Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (19): 266-273.DOI: 10.3778/j.issn.1002-8331.2303-0147

• Engineering and Applications • Previous Articles     Next Articles

Research on Repair Preference of Software Automatic Repair Method Based on Deep Learning

JIANG Yuanpeng, HUANG Ying, JIANG Shujuan   

  1. 1.Library of China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
    2.School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
  • Online:2023-10-01 Published:2023-10-01

基于深度学习的软件自动修复方法的修复偏好研究

姜元鹏,黄颖,姜淑娟   

  1. 1.中国矿业大学 图书馆,江苏 徐州 221116
    2.中国矿业大学 计算机科学与技术学院,江苏 徐州 221116

Abstract: The automatic software repair method based on machine learning can reduce the software defect repair costs and automatically repair software defects without manual intervention. However, different defect repair software’s repair preferences for different types of defects are not clear and lack pertinence, which can not fully play the role of the deep learning model. Therefore, based on the research of defect classification, the total repair probability of several representative software automatic repair methods based on deep learning for different types of defects is studied, and the repair preferences of different learning models for repairing different types of defects are compared and analyzed, so that model selection and software automatic repair can be better carried out later. Experimental results show that software automatic repair methods based on deep learning tend to repair defects in IF statement types, method statement types, and return statement types. Software automatic repair methods based on autoencoder tend to repair defects in IF sentence types, repair methods based on LSTM encoder-decoder tends to repair defects related to method statement types, while repair methods based on CNNs encoder-decoder have similar preferences for repairing IF sentence types, method sentence types, and return sentence types.

Key words: deep learning, automatic software repair, defect classification, repair preferences

摘要: 基于机器学习的软件修复方法可以降低软件缺陷修复成本,无须人工干涉而自动修复软件缺陷,但不同的缺陷修复软件对不同类型缺陷的修复偏好不明确,且缺乏针对性而无法充分发挥深度学习模型的作用;为此在研究缺陷分类的基础上,研究几种具有代表性基于深度学习的软件自动修复方法对不同类型的缺陷总的修复概率,并比较分析不同学习模型对于修复不同类型缺陷的修复偏好,后续可以更好地进行模型选择以及软件自动修复工作。实验结果表明,基于深度学习的软件自动修复方法倾向于修复IF语句类型、方法语句类型、return语句类型的缺陷。基于自编码器的软件自动修复方法倾向于修复IF语句类型的缺陷,基于LSTM的编码器-解码器的修复方法倾向于修复与方法语句类型相关的缺陷,而基于CNNs的编码器-解码器的修复方法则对IF语句类型、方法语句类型以及return语句类型这三种类型缺陷的修复偏好相差不大。

关键词: 深度学习, 软件自动修复, 缺陷分类, 修复偏好