Program merge conflict resolution via neural transformers
Open accessThe DOI matches its Crossref record; 44 of the 45 references it cites were found in a registry or an index.
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 sequence as a classification task over a set of primitive merge patterns extracted from real-world merge commit data. Our model achieves 63–68% accuracy for merge resolution synthesis, yielding nearly a 3× performance improvement over existing semi-structured, and 2× improvement over neural program merge tools. Finally, we demonstrate that MergeBERT is sufficiently flexible to work with source code files in Java, JavaScript, TypeScript, and C# programming languages. To measure the practical use of MergeBERT, we conduct a user study to evaluate MergeBERT suggestions with 25 developers from large OSS projects on 122 real-world conflicts they encountered. Results suggest that in practice, MergeBERT resolutions would be accepted at a higher rate than estimated by automatic metrics for precision and accuracy. Additionally, we use participant feedback to identify future avenues for improvement of MergeBERT.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325 · cited 3×
“MergeBERT is a textual program merge model based on the bidirectional transformer encoder (BERT) model [14].”
BackgroundMethodInfluentialCodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · Findings of the Association for Computational Linguistics: EMNLP 2020 · doi:10.18653/v1/2020.findings-emnlp.139 · Cited by 2,824
BLEURT: Learning Robust Metrics for Text Generation
Sellam, T., Das, D., & Parikh, A. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.704 · Cited by 1,005
BLEURT: Learning Robust Metrics for Text Generation
Sellam, T., Das, D., & Parikh, A. P. (2020) · arXiv · doi:10.48550/arxiv.2004.04696 · Cited by 1,005 · cited 1×
“Neural language models (LMs) have shown great performance in natural language generation [36, 38], and have been successfully applied to the domain of source code [17, 24, 48].”
BackgroundNeural Machine Translation of Rare Words with Subword Units
Sennrich, R., Haddow, B., & Birch, A. (2016) · Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p16-1162 · Cited by 974 · cited 1×
“The vocabulary is constructed using byte-pair encoding [39] and the vocabulary size is 50000.”
MethodNeural Machine Translation of Rare Words with Subword Units
Sennrich, R., Haddow, B., & Birch, A. (2015) · arXiv · doi:10.48550/arxiv.1508.07909 · Cited by 950 · cited 1×
“The vocabulary is constructed using byte-pair encoding [39] and the vocabulary size is 50000.”
MethodFine-grained and accurate source code differencing
Falleri, J.-R., Morandat, F., Blanc, X., Martinez, M., & Monperrus, M. (2014) · Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/2642937.2642982 · Cited by 549 · cited 2×
“In an effort to accurately and fairly identify semantically equivalent merges, we use GumTree [16], an AST differencing tool, to identify and ignore semantically equivalent differences between JD IME output and the user resolution, such as reordered method declarations.”
MethodOn the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Dévanbu, P. (2012) · doi:10.5555/2337223.2337322 · Cited by 541
A state-of-the-art survey on software merging
Mens, T. (2002) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2002.1000449 · Cited by 532
IntelliCode compose: code generation using transformer
Svyatkovskiy, A., Deng, S. K., Fu, S., & Sundaresan, N. (2020) · Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3368089.3417058 · Cited by 474 · cited 1×
“Neural language models (LMs) have shown great performance in natural language generation [36, 38], and have been successfully applied to the domain of source code [17, 24, 48].”
BackgroundSelf-citation
Research works printed but not linked: 6
- [4] Sven Apel, Jörg Liebig, Christian Lengauer, Christian Kästner, and William R Cook. 2010. Semistructured Merge in Revision Control Systems.. In VaMoS . 13-19. - · DOI · Paper page
- [8] Caius Brindescu, Yenifer Ramirez, Anita Sarma, and Carlos Jensen. 2020. Lifting the Curtain on Merge Conflict Resolution: A Sensemaking Perspective. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME) . IEEE, 534-545. -
- [26] Aditya Kanade, Petros Maniatis, Gogul Balakrishnan, and Kensen Shi. 2020. Learning and evaluating contextual embedding of source code. In International Conference on Machine Learning . PMLR, 5110-5121. ̸ -
- [34] Rangeet Pan, Vu Le, Nachiappan Nagappan, Sumit Gulwani, Shuvendu Lahiri, and Mike Kaufman. 2021. Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical Analysis. In 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) . IEEE, 785-796. -
- [46] M. Sousa, I. Dillig, and S. K. Lahiri. 2018. Verified Three-way Program Merge. Proc. ACM Program. Lang. 2 (2018), 165:1-165:29. -
- [49] Alberto Trindade Tavares, Paulo Borba, Guilherme Cavalcanti, and Sérgio Soares. 2019. Semistructured merge in JavaScript systems. In 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE) . IEEE, 10141025. - · DOI
Cited by
TOGA: a neural method for test oracle generation
Dinella, E., Ryan, G., Mytkowicz, T., & Lahiri, S. K. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510141 · Cited by 118
Self-citationChatGPT: A Study on its Utility for Ubiquitous Software Engineering Tasks
Sridhara, G., G., R. H., & Mazumdar, S. (2023) · arXiv · doi:10.48550/arxiv.2305.16837 · Cited by 68
“Resolving conflicts manually is a tedious and error prone activity [Svyatkovskiy et al.(2022)].”
Using pre-trained language models to resolve textual and semantic merge conflicts (experience paper)
Zhang, J., Mytkowicz, T., Kaufman, M., Piskac, R., & Lahiri, S. K. (2022) · Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3533767.3534396 · Cited by 39
Self-citationMultilingual code refactoring detection based on deep learning
Li, T., & Zhang, Y. (2024) · Expert Systems with Applications · doi:10.1016/j.eswa.2024.125164 · Cited by 20
Merge Conflict Resolution: Classification or Generation?
Dong, J., Zhu, Q., Sun, Z., Lou, Y., & Hao, D. (2023) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase56229.2023.00155 · Cited by 23
“The APIs of pre-trained models provided by HuggingFace are the most popular in NLP community and are widely used by researchers and developers [24], [37].”
BackgroundMethodResultInfluentialContextual Predictive Mutation Testing
Jain, K., Alon, U., Groce, A., & Goues, C. L. (2023) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3611643.3616289 · Cited by 15
“…to represent code changes for the purpose of ML, fall into three main categories: defining a set of features related to the modification [20, 36] representing the modification with a graph [21, 33, 35] or representing the “before” and “after” of the modification with multiple embeddings [30].”
InfluentialAutomatic Prediction of Developers' Resolutions for Software Merge Conflicts
Aldndni, W., Meng, N., & Servant, F. (2022) · Journal of Systems and Software · doi:10.1016/j.jss.2023.111836 · Cited by 14
Git Merge Conflict Resolution Leveraging Strategy Classification and LLM
Shen, C., Yang, W., Pan, M., & Zhou, Y. (2023) · IEEE International Conference on Software Quality, Reliability and Security (QRS) · doi:10.1109/qrs60937.2023.00031 · Cited by 19
“They introduced MergeBert, a merge tool based on the bidirectional transformer encoder model [20].”
BackgroundMethodInfluentialNeuDep: neural binary memory dependence analysis
Pei, K., She, D., Wang, M., Geng, S., Xuan, Z., David, Y., Yang, J., Jana, S., & Ray, B. (2022) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3540250.3549147 · Cited by 14
Promises and perils of using Transformer-based models for SE research
Xiao, Y., Zuo, X., Lu, X., Dong, J. S., Cao, X., & Beschastnikh, I. (2024) · Neural Networks · doi:10.1016/j.neunet.2024.107067 · Cited by 28
Towards accurate recommendations of merge conflicts resolution strategies
Elias, P., Campos, H. D. S., Ogasawara, E., & Murta, L. (2023) · Information and Software Technology · doi:10.1016/j.infsof.2023.107332 · Cited by 15
DeepCNN: A Dual Approach to Fault Localization and Repair in Convolutional Neural Networks
Wardat, M., & Al-Alaj, A. (2024) · IEEE Access · doi:10.1109/access.2024.3384981 · Cited by 11
“Here, we utilize the same technique, inspired by prior research [59], [60], to extract semantic features from CNN models for fault detection.”
MethodVEGA: Automatically Generating Compiler Backends using a Pre-trained Transformer Model
Zhong, M., Lv, F., Wang, L., Qiu, L., Wang, Y., Liu, Y., Cui, H., Feng, X., & Xue, J. (2025) · Proceedings of the CGO/Proceedings of the ... CGO · doi:10.1145/3696443.3708931 · Cited by 15
How code composition strategies affect merge conflict resolution?
Campos, H. D. S., Ghiotto, G., Barros, M. D. O., van der Hoek, A., & Murta, L. (2024) · Journal of Software Engineering Research and Development · doi:10.5753/jserd.2024.3638 · Cited by 4
“Furthermore, Svyatkovskiy et al. (2022) introduced MergeBERT, leveraging transformer-encoder models to classify resolution strategies for token-level conflicts.”
Symbolic Execution to Detect Semantic Merge Conflicts
Muylaert, W., Härtel, J., & Roover, C. D. (2023) · IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam59687.2023.00028 · Cited by 2
“We do not discuss related work that compares two versions of a program, but list some instances here (see [29], [30], [34]).”
BackgroundTowards Semi-Automated Merge Conflict Resolution: Is It Easier Than We Expected?
Boll, A., Dok, Y. V., Ohrndorf, M., Schultheiß, A., & Kehrer, T. (2024) · International Conference on Evaluation and Assessment in Software Engineering (EASE) · doi:10.1145/3661167.3661197 · Cited by 5
Evaluation of Version Control Merge Tools
Schesch, B., Featherman, R., Yang, K. J., Roberts, B. K., & Ernst, M. D. (2024) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3691620.3695075 · Cited by 9
“Other evaluations assess correctness by comparing the output of a tool with the resolution in the commit history [15, 46, 49].”
InfluentialRefactoring-Aware Patch Integration Across Structurally Divergent Java Forks
Ogenrwot, D., & Businge, J. (2025) · IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam67354.2025.00010 · Cited by 5
“Likewise, ML-based merge tools such as DeepMerge [18] and MergeBERT [19] frame merge resolution as token classification or sequence generation tasks over textual representations of code.”
WizardMerge —Save Us from Merging without Any Clues
Zhang, Q., Li, J., Lin, J., Ding, J., Lin, L., & Qian, C. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3731751 · Cited by 4
Towards a Feasible Evaluation Function for Search-Based Merge Conflict Resolution
de Souza Campos, H., de Menezes, G. G. L., de Oliveira Barros, M., van der Hoek, A., & Gresta Paulino Murta, L. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3748256 · Cited by 1
Behind Developer Contributions on Conflicting Merge Scenarios
Vale, G., Fernandes, E., Figueiredo, E., & Apel, S. (2023) · 2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam59687.2023.00014 · Cited by 1
“Contemporary software development greatly depends on simultaneous contributions of several developers [29], [36], [43].”
BackgroundAldndni, W., Servant, F., & Meng, N. (2024) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3643916.3644433 · Cited by 3
Jin, W., Sun, M., Zhou, J., Shang, J., Huang, Z., & Liu, T. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3744921 · Cited by 3
AgenticFlict: A Large-Scale Dataset of Merge Conflicts in AI Coding Agent Pull Requests on GitHub
Ogenrwot, D., & Businge, J. (2026) · Proceedings of the 3rd ACM International Conference on AI-Powered Software · doi:10.1145/3805760.3814923
“While Shen and Meng [47] introduced ConflictBench as a dedicated benchmark for studying conflicts, other existing datasets have typically emerged as secondary artifacts of broader studies on collaborative development [11, 18, 49].”
Revisiting the Conflict-Resolving Problem from a Semantic Perspective
Dong, J., Sun, J., Lin, Y., Zhang, Y., Ma, M., Dong, J. S., & Hao, D. (2024) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3691620.3694993 · Cited by 3
MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code
He, H., Liu, X., Xu, L., Mei, G., & Xuan, J. (2025) · SoftwareX · doi:10.1016/j.softx.2025.102144
Reliable Version Merging Based on Deep Semantic and logical Understanding of Critical Context
Fan, M., Zhang, W., Zhao, H., & Jin, Z. G. (2025) · Proceedings/Proceedings - International Symposium on Software Reliability Engineering · doi:10.1109/issre66568.2025.00050
“• M ERGE BERT: A Transformer-based framework that re-solves merge conflicts via token-level three-way differencing and classifies solutions from predefined patterns, outperforming traditional line-based tools in complex scenarios [9].”
InfluentialTwin Pipeline: AI Sibling of CI/CD
Salvi, Y., & Kanade, I. (2025) · International Conference on Computing Communication Control and automation · doi:10.1109/iccubea65967.2025.11283703
“For this resolution process, the twin pipeline will leverage MergeBERT [14], a neural program merge framework that combines token-level three-way differencing with a transformer encoder model.”
Velugubantla, V., Sonani, R., Amanmadov, N., Nagineni, A. C., & Alla, V. K. (2025) · International Conference on Artificial Intelligence, Blockchain, and Internet of Things (AIBThings) · doi:10.1109/aibthings66987.2025.11296209
“TASSAL [13] applied summarization methods to support merge understanding, while MergeBERT [14] used transformers trained on conflict resolution pairs to directly generate resolved code.”
InfluentialDT4LM: Differential Testing for Reliable Language Model Updates in Classification Tasks
Zuo, X., Xiao, Y., Cao, X., Wang, W., & Dong, J. S. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3622251 · Cited by 1
“Research on LMs is growing rapidly, focusing on diverse areas such as applying models to new tasks [12], [13], [14], [15], enhancing model performance through fine-tuning [16], [17], [18], [19] and prompting [20], [21], [22], and developing new models [6], [23], [24].”
Comparing static analyses for improved semantic conflict detection
de Jesus, G. S., Borba, P., Bonifácio, R., & de Oliveira, M. B. (2025) · Automated Software Engineering · doi:10.1007/s10515-025-00580-y · Cited by 1
“Zhang et al. (2022), Dinella et al. (2022), Svyatkovskiy et al. (2021 , 2022 ), Dong et al. (2023), Shen et al. (2023b) address automatic merge conflict resolution using machine learning and large language models.”
EditFusion: Resolving Code Merge Conflicts via Edit Selection
Wang, C., Xu, L., Wang, R., Ma, Y., & Zhang, W. (2025) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase63991.2025.00055
“However, prevailing resolution prediction methods, often framed as multi-class classification tasks [15], [16], [22], suffer from several limitations.”
InfluentialAgent 4: Teamwork and Collaboration for Vibe-Coding
Zhong, P. Y., Zhao, J., Sioufi, E., Austin, J., Pool, B., Chávez, L. H., Dahiya, A., Ernst, W., Feng, D., Furman, D. R., et al. (2026) · ACM Conference on AI and Agentic Systems (CAIS) · doi:10.1145/3786335.3813211 · Cited by 2
A Repository-Level Merge Conflict Resolution Method Based on Large Language ModelsPreprint
Zhang, W., Dong, Z., Zhao, H., Gu, Y., & Xu, L. (2026) · SSRN Electronic Journal · doi:10.2139/ssrn.6927019
How Effectively Do Large Language Models Help with Build Conflict Resolution?
Towqir, S. S., Zang, X., Mytkowicz, T., & Meng, N. (2026) · IEEE International Conference on Software Testing, Verification and Validation (ICST) · doi:10.1109/icst69053.2026.00081
“DeepMerge [26], MergeBERT [47], and MergeGen [27] employ deep learning to directly resolve specified conflicting chunks.”
Self-citationTowards Automated Test Adaptation in Fork Ecosystems via Large Language Models
Mukelabai, M., Schurkus, K.-W., Noller, Y., & Berger, T. (2026) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3803437.3805594
From Generation to Reasoning: Chain-of-Thought Guided Merge Conflict Resolution
Peng, C., Zhang, Z., Tyszberowicz, S. S., Liu, Z., & Liu, B. (2026) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3794763.3794821
“Existing deep learning-based merge conflict resolution methods, such as MergeBERT, model conflicts as a classification task but perform poorly in scenarios that require introducing new tokens, as they cannot generate content beyond the input range [29].”
InfluentialMerge-Bench: Resolve Merge Conflicts with Large Language Models
Schesch, B., & Ernst, M. D. (2026) · Lecture notes in computer science · doi:10.1007/978-3-032-31397-3_41
ABACI: Automated Downstream Bug Resolution via Semantic-Aware Bisection and Convergent Backporting
Wang, R., Zhou, Y., Su, Q., Yang, Y., Shi, X., & Ma, T. (2026) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3832783.3834466
Search-Based Merge Conflict Resolution
Campos, H. D. S., & Murta, L. (2026) · doi:10.5753/cbsoft_estendido.2026.29848
Metadata
- Authors
- Svyatkovskiy, A., Fakhoury, S., Ghorbani, N., Mytkowicz, T., Dinella, E., Bird, C., Jang, J., Sundaresan, N., & Lahiri, S. K.
- Affiliations
- Microsoft (United States) (US)
- Washington State University (US)
- University of California, Irvine (US)
- University of Pennsylvania (US)
- ORCID
- Venue
- Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering
- Publisher
- ACM
- Published
- 2022-11-07
- Pages
- 822-833
- OpenAlex
- W4296938538
- Cited by
- 38
- References
- 37
- Citations by year
- 2026: 8 · 2025: 12 · 2024: 8 · 2023: 6 · 2022: 4
- FWCI
- 6.71
- Type
- conference paper
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) (publishedVersion)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
- Physical Sciences › Computer Science › Software › Model-Driven Software Engineering Techniques
- Keywords
- merge conflict resolution, collaborative software development, pull requests, continuous integration, user study, open source projects, developer productivity
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.