Better Code Search and Reuse for Better Program Repair

被引:7
作者
Xin, Qi [1 ]
Reiss, Steven [2 ]
机构
[1] Georgia Inst Technol, Atlanta, GA 30332 USA
[2] Brown Univ, Providence, RI 02912 USA
来源
2019 IEEE/ACM 6TH INTERNATIONAL WORKSHOP ON GENETIC IMPROVEMENT (GI@ICSE 2019) | 2019年
关键词
automated program repair; code search; code reuse; GENERATION;
D O I
10.1109/GI.2019.00012
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
A branch of automated program repair (APR) techniques look at finding and reusing existing code for bug repair. ssFix is one of such techniques that is syntactic search-based: it searches a code database for code fragments that are syntactically similar to the bug context and reuses such code fragments to produce patches. The keys to its success lie in the approaches it uses for code search and code reuse. We investigated the effectiveness of ssFix using the Defects4J bug dataset and found that its code search and code reuse approaches are not truly effective and can be significantly improved. Motivated by the investigation, we developed a new repair technique sharpFix that follows ssFix's basic idea but differs significantly in the approaches used for code search and code reuse. We compared sharpFix and ssFix on the Defects4J dataset and confirmed through experiments that (1) sharpFix's code search and code reuse approaches are better than ssFix's approaches and (2) sharpFix can do better repair. sharpFix successfully repaired a total of 36 Defects4J bugs and outperformed many existing repair techniques in repairing more bugs. We also compared sharpFix, ssFix, and four other techniques on another dataset Bugs.jar-ELIXIR. Our results show that sharpFix did better than others and repaired the largest number of bugs.
引用
收藏
页码:10 / 17
页数:8
相关论文
共 38 条
[1]  
Campos J, 2012, IEEE INT CONF AUTOM, P378, DOI 10.1145/2351676.2351752
[2]   QLOSE: Program Repair with Quantitative Objectives [J].
D'Antoni, Loris ;
Samanta, Roopsha ;
Singh, Rishabh .
COMPUTER AIDED VERIFICATION: 28TH INTERNATIONAL CONFERENCE, CAV 2016, PT II, 2016, 9780 :383-401
[3]  
DARPA MUSE, 2016, DARPA MUSE REP
[4]   Fixing Recurring Crash Bugs via Analyzing Q&A Sites [J].
Gao, Qing ;
Zhang, Hansheng ;
Wang, Jie ;
Xiong, Yingfei ;
Zhang, Lu ;
Mei, Hong .
2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, :307-318
[5]  
HDRepair, 2016, HDREPAIR REP
[6]   Poster: Automated Program Repair with Canonical Constraints [J].
Hill, Andrew ;
Pasareanu, Corina S. ;
Stolee, Kathryn T. .
PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING - COMPANION (ICSE-COMPANION, 2018, :339-341
[7]   Shaping Program Repair Space with Existing Patches and Similar Code [J].
Jiang, Jiajun ;
Xiong, Yingfei ;
Zhang, Hongyu ;
Gao, Qing ;
Chen, Xiangqun .
ISSTA'18: PROCEEDINGS OF THE 27TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, 2018, :298-309
[8]  
Just R., 2014, International Symposium on Software Testing and Analysis, ISSTA '14, San Jose, CA, USA - July 21 - 26, 2014, P437, DOI [10.1145/2610384.2628055, DOI 10.1145/2610384.2628055]
[9]   Repairing Programs with Semantic Code Search [J].
Ke, Yalin ;
Stolee, Kathryn T. ;
Le Goues, Claire ;
Brun, Yuriy .
2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, :295-306
[10]  
Kim D, 2013, PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), P802, DOI 10.1109/ICSE.2013.6606626