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

通过历史特征频率排名可能的补丁

Ranking Plausible Patches by Historic Feature Frequencies

USI Università della Svizzera italiana(瑞士意大利语联邦理工学院);University of Southern Denmark(南丹麦大学);The Hong Kong Polytechnic University(香港理工大学)

Shifat Sahariar Bhuiyan, Abhishek Tiwari, Yu Pei, Carlo A. Furia

AI总结:

本文提出PrevaRank技术,通过历史程序员修复相似缺陷的补丁特征相似性,提升自动程序修复工具中正确补丁的排名效果,实验表明其显著提高了正确补丁的排名质量。

摘要:

自动化程序修复(APR)技术已取得显著进展,能够产生真正正确的修复方案。然而,即使APR技术能找到正确的修复方案,仍可能将正确修复排在其他可能的但不正确的补丁之下,影响实际效果。本文提出PrevaRank技术,根据历史程序员编写修复方案的特征相似性对任何APR技术生成的可能补丁进行排名。PrevaRank实现简单的启发式方法,使其可扩展并适用于任何生成可能补丁的APR工具。在实验评估中,训练PrevaRank于81个开源Java项目的修复历史后,将其用于对8个Java APR工具在168个Defects4J缺陷上生成的补丁进行排名。PrevaRank一致提高了正确修复的排名:例如,在27%更多的情况下,正确修复被排在前3名以内。其他实验结果表明,PrevaRank在各种APR工具和缺陷上具有鲁棒性,且具有可忽略的开销。

英文摘要:

Automated program repair (APR) techniques have achieved conspicuous progress, and are now capable of producing genuinely correct fixes in scenarios that were well beyond their capabilities only a few years ago. Nevertheless, even when an APR technique can find a correct fix for a bug, it still runs the risk of ranking the fix lower than other patches that are plausible (they pass all available tests) but incorrect. This can seriously hurt the technique's practical effectiveness, as the user will have to peruse a larger number of patches before finding the correct one. This paper presents PrevaRank, a technique that ranks plausible patches produced by any APR technique according to their feature similarity with historic programmer-written fixes for similar bugs. PrevaRank implements simple heuristics, which help make it scalable and applicable to any APR tool that produces plausible patches. In our experimental evaluation, after training PrevaRank on the fix history of 81 open-source Java projects, we used it to rank patches produced by 8 Java APR tools on 168 Defects4J bugs. PrevaRank consistently improved the ranking of correct fixes: for example, it ranked a correct fix within the top-3 positions in 27% more cases than the original tools did. Other experimental results indicate that PrevaRank works robustly with a variety of APR tools and bugs, with negligible overhead.

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

↑