TY - GEN
T1 - Automatic patch generation learned from human-written patches
AU - Kim, Dongsun
AU - Nam, Jaechang
AU - Song, Jaewoo
AU - Kim, Sunghun
PY - 2013
Y1 - 2013
N2 - Patch generation is an essential software maintenance task because most software systems inevitably have bugs that need to be fixed. Unfortunately, human resources are often insufficient to fix all reported and known bugs. To address this issue, several automated patch generation techniques have been proposed. In particular, a genetic-programming-based patch generation technique, GenProg, proposed by Weimer et al., has shown promising results. However, these techniques can generate nonsensical patches due to the randomness of their mutation operations. To address this limitation, we propose a novel patch generation approach, Pattern-based Automatic program Repair (Par), using fix patterns learned from existing human-written patches. We manually inspected more than 60,000 human-written patches and found there are several common fix patterns. Our approach leverages these fix patterns to generate program patches automatically. We experimentally evaluated Par on 119 real bugs. In addition, a user study involving 89 students and 164 developers confirmed that patches generated by our approach are more acceptable than those generated by GenProg. Par successfully generated patches for 27 out of 119 bugs, while GenProg was successful for only 16 bugs.
AB - Patch generation is an essential software maintenance task because most software systems inevitably have bugs that need to be fixed. Unfortunately, human resources are often insufficient to fix all reported and known bugs. To address this issue, several automated patch generation techniques have been proposed. In particular, a genetic-programming-based patch generation technique, GenProg, proposed by Weimer et al., has shown promising results. However, these techniques can generate nonsensical patches due to the randomness of their mutation operations. To address this limitation, we propose a novel patch generation approach, Pattern-based Automatic program Repair (Par), using fix patterns learned from existing human-written patches. We manually inspected more than 60,000 human-written patches and found there are several common fix patterns. Our approach leverages these fix patterns to generate program patches automatically. We experimentally evaluated Par on 119 real bugs. In addition, a user study involving 89 students and 164 developers confirmed that patches generated by our approach are more acceptable than those generated by GenProg. Par successfully generated patches for 27 out of 119 bugs, while GenProg was successful for only 16 bugs.
UR - http://www.scopus.com/inward/record.url?scp=84886385527&partnerID=8YFLogxK
U2 - 10.1109/ICSE.2013.6606626
DO - 10.1109/ICSE.2013.6606626
M3 - Conference contribution
AN - SCOPUS:84886385527
SN - 9781467330763
T3 - Proceedings - International Conference on Software Engineering
SP - 802
EP - 811
BT - 2013 35th International Conference on Software Engineering, ICSE 2013 - Proceedings
PB - IEEE Computer Society
T2 - 2013 35th International Conference on Software Engineering, ICSE 2013
Y2 - 18 May 2013 through 26 May 2013
ER -