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 条
  • [41] On the Causal Relation between Users' Real-World Activities and their Affective Processes
    Falavarjani, Seyed Amin Mirlohi
    Bagheri, Ebrahim
    Chou, Ssu Yu Zoe
    Jovanovic, Jelena
    Ghorbani, Ali A.
    PROCEEDINGS OF THE 2019 IEEE/ACM INTERNATIONAL CONFERENCE ON ADVANCES IN SOCIAL NETWORKS ANALYSIS AND MINING (ASONAM 2019), 2019, : 311 - 314
  • [42] Real-World Challenges with a Rapid Transition to 100% Renewable Power Systems
    Heuberger, Clara Franziska
    Mac Dowell, Niall
    JOULE, 2018, 2 (03) : 367 - 370
  • [43] Droplet microfluidics: from proof-of-concept to real-world utility?
    Suea-Ngam, Akkapol
    Howes, Philip D.
    Srisa-Art, Monpichar
    DeMello, Andrew J.
    CHEMICAL COMMUNICATIONS, 2019, 55 (67) : 9895 - 9903
  • [44] Beauty and the beholder: Highly individual taste for abstract, but not real-world images
    Vessel, Edward A.
    Rubin, Nava
    JOURNAL OF VISION, 2010, 10 (02): : 1 - 14
  • [45] Census and Analysis of Higher-Order Interactions in Real-World Hypergraphs
    Meng, Xihang
    Zhai, Xuemeng
    Fei, Gaolei
    Wen, Sheng
    Hu, Guangmin
    BIG DATA MINING AND ANALYTICS, 2025, 8 (02): : 383 - 406
  • [46] Machine-guided discovery of a real-world rogue wave model
    Haefner, Dion
    Gemmrich, Johannes
    Jochum, Markus
    PROCEEDINGS OF THE NATIONAL ACADEMY OF SCIENCES OF THE UNITED STATES OF AMERICA, 2023, 120 (48)
  • [47] Profiling real-world data sources for pharmacoepidemiologic research: A call for papers
    Li, Xiaojuan
    Lo Re, Vincent, III
    Toh, Sengwee
    PHARMACOEPIDEMIOLOGY AND DRUG SAFETY, 2022, 31 (09) : 929 - 931
  • [48] A novel MIQCP method for FACTS allocation in complex real-world grids
    Chang, Robert W.
    Saha, Tapan K.
    INTERNATIONAL JOURNAL OF ELECTRICAL POWER & ENERGY SYSTEMS, 2014, 62 : 735 - 743
  • [49] Toward real-world automated antibody design with combinatorial Bayesian optimization
    Khan, Asif
    Cowen-Rivers, Alexander I.
    Grosnit, Antoine
    Deik, Derrick-Goh-Xin
    Robert, Philippe A.
    Greiff, Victor
    Smorodina, Eva
    Rawat, Puneet
    Akbar, Rahmad
    Dreczkowski, Kamil
    Tutunov, Rasul
    Bou-Ammar, Dany
    Wang, Jun
    Storkey, Amos
    Bou-Ammar, Haitham
    CELL REPORTS METHODS, 2023, 3 (01):
  • [50] Validating the credibility of solar simulation tools using a real-world case study
    Kaleshwarwar, Akshay
    Bahadure, Sarika
    ENERGY AND BUILDINGS, 2023, 301