Automatic Program Repair Techniques: A Survey

被引:0
|
作者
Wang Z. [1 ]
Gao J. [1 ]
Chen X. [2 ]
Fu H.-J. [1 ]
Fan X.-Y. [1 ]
机构
[1] School of Computer Software, Tianjin University, Tianjin
[2] School of Computer Science and Technology, Nantong University, Nantong, 226019, Jiangsu
来源
基金
中国国家自然科学基金;
关键词
Automatic program repair; Concurrency bug repair; Constraint solving; Search based software engineering; Software fault localization;
D O I
10.11897/SP.J.1016.2018.00588
中图分类号
学科分类号
摘要
When developers do not know how to fix the defects in many bugreports, automatic program repair (APR) can successfully repair some bugs to reduce developer's debugging time effectively. Therefore, APR has been an active research topic in software maintenance domain and has made some progress nowadays. After retrieving more than 100 papers from the authoritative journals and conferences, this survey offers a systematic overview of existing research work on APR to highlight the research progress, identify the important issues, and summarize the achievements of related research groups in APR. Among all approaches of APR, test suite based APR is the current mainstream, which utilizes the test suite to verify the generated patches and includes three main stages: Fault localization, patch generation, and patch evaluation. As the foundation stage of test suite based APR, fault localization aims to identify statements that may contain defects as precisely as possible. After localizing the buggy statements, some candidate patches are then generated by predefined modification operators. The design of modification operators is based on the program itself, the code from the open source projects, or the information in the Q&A sites. In the patch evaluation stage, the candidate patches are evaluated until a patch is found that allows all test cases to pass and subsequently be confirmed by developers manually. In these three stages, the patch generation phase is the emphasis and the existing patch generation methods can be classified into three categories: search based methods, semantic based methods and other types of methods. The search based methods, such as GenProg, PAR, AE, RSrepair etc., generate patches by searching in a search space, and use the test suite to verify the correctness of the patch; the semantic based methods, such as SemFix, DirectFix, Angelix, Nopol etc., exploit semantic information to synthesize patches with symbolic execution and constraint solving techniques; Those research work not belong to the above two categories can be attributed to other types of methods, some classical work of them includes mining Q&A sites and open source projects hosting site to generate patches. The patch evaluation stage is the focus of APR. In recent two years, researchers have paid more attention to the distribution of the correct patches in the search space and the correctness of the patch. Especially, further exploration has been made to pursue lower verification overhead and higher quality of patch. In addition, this survey summarizes APR methods in some specific domains, such as concurrent defects, database defects, null pointer defects, data structure defects, and memory leak defects. Among these specific areas, we specifically analyzed APR methods for concurrent defects, which can be classified into automatic repair of data race, atomicity violation, order violation and deadlock. Moreover, the paper summarizes the commonly used defect benchmarks in the empirical evaluation of APR. It is not hard to find that ManyBugs, IntroClass, Simens suites and Defect4J are the most popular benchmarks. To assist researchers in comparing other APR methods with their proposed methods, the survey also collects all the available APR tools, including the reference papers and corresponding download links. Next, some active research groups as well as their contributions are summarized to facilitate the timely follow-up of their future research work. Finally, the survey looks forward to the future research work from the five aspects, including fault localization, patch generation and evaluation, defect number and type, APR in specific domains and application of APR in the industry. © 2018, Science Press. All right reserved.
引用
收藏
页码:588 / 610
页数:22
相关论文
共 103 条
  • [91] Cornu B., Durieux T., Seinturier L., Et al., NPEFix: Automatic runtime repair of null pointer exceptions in Java, (2015)
  • [92] Gao Q., Xiong Y., Mi Y., Zhang L., Et al., Safe memory-leak fixing for C programs, Proceedings of the International Conference on Software Engineering, pp. 459-470, (2015)
  • [93] Long F., Sidiroglou-Douskos S., Rinard M., Automatic runtime error repair and containment via recovery shepherding, Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 227-238, (2014)
  • [94] Gopinath D., Khurshid S., Saha D., Et al., Data-guided repair of selection statements, Proceedings of the 36th International Conference on Software Engineering, pp. 243-253, (2014)
  • [95] Ocariza F.S., Pattabiraman K., Mesbah A., Vejovis: Suggesting fixes for JavaScript faults, Proceedings of the International Conference on Software Engineering, pp. 837-847, (2014)
  • [96] Samirni H., Schafer M., Artzi S., Et al., Automated repair of HTML generation errors in PHP applications using string constraint solving, Proceedings of the International Conference on Software Engineering, pp. 277-287, (2012)
  • [97] Demsky B., Rinard M., Automatic detection and repair of errors in data structures, ACM SIGPLAN Notices, 38, 11, pp. 78-95, (2003)
  • [98] Demsky B., Rinard M.C., Goal-directed reasoning for specification-based data structure repair, IEEE Transactions on Software Engineering, 32, 12, pp. 931-951, (2006)
  • [99] Sidiroglou-Douskos S., Lahtinen E., Long F., Rinard M., Automatic error elimination by horizontal code transfer across multiple applications, Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 43-54, (2015)
  • [100] Le Goues C., Holtschulte N., Smith E.K., Et al., ManyBugs and IntroClass Benchmarks for Automated Repair of C Programs, IEEE Transactions on Software Engineering, 41, 12, pp. 1236-1256, (2015)