MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code
In software version control systems, like Git, merge conflicts typically arise when multiple developers edit the same segment of a source file from different branches. Detecting merge conflicts can be automated; however, resolving merge conflicts is tedious and demanding. Developers have to manually read and trace the conflicts to reconcile the changes. In this paper, we introduce MergeBot, a platform designed for resolving merge conflicts in C/C++ codebases. MergeBot utilizes the techniques of static program analysis to recommend the resolution of merge conflicts via a user-friendly graphical user interface. In the resolution of merge conflicts, MergeBot can help reduce introducing potential errors via real-time visualization of code differences between pre-resolution and post-resolution versions; meanwhile, MergeBot can avoid error propagation via the prevention of staging or committing unresolved conflicts. We demonstrate the extensibility of semi-structured merge through an implementation in C/C++. The semi-structured merge combines structural merge of program entities (e.g., functions, classes) with unstructured merge of code lines. A preliminary evaluation on 10 widely-used open-source C/C++ projects demonstrates the effectiveness of MergeBot with the precision of 62.9% and the accuracy of 42.4% in resolving merge conflicts.
Authors
- Jifeng Xuan (ORCID: https://orcid.org/0000-0002-2968-3496)
- Gang Mei (ORCID: https://orcid.org/0000-0003-0026-5423)
- Lei Xu (ORCID: https://orcid.org/0000-0001-9071-4311)
- Xiaofan Liu (ORCID: https://orcid.org/0000-0002-3693-5217)
- Hua He (ORCID: https://orcid.org/0000-0001-8461-922X)
Institutions
- Wuhan University (CN)
- Postmaster Psychologie Opleidingen (NL)
- Nanjing University (CN)
Publication Details
- Journal
- SoftwareX
- Published
- 2025-04-08
- DOI
- https://doi.org/10.1016/j.softx.2025.102144
- Primary Topic
- Advanced Software Engineering Methodologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00