一句话:通过六种重叠度量实证研究历史修复能否为自动程序修复提供可复用线索。
自动程序修复(APR)常尝试复用过往修复来修复新缺陷,但新旧修复之间究竟如何重叠尚缺乏系统研究。本文设计六种重叠度量,对5,735个缺陷修复进行实证分析:为每个修复构建增量依赖图(delta dependency graph),从修复内容、代码结构和标识符名称三个维度刻画重叠。结果显示,若仅完全或部分复用过往修复的内容,同项目内单/多修复最多只能生成2.1%和3.2%的新修复,跨项目为0.9%和1.2%;若复用代码结构,则可分别达到41.3%和29.7%。这表明代码结构比具体内容更有复用价值。
Researchers have recently proposed various automatic program repair (APR) approaches that reuse past fixes to fix new bugs. However, some fundamental questions, such as how new fixes overlap with old fixes, have not been investigated. Intuitively, the overlap between old and new fixes decides how APR approaches can construct new fixes with old ones. Based on this intuition, we systematically designed six overlap metrics, and performed an empirical study on 5,735 bug fixes to investigate the usefulness of past fixes when composing new fixes. For each bug fix, we created delta dependency graphs (i.e., program dependency graphs for code changes), and identified how bug fixes overlapped with each other in terms of the content, code structure, and identifier names of fixes. Our results show that if an APR approach composes new fixes by fully or partially reusing the content of past fixes, only 2.1% and 3.2% new fixes can be created from single or multiple past fixes in the same project, compared with 0.9% and 1.2% fixes created from past fixes across projects. However, if an APR approach composes new fixes by fully or partially reusing the code structure of past fixes, up to 41.3% and 29.7% new fixes can be created.
DOI 原文 ·
@inproceedings{paperbot4525,
title = {Towards reusing hints from past fixes},
author = {Hao Zhong and Na Meng},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3182550}
}