Automatic Detection and Resolution of Software Merge Conflicts: Are We There Yet?
Authors: Bowen Shen (Virginia Polytechnic Institute and State University, USA), Cihan Xiao (Virginia Polytechnic Institute and State University, USA), Na Meng (Virginia Polytechnic Institute and State University, USA), Fei He (Tsinghua University, China)
Abstract
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 %the popularity of merge conflicts and how conflicts 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. %in the version history of 15 open-source 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.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
A Characterization Study of Merge Conflicts in Java ProjectsBo-Wen Shen, Muhammad Ali Gulzar, Fei He et al. · 2022 · ACM Transactions on Software Engineering and Methodology · cited 21 times · Not summarized yet
A Characterization Study examines conflict types and how developers or tools handle them, while this paper analyzes conflict introduction and manual resolution in Java projects.
Abstract
In collaborative software development, programmers create software branches to add features and fix bugs tentatively, and then merge branches to integrate edits. When edits from different branches textually overlap (i.e., textual conflicts) or lead to compilation and runtime errors (i.e., build and test conflicts), it is challenging for developers to remove such conflicts. Prior work proposed tools to detect and solve conflicts. They investigate how conflicts relate to code smells and the software development process. However, many questions are still not fully investigated, such as what types of conflicts exist in real-world applications and how developers or tools handle them. For this art…
-
How do developers resolve merge conflicts? an investigation into the processes, tools, and improvementsCaius Brindescu · 2018 · ESEC/SIGSOFT FSE · cited 7 times · Not summarized yet
How do developers resolve merge conflicts? investigates developers’ resolution processes and tools, while this paper studies observed resolution strategies in repository histories.
Abstract
Most software development is done in teams. When more than one developer is modifying the source code, there is a change that their changes will conflict. When this happens, developers have to interrupt their workflow in order to resolve the merge conflict. This interruption can lead to frustration and lost productivity. This makes collaboration, and the problems associated with it, an important aspect of software development. Merge conflicts are some of the more difficult issues that arise when working in a team. We plan to bring in more information about the strategies developers use when resolving merge conflicts. We will gather information through in-situ observations and interviews of d…
-
Predicting Merge Conflicts in Collaborative Software DevelopmentMoein Owhadi-Kareshk, S. Nadi, J. Rubin · 2019 · International Symposium on Empirical Software Engineering and Measurement · cited 49 times · Not summarized yet
Predicting Merge Conflicts develops early conflict prediction, whereas this paper examines how conflicts arise and how developers resolve them.
Abstract
Background. During collaborative software development, developers often use branches to add features or fix bugs. When merging changes from two branches, conflicts may occur if the changes are inconsistent. Developers need to resolve these conflicts before completing the merge, which is an error-prone and time-consuming process. Early detection of merge conflicts, which warns developers about resolving conflicts before they become large and complicated, is among the ways of dealing with this problem. Existing techniques do this by continuously pulling and merging all combinations of branches in the background to notify developers as soon as a conflict occurs, which is a computationally expen…
-
Towards Merge Conflict Resolution by Combining Existing Lines of CodeHeleno de Souza Campos, G. G. L. de Menezes, M. Barros et al. · 2022 · Brazilian Symposium on Software Engineering · cited 4 times · Not summarized yet
Towards Merge Conflict Resolution studies patterns for resolving conflicts by combining existing code lines, a specific resolution strategy within this paper’s broader investigation.
Abstract
Software developers often need to combine their contributions. This operation is called merge. When the contributions happen at the same physical region in the source code, the merge is marked as conflicting and must be manually resolved by the developers. Existing studies explore why conflicts happen, their characteristics, and how they are resolved. In this paper, we investigate a specific subset of merge conflicts, which may be resolved using a combination of existing lines. We analyze 10,177 conflict chunks of popular projects that were resolved by combining existing lines, aiming at characterizing and finding patterns that developers frequently use to resolve them. We found that these c…
-
On the Nature of Merge Conflicts: A Study of 2,731 Open Source Java Projects Hosted by GitHubGleiph Ghiotto, Leonardo Gresta Paulino Murta, M. Barros et al. · 2020 · IEEE Transactions on Software Engineering · cited 85 times · Not summarized yet
On the Nature of Merge Conflicts characterizes real-world conflicts and developer resolutions, questions also examined in this paper.
Abstract
When multiple developers change a software system in parallel, these concurrent changes need to be merged to all appear in the software being developed. Numerous merge techniques have been proposed to support this task, but none of them can fully automate the merge process. Indeed, it has been reported that as much as 10 to 20 percent of all merge attempts result in a merge conflict, meaning that a developer has to manually complete the merge. To date, we have little insight into the nature of these merge conflicts. What do they look like, in detail? How do developers resolve them? Do any patterns exist that might suggest new merge techniques that could reduce the manual effort? This paper c…
-
What causes merge conflicts?José William Menezes, Bruno Trindade, J. F. Pimentel et al. · 2020 · Brazilian Symposium on Software Engineering · cited 10 times · Not summarized yet
What causes merge conflicts analyzes merge attributes associated with physical conflict occurrence, while this paper focuses on conflict types and their resolution.
Abstract
During the software development process, several developers commonly change artifacts in parallel. A merge process can combine parallel changes. In the case of changes that cannot be automatically combined, the developer responsible for the merge must reconcile decisions and resolve conflicts. Some studies are concerned with investigating ways to deal with merge conflicts and measuring the effort that this activity may require. However, the investigation of factors that may reduce the occurrence of conflicts needs more and deeper attention. This paper aims at identifying and analyzing attributes of past merges with and without conflicts to understand what may induce physical conflicts. We an…
-
Automatic Software Merging using Automated Program RepairXiaoqiang Xing, Katsuhisa Maruyama · 2019 · 2019 IEEE 1st International Workshop on Intelligent Bug Fixing (IBF) · cited 10 times · Not summarized yet
Automatic Software Merging proposes automated repair for behavioral merge conflicts, addressing resolution where this paper documents developer practices and tool limitations.
Abstract
Resolution of merge conflicts is inevitable in con-current software development where source code has been independently modified by multiple programmers. Unfortunately, it requires a lot of human efforts since programmers have to change the conflicting code until the merged code can be compiled with no error and does the correct behavior expected by themselves. Although several techniques have been proposed to (semi-)automatically resolve textual, syntactic, and semantic merge conflicts, behavioral conflicts are still a big trouble for modern software development using version control systems. In this paper, we propose an automatic merge mechanism that reduces programmers’ burden to resolve…
-
Challenges of Resolving Merge Conflicts: A Mining and Survey StudyGustavo Vale, Claus Hunsen, Eduardo Figueiredo et al. · 2022 · IEEE Transactions on Software Engineering · cited 26 times · Not summarized yet
Challenges of Resolving Merge Conflicts investigates factors that prolong resolution, while this paper examines conflict difficulty and developers’ manual strategies.
Abstract
In collaborative software development, merge conflicts arise when developers integrate concurrent code changes. Practitioners seek to minimize the number of merge conflicts because resolving them is difficult, time consuming, and often an error-prone task. Despite a substantial number of studies investigating merge conflicts, the challenges in merge conflict resolution are not well understood. Our goal is to investigate which factors make merge conflicts longer to resolve in practice. To this end, we performed a two-phase study. First, we analyzed 66 projects containing around 81 thousand merge scenarios, involving 2 million files and over 10 million chunks. For this analysis, we use rank co…
Prior work it builds on
-
Improving early detection of software merge conflictsM. L. Guimarães, A. R. Silva · 2012 · International Conference on Software Engineering · cited 126 times · Not summarized yet
Improving early detection develops earlier conflict detection, whereas this paper investigates conflict introduction and resolution practices.
-
Conflict resolution for structured merge via version space algebraFeng-Min Zhu, Fei He · 2018 · Proc. ACM Program. Lang. · cited 43 times · Not summarized yet
Conflict resolution for structured merge proposes interactive, ranked candidate resolutions, unlike this paper’s empirical analysis of developer resolutions.
Abstract
Resolving conflicts is the main challenge for software merging. The existing merge tools usually rely on the developer to manually resolve conflicts. This is of course inefficient. We propose an interactive approach for resolving merge conflicts. To the best of our knowledge, this is the first attempt for conflict resolution of structured merge. To represent the possibly very large set of candidate programs, we propose an expressive and efficient representation by version space algebra. We also design a simple mechanism for ranking resolutions in the program space, such that the top-ranked resolution is very likely to meet the developer's expectation. We prototype our approach as a merge too…
-
Are Refactorings to Blame? An Empirical Study of Refactorings in Merge ConflictsM. Mahmoudi, S. Nadi, Nikolaos Tsantalis · 2019 · IEEE International Conference on Software Analysis, Evolution, and Reengineering · cited 46 times · Not summarized yet
Are Refactorings to Blame? examines how refactorings contribute to merge conflicts, a particular cause outside this paper’s broader conflict analysis.
Abstract
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 …
-
Verified three-way program mergeMarcelo Sousa, I. Dillig, Shuvendu K. Lahiri · 2018 · Proc. ACM Program. Lang. · cited 63 times · Not summarized yet
Verified three-way program merge checks whether merged programs introduce unwanted behavior, whereas this paper studies conflict detection and developer resolution empirically.
Abstract
Even though many programmers rely on 3-way merge tools to integrate changes from different branches, such tools can introduce subtle bugs in the integration process. This paper aims to mitigate this problem by defining a semantic notion of conflict-freedom, which ensures that the merged program does not introduce new unwanted behaviors. We also show how to verify this property using a novel, compositional algorithm that combines lightweight summarization for shared program fragments with precise relational reasoning for the modifications. Towards this goal, our method uses a 4-way differencing algorithm on abstract syntax trees to represent different program versions as edits applied to a sh…
-
Semistructured merge: rethinking merge in revision control systemsSven Apel, Jörg Liebig, B. Brandl et al. · 2011 · ESEC/FSE '11 · cited 147 times · Not summarized yet
Semistructured merge presents an alternative merge technique that this paper cites among earlier work on merge tools.
Papers that cite it
-
SoManyConflicts: Resolve Many Merge Conflicts Interactively and SystematicallyBo Shen, Wei Zhang, Ai-Lun Yu et al. · 2021 · International Conference on Automated Software Engineering · cited 9 times · Not summarized yet
SoManyConflicts models relationships among conflicts to support systematic resolution and cites this paper’s empirical study.
Abstract
Code merging plays an important role in collaborative software development. However, it is often tedious and error-prone for developers to manually resolve merge conflicts, especially when there are many conflicts after merging long-lived branches or parallel versions. In this paper, we present SoManyConflicts, a language-agnostic approach to help developers resolve merge conflicts systematically, by utilizing their interrelations (e.g., dependency, similarity, etc.). SoManyConflicts employs a graph representation to model these interrelations and provides 3 major features: 1) cluster and order related conflict based on the graph connectivity; 2) suggest related conflicts of one focused conf…
-
Turning Merge Conflicts Into Conflict-Induced VariabilityManuel Ohrndorf, A. Boll, Roman Bögli et al. · 2026 · NIER@ICSE · Not summarized yet
Turning Merge Conflicts Into Conflict-Induced Variability proposes deferred conflict resolution and cites this paper’s findings about merge conflicts.
Abstract
Merging is central to software version control and collaborative work, yet current techniques force developers to resolve conflicts immediately upon each merge attempt, causing constant interruptions and hampering continuous integration. To mitigate, we propose a paradigm shift: merge conflicts shall be no longer treated as obstacles to be eliminated immediately, but as a form of software variability that explicitly captures diverging developer intentions. Such conflict-induced variability defines alternative behaviors that can be explored, analyzed, and resolved upon request, enabling deferred bulk conflict resolution based on the analysis results. With this, we open an avenue of research a…
-
Software Merge: A Two-Decade Systematic Mapping StudyC. Carbonera, Kleinner Farias, C. Graeff et al. · 2023 · Brazilian Symposium on Software Engineering · cited 3 times · Not summarized yet
Software Merge: A Two-Decade Systematic Mapping Study classifies and analyzes software-merge research, including this paper’s area.
Abstract
Software merging plays a key role in many software engineering tasks, e.g., reconciling source code developed in parallel. For this reason, many studies have been proposed in the last two decades. However, the current literature still lacks a classification of currently available approaches and research carried out considering software merge. Hence, a broad understanding of these already published works remains limited and inconclusive. Even worse, research gaps are not identified or prioritized. This study, therefore, provides a classification and thematic analysis of studies about software merge in the last two decades. We performed a systematic mapping study of the literature following PR…
-
Program merge conflict resolution via neural transformersA. Svyatkovskiy, Sarah Fakhoury, Negar Ghorbani et al. · 2021 · ESEC/SIGSOFT FSE · cited 44 times · Not summarized yet
Program merge conflict resolution via neural transformers generates conflict resolutions and cites this paper’s study of developer resolution practices.
Abstract
Collaborative software development is an integral part of the modern software development life cycle, essential to the success of large-scale software projects. When multiple developers make concurrent changes around the same lines of code, a merge conflict may occur. Such conflicts stall pull requests and continuous integration pipelines for hours to several days, seriously hurting developer productivity. To address this problem, we introduce MergeBERT, a novel neural program merge framework based on token-level three-way differencing and a transformer encoder model. By exploiting the restricted nature of merge conflict resolutions, we reformulate the task of generating the resolution seque…
-
RefFilter: Improving Semantic Conflict Detection via Refactoring-Aware Static AnalysisVictor Lira, Paulo Borba, Rodrigo Bonif'acio et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet
RefFilter detects semantic interference using refactoring-aware static analysis, a neighboring conflict-detection problem that cites this paper.
Abstract
Detecting semantic interference remains a challenge in collaborative software development. Recent lightweight static analysis techniques improve efficiency over SDG-based methods, but they still suffer from a high rate of false positives. A key cause of these false positives is the presence of behavior-preserving code refactorings, which current techniques cannot effectively distinguish from changes that impact behavior and can interfere with others. To handle this problem we present RefFilter, a refactoring-aware tool for semantic interference detection. It builds on existing static techniques by incorporating automated refactoring detection to improve precision. RefFilter discards behavior…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 6 November 2026.