SOSRepair: Expressive Semantic Search for Real-World Program Repair

被引:18
|
作者
Afzal, Afsoon [1 ]
Motwani, Manish [2 ]
Stolee, Kathryn T. [3 ]
Brun, Yuriy [2 ]
Le Goues, Claire [1 ]
机构
[1] Carnegie Mellon Univ, Sch Comp Sci, Pittsburgh, PA 15213 USA
[2] Univ Massachusetts, Coll Informat & Comp Sci, Amherst, MA 01003 USA
[3] North Carolina State Univ, Dept Comp Sci, Raleigh, NC 27695 USA
基金
美国国家科学基金会;
关键词
Maintenance engineering; Semantic search; Encoding; Benchmark testing; Computer bugs; Software; Automated program repair; semantic code search; patch quality; program repair quality; SOSRepair; RESPONSIBILITY; GENERATION; COMPLEXITY; CAUSALITY;
D O I
10.1109/TSE.2019.2944914
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automated program repair holds the potential to significantly reduce software maintenance effort and cost. However, recent studies have shown that it often produces low-quality patches that repair some but break other functionality. We hypothesize that producing patches by replacing likely faulty regions of code with semantically-similar code fragments, and doing so at a higher level of granularity than prior approaches can better capture abstraction and the intended specification, and can improve repair quality. We create SOSRepair, an automated program repair technique that uses semantic code search to replace candidate buggy code regions with behaviorally-similar (but not identical) code written by humans. SOSRepair is the first such technique to scale to real-world defects in real-world systems. On a subset of the ManyBugs benchmark of such defects, SOSRepair produces patches for 22 (34%) of the 65 defects, including 3, 5, and 6 defects for which previous state-of-the-art techniques Angelix, Prophet, and GenProg do not, respectively. On these 22 defects, SOSRepair produces more patches (9, 41%) that pass all independent tests than the prior techniques. We demonstrate a relationship between patch granularity and the ability to produce patches that pass all independent tests. We then show that fault localization precision is a key factor in SOSRepair's success. Manually improving fault localization allows SOSRepair to patch 23 (35%) defects, of which 16 (70%) pass all independent tests. We conclude that (1) higher-granularity, semantic-based patches can improve patch quality, (2) semantic search is promising for producing high-quality real-world defect repairs, (3) research in fault localization can significantly improve the quality of program repair techniques, and (4) semi-automated approaches in which developers suggest fix locations may produce high-quality patches.
引用
收藏
页码:2162 / 2181
页数:20
相关论文
共 50 条
  • [1] Quality of Automated Program Repair on Real-World Defects
    Motwani, Manish
    Soto, Mauricio
    Brun, Yuriy
    Just, Rene
    Le Goues, Claire
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (02) : 637 - 661
  • [2] APR4Vul: an empirical study of automatic program repair techniques on real-world Java vulnerabilities
    Quang-Cuong Bui
    Ranindya Paramitha
    Duc-Ly Vu
    Fabio Massacci
    Riccardo Scandariato
    Empirical Software Engineering, 2024, 29
  • [3] APR4Vul: an empirical study of automatic program repair techniques on real-world Java']Java vulnerabilities
    Bui, Quang-Cuong
    Paramitha, Ranindya
    Vu, Duc-Ly
    Massacci, Fabio
    Scandariato, Riccardo
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (01)
  • [4] Algorithmic Profiling for Real-World Complexity Problems
    Qin, Boqin
    Tu, Tengfei
    Liu, Ziheng
    Yu, Tingting
    Song, Linhai
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 48 (07) : 2680 - 2694
  • [5] Priority Measurement of Patches for Program Repair Based on Semantic Distance
    Dong, Yukun
    Wu, Meng
    Zhang, Li
    Yin, Wenjing
    Wu, Mengying
    Li, Haojie
    SYMMETRY-BASEL, 2020, 12 (12): : 1 - 17
  • [6] A Novel Approach For Search-Based Program Repair
    Trujillo, Leonardo
    Villanueva, Omar M.
    Hernandez, Daniel Eduardo
    IEEE SOFTWARE, 2021, 38 (04) : 36 - 42
  • [7] Better Code Search and Reuse for Better Program Repair
    Xin, Qi
    Reiss, Steven
    2019 IEEE/ACM 6TH INTERNATIONAL WORKSHOP ON GENETIC IMPROVEMENT (GI@ICSE 2019), 2019, : 10 - 17
  • [8] A Closer Look at Real-World Patches
    Liu, Kui
    Kim, Dongsun
    Koyuncu, Anil
    Li, Li
    Bissyande, Tegawende F.
    Le Traon, Yves
    PROCEEDINGS 2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2018, : 275 - 286
  • [9] Towards Theory for Real-World Data
    Martens, Wim
    PROCEEDINGS OF THE 41ST ACM SIGMOD-SIGACT-SIGAI SYMPOSIUM ON PRINCIPLES OF DATABASE SYSTEMS (PODS '22), 2022, : 261 - 276
  • [10] The Strength of Random Search on Automated Program Repair
    Qi, Yuhua
    Mao, Xiaoguang
    Lei, Yan
    Dai, Ziying
    Wang, Chengsong
    36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 254 - 265