摘要
在程序修复模板挖掘的过程中,由于历史修复信息中存在噪声干扰,导致挖掘出的修复模板可用性不强,程序修复效果不佳。再者,利用修复模板对程序缺陷进行修复是程序自动修复的关键。从修复模板挖掘和程序自动修复两方面出发,提出了一种改进的程序自动修复方法APRMT(automatic program repair method based on template mining)。APRMT通过正则匹配消除历史修复信息中的噪声,提高修复模板的准确性;依据程序缺陷代码位置与类型,采用最近最相关策略搜索针对程序缺陷的修复信息,辅助修复模板对程序缺陷进行自动修复。为验证该方法的有效性,APRMT针对4个开源项目进行实验,结果表明:APRMT成功修复了26个缺陷,平均每个缺陷的修复时间为3.1 min。由此可见,APRMT能在更短时间内修复更多的程序缺陷,提升程序自动修复的效果及效率。
In the process of program repair template mining,due to the noise interference in the historical repair information,the availability of the mined repair template was not strong,and the program repair effect is not good.In order to improve the efficiency of automatic repair.It was an important method use repair templates to repair the program.Therefore,from the perspective of repair template mining and automatic program repair,an improved program automatic repair method is proposed,called APRMT(automatic program repair method based on template mining).APRMT can eliminate the noise of repair information through regular matching,and the accuracy of repair information.According to the location and type of the program defect code to search and repair the information of the defect,the most recent strategy was proposed,which could efficiently use the repair template to repair the program defect.In order to verify the effectiveness of this method,APRMT experimented on 4 open source projects,and the experimental results showed that APRMT successfully fixed 26 defects,with an average time of 3.1 minutes per defect.It can be seen that APRMT can fix more program defects in a shorter time,and therefore improved the effect and efficiency of automatic program repaired.
作者
韩俊璇
孙伟峰
赵瑞莲
王微微
HAN Junxuan;SUN Weifeng;ZHAO Ruilian;WANG Weiwei(School of Information Science and Engineering, Beijing University of Chemical Technology, Beijing 100029, China)
出处
《郑州大学学报(工学版)》
CAS
北大核心
2021年第2期61-66,共6页
Journal of Zhengzhou University(Engineering Science)
基金
国家自然科学基金资助项目(61672085)。
关键词
自动修复
模板
程序
缺陷
挖掘
automatic repair
template
program
defect
mining