ABSTRACT
Maintenance activities are crucial to prolong the lifecycle of a software. An important activity during software maintenance is refactoring, which is a transformation that improves the quality of a program without changing its behavior. During software development, Version Control Systems (VCS) are used to integrate changes made by developers. These integration procedures, known as merge processes, may result in conflicts if changes are made in the same place in the code. This work aims to analyze the possible relationship between refactorings and merge conflicts in JavaScript code. We analyzed 50 JavaScript repositories, including 56,966 merge scenarios, which 4,816 of them have conflicts. We discovered a moderate positive correlation between the number of conflicts and the number of refactoring transformations within the conflicting file. Additionally, this correlation captured a specific JavaScript refactoring type, "Internal Move", that was most strongly associated with conflicting merge scenarios.
- Paola Accioly, Paulo Borba, and Guilherme Cavalcanti. 2018. Understanding semi-structured merge conflict characteristics in open-source java projects. Empirical Software Engineering 23 (2018), 2051–2085.Google ScholarDigital Library
- Iftekhar Ahmed, Caius Brindescu, Umme Ayda Mannan, Carlos Jensen, and Anita Sarma. 2017. An empirical examination of the relationship between code smells and merge conflicts. In 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). IEEE, 58–67.Google ScholarDigital Library
- Aryclenio Xavier Barros and Eiji Adachi. 2021. Bad Smells in Javascript-A Mapping Study. In Anais do IX Workshop de Visualização, Evolução e Manutenção de Software. SBC, 1–5.Google Scholar
- Caius Brindescu, Iftekhar Ahmed, Carlos Jensen, and Anita Sarma. 2020. An empirical investigation into merge conflicts and their effect on software quality. Empirical Software Engineering 25 (2020), 562–590.Google ScholarDigital Library
- Aline Brito, Andre Hora, and Marco Tulio Valente. 2021. Characterizing refactoring graphs in Java and JavaScript projects. Empirical Software Engineering 26 (2021), 1–43.Google ScholarDigital Library
- Valerio Cosentino, Javier L Cánovas Izquierdo, and Jordi Cabot. 2017. A systematic mapping study of software development with GitHub. IEEE Access 5 (2017), 7173–7192.Google ScholarCross Ref
- Rafael de Souza Santos and Leonardo Gresta Paulino Murta. 2012. Evaluating the branch merging effort in version control systems. In 2012 26th Brazilian Symposium on Software Engineering. IEEE, 151–160.Google ScholarDigital Library
- Martin Fowler. 1997. Refactoring: Improving the design of existing code. In 11th European Conference. Jyväskylä, Finland.Google Scholar
- Robert Fuhrer, Frank Tip, Adam Kieżun, Julian Dolby, and Markus Keller. 2005. Efficiently refactoring Java applications to use generic libraries. In ECOOP 2005-Object-Oriented Programming: 19th European Conference, Glasgow, UK, July 25-29, 2005. Proceedings 19. Springer, 71–96.Google ScholarDigital Library
- Alejandra Garrido and José Meseguer. 2006. Formal specification and verification of Java refactorings. In 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation. IEEE, 165–174.Google ScholarDigital Library
- Gleiph Ghiotto, Leonardo Murta, Márcio Barros, and Andre Van Der Hoek. 2018. On the nature of merge conflicts: a study of 2,731 open source java projects hosted by github. IEEE Transactions on Software Engineering 46, 8 (2018), 892–915.Google ScholarCross Ref
- David Johannes, Foutse Khomh, and Giuliano Antoniol. 2019. A large-scale empirical study of code smells in JavaScript projects. Software Quality Journal 27 (2019), 1271–1314.Google ScholarDigital Library
- Meir M Lehman, Juan F Ramil, Paul D Wernick, Dewayne E Perry, and Wladyslaw M Turski. 1997. Metrics and laws of software evolution-the nineties view. In Proceedings Fourth International Software Metrics Symposium. IEEE, 20–32.Google ScholarDigital Library
- Mehran Mahmoudi, Sarah Nadi, and Nikolaos Tsantalis. 2019. 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). IEEE, 151–162.Google ScholarCross Ref
- Tom Mens. 2002. A state-of-the-art survey on software merging. IEEE transactions on software engineering 28, 5 (2002), 449–462.Google ScholarDigital Library
- Michael Mohan and Des Greer. 2018. A survey of search-based refactoring for software maintenance. Journal of Software Engineering Research and Development 6, 1 (2018), 1–52.Google ScholarCross Ref
- Andre Oliveira, Vania Neves, Alexandre Plastino, Ana Carla Bibiano, Alessandro Garcia, and Leonardo Murta. 2023. Do code refactorings influence the merge effort?arXiv preprint arXiv:2305.06129 (2023).Google Scholar
- William F Opdyke. 1992. Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign.Google ScholarDigital Library
- Achilleas Pipinellis. 2015. GitHub essentials. Vol. 2. Packt Publishing.Google Scholar
- Max Schäfer and Oege De Moor. 2010. Specifying and implementing refactorings. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications. 286–301.Google ScholarDigital Library
- Danilo Silva, Joao Paulo da Silva, Gustavo Santos, Ricardo Terra, and Marco Tulio Valente. 2020. Refdiff 2.0: A multi-language refactoring detection tool. IEEE Transactions on Software Engineering 47, 12 (2020), 2786–2802.Google ScholarCross Ref
- Alberto Trindade Tavares, Paulo Borba, Guilherme Cavalcanti, and Sérgio Soares. 2019. Semistructured merge in JavaScript systems. In 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 1014–1025.Google ScholarDigital Library
- Gustavo Vale, Angelika Schmid, Alcemir Rodrigues Santos, Eduardo Santana De Almeida, and Sven Apel. 2020. On the relation between Github communication activity and merge conflicts. Empirical Software Engineering 25 (2020), 402–433.Google ScholarDigital Library
Index Terms
- An empirical study of the relationship between refactorings and merge conflicts in Javascript code
Recommendations
An empirical investigation into merge conflicts and their effect on software quality
AbstractMerge conflicts are known to cause extra effort for developers, but little is known about their effect on software. While some research has been done, many questions remain. To better understand merge conflicts and their impact we performed an ...
An empirical examination of the relationship between code smells and merge conflicts
ESEM '17: Proceedings of the 11th ACM/IEEE International Symposium on Empirical Software Engineering and MeasurementBackground: Merge conflicts are a common occurrence in software development. Researchers have shown the negative impact of conflicts on the resulting code quality and the development workflow. Thus far, no one has investigated the effect of bad design (...
Do Code Refactorings Influence the Merge Effort?
ICSE '23: Proceedings of the 45th International Conference on Software EngineeringIn 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 ...
Comments