• DocumentCode
    3142745
  • Title

    Automatic patch generation learned from human-written patches

  • Author

    Dongsun Kim ; Jaechang Nam ; Jaewoo Song ; Sunghun Kim

  • Author_Institution
    Hong Kong Univ. of Sci. & Technol., Hong Kong, China
  • fYear
    2013
  • fDate
    18-26 May 2013
  • Firstpage
    802
  • Lastpage
    811
  • Abstract
    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.
  • Keywords
    genetic algorithms; software maintenance; user interfaces; GenProg; automated patch generation; automatic patch generation; genetic programming based patch generation; human resources; human written patches; pattern based automatic program repair; software maintenance task; software systems; Arrays; Computer bugs; Context; Fault location; Maintenance engineering; Manuals; Semantics;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2013 35th International Conference on
  • Conference_Location
    San Francisco, CA
  • Print_ISBN
    978-1-4673-3073-2
  • Type

    conf

  • DOI
    10.1109/ICSE.2013.6606626
  • Filename
    6606626