An Analysis of the Search Spaces for Generate and Validate Patch Generation Systems

被引:97
作者
Long, Fan [1 ]
Rinard, Martin
机构
[1] MIT, EECS, Cambridge, MA 02139 USA
来源
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2016年
关键词
Program repair; Patch generation; Search space;
D O I
10.1145/2884781.2884872
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present the first systematic analysis of key characteristics of patch search spaces for automatic patch generation systems. We analyze sixteen different configurations of the patch search spaces of SPR and Prophet, two current state-of-the-art patch generation systems. The analysis shows that 1) correct patches are sparse in the search spaces (typically at most one correct patch per search space per defect), 2) incorrect patches that nevertheless pass all of the test cases in the validation test suite are typically orders of magnitude more abundant, and 3) leveraging information other than the test suite is therefore critical for enabling the system to successfully isolate correct patches. We also characterize a key tradeoff in the structure of the search spaces. Larger and richer search spaces that contain correct patches for more defects can actually cause systems to find fewer, not more, correct patches. We identify two reasons for this phenomenon: 1) increased validation times because of the presence of more candidate patches and 2) more incorrect patches that pass the test suite and block the discovery of correct patches. These fundamental properties, which are all characterized for the first time in this paper, help explain why past systems often fail to generate correct patches and help identify challenges, opportunities, and productive future directions for the field.
引用
收藏
页码:702 / 713
页数:12
相关论文
共 41 条
[1]   The Plastic Surgery Hypothesis [J].
Barr, Earl T. ;
Brun, Yuriy ;
Devanbu, Premkumar ;
Harman, Mark ;
Sarro, Federica .
22ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (FSE 2014), 2014, :306-317
[2]  
Carbin M, 2011, LECT NOTES COMPUT SC, V6813, P609, DOI 10.1007/978-3-642-22655-7_28
[3]  
Debroy Vidroha, 2010, Proceedings of the Third IEEE International Conference on Software Testing, Verification and Validation (ICST 2010), P65, DOI 10.1109/ICST.2010.66
[4]  
DeMarco Favio, 2014, P 6 INT WORKSHOP CON, P30
[5]   Automatic detection and repair of errors in data structures [J].
Demsky, B ;
Rinard, M .
ACM SIGPLAN NOTICES, 2003, 38 (11) :78-95
[6]   Goal-directed reasoning for specification-based data structure repair [J].
Demsky, Brian ;
Rinard, Martin C. .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2006, 32 (12) :931-951
[7]  
Elkarablieh Bassem., 2007, ASE 07 P 22 IEEEACM, P64
[8]   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
[9]   Data-Guided Repair of Selection Statements [J].
Gopinath, Divya ;
Khurshid, Sarfraz ;
Saha, Diptikalyan ;
Chandra, Satish .
36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, :243-253
[10]  
Nguyen HDT, 2013, PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), P772, DOI 10.1109/ICSE.2013.6606623