首页> 外文期刊>Software Engineering, IEEE Transactions on >Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs
【24h】

Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs

机译:Nopol:Java程序中条件语句错误的自动修复

获取原文
获取原文并翻译 | 示例

摘要

We propose Nopol, an approach to automatic repair of buggy conditional statements (i.e., if-then-else statements). This approach takes a buggy program as well as a test suite as input and generates a patch with a conditional expression as output. The test suite is required to contain passing test cases to model the expected behavior of the program and at least one failing test case that reveals the bug to be repaired. The process of Nopol consists of three major phases. First, Nopol employs angelic fix localization to identify expected values of a condition during the test execution. Second, runtime trace collection is used to collect variables and their actual values, including primitive data types and objected-oriented features (e.g., nullness checks), to serve as building blocks for patch generation. Third, Nopol encodes these collected data into an instance of a Satisfiability Modulo Theory (SMT) problem; then a feasible solution to the SMT instance is translated back into a code patch. We evaluate Nopol on 22 real-world bugs (16 bugs with buggy if conditions and six bugs with missing preconditions) on two large open-source projects, namely Apache Commons Math and Apache Commons Lang. Empirical analysis on these bugs shows that our approach can effectively fix bugs with buggy if conditions and missing preconditions. We illustrate the capabilities and limitations of Nopol using case studies of real bug fixes.
机译:我们提出了Nopol,这是一种自动修复有问题的条件语句(即if-then-else语句)的方法。这种方法将一个有问题的程序以及一个测试套件作为输入,并生成一个带有条件表达式的补丁作为输出。测试套件必须包含通过的测试用例,以对程序的预期行为进行建模,并至少包含一个失败的测试用例,以揭示要修复的错误。 Nopol的过程包括三个主要阶段。首先,Nopol使用天使定位本地化来确定测试执行过程中条件的期望值。其次,运行时跟踪收集用于收集变量及其实际值,包括原始数据类型和面向对象的功能(例如,无效性检查),以用作补丁生成的构建块。第三,Nopol将这些收集的数据编码为可满足性模理论(SMT)问题的实例。然后将SMT实例的可行解决方案转换回代码补丁。我们在两个大型开源项目(Apache Commons Math和Apache Commons Lang)上评估了22个真实世界的bug(如果有条件则有16个bug,有缺少先决条件的bug)对Nopol的评估。对这些错误的经验分析表明,如果条件和缺少先决条件,我们的方法可以有效地修复具有错误的错误。我们通过实际漏洞修复案例研究来说明Nopol的功能和局限性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号