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...
Saved in:
| Main Authors: | , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Elsevier
2025-05-01
|
| Series: | SoftwareX |
| Subjects: | |
| Online Access: | http://www.sciencedirect.com/science/article/pii/S2352711025001116 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850139677935271936 |
|---|---|
| author | Hua He Xiaofan Liu Lei Xu Guanghui Mei Jifeng Xuan |
| author_facet | Hua He Xiaofan Liu Lei Xu Guanghui Mei Jifeng Xuan |
| author_sort | Hua He |
| collection | DOAJ |
| description | 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. |
| format | Article |
| id | doaj-art-a9328a52b8e54c1cbe638294bd2e7ed6 |
| institution | OA Journals |
| issn | 2352-7110 |
| language | English |
| publishDate | 2025-05-01 |
| publisher | Elsevier |
| record_format | Article |
| series | SoftwareX |
| spelling | doaj-art-a9328a52b8e54c1cbe638294bd2e7ed62025-08-20T02:30:10ZengElsevierSoftwareX2352-71102025-05-013010214410.1016/j.softx.2025.102144MergeBot: A platform of semi-structured merge conflict resolution for C/C++ codeHua He0Xiaofan Liu1Lei Xu2Guanghui Mei3Jifeng Xuan4School of Computer Science, Wuhan University, Wuhan 430072, ChinaSchool of Computer Science, Wuhan University, Wuhan 430072, ChinaSchool of Computer Science, Nanjing University, Nanjing 210023, ChinaOPPO, Shanghai 200032, ChinaSchool of Computer Science, Wuhan University, Wuhan 430072, China; Corresponding author.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.http://www.sciencedirect.com/science/article/pii/S2352711025001116Software version control systemsMerge conflictsConflict resolutionSemi-structured mergeContinuous integration |
| spellingShingle | Hua He Xiaofan Liu Lei Xu Guanghui Mei Jifeng Xuan MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code SoftwareX Software version control systems Merge conflicts Conflict resolution Semi-structured merge Continuous integration |
| title | MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code |
| title_full | MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code |
| title_fullStr | MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code |
| title_full_unstemmed | MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code |
| title_short | MergeBot: A platform of semi-structured merge conflict resolution for C/C++ code |
| title_sort | mergebot a platform of semi structured merge conflict resolution for c c code |
| topic | Software version control systems Merge conflicts Conflict resolution Semi-structured merge Continuous integration |
| url | http://www.sciencedirect.com/science/article/pii/S2352711025001116 |
| work_keys_str_mv | AT huahe mergebotaplatformofsemistructuredmergeconflictresolutionforcccode AT xiaofanliu mergebotaplatformofsemistructuredmergeconflictresolutionforcccode AT leixu mergebotaplatformofsemistructuredmergeconflictresolutionforcccode AT guanghuimei mergebotaplatformofsemistructuredmergeconflictresolutionforcccode AT jifengxuan mergebotaplatformofsemistructuredmergeconflictresolutionforcccode |