TY - GEN
T1 - Are Refactorings to Blame? An Empirical Study of Refactorings in Merge Conflicts
AU - Mahmoudi, Mehran
AU - Nadi, Sarah
AU - Tsantalis, Nikolaos
N1 - Publisher Copyright:
© 2019 IEEE.
PY - 2019/3/15
Y1 - 2019/3/15
N2 - With the rise of distributed software development, branching has become a popular approach that facilitates collaboration between software developers. One of the biggest challenges that developers face when using multiple development branches is dealing with merge conflicts. Conflicts occur when inconsistent changes happen to the code. Resolving these conflicts can be a cumbersome task as it requires prior knowledge about the changes in each of the development branches. A type of change that could potentially lead to complex conflicts is code refactoring. Previous studies have proposed techniques for facilitating conflict resolution in the presence of refactorings. However, the magnitude of the impact that refactorings have on merge conflicts has never been empirically evaluated. In this paper, we perform an empirical study on almost 3,000 well-engineered open-source Java software repositories and investigate the relation between merge conflicts and 15 popular refactoring types. Our results show that refactoring operations are involved in 22% of merge conflicts, which is remarkable taking into account that we investigated a relatively small subset of all possible refactoring types. Furthermore, certain refactoring types, such as EXTRACT METHOD, tend to be more problematic for merge conflicts. Our results also suggest that conflicts that involve refactored code are usually more complex, compared to conflicts with no refactoring changes.
AB - With the rise of distributed software development, branching has become a popular approach that facilitates collaboration between software developers. One of the biggest challenges that developers face when using multiple development branches is dealing with merge conflicts. Conflicts occur when inconsistent changes happen to the code. Resolving these conflicts can be a cumbersome task as it requires prior knowledge about the changes in each of the development branches. A type of change that could potentially lead to complex conflicts is code refactoring. Previous studies have proposed techniques for facilitating conflict resolution in the presence of refactorings. However, the magnitude of the impact that refactorings have on merge conflicts has never been empirically evaluated. In this paper, we perform an empirical study on almost 3,000 well-engineered open-source Java software repositories and investigate the relation between merge conflicts and 15 popular refactoring types. Our results show that refactoring operations are involved in 22% of merge conflicts, which is remarkable taking into account that we investigated a relatively small subset of all possible refactoring types. Furthermore, certain refactoring types, such as EXTRACT METHOD, tend to be more problematic for merge conflicts. Our results also suggest that conflicts that involve refactored code are usually more complex, compared to conflicts with no refactoring changes.
KW - git
KW - merge conflict
KW - refactoring
KW - software evolution
UR - http://www.scopus.com/inward/record.url?scp=85064160319&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85064160319&partnerID=8YFLogxK
U2 - 10.1109/SANER.2019.8668012
DO - 10.1109/SANER.2019.8668012
M3 - Conference contribution
AN - SCOPUS:85064160319
T3 - SANER 2019 - Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution, and Reengineering
SP - 151
EP - 162
BT - SANER 2019 - Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution, and Reengineering
A2 - Shihab, Emad
A2 - Lo, David
A2 - Wang, Xinyu
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 26th IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2019
Y2 - 24 February 2019 through 27 February 2019
ER -