skip to main content
10.1145/3613372.3613402acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

An empirical study of the relationship between refactorings and merge conflicts in Javascript code

Published: 25 September 2023 Publication History

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.

References

[1]
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.
[2]
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.
[3]
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.
[4]
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.
[5]
Aline Brito, Andre Hora, and Marco Tulio Valente. 2021. Characterizing refactoring graphs in Java and JavaScript projects. Empirical Software Engineering 26 (2021), 1–43.
[6]
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.
[7]
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.
[8]
Martin Fowler. 1997. Refactoring: Improving the design of existing code. In 11th European Conference. Jyväskylä, Finland.
[9]
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.
[10]
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.
[11]
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.
[12]
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.
[13]
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.
[14]
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.
[15]
Tom Mens. 2002. A state-of-the-art survey on software merging. IEEE transactions on software engineering 28, 5 (2002), 449–462.
[16]
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.
[17]
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).
[18]
William F Opdyke. 1992. Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign.
[19]
Achilleas Pipinellis. 2015. GitHub essentials. Vol. 2. Packt Publishing.
[20]
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.
[21]
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.
[22]
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.
[23]
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.

Index Terms

  1. An empirical study of the relationship between refactorings and merge conflicts in Javascript code

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    SBES '23: Proceedings of the XXXVII Brazilian Symposium on Software Engineering
    September 2023
    570 pages
    ISBN:9798400707872
    DOI:10.1145/3613372
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 25 September 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. github
    2. javascript
    3. merge conflicts
    4. refactoring

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    SBES 2023
    SBES 2023: XXXVII Brazilian Symposium on Software Engineering
    September 25 - 29, 2023
    Campo Grande, Brazil

    Acceptance Rates

    Overall Acceptance Rate 147 of 427 submissions, 34%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 32
      Total Downloads
    • Downloads (Last 12 months)12
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 03 Mar 2025

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media