Explorando a detecção de conflitos semânticos nas integrações de código em múltiplos métodos
Resumo
Durante o desenvolvimento de software, integrar mudanças dos diferentes desenvolvedores é crucial. No entanto, essa ação pode resultar em uma versão do sistema que não preserva os comportamentos individuais pretendidos por eles, causando o que chamamos de conflitos de merge semânticos. As ferramentas atuais para detectar esses conflitos são limitadas a cenários mais simples, onde contribuições conflitantes ocorrem dentro do mesmo método. Para superar essa limitação, este artigo adapta e avalia uma ferramenta que detecta conflitos, considerando a interferência causada por mudanças feitas em diferentes métodos e classes. Para alcançar isso, a ferramenta explora a criação de testes utilizando ferramentas de geração de testes. Para avaliar a eficácia da ferramenta proposta, foi realizado um estudo empírico com uma amostra de 613 cenários sintéticos de merge criados com conflitos, representando uma amostra seis vezes maior em comparação com estudos anteriores. Como resultado, foi possível observar a detecção de 230 conflitos pela ferramenta, demonstrando seu potencial para detectar conflitos ao explorar múltiplas mudanças e apoiar ferramentas existentes. Além disso, os resultados reforçam para a importância em explorar diferentes ferramentas de geração de testes em conjunto.
Referências
Apêndice Online. 2024. Disponível em: [link].
Apêndice Online. 2024. Disponível em: [link].
Apêndice Online. 2024. Disponível em: [link].
Christian Bird and Thomas Zimmermann. 2012. Assessing the value of branches with what-if analysis. In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering. 1–11.
Yuriy Brun, Reid Holmes, Michael D. Ernst, and David Notkin. 2011. Crystal: precise and unobtrusive conflict warnings. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (Szeged, Hungary) (ESEC/FSE ’11). Association for Computing Machinery, New York, NY, USA, 444–447. DOI: 10.1145/2025113.2025187
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.
Nuno Guilherme Nunes Castanho. 2021. Semantic Conflicts in Version Control Systems. Ph.D. Dissertation.
Guilherme Cavalcanti, Paulo Borba, and Paola Accioly. 2017. Evaluating and Improving Semistructured Merge. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’17). 59:1–59:27.
Guilherme Cavalcanti, Paulo Borba, and Paola Accioly. 2017. Should We Replace Our Merge Tools?. In 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C). 325–327. DOI: 10.1109/ICSE-C.2017.103
Guilherme Cavalcanti, Paulo Borba, Georg Seibt, and Sven Apel. 2019. The Impact of Structure on Software Merging: Semistructured versus Structured Merge. In 34th IEEE/ACM International Conference on Automated Software Engineering (ASE 2019). 1002–1013.
Jônatas Clementino, Paulo Borba, and Guilherme Cavalcanti. 2021. Textual merge based on language-specific syntactic separators. In 35th Brazilian Symposium on Software Engineering (SBES 2021). 243–252.
Leuson Da Silva, Paulo Borba, Wardah Mahmood, Thorsten Berger, and João Moisakis. 2020. Detecting semantic conflicts via automated behavior change detection. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 174–184.
Léuson Da Silva, Paulo Borba, and Arthur Pires. 2022. Build conflicts in the wild. Journal of Software: Evolution and Process 34, 4 (2022), e2441.
Sebastian Elbaum, Hui Nee Chin, Matthew B Dwyer, and Jonathan Dokulil. 2006. Carving differential unit test cases from system test cases. In Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering. 253–264.
Gordon Fraser and Andrea Arcuri. 2014. A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuite. ACM Trans. Softw. Eng. Methodol. 24, 2, Article 8 (dec 2014), 42 pages. DOI: 10.1145/2685612
Tao Ji, Liqian Chen, Xiaoguang Mao, Xin Yi, and Jiahong Jiang. 2022. Automated regression unit test generation for program merges. Science China Information Sciences 65, 9 (2022), 199103.
Brittany Johnson, Yuriy Brun, and Alexandra Meliou. 2020. Causal testing: understanding defects’ root causes. In Proceedings of the ACM/IEEE 42nd international conference on software engineering. 87–99.
René Just. 2014. The Major mutation framework: Efficient and scalable mutation analysis for Java. In Proceedings of the 2014 international symposium on software testing and analysis. 433–436.
René Just, Darioush Jalali, and Michael D. Ernst. 2014. Defects4J: a database of existing faults to enable controlled testing studies for Java programs. In Proceedings of the 2014 International Symposium on Software Testing and Analysis (San Jose, CA, USA) (ISSTA 2014). Association for Computing Machinery, New York, NY, USA, 437–440. DOI: 10.1145/2610384.2628055
Bakhtiar Khan Kasi and Anita Sarma. 2013. Cassandra: Proactive conflict minimization through optimized task scheduling. In 2013 35th International Conference on Software Engineering (ICSE). IEEE, 732–741.
Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce. 2023. A Formal Investigation of Diff3. In FSTTCS 2007: Foundations of Software Technology and Theoretical Computer Science: 27th International Conference, New Delhi, India, December 12-14, 2007. Proceedings (New Delhi, India). Springer-Verlag, Berlin, Heidelberg, 485–496. DOI: 10.1007/978-3-540-77050-3_40
Shane McKee, Nicholas Nelson, Anita Sarma, and Danny Dig. 2017. Software practitioner perspectives on merge conflicts and resolutions. In 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 467–478.
Hung Viet Nguyen, Christian Kästner, and Tien N Nguyen. 2014. Exploring variability-aware execution for testing plugin-based web applications. In International Conference on Software Engineering. IEEE.
Hung Viet Nguyen, My Huu Nguyen, Son Cuu Dang, Christian Kästner, and Tien N Nguyen. 2015. Detecting semantic merge conflicts with variability-aware execution. In Symposium on the Foundations of Software Engineering. ACM.
Carlos Pacheco, Shuvendu K. Lahiri, Michael D. Ernst, and Thomas Ball. 2007. Feedback-Directed Random Test Generation. In 29th International Conference on Software Engineering (ICSE’07). 75–84. DOI: 10.1109/ICSE.2007.37
Anita Sarma, David F. Redmiles, and André van der Hoek. 2012. Palantir: Early Detection of Development Conflicts Arising from Parallel Code Changes. IEEE Transactions on Software Engineering 38, 4 (2012), 889–908.
Georg Seibt, Florian Heck, Guilherme Cavalcanti, Paulo Borba, and Sven Apel. 2021. Leveraging Structure in Software Merge: An Empirical Study. IEEE Transactions on Software Engineering (2021), 1–1.
Léuson Silva, Paulo Borba, Toni Maciel, Wardah Mahmood, Thorsten Berger, João Moisakis, Aldiberg Gomes, and Vinícius Leite. 2024. Detecting semantic conflicts with unit tests. Journal of Systems and Software (2024), ?–?
Marcelo Sousa, Isil Dillig, and Shuvendu K Lahiri. 2018. Verified three-way program merge. ACM Transactions on Programming Languages and Systems 2, OOPSLA (2018), 1–29.
Thorsten Wuensche, Artur Andrzejak, and Sascha Schwedes. 2020. Detecting Higher-Order Merge Conflicts in Large Software Projects. In International Conference on Software Testing, Validation and Verification. IEEE.
Chunqiu Steven Xia, Yuxiang Wei, and Lingming Zhang. 2023. Automated program repair in the era of large pre-trained language models. In 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). IEEE, 1482–1494.