DEAR: A Novel Deep Learning-based Approach for Automated Program Repair

被引:21
|
作者
Li, Yi [1 ]
Wang, Shaohua [1 ]
Nguyen, Tien N. [2 ]
机构
[1] New Jersey Inst Technol, Newark, NJ 07102 USA
[2] Univ Texas Dallas, Richardson, TX 75083 USA
基金
美国国家科学基金会;
关键词
Automated Program Repair; Deep Learning; Fault Localization; CODE;
D O I
10.1145/3510003.3510177
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The existing deep learning (DL)-based automated program repair (APR) models are limited in fixing general software defects. We present DEAR, a DL-based approach that supports fixing for the general bugs that require dependent changes at once to one or multiple consecutive statements in one or multiple hunks of code. We first design a novel fault localization (FL) technique for multi-hunk, multi-statement fixes that combines traditional spectrum-based (SB) FL with deep learning and data-flow analysis. It takes the buggy statements returned by the SBFL model, detects the buggy hunks to be fixed at once, and expands a buggy statement.. in a hunk to include other suspicious statements around... We design a two-tier, tree-based LSTM model that incorporates cycle training and uses a divide-and-conquer strategy to learn proper code transformations for fixing multiple statements in the suitable fixing context consisting of surrounding subtrees. We conducted several experiments to evaluate DEAR on three datasets: Defects4J (395 bugs), BigFix (+26k bugs), and CPatMiner (+44k bugs). On Defects4J dataset, DEAR outperforms the baselines from 42%-683% in terms of the number of auto-fixed bugs with only the top-1 patches. On BigFix dataset, it fixes 31-145 more bugs than existing DL-based APR models with the top-1 patches. On CPatMiner dataset, among 667 fixed bugs, there are 169 (25.3%) multi-hunk/multi-statement bugs. DEAR fixes 71 and 164 more bugs, including 52 and 61 more multi-hunk/multi-statement bugs, than the state-of-the-art, DL-based APR models.
引用
收藏
页码:511 / 523
页数:13
相关论文
共 50 条
  • [1] A Survey of Learning-based Automated Program Repair
    Zhang, Quanjun
    Fang, Chunrong
    Ma, Yuxiang
    Sun, Weisong
    Chen, Zhenyu
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (02)
  • [2] Deep learning-based approach for automated assessment of PTEN status
    Jamaspishvili, Tamara
    Harmon, Stephanie
    Patel, Palak
    Sanford, Thomas
    Caven, Isabelle
    Iseman, Rachael
    Mehralivand, Sherif
    Choyke, Peter L.
    Berman, David Monty
    Turkbey, Baris
    [J]. JOURNAL OF CLINICAL ONCOLOGY, 2020, 38 (06)
  • [3] A novel deep learning-based approach for malware detection
    Shaukat, Kamran
    Luo, Suhuai
    Varadharajan, Vijay
    [J]. ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE, 2023, 122
  • [4] An Extensive Study on Model Architecture and Program Representation in the Domain of Learning-based Automated Program Repair
    Horvath, Daniel
    Csuvik, Viktor
    Gyimothy, Tibor
    Vidacs, Laszlo
    [J]. 2023 IEEE/ACM INTERNATIONAL WORKSHOP ON AUTOMATED PROGRAM REPAIR, APR, 2023, : 31 - 38
  • [5] An automated unsupervised deep learning-based approach for diabetic retinopathy detection
    Naz, Huma
    Nijhawan, Rahul
    Ahuja, Neelu Jyothi
    [J]. MEDICAL & BIOLOGICAL ENGINEERING & COMPUTING, 2022, 60 (12) : 3635 - 3654
  • [6] Deep Learning-Based Automated Approach for Determination of Pig Carcass Traits
    Wei, Jiacheng
    Wu, Yan
    Tang, Xi
    Liu, Jinxiu
    Huang, Yani
    Wu, Zhenfang
    Li, Xinyun
    Zhang, Zhiyan
    [J]. ANIMALS, 2024, 14 (16):
  • [7] Impact of Defect Instances for Successful Deep Learning-based Automatic Program Repair
    Kim, Misoo
    Kim, Youngkyoung
    Heo, Jinseok
    Jeong, Hohyeon
    Kim, Sungoh
    Lee, Eunseok
    [J]. 2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 419 - 423
  • [8] An Empirical Study of Deep Transfer Learning-Based Program Repair for Kotlin Projects
    Kim, Misoo
    Kim, Youngkyoung
    Jeong, Hohyeon
    Heo, Jinseok
    Kim, Sungoh
    Chung, Hyunhee
    Lee, Eunseok
    [J]. PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 1441 - 1452
  • [9] Automated patellar height assessment on high-resolution radiographs with a novel deep learning-based approach
    Kwolek, Kamil
    Grzelecki, Dariusz
    Kwolek, Konrad
    Marczak, Dariusz
    Kowalczewski, Jacek
    Tyrakowski, Marcin
    [J]. WORLD JOURNAL OF ORTHOPEDICS, 2023, 14 (06): : 387 - 398
  • [10] A Deep Learning-Based Novel Approach for Weed Growth Estimation
    Mishra, Anand Muni
    Harnal, Shilpi
    Mohiuddin, Khalid
    Gautam, Vinay
    Nasr, Osman A.
    Goyal, Nitin
    Alwetaishi, Mamdooh
    Singh, Aman
    [J]. INTELLIGENT AUTOMATION AND SOFT COMPUTING, 2022, 31 (02): : 1157 - 1172