Automatic Detection and Resolution of Software Merge Conflicts: Are We There Yet?

02/22/2021
by   Bowen Shen, et al.
0

Developers create software branches for tentative feature addition and bug fixing, and periodically merge branches to release software with new features or repairing patches. When the program edits from different branches textually overlap (i.e., textual conflicts), or the co-application of those edits lead to compilation or runtime errors (i.e., compiling or dynamic conflicts), it is challenging and time-consuming for developers to eliminate merge conflicts. Prior studies examined were related to code smells or software development process; tools were built to find and solve conflicts. However, some fundamental research questions are still not comprehensively explored, including (1) how conflicts were introduced, (2) how developers manually resolved conflicts, and (3) what conflicts cannot be handled by current tools. For this paper, we took a hybrid approach that combines automatic detection with manual inspection to reveal 204 merge conflicts and their resolutions in 15 open-source repositories. projects. Our data analysis reveals three phenomena. First, compiling and dynamic conflicts are harder to detect, although current tools mainly focus on textual conflicts. Second, in the same merging context, developers usually resolved similar textual conflicts with similar strategies. Third, developers manually fixed most of the inspected compiling and dynamic conflicts by similarly editing the merged version as what they did for one of the branches. Our research reveals the challenges and opportunities for automatic detection and resolution of merge conflicts; it also sheds light on related areas like systematic program editing and change recommendation.

READ FULL TEXT
research
12/20/2021

A Systematic Comparison of Two Refactoring-aware Merging Techniques

Dealing with merge conflicts in version control systems is a challenging...
research
08/08/2017

Cherry-Picking of Code Commits in Long-Running, Multi-release Software

This paper presents Tartarian, a tool that supports maintenance of softw...
research
07/14/2019

Predicting Merge Conflicts in Collaborative Software Development

Background. During collaborative software development, developers often ...
research
04/09/2022

Revisiting the Effect of Branch Handling Strategies on Change Recommendation

Although literature has noted the effects of branch handling strategies ...
research
03/02/2021

Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical Analysis

Forking structure is widespread in the open-source repositories and that...
research
02/10/2022

Spork: Structured Merge for Java with Formatting Preservation

The highly parallel workflows of modern software development have made m...
research
11/23/2021

Can Pre-trained Language Models be Used to Resolve Textual and Semantic Merge Conflicts?

Program merging is standard practice when developers integrate their ind...

Please sign up or login with your details

Forgot password? Click here to reset