arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2104.02386cs.SE
收藏

用于自动程序修复的人类克隆变化的大规模研究

A large-scale study on human-cloned changes for automated program repair

Fernanda Madeiral, Thomas Durieux

摘要:

对自动程序修复的研究表明,真正的错误可以自动修复。然而,这一任务涉及的若干挑战尚未得到充分解决。作为一个例子,考虑一个基于测试套件的修复工具在程序中执行一个更改,以修复一个失败的测试用例发现的错误,但是随后同一个或另一个测试用例失败了。这可能意味着更改是对错误的部分修复,或者另一个错误已经显现。但是,修复工具会放弃更改并可能执行其他修复尝试。人们可能会想,应用的更改是否也应该应用于程序中的其他位置,以便完全修复bug。在本文中,我们感兴趣的是调查开发人员在补丁中克隆的错误修复更改的程度。我们的目标是通过在相同或相似的背景下使用相同或相似的变化来调查多位置修复的需要。为此,我们分析了来自ManySStuBs4J数据集的3,049个多块补丁,ManySStuBs4J数据集是一个单语句错误修复更改的大型数据集。我们发现,68%的多块补丁包含至少一个更改克隆组。此外,这些补丁中的大多数(70%)是严格克隆的补丁,这些补丁完全由属于一个单一的更改克隆组的更改组成。最后,大多数严格克隆的补丁(89%)包含具有相同更改的更改克隆,独立于其上下文。我们的结论是,自动化的解决方案,用于创建由相同或相似的变化组成的补丁可以修复错误是有用的。

英文摘要:

Research in automatic program repair has shown that real bugs can be automatically fixed. However, there are several challenges involved in such a task that are not yet fully addressed. As an example, consider that a test-suite-based repair tool performs a change in a program to fix a bug spotted by a failing test case, but then the same or another test case fails. This could mean that the change is a partial fix for the bug or that another bug was manifested. However, the repair tool discards the change and possibly performs other repair attempts. One might wonder if the applied change should be also applied in other locations in the program so that the bug is fully fixed. In this paper, we are interested in investigating the extent of bug fix changes being cloned by developers within patches. Our goal is to investigate the need of multi-location repair by using identical or similar changes in identical or similar contexts. To do so, we analyzed 3,049 multi-hunk patches from the ManySStuBs4J dataset, which is a large dataset of single statement bug fix changes. We found out that 68% of the multi-hunk patches contain at least one change clone group. Moreover, most of these patches (70%) are strictly-cloned ones, which are patches fully composed of changes belonging to one single change clone group. Finally, most of the strictly-cloned patches (89%) contain change clones with identical changes, independently of their contexts. We conclude that automated solutions for creating patches composed of identical or similar changes can be useful for fixing bugs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑