Git Merge Conflict Resolution Leveraging Strategy Classification and LLM
- 22 October 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 228-239
Abstract
In the realm of collaborative software development, version control systems (VCS) like Git play an indispensable role, enabling concurrent development and facilitating seamless integration of disparate code contributions. Despite these benefits, merge conflicts resulting from simultaneous changes to identical code lines often pose significant challenges to the integration process. Addressing this challenge, our paper introduces a novel two-stage approach, termed as CHATMERGE, for resolving Git merge conflicts. CHATMERGE pioneers a unique strategy that employs machine learning to initially predict resolution strategies, and subsequently leverages a large language model, ChatGPT, to create resolutions for conflicts that necessitate complex resolution strategies. A series of comprehensive experiments validate CHATMERGE’s efficacy, demonstrating its impressive alignment with historical manual resolutions and its superior performance relative to existing, publicly accessible tools. The paper further explores the influence of various classification algorithms and the prompt construction process for ChatGPT, providing further insights into the merge conflict resolution process. Moreover, to foster continued advancements in this area, CHATMERGE, along with its associated training and testing datasets, is made publicly available, offering a valuable resource for both developers and researchers. This work, therefore, provides both an innovative solution to merge conflict resolution and a strong foundation for future explorations in this domain.Keywords
Funding Information
- National Natural Science Foundation of China
- Natural Science Foundation of Jiangsu Province
This publication has 44 references indexed in Scilit:
- Detecting semantic merge conflicts with variability-aware execution2015
- Balancing precision and performance in structured mergeAutomated Software Engineering, 2014
- Assessing the value of branches with what-if analysis2012
- Structured merge with auto-tuning: balancing precision and performance2012
- Proactive detection of collaboration conflicts2011
- JDiff: A differencing technique and tool for object-oriented programsAutomated Software Engineering, 2006
- The importance of branching models in SCMComputer, 2002
- A state-of-the-art survey on software mergingIEEE Transactions on Software Engineering, 2002
- A framework for shared applications with a replicated architecture1993
- Structure-oriented merging of revisions of software documents1991