重新审视ssFix以更好地修复程序
Revisiting ssFix for Better Program Repair
摘要:
自动程序修复(APR)技术的一个分支着眼于查找和重用现有代码以进行错误修复。ssFix是基于语法搜索的技术之一:它在代码数据库中搜索与bug上下文语法相似的代码片段,并重用这些检索到的代码片段来生成补丁。使用这样的语法方法,ssFix是相对轻量级的,并且表现出优于许多其他APR技术。在本文中,为了研究ssFix的真正有效性,我们进行了多个实验来验证ssFix的内置假设(即,以了解是否经常可以重用现有代码进行错误修复),并评估其代码搜索和代码重用方法。我们的研究结果表明,虽然ssFix的基本思想,即,重用现有代码进行错误修复是有希望的,ssFix使用的方法不是最好的,可以显着改进。我们提出了一种新的修复技术sharpFix,它遵循ssFix的基本思想,但不同的代码搜索和重用方法。我们在两个bug数据集上评估了sharpFix和ssFix:Defects 4J和Bugs.jar-ELIXIR。结果证实sharpFix是ssFix的改进。对于Defects 4J数据集,sharpFix成功修复了总共36个错误,并且在修复更多错误方面优于许多现有的修复技术。对于Bugs.jar-ELIXIR数据集,我们比较了sharpFix、ssFix和其他四种APR技术,发现sharpFix具有最佳的修复性能。从本质上讲,本文展示了如何有效的句法搜索为基础的方法可以和什么技术应该用于这样的方法。
英文摘要:
A branch of automated program repair (APR) techniques look at finding and reusing existing code for bug repair. ssFix is one of such techniques that is syntactic search-based: it searches a code database for code fragments that are syntactically similar to the bug context and reuses such retrieved code fragments to produce patches. Using such a syntactic approach, ssFix is relatively lightweight and was shown to outperform many other APR techniques. In this paper, to investigate the true effectiveness of ssFix, we conducted multiple experiments to validate ssFix's built-upon assumption (i.e., to see whether it is often possible to reuse existing code for bug repair) and evaluate its code search and code reuse approaches. Our results show that while the basic idea of ssFix, i.e., reusing existing code for bug repair, is promising, the approaches ssFix uses are not the best and can be significantly improved. We proposed a new repair technique sharpFix which follows ssFix's basic idea but differs in the code search and reuse approaches used. We evaluated sharpFix and ssFix on two bug datasets: Defects4J and Bugs.jar-ELIXIR. The results confirm that sharpFix is an improvement over ssFix. For the Defects4J dataset, sharpFix successfully repaired a total of 36 bugs and outperformed many existing repair techniques in repairing more bugs. For the Bugs.jar-ELIXIR dataset, we compared sharpFix, ssFix, and four other APR techniques, and found that sharpFix has the best repair performance. In essence, the paper shows how effective a syntactic search-based approach can be and what techniques should be used for such an approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。