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 条
  • [11] Wong W.E., Gao R.Z., Li Y.H., Et al., A survey on software fault localization, IEEE Transactions on Software Engineering, 42, 8, pp. 707-740, (2016)
  • [12] Dallmeier V., Zeller A., Meyer B., Generating fixes from object behavior anomalies, Proceedings of the International Conference on Software Engineering, pp. 550-554, (2009)
  • [13] Perkins J.H., Kim S., Larsen S., Et al., Automatically patching errors in deployed software, Proceedings of the ACM SIGOPS Symposium on Operating Systems Principles, pp. 87-102, (2009)
  • [14] Wei Y., Pei Y., Furia C.A., Meyer B., Et al., Automated fixing of programs with contracts, Proceedings of the International Symposium on Software Testing and Analysis, pp. 61-72, (2010)
  • [15] Pei Y., Wei Y., Furia C.A., Et al., Code-based automated program fixing, Proceedings of the International Conference on Automated Software Engineering, pp. 392-395, (2011)
  • [16] Pei Y., Furia C.A., Nordio M., Meyer B., Automatic program repair by fixing contracts, Proceedings of the International Conference on Fundamental Approaches to Software Engineering, pp. 246-260, (2014)
  • [17] Pei Y., Furia C.A., Nordio M., Et al., Automated fixing of programs with contracts, IEEE Transactions on Software Engineering, 40, 5, pp. 427-449, (2014)
  • [18] Pei Y., Furia C.A., Nordio M., Meyer B., Automated program repair in an integrated development environment, Proceedings of the International Conference on Software Engineering, pp. 681-684, (2015)
  • [19] Liu C., Yang J., Tan L., Hafiz M., R2Fix: Automatically generating bug fixes from bug reports, Proceedings of the International Conference on Software Testing, Verification, and Validation, pp. 282-291, (2013)
  • [20] Le D.X.B., Lo D., Le Goues C., History driven program repair, Proceedings of the International Conference on Software Analysis, Evolution, and Reengineering (SANER), pp. 213-224, (2016)