paperbot · PL 论文追踪

全部论文 待读 收藏

P2 EditFusion: Resolving Code Merge Conflicts via Edit Selection

EditFusion:通过编辑选择解决代码合并冲突
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 论文聚焦版本控制中的合并冲突解决,属于软件工程/开发者工具,虽涉及机器学习与程序编辑,但与静态分析、浮点程序分析、贝叶斯程序分析、LLM/Agent 改进静态分析等核心方向无直接关联。引用 0 inbox
Changxin Wang, Lei Xu, Rundong Wang, Yiming Ma, Weifeng Zhang
crossref: 2026-09-12

AI 速览

一句话:将合并冲突解决建模为对原子行级编辑脚本的接受/拒绝二分类,提出可解释的深度学习模型 EditFusion,准确率优于基线。

分布式版本控制系统(如 Git)中的合并冲突长期困扰开发流程,处理不当会阻碍协作并引入错误。现有自动解决思路(多分类、直接生成代码)可解释性差、需大量人工修正,且可能生成微妙错误的代码。作者的经验分析发现,被现有研究普遍忽视的相邻行冲突(对连续行的独立编辑被工具标记为冲突)占比可观,且常可用简单模式解决。为此,论文把冲突解决建模为编辑脚本选择:对构成冲突的每个原子行级编辑脚本做“接受/拒绝”的二值决策,决策直接对应开发者所写的修改,因而推理透明,也贴近开发者逐条审视变更的方式。该方法适用于 94.18% 可在不引入任何新代码行的前提下正确解决的冲突。作者实现了结合语义嵌入与编辑元数据的深度学习模型 EditFusion,并在大规模真实数据集上验证了相邻行冲突的普遍性及该方法相对基线的优越性能。

问题
Git 等 DVCS 中的合并冲突普遍存在,现有自动解决方法可解释性差、需人工精修,且可能产生细微错误,同时普遍忽视了占比很高的相邻行冲突。
方法
将冲突解决形式化为编辑脚本选择:对每个原子行级编辑脚本做接受或拒绝的二值决策,由选中的既有编辑子集直接得到解决结果;实现深度学习模型 EditFusion,利用语义嵌入与编辑元数据进行预测。
评估
在大规模真实数据集上进行实证与对比评估,统计相邻行冲突的占比,并比较 EditFusion 与基线方法在冲突正确解决上的性能,同时说明方法可覆盖 94.18% 无需引入新代码行的冲突。
原文摘要(Abstract)

Merge conflicts in Distributed Version Control Systems (DVCS) like Git are a persistent challenge in the software development lifecycle. If not handled properly or overlooked, they can lead to issues like hindering collaboration and introducing errors. While automated resolution methods exist, prevailing approaches—such as multi-class classification and direct code generation—often suffer from limited interpretability, demanding substantial manual effort to refine predictions, and risk producing subtly flawed code. Critically, existing research often overlooks a prevalent conflict type: adjacent-line conflicts, where independent edits to contiguous lines are flagged by tools like Git. Our empirical analysis reveals that these make up a substantial portion of all conflicts. Moreover, they can often be resolved using simple patterns.Motivated by these limitations and empirical findings, we propose a novel approach: modeling merge conflict resolution as edit script selection. Instead of predicting abstract categories or generating code from scratch, our method makes a binary decision for each atomic line-level edit script contributing to the conflict: accept or reject. Our method inherently makes the reasoning behind proposed solutions transparent, as decisions directly correspond to individual, developer-authored code modifications. It also aligns closely with how developers naturally approach conflict analysis by considering each change in context. Our method applies to the vast majority (94.18%) of conflicts that can be correctly resolved without introducing any novel code lines—that is, lines not present in any of the parent versions being merged; this selection process directly yields the resolved code by applying the chosen subset of existing edits. We developed EditFusion, a deep learning model that performs edit script selection by leveraging semantic embeddings and edit metadata. Extensive evaluation on large-scale, real-world datasets demonstrates both the prevalence of adjacent-line conflicts and EditFusion’s superior performance in accurately resolving conflicts compared to baselines. Our work represents an attempt towards more transparent, intuitive, and practical automated merge conflict resolution.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9519,
  title = {EditFusion: Resolving Code Merge Conflicts via Edit Selection},
  author = {Changxin Wang and Lei Xu and Rundong Wang and Yiming Ma and Weifeng Zhang},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00055}
}