Doctor Code: A Machine Learning-Based Approach to Program Repair

IF 1.4 4区 工程技术 Q2 ENGINEERING, MULTIDISCIPLINARY
Sharmin Moosavi, Mojtaba Vahidi-Asl, Hassan Haghighi, Mohammad Rezaalipour
{"title":"Doctor Code: A Machine Learning-Based Approach to Program Repair","authors":"Sharmin Moosavi, Mojtaba Vahidi-Asl, Hassan Haghighi, Mohammad Rezaalipour","doi":"10.24200/sci.2023.54718.3884","DOIUrl":null,"url":null,"abstract":"To address the problems of automatic repair techniques, we present Doctor Code, a new APR technique that chooses repair operators by systematically learning from the features of the most common bugs in different programs, using machine learning. The wise selection of repair operators reduces the number of candidate patches. We compare our technique against Mutation repair, a test suite-based APR technique, using the Siemens suite. The experiment results indicate that our technique can fix 41 bugs while the baseline only repairs 22. In addition, Doctor Code can produce patches that do not exist in the search space of the three test suite-based techniques called SPR, Prophet, and SemFix. We also experiment with Doctor Code utilizing three buggy versions of a program called Space (9K LOC), to indicate its capability of repairing large-sized programs. In addition, we compare Doctor Code against 7 state-of-the-art APR tools like Elixir, using the Defects4j dataset. The experiment results indicate that our technique outperforms the other tools regarding the number of fixed bugs and overfitted patches.Comparing Doctor Code with RAPR as the baseline indicates that using machine learning reduces the number of overfitted patches and the time of patch production by 33.33% and 82.68%, respectively.","PeriodicalId":21605,"journal":{"name":"Scientia Iranica","volume":null,"pages":null},"PeriodicalIF":1.4000,"publicationDate":"2023-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Scientia Iranica","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.24200/sci.2023.54718.3884","RegionNum":4,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"ENGINEERING, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0

Abstract

To address the problems of automatic repair techniques, we present Doctor Code, a new APR technique that chooses repair operators by systematically learning from the features of the most common bugs in different programs, using machine learning. The wise selection of repair operators reduces the number of candidate patches. We compare our technique against Mutation repair, a test suite-based APR technique, using the Siemens suite. The experiment results indicate that our technique can fix 41 bugs while the baseline only repairs 22. In addition, Doctor Code can produce patches that do not exist in the search space of the three test suite-based techniques called SPR, Prophet, and SemFix. We also experiment with Doctor Code utilizing three buggy versions of a program called Space (9K LOC), to indicate its capability of repairing large-sized programs. In addition, we compare Doctor Code against 7 state-of-the-art APR tools like Elixir, using the Defects4j dataset. The experiment results indicate that our technique outperforms the other tools regarding the number of fixed bugs and overfitted patches.Comparing Doctor Code with RAPR as the baseline indicates that using machine learning reduces the number of overfitted patches and the time of patch production by 33.33% and 82.68%, respectively.
医生代码:基于机器学习的程序修复方法
为了解决自动修复技术的问题,我们提出了Doctor Code,这是一种新的APR技术,通过使用机器学习系统地学习不同程序中最常见错误的特征来选择修复操作员。维修操作员的明智选择减少了候选补丁的数量。我们比较了我们的技术与突变修复,一种基于测试套件的APR技术,使用西门子套件。实验结果表明,我们的技术可以修复41个错误,而基线只能修复22个错误。此外,Doctor Code可以生成在三种基于测试套件的技术(SPR、Prophet和SemFix)的搜索空间中不存在的补丁。我们还利用一个名为Space (9K LOC)的程序的三个错误版本对Doctor Code进行了实验,以表明它修复大型程序的能力。此外,我们使用缺陷4j数据集将Doctor Code与Elixir等7个最先进的APR工具进行了比较。实验结果表明,我们的技术在修复错误和过拟合补丁的数量上优于其他工具。将Doctor Code与RAPR作为基线进行比较,发现使用机器学习可以将过拟合的贴片数量和贴片制作时间分别减少33.33%和82.68%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Scientia Iranica
Scientia Iranica 工程技术-工程:综合
CiteScore
2.90
自引率
7.10%
发文量
59
审稿时长
2 months
期刊介绍: The objectives of Scientia Iranica are two-fold. The first is to provide a forum for the presentation of original works by scientists and engineers from around the world. The second is to open an effective channel to enhance the level of communication between scientists and engineers and the exchange of state-of-the-art research and ideas. The scope of the journal is broad and multidisciplinary in technical sciences and engineering. It encompasses theoretical and experimental research. Specific areas include but not limited to chemistry, chemical engineering, civil engineering, control and computer engineering, electrical engineering, material, manufacturing and industrial management, mathematics, mechanical engineering, nuclear engineering, petroleum engineering, physics, nanotechnology.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信