一句话:提出Shibboleth,从生产代码句法/语义相似度与测试覆盖三方面评估APR补丁正确性,排名与分类均优于现有方法。
基于测试的生成-验证式自动程序修复(APR)系统常产生大量通过测试但未真正修复缺陷的补丁,需人工检查。已有动态正确性评估假设正确补丁不应显著改变原通过测试的程序行为。本文提出Shibboleth,从三个方面互补刻画补丁影响:生产代码的句法相似度、语义相似度,以及通过测试的代码覆盖率,以区分产生相似程序且不删除所需程序元素的补丁,并支持排名和分类两种评估模式。作者在29个Java APR系统为Defects4J生成的1,871个补丁上评估,排名前1/前2命中率分别为43%/66%,分类准确率0.887、F1 0.852,优于现有技术。
Test-based generate-and-validate automated program repair (APR) systems often generate many patches that pass the test suite without fixing the bug. The generated patches must be manually inspected by the developers, so previous research proposed various techniques for automatic correctness assessment of APR-generated patches. Among them, dynamic patch correctness assessment techniques rely on the assumption that, when running the originally passing test cases, the correct patches will not alter the program behavior in a significant way, e.g., removing the code implementing correct functionality of the program. In this paper, we propose and evaluate a novel technique, named Shibboleth, for automatic correctness assessment of the patches generated by test-based generate-and-validate APR systems. Unlike existing works, the impact of the patches is captured along three complementary facets, allowing more effective patch correctness assessment. Specifically, we measure the impact of patches on both production code (via syntactic and semantic similarity) and test code (via code coverage of passing tests) to separate the patches that result in similar programs and that do not delete desired program elements. Shibboleth assesses the correctness of patches via both ranking and classification. We evaluated Shibboleth on 1,871 patches, generated by 29 Java-based APR systems for Defects4J programs. The technique outperforms state-of-the-art ranking and classification techniques. Specifically, in our ranking data set, in 43% (66%) of the cases, Shibboleth ranks the correct patch in top-1 (top-2) positions, and in classification mode applied on our classification data set, it achieves an accuracy and F1-score of 0.887 and 0.852, respectively.
@inproceedings{paperbot7442,
title = {Patch correctness assessment in automated program repair based on the impact of patches on production and test code},
author = {Ali Ghanbari and Andrian Marcus},
booktitle = {ISSTA},
year = {2022},
doi = {10.1145/3533767.3534368}
}