利用进化进行多大块程序修复
Harnessing Evolution for Multi-Hunk Program Repair
摘要:
尽管在过去的十年中,自动程序修复(APR)技术取得了重大进展,但实际部署仍然是一个难以捉摸的目标。在这方面的重要挑战之一是当前APR技术一般不能产生需要在多个位置编辑的补丁,即,多块补丁在这项工作中,我们提出了一种新的APR技术,推广单大块修复技术,包括一个重要的一类多大块的错误,即错误,可能需要应用一个基本上类似的补丁在一些位置。我们将这些修复位置称为进化兄弟姐妹--在相似的环境中实例化的相似代码,预计会经历相似的变化。我们提出的方法的核心是分析,以准确地识别一组进化的兄弟姐妹,对于一个给定的错误。这个分析利用了三个不同的信息源,即测试套件谱,一个新的代码相似性分析,以及项目的修订历史。发现的兄弟姐妹然后以类似的方式同时修复。我们在一个名为Hercules的工具中实例化了这种技术,并证明它能够正确修复Defects 4J数据集中的49个错误,这是迄今为止任何单独的APR技术中最高的。这包括15个多大块的错误和13个迄今为止还没有被任何其他技术修复的错误。
英文摘要:
Despite significant advances in automatic program repair (APR)techniques over the past decade, practical deployment remains an elusive goal. One of the important challenges in this regard is the general inability of current APR techniques to produce patches that require edits in multiple locations, i.e., multi-hunk patches. In this work, we present a novel APR technique that generalizes single-hunk repair techniques to include an important class of multi-hunk bugs, namely bugs that may require applying a substantially similar patch at a number of locations. We term such sets of repair locations as evolutionary siblings - similar looking code, instantiated in similar contexts, that are expected to undergo similar changes. At the heart of our proposed method is an analysis to accurately identify a set of evolutionary siblings, for a given bug. This analysis leverages three distinct sources of information, namely the test-suite spectrum, a novel code similarity analysis, and the revision history of the project. The discovered siblings are then simultaneously repaired in a similar fashion. We instantiate this technique in a tool called Hercules and demonstrate that it is able to correctly fix 49 bugs in the Defects4J dataset, the highest of any individual APR technique to date. This includes 15 multi-hunk bugs and overall 13 bugs which have not been fixed by any other technique so far.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。