paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automated patch porting across forked projects

跨 fork 项目的自动化补丁移植
FSE Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2019匹配度 2/10 · 该论文研究 fork 项目间的自动补丁移植,属于软件工程与程序变换/维护方向,虽涉及代码分析,但未涉及用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析或贝叶斯程序分析。引用 12 inbox
Luyao Ren
crossref: 2026-09-12

AI 速览

一句话:实证分析 fork 项目中的补丁移植需求,并提出自动识别与移植补丁的新方法。

Fork 是开发者复用已有源码并按自身场景定制的常见手段,能显著减轻开发负担,但也使上下游项目在复用代码上共享同一批缺陷;随着各 fork 独立演化,某些缺陷只在一处被修复,补丁需移植到其他分支,而人工追踪这些活动十分困难。已有研究指出跨 fork 补丁移植至关重要,并呼吁开展相关研究。本文针对该问题先做实证研究,分析 fork 项目中补丁的特征:在所有被分析的补丁中,20.5% 需要移植,比例不可忽视;其中 73.2% 可通过简单的语法级代码变换轻松完成移植,但剩余 26.8% 因对应代码在各 fork 中经历了不同的修改而颇具挑战。基于这些洞见,作者提出了一种新方法,目标是自动识别并移植跨 fork 项目的补丁。

问题
上游项目与其 fork 共享复用代码中的缺陷,缺陷往往只在其中一个项目中修复,补丁需移植到其他 fork,但人工追踪与移植这些活动十分困难。
方法
先对 fork 项目中的补丁开展实证研究,统计需要移植的补丁比例及其可移植性特征;再基于研究洞见设计自动识别并移植跨 fork 补丁的方法。
评估
通过实证研究对 fork 项目中的补丁进行特征分析,量化需要移植的补丁占比(20.5%)以及可由简单语法变换完成移植的比例(73.2%),以此支撑方法的动机与设计。
原文摘要(Abstract)

Forking projects provides a straightforward method for developers to reuse existing source code and tailor it to their own application scenarios, which can significantly reduce developers' burden. However, this process makes forked projects (upstream projects and their forks) share the same defects on reused code as well. With the independent development of forked projects, some defects can only be repaired in one of them, where the patches need to be ported to others as well. Manually tracking all such activities among them is hard. Previous studies reveal that porting patches across forked projects is imperative and call research in this direction. Targeting at this problem, we conducted an empirical study to analyze the characteristics of patches in forked projects. We found that 20.5% patches need to be ported among all analyzed patches, which is a non-negligible portion. Among all those patches that need to be ported, 73.2% can be easily ported by simple syntactic code transformations. However, it is still challenging for other 26.8% patches since the corresponding code has experienced different modifications in the forked projects. As a result, according to the insights from the study, we proposed a new approach, which aims to automatically identify and port patches across forked projects.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5055,
  title = {Automated patch porting across forked projects},
  author = {Luyao Ren},
  booktitle = {FSE},
  year = {2019},
  doi = {10.1145/3338906.3342488}
}