1. Understanding semi-structured merge conflict characteristics in open-source Java projects
- Author
-
Paulo Borba, Guilherme Cavalcanti, and Paola Accioly
- Subjects
Copying ,Java ,Exploit ,Computer science ,020207 software engineering ,02 engineering and technology ,Collaborative software development ,Data science ,Syntax ,Open source ,Empirical research ,020204 information systems ,0202 electrical engineering, electronic engineering, information engineering ,Merge (version control) ,computer ,Software ,computer.programming_language - Abstract
Empirical studies show that merge conflicts frequently occur, impairing developers' productivity, since merging conflicting contributions might be a demanding and tedious task. However, the structure of changes that lead to conflicts has not been studied yet. Understanding the underlying structure of conflicts, and the involved syntactic language elements might shed light on how to better avoid merge conflicts. To this end, in this paper we derive a catalog of conflict patterns expressed in terms of the structure of code changes that lead to merge conflicts. We focus on conflicts reported by a semistructured merge tool that exploits knowledge about the underlying syntax of the artifacts. This way, we avoid analyzing a large number of spurious conflicts often reported by typical line based merge tools. To assess the occurrence of such patterns in different systems, we conduct an empirical study reproducing 70,047 merges from 123 GitHub Java projects. Our results show that most semistructured merge conflicts in our sample happen because developers independently edit the same or consecutive lines of the same method. However, the probability of creating a merge conflict is approximately the same when editing methods, class fields, and modifier lists. Furthermore, we noticed that most part of conflicting merge scenarios, and merge conflicts, involve more than two developers. Also, that copying and pasting pieces of code, or even entire files, across different repositories is a common practice and cause of conflicts. Finally, we discuss how our results reveal the need for new research studies and suggest potential improvements to tools supporting collaborative software development.
- Published
- 2017
- Full Text
- View/download PDF