New study: These 5 refactoring types drain your merge time
Which refactorings cause the most merge pain? A 64-project study has answers.
Modern software development relies on parallel branches and frequent merging, but 10-20% of merge attempts end in conflicts that demand manual intervention. Refactoring has long been suspected as a conflict driver, yet prior studies never quantified how individual refactoring types affect the manual effort needed to resolve those conflicts. Researchers from Brazilian universities (including André Oliveira, João Victor Monteiro, and Alessandro Garcia) set out to close that gap by analyzing 64 open-source Java projects, applying association rule mining to uncover statistical links between specific refactoring types and merge effort. They measured effort both in terms of occurrence (whether a conflict happens) and intensity (how much work resolution requires), while also accounting for the number of refactorings and their diversity across the branches being merged.
The results pinpoint several refactorings with the strongest associations to elevated merge effort: Rename Attribute, Move Class, Extract Variable, Change Return Type, and Split Parameter. The effect grows when these refactorings appear in higher numbers. Notably, both the count and the diversity of refactorings independently increase merge effort—meaning even a varied set of small changes adds complexity, not just repetition. Co-occurrence of refactorings across parallel branches amplifies the problem, especially when structural transformations are combined with method signature changes or data-structure representation changes, while more localized modifications show weaker links to high effort. The paper is currently under major revision at IEEE Transactions on Software Engineering (TSE), so the findings are not yet fully peer-reviewed. Still, they provide concrete guidance for development teams: flag these refactoring types during code review, anticipate merge complexity when they appear in concurrent branches, and consider merge sequencing or branch scheduling to minimize manual conflict resolution.
- Analyzed 64 open-source Java projects using association rule mining to link refactoring types to merge effort.
- Rename Attribute, Move Class, Extract Variable, Change Return Type, and Split Parameter show the strongest merge-effort associations.
- Both the number and diversity of refactorings independently increase merge effort; co-occurrence across branches amplifies it further.
Why It Matters
Teams can now predict merge pain by flagging specific refactorings, reducing manual conflict resolution time and cost.