Mining StackOverflow for Program Repair

被引:0
|
作者
Liu, Xuliang [1 ]
Zhong, Hao [2 ]
机构
[1] Shanghai Jiao Tong Univ, Sch Software, Shanghai, Peoples R China
[2] Shanghai Jiao Tong Univ, Dept Comp Sci & Engn, Shanghai, Peoples R China
关键词
program repair; Stack Overflow; repair template; TOOL;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:118 / 129
页数:12
相关论文
共 50 条
  • [41] Source Code Curation on StackOverflow: The Vesperin System
    Sanchez, Huascar
    Whitehead, Jim
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 2, 2015, : 661 - 664
  • [42] Repair Is Nearly Generation: Multilingual Program Repair with LLMs
    Joshi, Harshit
    Sanchez, Jose Cambronero
    Gulwani, Sumit
    Le, Vu
    Radicek, Ivan
    Verbruggen, Gust
    THIRTY-SEVENTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 37 NO 4, 2023, : 5131 - 5140
  • [43] Partial Specifications for Program Repair
    Kitt, Linsey
    Cohen, Myra B.
    2021 IEEE/ACM INTERNATIONAL WORKSHOP ON GENETIC IMPROVEMENT (GI 2021), 2021, : 19 - 20
  • [44] The master ordnance repair program
    Stimson, SA
    NAVAL ENGINEERS JOURNAL, 2006, 118 (01) : 83 - 92
  • [45] Cerberus: a Program Repair Framework
    Shariffdeen, Ridwan
    Mirchev, Martin
    Noller, Yannic
    Roychoudhury, Abhik
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS, ICSE-COMPANION, 2023, : 73 - 77
  • [46] The master ordnance repair program
    Stimson, William A.
    Naval Engineers Journal, 1600, 118 (01): : 83 - 92
  • [47] Program Repair Competition 2024
    Shariffdeen, Ridwan
    Noller, Yannic
    Mirchev, Martin
    Ruan, Haifeng
    Gao, Xiang
    Costea, Andreea
    Duck, Gregory J.
    Roychoudhury, Abhik
    2024 ACM/IEEE INTERNATIONAL WORKSHOP ON AUTOMATED PROGRAM REPAIR, APR 2024, 2024, : 46 - 49
  • [48] Program repair without regret
    von Essen, Christian
    Jobstmann, Barbara
    FORMAL METHODS IN SYSTEM DESIGN, 2015, 47 (01) : 26 - 50
  • [49] Toward a theory of program repair
    Khaireddine, Besma
    Zakharchenko, Aleksandr
    Martinez, Matias
    Mili, Ali
    ACTA INFORMATICA, 2023, 60 (03) : 209 - 255
  • [50] Toward a theory of program repair
    Besma Khaireddine
    Aleksandr Zakharchenko
    Matias Martinez
    Ali Mili
    Acta Informatica, 2023, 60 : 209 - 255