Break-It-Fix-It: Unsupervised Learning for Program Repair

被引:0
|
作者
Yasunaga, Michihiro [1 ]
Liang, Percy [1 ]
机构
[1] Stanford Univ, Stanford, CA 94305 USA
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
We consider repair tasks: given a critic (e.g., compiler) that assesses the quality of an input, the goal is to train a fixer that converts a bad example (e.g., code with syntax errors) into a good one (e.g., code with no syntax errors). Existing works create training data consisting of (bad, good) pairs by corrupting good examples using heuristics (e.g., dropping tokens). However, fixers trained on this synthetically-generated data do not extrapolate well to the real distribution of bad inputs. To bridge this gap, we propose a new training approach, Break-It-Fix-It (BIFI), which has two key ideas: (i) we use the critic to check a fixer's output on real bad inputs and add good (fixed) outputs to the training data, and (ii) we train a breaker to generate realistic bad code from good code. Based on these ideas, we iteratively update the breaker and the fixer while using them in conjunction to generate more paired data. We evaluate BIFI on two code repair datasets: GitHub-Python, a new dataset we introduce where the goal is to repair Python code with AST parse errors; and DeepFix where the goal is to repair C code with compiler errors. BIFI outperforms state-of-the-art methods, obtaining 90.5% repair accuracy on GitHub-Python (+28.5%) and 71.7% on DeepFix (+5.6%). Notably, BIFI does not require any labeled data; we hope it will be a strong starting point for unsupervised learning of various repair tasks.
引用
收藏
页数:12
相关论文
共 50 条
  • [31] WRAPLE - THE WEIGHTED REPAIR ASSISTANCE PROGRAM LEARNING EXTENSION
    SIMPSON, WR
    DOWLING, CS
    IEEE DESIGN & TEST OF COMPUTERS, 1986, 3 (02): : 66 - 73
  • [32] You break it, you fix it: functions for AID downstream of deamination
    Delker, Rebecca K.
    Papavasiliou, F. Nina
    NATURE IMMUNOLOGY, 2013, 14 (11) : 1112 - 1114
  • [33] You break it, you fix it: functions for AID downstream of deamination
    Rebecca K Delker
    F Nina Papavasiliou
    Nature Immunology, 2013, 14 : 1112 - 1114
  • [34] Program Transformations to Fix C Integers
    Coker, Zack
    Hafiz, Munawar
    PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), 2013, : 792 - 801
  • [35] Japan strives to fix space program
    Davis, NW
    AEROSPACE AMERICA, 2000, 38 (06) : 4 - 6
  • [36] Advisers to pentagon: Fix technology program
    Aviation Week and Space Technology (New York), 2000, 153 (16):
  • [37] Advisers to pentagon: Fix technology program
    Wall, R
    AVIATION WEEK & SPACE TECHNOLOGY, 2000, 153 (16): : 28 - 29
  • [38] Transcriptionally tailored break repair
    Eytan Zlotorynski
    Nature Reviews Molecular Cell Biology, 2018, 19 : 675 - 675
  • [39] First Break Traveltime Picking Using Unsupervised Machine Learning and Super-Virtual Refraction Interferometry
    Awais, Muhammad
    Hanafy, Sherif M.
    Shafiq, Saifullah
    Al-Shuhail, Abdullatif
    Waheed, Umair Bin
    EARTH AND SPACE SCIENCE, 2023, 10 (12)
  • [40] Transcriptionally tailored break repair
    Zlotorynski, Eytan
    NATURE REVIEWS MOLECULAR CELL BIOLOGY, 2018, 19 (11) : 675 - 675