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 2023Publication 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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Martin Fowler. 1997. Refactoring: Improving the design of existing code. In 11th European Conference. Jyväskylä, Finland.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  15. Tom Mens. 2002. A state-of-the-art survey on software merging. IEEE transactions on software engineering 28, 5 (2002), 449–462.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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).Google ScholarGoogle Scholar
  18. William F Opdyke. 1992. Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Achilleas Pipinellis. 2015. GitHub essentials. Vol. 2. Packt Publishing.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • 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

      Copyright © 2023 ACM

      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 about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      Overall Acceptance Rate147of427submissions,34%
    • Article Metrics

      • Downloads (Last 12 months)23
      • Downloads (Last 6 weeks)3

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format