计算机工程与设计2024,Vol.45Issue(1) :88-94.DOI:10.16208/j.issn1000-7024.2024.01.012

基于变异和约束求解的程序缺陷自动修复方法

Automatic repair method of program defects based on variation and constraint solving

董兰 洪玫 伍佳
计算机工程与设计2024,Vol.45Issue(1) :88-94.DOI:10.16208/j.issn1000-7024.2024.01.012

基于变异和约束求解的程序缺陷自动修复方法

Automatic repair method of program defects based on variation and constraint solving

董兰 1洪玫 1伍佳1
扫码查看

作者信息

  • 1. 四川大学计算机学院(软件学院),四川成都 610065
  • 折叠

摘要

为能正确高效地生成修复补丁,针对Java程序中出现频率较高的条件语句相关缺陷修复问题,将启发式搜索方法与语义约束求解方法相结合,提出一个有针对性、更高效的解决方案.针对条件语句缺失错误,采用基于组件的程序合成技术,合成满足约束的候选条件语句;针对条件语句逻辑表达式错误,采用变异技术,生成候选逻辑表达式;针对条件语句逻辑表达式错误中,不能用变异技术修复的缺陷,使用基于组件的约束求解方法生成候选补丁.实验结果表明,所提方法有更高的补丁召回率和准确率.

Abstract

To generate repair patches correctly and efficiently,a targeted and more efficient method was proposed by combining the heuristic search method with the semantic constraint solving method for automatic repair of buggy conditional statements with high frequency in Java programs.Aiming at the missing precondition bugs of conditional statements,the component-based pro-gram synthesis technology was used to generate candidate conditional statements that satisfied the constraints.At the same time,for the buggy conditional statements,mutation technology was used to generate candidate logical expressions.For the buggy conditional statements that could not be repaired using mutation techniques,component-based constraint solving method was used to generate candidate patches.Experimental results demonstrate that the proposed method has higher patch recall and accu-racy.

关键词

程序自动修复/变异分析/约束求解/程序合成/条件语句缺陷/补丁生成/软件调试

Key words

automatic program repair/mutation analysis/constraint solving/program synthesis/conditional statement bugs/patch generation/software debugging

引用本文复制引用

基金项目

国家重点研发计划基金项目(2020YFB1711801)

出版年

2024
计算机工程与设计
中国航天科工集团二院706所

计算机工程与设计

CSTPCD北大核心
影响因子:0.617
ISSN:1000-7024
参考文献量2
段落导航相关论文