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 条
  • [21] Plug-stat®: a cloud-based application to facilitate the emulation of clinical trials for real-world evidence based on real-world data
    Yohann Foucher
    Cyrille Loncle
    Florent Le Borgne
    Health Services and Outcomes Research Methodology, 2023, 23 : 266 - 279
  • [22] miTLS: Verifying Protocol Implementations against Real-World Attacks
    Bhargavan, Karthikeyan
    Fournet, Cedric
    Kohlweiss, Markulf
    IEEE SECURITY & PRIVACY, 2016, 14 (06) : 18 - 25
  • [23] Rethinking modular multi-exponentiation in real-world applications
    Attias, Vidal
    Vigneri, Luigi
    Dimitrov, Vassil
    JOURNAL OF CRYPTOGRAPHIC ENGINEERING, 2023, 13 (01) : 57 - 70
  • [24] Representation of Real-World Event Schemas during Narrative Perception
    Baldassano, Christopher
    Hasson, Uri
    Norman, Kenneth A.
    JOURNAL OF NEUROSCIENCE, 2018, 38 (45): : 9689 - 9699
  • [25] Code Naturalness to Assist Search Space Exploration in Search-Based Program Repair Methods
    Dantas, Altino
    de Souza, Eduardo F.
    Souza, Jerffeson
    Camilo-Junior, Celso G.
    SEARCH-BASED SOFTWARE ENGINEERING, SSBSE 2019, 2019, 11664 : 164 - 170
  • [26] Dehazing Evaluation: Real-World Benchmark Datasets, Criteria, and Baselines
    Zhao, Shiyu
    Zhang, Lin
    Huang, Shuaiyi
    Shen, Ying
    Zhao, Shengjie
    IEEE TRANSACTIONS ON IMAGE PROCESSING, 2020, 29 : 6947 - 6962
  • [27] Curating complexity: An artful approach for real-world system transitions
    Kampelmann, Stephan
    Kaethler, Michael
    Hill, Adrian Vickery
    ENVIRONMENTAL INNOVATION AND SOCIETAL TRANSITIONS, 2018, 27 : 59 - 71
  • [28] Reality and Truth Balancing the Hope and the Hype of Real-World Evidence
    Patel, Anushka
    Billot, Laurent
    CIRCULATION, 2017, 136 (03) : 260 - 262
  • [29] Tackling Dataset Bias With an Automated Collection of Real-World Samples
    Sevetlidis, Vasileios
    Pavlidis, George
    Mouroutsos, Spyridon
    Gasteratos, Antonios
    IEEE ACCESS, 2022, 10 : 126832 - 126844
  • [30] Challenges in benchmarking stream learning algorithms with real-world data
    Souza, Vinicius M. A.
    dos Reis, Denis M.
    Maletzke, Andre G.
    Batista, Gustavo E. A. P. A.
    DATA MINING AND KNOWLEDGE DISCOVERY, 2020, 34 (06) : 1805 - 1858