Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1109/ICSE48619.2023.00023acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Do Code Refactorings Influence the Merge Effort?

Published: 26 July 2023 Publication History

Abstract

In collaborative software development, multiple contributors frequently change the source code in parallel to implement new features, fix bugs, refactor existing code, and make other changes. These simultaneous changes need to be merged into the same version of the source code. However, the merge operation can fail, and developer intervention is required to resolve the conflicts. Studies in the literature show that 10 to 20 percent of all merge attempts result in conflicts, which require the manual developer's intervention to complete the process. In this paper, we concern about a specific type of change that affects the structure of the source code and has the potential to increase the merge effort: code refactorings. We analyze the relationship between the occurrence of refactorings and the merge effort. To do so, we applied a data mining technique called association rule extraction to find patterns of behavior that allow us to analyze the influence of refactorings on the merge effort. Our experiments extracted association rules from 40,248 merge commits that occurred in 28 popular open-source projects. The results indicate that: (i) the occurrence of refactorings increases the chances of having merge effort; (ii) the more refactorings, the greater the chances of effort; (iii) the more refactorings, the greater the effort; and (iv) parallel refactorings increase even more the chances of having effort, as well as the intensity of it. The results obtained may suggest behavioral changes in the way refactorings are implemented by developer teams. In addition, they can indicate possible ways to improve tools that support code merging and those that recommend refactorings, considering the number of refactorings and merge effort attributes.

References

[1]
Y. Brun, R. Holmes, M. D. Ernst, and D. Notkin, "Proactive detection of collaboration conflicts," in Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, ser. Proc. 19th ACM SIGSOFT Symp.and the 13th European Conf. on Foundations of Software Engineering (ESEC/FSE). New York, NY, USA: Association for Computing Machinery, 2011, p. 168--178. [Online].
[2]
B. K. Kasi and A. Sarma, "Cassandra: Proactive conflict minimization through optimized task scheduling," in Proceedings of the 2013 International Conference on Software Engineering, ser. Proc. International Conference on Software Engineering (ICSE). IEEE Press, 2013, p. 732--741.
[3]
T. Zimmermann, "Mining workspace updates in cvs," in Proceedings of the Fourth International Workshop on Mining Software Repositories, ser. Proc. 4th International Workshop on Mining Software Repositories (MSR). USA: IEEE Computer Society, 2007, p. 11. [Online].
[4]
T. Mens, "A state-of-the-art survey on software merging," IEEE Transactions on Software Engineering, vol. 28, no. 5, pp. 449--462, 2002.
[5]
S. Apel, J. Liebig, B. Brandl, C. Lengauer, and C. Kästner, "Semistructured merge: Rethinking merge in revision control systems," in Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, ser. Proc. 19th ACM SIGSOFT Symp.and the 13th European Conf. on Foundations of Software Engineering. New York, NY, USA: Association for Computing Machinery, 2011, p. 190--200. [Online].
[6]
T. Apiwattanapong, A. Orso, and M. J. Harrold, "Jdiff: A differencing technique and tool for object-oriented programs," Automated Software Eng., vol. 14, no. 1, p. 3--36, mar 2007. [Online].
[7]
D. Binkley, S. Horwitz, and T. Reps, "Program integration for languages with procedure calls," ACM Trans. Softw. Eng. Methodol., vol. 4, no. 1, p. 3--35, jan 1995. [Online].
[8]
J. Buffenbarger, Syntactic software merging, J. Estublier, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 1995.
[9]
J. Hunt and W. Tichy, "Extensible language-aware merging," in International Conference on Software Maintenance, 2002. Proceedings., ser. International Conference on Software Maintenance, 2002, pp. 511--520.
[10]
H. Shen and C. Sun, "A complete textual merging algorithm for software configuration management systems," in Proceedings of the 28th Annual International Computer Software and Applications Conference, 2004. COMPSAC 2004., ser. Proceedings of the 28th Annual International Computer Software and Applications Conference (COMPSAC), 2004, pp. 293--298 vol.1.
[11]
H. Shen and C. Sun, "Syntax-based reconciliation for asynchronous collaborative writing," in 2005 International Conference on Collaborative Computing: Networking, Applications and Worksharing, ser. International Conference on Collaborative Computing: Networking, Applications and Worksharing, 2005, pp. 10 pp.-.
[12]
B. Westfechtel, "Structure-oriented merging of revisions of software documents," in Proceedings of the 3rd International Workshop on Software Configuration Management, ser. Proc. 3rd International Workshop on Software Configuration Management (SCM). New York, NY, USA: Association for Computing Machinery, 1991, p. 68--79. [Online].
[13]
V. Berzins, "Software merge: Semantics of combining changes to programs," Journal ACM Transactions on Programming Languages and Systems, vol. 16, no. 6, p. 1875--1903, nov 1994. [Online].
[14]
Jackson and Ladd, "Semantic diff: a tool for summarizing the effects of modifications," in Proceedings 1994 International Conference on Software Maintenance, ser. Proc. International Conference on Software Maintenance, 1994, pp. 243--252.
[15]
O. LeBenich, S. Apel, and C. Lengauer, "Balancing precision and performance in structured merge," Automated Software Eng., vol. 22, no. 3, p. 367--397, sep 2015. [Online].
[16]
S. Apel, O. LeBenich, and C. Lengauer, "Structured merge with auto-tuning: balancing precision and performance," in 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, ser. Proc.27th IEEE/ACM International Conference on Automated Software Engineering, 2012, pp. 120--129.
[17]
M. Kim, T. Zimmermann, and N. Nagappan, "A field study of refactoring challenges and benefits," in Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering (FSE '12). New York, NY, USA: Association for Computing Machinery, 2012. [Online]. Available: https://doi-org.ez24.periodicos.capes.gov.br/10.1145/2393596.2393655
[18]
M. Fowler, Refactoring: Improving the Design of Existing Code, 2nd ed. Addison-Wesley Professional, Nov. 2018.
[19]
D. Dig, K. Manzoor, R. Johnson, and T. N. Nguyen, "Refactoring-aware configuration management for object-oriented programs," in 29th International Conference on Software Engineering (ICSE'07), ser. International Conference on Software Engineering (ICSE'07), 2007, pp. 427--436.
[20]
O. LeBenich, S. Apel, C. Kästner, G. Seibt, and J. Siegmund, "Renaming and shifted code in structured merging: Looking ahead for precision and performance," in 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE), ser. 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE), 2017, pp. 543--553.
[21]
M. Mahmoudi and S. Nadi, "The android update problem: An empirical study," in Proceedings of the 15th International Conference on Mining Software Repositories, ser. Proc. 15th International Conference on Mining Software Repositories (MSR). New York, NY, USA: Association for Computing Machinery, 2018, p. 220--230. [Online].
[22]
A. László, L. Lengyel, and H. Charaf, "Detecting renamings in three-way merging," Acta Polytechnica Hungarica, vol. vol. 4, no. 4, 12 2007.
[23]
M. Mahmoudi, S. Nadi, and N. Tsantalis, "Are refactorings to blame? an empirical study of refactorings in merge conflicts," in 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), ser. IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), 2019, pp. 151--162.
[24]
D. I. Sjøberg, A. Yamashita, B. C. Anda, A. Mockus, and T. Dybå, "Quantifying the effect of code smells on maintenance effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144--1156, 2013.
[25]
S. McKee, N. Nelson, A. Sarma, and D. Dig, "Software practitioner perspectives on merge conflicts and resolutions," in 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME), 2017, pp. 467--478.
[26]
C. Brindescu, "How do developers resolve merge conflicts? an investigation into the processes, tools, and improvements," in Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ser. ESEC/FSE 2018. New York, NY, USA: Association for Computing Machinery, 2018, p. 952--955. [Online].
[27]
E. Kalliamvakou, G. Gousios, K. Blincoe, L. Singer, D. M. German, and D. Damian, "The promises and perils of mining github." in Proceedings of the 11th Working Conference on Mining Software Repositories, ser. Proc.11th Working Conference on Mining Software Repositories (MSR). Hyderabad, India: ACM, 2014, pp. 92--101.
[28]
H. Borges and M. T. Valente, "What's in a github star? understanding repository starring practices in a social coding platform." Journal of Systems and Software, vol. 146, pp. 112--129, 2018.
[29]
TIOBE, "Tiobe index for august 2022," https://www.tiobe.com/tiobe-index/, 2022, (accessed: 07.11.2022).
[30]
StackOverflow, "Developer survey results," https://insights.stackoverflow.com/survey/2021/, 2021, (accessed: 07.11.2022).
[31]
N. Tsantalis, A. Ketkar, and D. Dig, "Refactoringminer 2.0," IEEE Transactions on Software Engineering, pp. 1--1, 2020.
[32]
N. Tsantalis, M. Mansouri, L. M. Eshkevari, D. Mazinanian, and D. Dig, "Accurate and efficient refactoring detection in commit history," in Proceedings of the 40th International Conference on Software Engineering, ser. Proc. IEEE/ACM 40th International Conference on Software Engineering (ICSE). New York, NY, USA: ACM, 2018, pp. 483--494. [Online].
[33]
V. Barnett and T. Lewis, Outliers in Statistical Data, 3rd ed. JSTOR, 1994.
[34]
A. C. Bibiano, W. K. G. Assunção, D. Coutinho, K. Santos, V. Soares, R. Gheyi, A. Garcia, B. Fonseca, M. Ribeiro, D. Oliveira, C. Barbosa, J. L. Marques, and A. Oliveira, "Look ahead! revealing complete composite refactorings and their smelliness effects," in 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME), ser. IEEE International Conference on Software Maintenance and Evolution (ICSME), 2021, pp. 298--308.
[35]
Prudêncio, M. João-Gustavo, W. Leonardo, C. Cláudia, and Rafael, "To lock, or not to lock: That is the question." Journal of Systems and Software, vol. 85(2), pp. 277--289, 02 2012. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S0164121211001063
[36]
Moura, M. Tayane, and Leonardo, "Uma técnica para a quantificação do esforço de merge." in In Proceedings of the 6th Workshop on Software Visualization, Evolution and Maintenance, ser. Proc. 6th Workshop on Software Visualization, Evolution and Maintenance. São Carlos, SP, Brasil, 2018, 2018.
[37]
Knuth and Donald-E, The Art of Computer Programming, 3rd ed. USA: Addison-Wesley Longman Publishing Co., 1997, vol. 2.
[38]
D. Silva, N. Tsantalis, and M.-T. Valente, "Why we refactor? confessions of github contributors." in In Proceedings of the 2016 24th ACM SIGSOFT - International Symposium on Foundations of Software Engineering - FSE. ACM Press, New York, New York, USA, 2015, pp. 858--870.
[39]
Tsantalis, G. Nikolaos, S. Victor, H. Eleni, and Abram, "A multidimensional empirical study on refactoring activity." In 23rd CASCON. IBM Corp., pp. 132--146, 2013.
[40]
J. Han, M. Kamber, and J. Pei, Data Mining: Concepts and Techniques: Concepts and Techniques, 3rd ed. Elsevier, Jun. 2011.
[41]
I. H. Witten, E. Frank, and M. A. Hall, Data Mining: Practical Machine Learning Tools and Techniques, 3rd ed. Elsevier, Feb. 2016.
[42]
R. Agrawal and R. Srikant, "Fast Algorithms for Mining Association Rules in Large Databases," in Proceedings of the 20th International Conference on Very Large Data Bases, ser. Proc. 20th International Conference on Very Large Data Bases (VLDB). San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 1994, pp. 487--499. [Online]. Available: http://dl.acm.org/citation.cfm?id=645920.672836
[43]
P. Hammant, "What is trunk-based development?" https://paulhammant.com/2013/04/05/what-is-trunk-based-development/, 2013, (accessed: 07.11.2022).
[44]
R. Mahdavi-Hezaveh, J. Dremann, and L. A. Williams, "Feature toggle driven development: Practices usedby practitioners," CoRR, vol. abs/1907.06157, 2019. [Online]. Available: http://arxiv.org/abs/1907.06157
[45]
E. S. Prutchi, H. de S. Campos Junior, and L. G. P. Murta, "How the adoption of feature toggles correlates with branch merges and defects in open-source projects?" Software: Practice and Experience, vol. 52, no. 2, pp. 506--536, 2022. [Online].
[46]
R. Morales, A. Sabane, P. Musavi, F. Khomh, F. Chicano, and G. Antoniol, "Finding the best compromise between design quality and testing effort during refactoring," in 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), vol. 1, 2016, pp. 24--35.
[47]
A. Ouni, M. Kessentini, H. Sahraoui, K. Inoue, and K. Deb, "Multicriteria code refactoring using search-based software engineering: An industrial case study," ACM Trans. Softw. Eng. Methodol., vol. 25, no. 3, jun 2016. [Online].
[48]
W. K. G. Assunção, T. E. Colanzi, L. Carvalho, J. A. Pereira, A. Garcia, M. J. de Lima, and C. Lucena, "A multi-criteria strategy for redesigning legacy features as microservices: An industrial case study," in 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), 2021, pp. 377--387.
[49]
E. Murphy-Hill, C. Parnin, and A. P. Black, "How we refactor, and how we know it," IEEE Transactions on Software Engineering, vol. 38, no. 1, pp. 5--18, 2012.
[50]
T. Olsson, M. Ericsson, and A. Wingkvist, "Poster: Using repository data for driving software architecture," in 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion), 2018, pp. 197--198.
[51]
F. Coelho, N. Tsantalis, T. Massoni, and E. L. G. Alves, "An empirical study on refactoring-inducing pull requests," in Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), ser. ESEM '21. New York, NY, USA: Association for Computing Machinery, 2021. [Online].

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '23: Proceedings of the 45th International Conference on Software Engineering
May 2023
2713 pages
ISBN:9781665457019
  • General Chair:
  • John Grundy,
  • Program Co-chairs:
  • Lori Pollock,
  • Massimiliano Di Penta

Sponsors

In-Cooperation

  • IEEE CS

Publisher

IEEE Press

Publication History

Published: 26 July 2023

Check for updates

Author Tags

  1. software merge
  2. merge effort
  3. refactoring
  4. association rules
  5. data mining

Qualifiers

  • Research-article

Conference

ICSE '23
Sponsor:
ICSE '23: 45th International Conference on Software Engineering
May 14 - 20, 2023
Victoria, Melbourne, Australia

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 32
    Total Downloads
  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)1
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media