arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.16646cs.SE
收藏

基于大语言模型与基于搜索的合并冲突解决:对两种范式的实证研究

LLM-based vs. Search-based Merge Conflict Resolution: An Empirical Study of Competing Paradigms

Federal Fluminense University(联邦弗鲁米嫩塞大学)

Heleno de Souza Campos Junior, Leonardo Gresta Paulino Murta

AI总结:

本文通过实证研究比较了基于大语言模型和基于搜索的合并冲突解决方法,揭示了两者在实际场景中的优劣势及权衡。

摘要:

背景:软件合并冲突的解决正受到两种竞争范式的影响:基于大语言模型(LLM)的生成方法和基于搜索的软件工程(SBSE)的优化方法。尽管两种范式都有所表现,但它们的相对优势、劣势和权衡尚未得到充分理解。目标:本文首次深入实证研究,直接比较这两种范式,以确定其在实际场景中的能力和限制。方法:我们评估了MergeGen,一种最先进的基于LLM的工具,与SBCR,一种采用随机重启爬山(RRHC)算法的新SBSE方法。比较使用了来自开源项目(Java、C#、JavaScript和TypeScript)的数千个真实冲突。结果:我们的发现揭示了根本的权衡。LLM范式在处理内容不平衡的冲突时表现优异,通过利用学习到的模式。然而,它在非英语内容和大输入时表现不佳,可能导致截断或空的结果。相反,SBSE范式在跨数据集的泛化上表现更佳,且在平衡冲突上表现最佳,突显了其作为稳健、数据无关替代方案的潜力。结论:没有一种范式是万能的。我们的发现突显了上下文相关的优势,并推动了开发结合LLM和SBSE方法互补能力的混合系统,以创建更稳健和可靠的合并冲突解决工具。

英文摘要:

Context: The resolution of software merge conflicts is being reshaped by two competing paradigms: generative approaches based on Large Language Models (LLMs) and optimization approaches from Search-Based Software Engineering (SBSE). While tools from both paradigms have shown promise, their relative strengths, weaknesses, and trade-offs are not yet well understood. Objective: This paper presents the first in-depth empirical study directly comparing these paradigms to identify their capabilities and limitations in real-world scenarios. Method: We evaluated MergeGen, a state-of-the-art LLM-based tool, against SBCR, a novel SBSE approach employing a Random Restart Hill Climbing (RRHC) algorithm. The comparison used thousands of real-world conflicts from open-source projects written in Java, C#, JavaScript, and TypeScript. Results: Our findings reveal fundamental trade-offs. The LLM paradigm excels at resolving conflicts with imbalanced content by leveraging learned patterns. However, it struggles with non-English content and large inputs, which can lead to truncated or empty resolutions. Conversely, the SBSE paradigm demonstrates superior generalization across datasets and performs best on balanced conflicts, highlighting its potential as a robust, data-independent alternative. Conclusions: Neither paradigm is a silver bullet. Our findings highlight context-dependent strengths and motivate the development of hybrid systems that combine the complementary capabilities of LLM and SBSE approaches to create more robust and reliable merge conflict resolution tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑