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