Enhanced evolutionary automated program repair by finer-granularity ingredients and better search algorithms

被引:1
作者
Wang, Bo [1 ,2 ,4 ]
Liu, Guizhuang [1 ]
Lin, Youfang [1 ,2 ]
Ren, Shuang [1 ]
Li, Honghui [1 ]
Zhang, Dalin [3 ]
机构
[1] Beijing Jiaotong Univ, Sch Comp & Informat Technol, Beijing, Peoples R China
[2] Beijing Key Lab Traff Data Anal & Min, Beijing, Peoples R China
[3] Beijing Jiaotong Univ, Sch Software Engn, Beijing, Peoples R China
[4] Beijing Jiaotong Univ, Bldg 9,3 Shangyuancun, Beijing 100044, Peoples R China
基金
中国国家自然科学基金;
关键词
automated program repair; evolutionary program repair; genetic improvement; genetic programming;
D O I
10.1002/smr.2624
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Bug repair is time consuming and tedious, which hampers software maintenance. To alleviate the burden, automated program repair (APR) is proposed and has been fruitful in the last decade. Evolutionary repair is the seminal work of this field and proliferated a family of approaches. The performance of evolutionary repair approaches is affected by two main factors: (1) search space, which defines all possible patches, and (2) search algorithms, which navigate the space. Although recent approaches have achieved remarkable progress, the main challenges of the two factors still remain. On one hand, the different kinds of search space are very coarse for containing correct patches. On the other hand, the search process guided by genetic algorithms is inefficient in finding the correct patches in an appropriate time budget. In this paper, we propose MicroRepair, a new evolutionary repair approach to address the two challenges. Rather than finding statement-level patches like existing genetic repair approaches, MicroRepair enlarges the search space by breaking the statements into finer-granularity ingredients that consist of AST leaves. As the search space grows exponentially, the former search algorithms may become inefficient in navigating the larger space. We utilize the best multiobjective search algorithm selected from our empirical comparison of a set of search algorithms. At last, we find redundancies search in the existing genetic process, and we further design a history-aware search strategy to accelerate the process.We evaluated MicroRepair on 224 bugs of real-world from the benchmark Defects4J and compared it with several state-of-the-art repair approaches. The evaluation results show that MicroRepair correctly repaired 26 bugs with a precision of 62%, which significantly outperforms the state-of-the-art evolutionary APR approaches in terms of precision. Moreover, the history-aware search boosts the repair execution speed by 4% on average. MicroRepair is a new automated program repair approach that enlarges the search space by breaking statements into finer-granularity ingredients. It outperforms state-of-the-art evolutionary APR approaches in terms of precision, correctly repairing 26 bugs with a 62% precision rate. image
引用
收藏
页数:20
相关论文
共 70 条
  • [1] Abreu R, 2006, 12TH PACIFIC RIM INTERNATIONAL SYMPOSIUM ON DEPENDABLE COMPUTING, PROCEEDINGS, P39
  • [2] [Anonymous], 2013, Reversible debugging software-quantify the time and cost saved using reversible debuggersJ
  • [3] The Plastic Surgery Hypothesis
    Barr, Earl T.
    Brun, Yuriy
    Devanbu, Premkumar
    Harman, Mark
    Sarro, Federica
    [J]. 22ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (FSE 2014), 2014, : 306 - 317
  • [4] Refining Fitness Functions for Search-Based Program Repair
    Bian, Zhiqiang
    Blot, Aymeric
    Petke, Justyna
    [J]. 2021 IEEE/ACM INTERNATIONAL WORKSHOP ON AUTOMATED PROGRAM REPAIR (APR 2021), 2021, : 1 - 8
  • [5] Chen LS, 2017, IEEE INT CONF AUTOM, P637, DOI 10.1109/ASE.2017.8115674
  • [6] SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair
    Chen, Zimin
    Kommrusch, Steve
    Tufano, Michele
    Pouchet, Louis-Noel
    Poshyvanyk, Denys
    Monperrus, Martin
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (09) : 1943 - 1959
  • [7] Corne D. W., 2001, GECCO 01, P283, DOI DOI 10.5555/2955239.2955289
  • [8] A fast and elitist multiobjective genetic algorithm: NSGA-II
    Deb, K
    Pratap, A
    Agarwal, S
    Meyarivan, T
    [J]. IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, 2002, 6 (02) : 182 - 197
  • [9] Fraser Gordon, 2011, P 19 ACM SIGSOFT S 1, P416
  • [10] Beyond Tests: Program Vulnerability Repair via Crash Constraint Extraction
    Gao, Xiang
    Wang, Bo
    Duck, Gregory J.
    Ji, Ruyi
    Xiong, Yingfei
    Roychoudhury, Abhik
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2021, 30 (02)