Understanding and Analyzing Factors that Affect Merge Conflicts from the Perspective of Software Developers

Authors

DOI:

https://doi.org/10.5753/jserd.2022.2576

Keywords:

Version Control, Merge Conflicts, Survey Research, Field Study, Software Developers

Abstract

Merge conflicts are very common in collaborative software development, which is supported mainly by the use of branches that can be potentially merged. In this context, several studies have proposed mechanisms to avoid conflicts whenever possible and some identified factors that lead to conflicts. In this article, we report on an investigation of factors that can lead to conflicts or that can somehow reduce the chances of conflict from the developers’ perspective. To do so, based on related work, we conducted two empirical studies with Brazilian software developers to both understand and analyze factors that affect merge conflicts. Firstly, we conducted survey research with 109 software developers to understand how they use branches, the occurrence of conflicts and the resolution process, and factors that can lead to or avoid conflicts. Results showed that the use of branches is very common and mostly has the purpose of creating a new feature or fixing a bug. According to the participants, in most projects, developers have the autonomy to create new branches and sometimes conflicts happen. The main factors that can lead to conflicts are “the time a branch is isolated” and “lack of communication”. On the other hand, the factors cited as good practices to avoid conflicts were “improve team communication” and “less branching duration”. Secondly, we conducted a field study based on interviews with 15 software developers to analyze those factors to understand better what leads to or avoids conflicts in a merge. Finally, this work allowed us to conclude that communication with the team, checking code updates, shorter branch duration, and management are important for software developers, especially when they think about what increases and decreases merge conflicts.

Downloads

Download data is not yet available.

References

Accioly, P., Borba, P., and Cavalcanti, G. (2018). Understanding semi-structured merge conflict characteristics in open-source Java projects. Empirical Software Engineering, 23:2051–2085.

Bird, C., Zimmermann, T., and Teterev, A. (2011). A theory of branches as goals and virtual teams. In Proceedings of the 4th International Workshop on Cooperative and Human Aspects of Software Engineering, pages 53–56.

Brindescu, C., Ahmed, I., Jensen, C., and Sarma, A. (2020a). An empirical investigation into merge conflicts and their effect on software quality. Empirical Software Engineering, 25:562–590.

Brindescu, C., Ahmed, I., Leano, R., and Sarma, A. (2020b). Planning for untangling: Predicting the difficulty of merge conflicts. In 42nd International Conference on Software Engineering (ICSE), pages 801–811.

Brun, Y., Holmes, R., Ernst, M. D., and Notkin, D. (2011). Proactive detection of collaboration conflicts. In 19th ACM Special Interest Group on Software Engineering Symposium and the 13th European Conference on Foundations of Software Engineering (SIGSOFT), pages 168–178.

Cavalcanti, G., Accioly, P., and Borba, P. (2015). Assessing semistructured merge in version control systems: A replicated experiment. In 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pages 1–10. IEEE.

Condina, V., Malcher, P., Farias, V., Santos, R., Fontão, A., Wiese, I., and Viana, D. (2020). An exploratory study on developers opinions about influence in open source software ecosystems. In Proceedings of the 34th Brazilian Symposium on Software Engineering, pages 137–146.

Costa, C., Figueiredo, J. J., Ghiotto, G., and Murta, L. (2014). Characterizing the problem of developers’ assignment for merging branches. International Journal of Software Engineering and Knowledge Engineering, 24:1489–1508.

Costa, C., Figueiredo, J. J., Pimentel, J. F., Sarma, A., and Murta, L. G. P. (2019). Recommending participants for collaborative merge sessions. IEEE Transactions on Software Engineering.

Costa, C., Menezes, J., Trindade, B., and Santos, R. (2021). Factors that affect merge conflicts: A software developers’ perspective. In Brazilian Symposium on Software Engineering, pages 233–242.

de Farias Junior, I., Marczak, S., dos Santos, R. P., Rodrigues, C., and Moura, H. (2022). C2m: A maturity model for the evaluation of communication in distributed software development. Empirical Software Engineering.

Dias, K., Borba, P., and Barreto, M. (2020). Understanding predictive factors for merge conflicts. Information and Software Technology, 121:106256.

Estler, H. C., Nordio, M., Furia, C. A., and Meyer, B. (2013). Unifying configuration management with merge conflict detection and awareness systems. In 22nd Australian Software Engineering Conference (ASWEC), pages 201–210.

Ghiotto, G., Murta, L., Barros, M., and Hoek, A. V. D. (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:892–915.

Greiler, M., Storey, M.-A., and Noda, A. (2022). An actionable framework for understanding and improving developer experience. IEEE Transactions on Software Engineering.

Guest, G., Bunce, A., and Johnson, L. (2006). How many interviews are enough? Field Methods, 18:59–82.

Guimarães, M. L. and Silva, A. R. (2012). Improving early detection of software merge conflicts. In 34th International Conference on Software Engineering (ICSE), pages 342–352.

Kamei, F., Wiese, I., Pinto, G., Ribeiro, M., and Soares, S. (2020). On the use of grey literature: A survey with the brazilian software engineering research community. In Proceedings of the 34th Brazilian Symposium on Software Engineering, pages 183–192.

Kasi, B. K. and Sarma, A. (2013). Cassandra: Proactive conflict minimization through optimized task scheduling. In 35th International Conference on Software Engineering (ICSE), pages 732–741.

Leßenich, O., Siegmund, J., Apel, S., Kästner, C., and Hunsen, C. (2018). Indicators for merge conflicts in the wild: survey and empirical study. Automated Software Engineering, 25:279–313.

McKee, S., Nelson, N., Sarma, A., and Dig, D. (2017). Software practitioner perspectives on merge conflicts and resolutions. In 33rd IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 467–478.

Menezes, J. W., Trindade, B., Pimentel, J. F., Moura, T., Plastino, A., Murta, L., and Costa, C. (2020). What causes merge conflicts? In 34th Brazilian Symposium on Software Engineering (SBES), pages 203–212.

Menezes, J. W., Trindade, B., Pimentel, J. F., Plastino, A., Murta, L., and Costa, C. (2021). Attributes that may raise the occurrence of merge conflicts. Journal of Software Engineering, 9:14.

Owhadi-Kareshk, M., Nadi, S., and Rubin, J. (2019). Predicting merge conflicts in collaborative software development. In 13th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pages 1–11.

Pan, R., Le, V., Nagappan, N., Gulwani, S., Lahiri, S., and Kaufman, M. (2021). Can program synthesis be used to learn merge conflict resolutions? an empirical analysis. In 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), pages 785–796. IEEE.

Pfleeger, S. L. and Kitchenham, B. A. (2001). Principles of survey research: part 1: turning lemons into lemonade. ACM SIGSOFT Software Engineering Notes, 26:16–18.

Premraj, R., Tang, A., Linssen, N., Geraats, H., and van Vliet, H. (2011). To branch or not to branch? In Proceedings of the 2011 International Conference on Software and Systems Process, pages 81–90.

Sarma, A., Redmiles, D., and Van Der Hoek, A. (2008). Empirical evidence of the benefits of workspace awareness in software configuration management. In Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of software engineering, pages 113–123.

Sarma, A., Redmiles, D. F., and Hoek, A. V. D. (2011). Palantir: Early detection of development conflicts arising from parallel code changes. IEEE Transactions on Software Engineering, 38:889–908.

Shihab, E., Bird, C., and Zimmermann, T. (2012). The effect of branching strategies on software quality. In 12th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pages 301–310.

Singer, J., Sim, S. E., and Lethbridge, T. C. (2008). Software Engineering Data Collection for Field Studies, pages 9–34. Springer London, London.

Smith, E., Loftin, R., Murphy-Hill, E., Bird, C., and Zimmermann, T. (2013). Improving developer participation rates in surveys. In 2013 6th International Workshop on Cooperative and Human Aspects of Software Engineering (CHASE), pages 89–92.

Spencer, D. (2009). Card sorting: Designing usable categories. Rosenfeld Media.

Steglich, C., Marczak, S., De Souza, C. R., Guerra, L. P., Mosmann, L. H., Figueira Filho, F., and Perin, M. (2019). Social aspects and how they influence mseco developers. In 2019 IEEE/ACM 12th International Workshop on Cooperative and Human Aspects of Software Engineering (CHASE), pages 99–106.

Vale, G., Hunsen, C., Figueiredo, E., and Apel, S. (2021). Challenges of resolving merge conflicts: A mining and survey study. IEEE Transactions on Software Engineering.

Vale, G., Schmid, A., Santos, A. R., Almeida, E. S. D., and Apel, S. (2020). On the relation between GitHub communication activity and merge conflicts. Empirical Software Engineering, 25:402–433.

Zimmermann, T. (2016). Card-sorting: From text to themes. In Perspectives on data science for software engineering, pages 137–141. Elsevier.

Zou, W., Zhang, W., Xia, X., Holmes, R., and Chen, Z. (2019). Branch use in practice: A large-scale empirical study of 2,923 projects on github. In 2019 IEEE 19th International Conference on Software Quality, Reliability and Security (QRS), pages 306–317. IEEE.

Downloads

Published

2022-10-20

How to Cite

Ribeiro, B. B., Costa, C., & Pereira dos Santos, R. (2022). Understanding and Analyzing Factors that Affect Merge Conflicts from the Perspective of Software Developers. Journal of Software Engineering Research and Development, 10, 12:1 – 12:17. https://doi.org/10.5753/jserd.2022.2576

Issue

Section

Research Article

Most read articles by the same author(s)