The Community for Technology Leaders
2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER) (2018)
Campobasso, Italy
March 20, 2018 to March 23, 2018
ISBN: 978-1-5386-4970-1
pp: 118-129
Xuliang Liu , School of Software, Shanghai Jiao Tong University, China
Hao Zhong , Department of Computer Science and Engineering, Shanghai Jiao Tong University, China
In recent years, automatic program repair has been a hot research topic in the software engineering community, and many approaches have been proposed. Although these approaches produce promising results, some researchers criticize that existing approaches are still limited in their repair capability, due to their limited repair templates. Indeed, it is quite difficult to design effective repair templates. An award-wining paper analyzes thousands of manual bug fixes, but summarizes only ten repair templates. Although more bugs are thus repaired, recent studies show such repair templates are still insufficient. We notice that programmers often refer to Stack Overflow, when they repair bugs. With years of accumulation, Stack Overflow has millions of posts that are potentially useful to repair many bugs. The observation motives our work towards mining repair templates from Stack Overflow. In this paper, we propose a novel approach, called SOFix, that extracts code samples from Stack Overflow, and mines repair patterns from extracted code samples. Based on our mined repair patterns, we derived 13 repair templates. We implemented these repair templates in SOFix, and conducted evaluations on the widely used benchmark, Defects4J. Our results show that SOFix repaired 23 bugs, which are more than existing approaches. After comparing repaired bugs and templates, we find that SOFix repaired more bugs, since it has more repair templates. In addition, our results also reveal the urgent need for better fault localization techniques.
Maintenance engineering, Computer bugs, Data mining, Tools, Manuals, Benchmark testing

X. Liu and H. Zhong, "Mining stackoverflow for program repair," 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), Campobasso, Italy, 2018, pp. 118-129.
85 ms
(Ver 3.3 (11022016))