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

ARJA:基于多目标遗传编程的Java程序自动修复

ARJA: Automated Repair of Java Programs via Multi-Objective Genetic Programming

Yuan Yuan, Wolfgang Banzhaf

摘要:

最近的实证研究表明,GenProg的性能并不令人满意,特别是对于Java。在本文中,我们提出了ARJA,一个新的GP为基础的修复方法自动修复的Java程序。具体来说,我们提出了一种新的低粒度补丁表示,适当的搜索子空间的可能错误的位置,操作类型和潜在的修复成分,使GP探索搜索空间更有效。基于这种新的表示,我们制定自动程序修复作为一个多目标的搜索问题,并使用NSGA-II寻找更简单的修复。为了减少计算量和搜索空间,我们引入了一个测试过滤过程,可以加快适应度评估的GP和三种类型的规则,可以应用到避免不必要的操作的代码。此外,我们还提出了一种类型匹配策略,可以通过利用现有语句的语法模式来创建新的潜在修复成分。我们进行了一个大规模的实证评估ARJA及其变种的种子错误和现实世界的错误相比,几个国家的最先进的修复方法。我们的研究结果验证了ARJA中所采用的搜索机制的有效性和效率,也显示了其优于其他方法。特别是,与jGenProg(GenProg for Java的实现)相比,完全遵循冗余假设的ARJA版本可以为两倍以上的bug数量(从27到59)生成测试套件足够的补丁,并为近四倍的数量(从5到18)生成正确的补丁,在Defects 4J中考虑了224个真实世界的bug。此外,ARJA是能够正确地修复几个真正的多位置的错误,很难被修复的大多数现有的修复方法。

英文摘要:

Recent empirical studies show that the performance of GenProg is not satisfactory, particularly for Java. In this paper, we propose ARJA, a new GP based repair approach for automated repair of Java programs. To be specific, we present a novel lower-granularity patch representation that properly decouples the search subspaces of likely-buggy locations, operation types and potential fix ingredients, enabling GP to explore the search space more effectively. Based on this new representation, we formulate automated program repair as a multi-objective search problem and use NSGA-II to look for simpler repairs. To reduce the computational effort and search space, we introduce a test filtering procedure that can speed up the fitness evaluation of GP and three types of rules that can be applied to avoid unnecessary manipulations of the code. Moreover, we also propose a type matching strategy that can create new potential fix ingredients by exploiting the syntactic patterns of the existing statements. We conduct a large-scale empirical evaluation of ARJA along with its variants on both seeded bugs and real-world bugs in comparison with several state-of-the-art repair approaches. Our results verify the effectiveness and efficiency of the search mechanisms employed in ARJA and also show its superiority over the other approaches. In particular, compared to jGenProg (an implementation of GenProg for Java), an ARJA version fully following the redundancy assumption can generate a test-suite adequate patch for more than twice the number of bugs (from 27 to 59), and a correct patch for nearly four times of the number (from 5 to 18), on 224 real-world bugs considered in Defects4J. Furthermore, ARJA is able to correctly fix several real multi-location bugs that are hard to be repaired by most of the existing repair approaches.

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

↑