构建分级冲突基准测试,评估大模型在复杂代码合并中的表现
CONGRA: Benchmarking Automatic Conflict Resolution
- 按代码操作类型分类冲突,构建4.5万条真实项目冲突数据集
- 在该数据集上测试多个顶尖大模型,发现其性能随冲突复杂度下降明显
- 揭示大模型在复杂合并任务中存在反直觉的局限性,适合研究工具评估者
不同软件版本合并时的冲突解决是一项挑战性任务。为减少人工合并开销,现有程序分析工具仅能处理特定类型冲突,应用范围有限。随着语言模型的发展,研究人员将冲突代码视为文本,理论上可应对几乎所有冲突类型。然而,缺乏有效的冲突难度分级方法,阻碍了对大语言模型(LLMs)在该任务上的全面评估,难以深入理解其局限性。此外,目前缺乏大规模公开基准用于评估LLMs在自动冲突解决中的表现。为此,我们提出ConGra——一种基于冲突复杂度分级的基准评测方案,旨在评估软件合并工具在不同复杂度场景下的性能。我们提出一种基于代码操作的冲突分类新方法,并基于34个真实项目中的44,948个冲突构建大规模评估数据集。利用该数据集,我们评估了多个前沿大语言模型和代码语言模型在冲突解决任务中的表现,最终揭示两个反直觉但深刻的发现。ConGra将开源发布于https://github.com/HKU-System-Security-Lab/ConGra。
原文摘要 · Abstract (English)
Resolving conflicts from merging different software versions is a challenging task. To reduce the overhead of manual merging, researchers develop various program analysis-based tools which only solve specific types of conflicts and have a limited scope of application. With the development of language models, researchers treat conflict code as text, which theoretically allows for addressing almost all types of conflicts. However, the absence of effective conflict difficulty grading methods hinders a comprehensive evaluation of large language models (LLMs), making it difficult to gain a deeper understanding of their limitations. Furthermore, there is a notable lack of large-scale open benchmarks for evaluating the performance of LLMs in automatic conflict resolution. To address these issues, we introduce ConGra, a CONflict-GRAded benchmarking scheme designed to evaluate the performance of software merging tools under varying complexity conflict scenarios. We propose a novel approach to classify conflicts based on code operations and use it to build a large-scale evaluation dataset based on 44,948 conflicts from 34 real-world projects. We evaluate state-of-the-art LLMs on conflict resolution tasks using this dataset. By employing the dataset, we assess the performance of multiple state-of-the-art LLMs and code LLMs, ultimately uncovering two counterintuitive yet insightful phenomena. ConGra will be released at https://github.com/HKU-System-Security-Lab/ConGra.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。