Operation-Based Refactoring-Aware Merging: An Empirical Evaluation

Max Ellis, Sarah Nadi, Danny Dig · IEEE Transactions on Software Engineering · 2022

Dealing with merge conflicts in version control systems is a challenging task for software developers. Resolving merge conflicts is a time-consuming and error-prone process, which distracts developers from important tasks. Recent work shows that refactorings are often involved in merge conflicts and that refactoring-related conflicts tend to be larger, making them harder to resolve. In the literature, there are two refactoring-aware merging techniques that claim to automatically resolve refactoring-related conflicts; however, these two techniques have never been empirically compared. In this paper, we presentRefMerge, a rejuvenated Java-based design and implementation of the first technique, which is an operation-based refactoring-aware merging algorithm. We compareRefMergeto Git and the state-of-the-art graph-based refactoring-aware merging tool,IntelliMerge, on 2,001 merge scenarios with refactoring-related conflicts from 20 open-source projects. We find thatRefMergeresolves or reduces conflicts in 497 (25%) merge scenarios while increasing conflicting LOC in only 214 (11%) scenarios. On the other hand, we find thatIntelliMergeresolves or reduces conflicts in 478 (24%) merge scenarios but increases conflicting LOC in 597 (30%) merge scenarios. We additionally conduct a qualitative analysis of the differences between the three merging algorithms and provide insights of the strengths and weaknesses of each tool. We find that whileIntelliMergedoes well with ordering and formatting conflicts, it struggles with class-level refactorings and scenarios with several refactorings. On the other hand,RefMergeis resilient to the number of refactorings in a merge scenario, but we find thatRefMergeintroduces conflicts when inverting move-related refactorings.

Read the paper · More papers on PaperTik