arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1706.09120cs.SE
收藏

基于测试的程序修复补丁正确性识别

Identifying Patch Correctness in Test-Based Program Repair

Yingfei Xiong, Xinyuan Liu, Muhan Zeng, Lu Zhang, Gang Huang

摘要:

基于测试的程序自动修复近年来引起了广泛的关注。然而,在实践中的测试套件往往是太弱,以保证正确性和现有的方法往往会产生大量的不正确的补丁。为了减少生成的不正确的补丁的数量,我们提出了一种新的方法,该方法可以精确地确定生成的补丁的正确性。其核心思想是利用测试用例执行的行为相似性。对原始程序和修补程序的通过测试可能表现相似,而对原始程序和修补程序的失败测试可能表现不同。此外,如果两个测试表现出类似的运行时行为,则这两个测试可能具有相同的测试结果。基于这些观察,我们生成新的测试输入,以增强测试套件,并使用它们的行为相似性,以确定补丁的正确性。我们的方法进行评估的数据集上生成的139补丁从现有的程序修复系统,包括jGenProg,Nopol,jKali,ACS和HDRepair。我们的方法成功地防止了56.3%的不正确的补丁生成,没有阻止任何正确的补丁。

英文摘要:

Test-based automatic program repair has attracted a lot of attention in recent years. However, the test suites in practice are often too weak to guarantee correctness and existing approaches often generate a large number of incorrect patches. To reduce the number of incorrect patches generated, we propose a novel approach that heuristically determines the correctness of the generated patches. The core idea is to exploit the behavior similarity of test case executions. The passing tests on original and patched programs are likely to behave similarly while the failing tests on original and patched programs are likely to behave differently. Also, if two tests exhibit similar runtime behavior, the two tests are likely to have the same test results. Based on these observations, we generate new test inputs to enhance the test suites and use their behavior similarity to determine patch correctness. Our approach is evaluated on a dataset consisting of 139 patches generated from existing program repair systems including jGenProg, Nopol, jKali, ACS and HDRepair. Our approach successfully prevented 56.3\% of the incorrect patches to be generated, without blocking any correct patches.

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

↑