Merge Nature: a tool to support research about merge conflicts
Resumo
The modern software development model requires concurrent programming to create more complex programs. As such, existing approaches are able to track and merge the changes made on a code repository, allowing more developers to work collaboratively. Despite these solutions, 10% to 20% of all merges result in conflicts, such as when changes are made on the same file region. Existing studies have analyzed, prevented, predicted, and even automatically resolved merge conflicts. However, they are usually focused on a specific language or on language-independent information from the source-code lines involved in the conflict. This situation hinders the generalization of results. To enrich the information to be used by further studies about merges, we present the Merge Nature Tool, which recreates all project merges and extracts characteristics from conflicts, such as the resolutions adopted by developers, and the language constructs involved in the conflict for Java, C++, and Python files. The tool was evaluated regarding reproducibility and generalization. It was able to reproduce 87.75% of the results of a previous study. The differences can be explained by newly introduced features. On the other hand, regarding generalization, the tool was used to analyze a set of 100 merges from Python projects. The merges were analyzed manually to ensure the reliability of the results. We found that 100% of the data matched the expected result. We expect this tool to facilitate future work regarding merge conflicts. For instance, it may allow comparing the characteristics of merge conflicts from different programming languages.
Referências
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, 1 (2020), 562-590.
Yuriy Brun, Reid Holmes, Michael D Ernst, and David Notkin. 2011. Proactive detection of collaboration conflicts. In Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering. 168-178.
Scott Chacon and Ben Straub. 2014. Pro git: Everything you need to know about Git (second ed.). Apress. https://git-scm.com/book/en/v2
Catarina Costa, Jair Figueirêdo, João Felipe Pimentel, Anita Sarma, and Leonardo Murta. 2019. Recommending participants for collaborative merge sessions. IEEE Transactions on Software Engineering 47, 6 (2019), 1198-1210.
Gleiph Ghiotto, Leonardo Murta, Marcio 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.
Mário Luís Guimarães and Antônio Rito Silva. 2012. Improving early detection of software merge conflicts. In 2012 34th International Conference on Software Engineering (ICSE). IEEE, 342-352.
Bakhtiar Khan Kasi and Anita Sarma. 2013. Cassandra: proactive conflict minimization through optimized task scheduling. In Proceedings of the 35th ICSE, David Notkin, Betty H. C. Cheng, and Klaus Pohl (Eds.). IEEE / ACM, 732-741.
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.
José William Menezes, Bruno Trindade, João Felipe Pimentel, Tayane Moura, Alexandre Plastino, Leonardo Murta, and Catarina Costa. 2020. What causes merge conflicts?. In Proceedings of the 34th Brazilian Symposium on Software Engineering. 203-212.
Tom Mens. 2002. Astate-of-the-art survey on software merging. IEEE Transactions on Software Engineering 28, 5 (2002), 449-462.
Moein Owhadi-Kareshk and Sarah Nadi. 2019. Scalable software merging studies with merganser. In 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR). IEEE, 560-564.
Bowen Shen, Cihan Xiao, Na Meng, and Fei He. 2021. Automatic detection and resolution of software merge conflicts: Are we there yet? arXiv preprint arXiv:2102.11307 (2021).