Conclusion
We propose test oracles for real-world program merges including two-way, three-way, and octopus merges. On this basis, we implemented a tool called TOM to automatically generate test cases to reveal merge conflicts. In addition, we designed the benchmark MCon4J to support further studies on merges. In our experiments, a total of 45 conflict three-way merges and 87 conflict octopus merges were detected using TOM, while the verification-based tool SafeMerge failed to work on MCon4J.
References
Mens T. A state-of-the-art survey on software merging. IEEE Trans Software Eng, 2002, 28: 449–462
Mckee S, Nelson N, Sarma A, et al. Software practitioner perspectives on merge conflicts and resolutions. In: Proceedings of IEEE International Conference on Software Maintenance and Evolution (ICSME), 2017. 467–478
Sousa M, Dillig I, Lahiri S K. Verified three-way program merge. In: Proceedings of the ACM on Programming Languages, 2018. 2: 165
Fraser G, Arcuri A. Evosuite: automatic test suite generation for object-oriented software. In: Proceedings of the ACM SIGSOFT Symposium and the European Conference on Foundations of Software Engineering (FSE), 2011. 416–419
Just R. The Major mutation framework: efficient and scalable mutation analysis for Java. In: Proceedings of the International Symposium on Software Testing and Analysis (ISSTA), San Jose, 2014. 433–436
Just R, Jalali D, Ernst M D. Defects4j: a database of existing faults to enable controlled testing studies for java programs. In: Proceedings of the International Symposium on Software Testing and Analysis (ISSTA), 2014. 437–440
Acknowledgements
This work was supported by National Key R&D Program of China (Grant No. 2017YFB1001802) and National Natural Science Foundation of China (Grant Nos. 61672529, 61872445).
Author information
Authors and Affiliations
Corresponding authors
Additional information
Supporting information
Appendixes A—E. The supporting information is available online at info.scichina.com and link.springer.com. The supporting materials are published as submitted, without typesetting or editing. The responsibility for scientific accuracy and content remains entirely with the authors.
Electronic supplementary material
Rights and permissions
About this article
Cite this article
Ji, T., Chen, L., Mao, X. et al. Automated regression unit test generation for program merges. Sci. China Inf. Sci. 65, 199103 (2022). https://doi.org/10.1007/s11432-019-3020-4
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11432-019-3020-4