Program merge conflict resolution via neural transformers
Open accessThe DOI matches its Crossref record; 44 of the 44 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: 8
- 10.1145/3212695 · DOI · Paper page
- 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. 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
- 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). 534–545 . 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). 534–545.
- Aditya Kanade , Petros Maniatis , Gogul Balakrishnan , and Kensen Shi . 2020 . Learning and evaluating contextual embedding of source code . In International Conference on Machine Learning. 5110–5121 . Aditya Kanade, Petros Maniatis, Gogul Balakrishnan, and Kensen Shi. 2020. Learning and evaluating contextual embedding of source code. In International Conference on Machine Learning. 5110–5121.
- 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). 785–796 . 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). 785–796.
- M. Sousa , I. Dillig , and S. K. Lahiri . 2018. Verified Three-way Program Merge . Proc. ACM Program. Lang. , 2 ( 2018 ), 165:1–165:29. M. Sousa, I. Dillig, and S. K. Lahiri. 2018. Verified Three-way Program Merge. Proc. ACM Program. Lang., 2 (2018), 165:1–165:29.
- 10.1145/3368089.3417058 · DOI · Paper page
- 10.1109/ASE.2019.00098 · 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].”
BackgroundMethodResultInfluential
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
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Program merge conflict resolution via neural transformers. https://app.cochat.ai/papers/10.1145/3540250.3549163
- The paper
- Svyatkovskiy, A., Fakhoury, S., Ghorbani, N., Mytkowicz, T., Dinella, E., Bird, C., Jang, J., Sundaresan, N., & Lahiri, S. K. (2022). Program merge conflict resolution via neural transformers. Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. https://doi.org/10.1145/3540250.3549163
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.