paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?

GNU Patch 与 Git Cherry-Pick 的数十年:我们能做得更好吗?
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 论文研究语言无关的补丁应用与 cherry-pick 自动化,属于软件工程/开发者工具,并未涉及用户核心关注的静态分析、LLM/Agent 与 PL 交叉、浮点或贝叶斯程序分析。虽可能对 coding agent 的底层补丁落地有间接参考,但主题匹配度较弱。引用 0 inbox
Alexander Schultheiß, Alexander Boll, Paul Maximilian Bittner, Sandra Greiner, Thomas Thüm, Timo Kehrer
crossref: 2026-09-12

AI 速览

一句话:提出语言无关补丁技术 mpatch,通过源到目标匹配定位变更,显著提升自动打补丁成功率并减少手工修复。

补丁是软件维护与演化中的基础任务,用于在不同版本间传播变更。GNU patch 与 Git cherry-pick 等语言无关工具依赖文本行号和上下文,源与目标差异时易失败,导致大量手工修复。本文构建并分析来自 5000 个 GitHub 项目的 40 万余个 cherry-pick 场景,评估现有补丁工具效果,进而提出语言无关技术 mpatch,利用源到目标匹配确定合适变更位置。实验表明,mpatch 比其他语言无关补丁工具多正确自动应用 44% 的补丁,并在无法完全自动化时减少手工修复,从而降低频繁打补丁项目的维护负担。

问题
传统语言无关补丁工具(如 GNU patch 与 Git cherry-pick)依赖文本行号和上下文,当补丁源与目标存在差异时经常失败,迫使开发者手工修复。
方法
作者从 5000 个 GitHub 项目收集并分析 40 万余个 cherry-pick 场景,评估现有工具,并提出 mpatch:一种语言无关补丁技术,通过源到目标匹配确定变更位置。
评估
在收集的大规模补丁场景上比较,mpatch 比其他语言无关工具多正确自动应用 44% 的补丁,并在无法完全自动化时需要更少手工修复。
原文摘要(Abstract)

Patching is a fundamental software maintenance and evolution task enabling the (semi-)automated propagation of changes across different software versions. Established and widely used language-agnostic patchers, such as GNU patch and Git cherry-pick, work on textual artifact representations (i.e., text files) and typically rely on line numbers and contexts (i.e., surrounding unchanged text fragments) to apply changes. This strategy often fails if source and target of a patch differ, provoking cumbersome manual effort. In this paper, we study the effectiveness of commonly-used patchers, and propose a novel technique that significantly increases patch automation. First, we curate and analyze a large dataset of more than 400000 patch scenarios (i.e., cherry picks) from 5000 GitHub projects. Next, we examine the effectiveness of established patchers on the gathered patch scenarios. Third, we develop a novel language-agnostic patch technique, mpatch, that utilizes a source-to-target matching to determine suitable change locations. By comparing mpatch to other patchers, we find that it can correctly apply 44% more patches automatically than other language-agnostic patchers, while it also requires fewer manual fixes in cases that cannot be automated completely. Thus, mpatch considerably reduces the burden of manually fixing failed patches in practice, specifically in projects with frequent patch applications.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11544,
  title = {Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?},
  author = {Alexander Schultheiß and Alexander Boll and Paul Maximilian Bittner and Sandra Greiner and Thomas Thüm and Timo Kehrer},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3764537}
}