| 注册
首页|期刊导航|电子学报|基于自注意力机制神经机器翻译的软件缺陷自动修复方法

基于自注意力机制神经机器翻译的软件缺陷自动修复方法

曹鹤玲 刘昱 韩栋

电子学报2024,Vol.52Issue(3):945-956,12.
电子学报2024,Vol.52Issue(3):945-956,12.DOI:10.12263/DZXB.20220734

基于自注意力机制神经机器翻译的软件缺陷自动修复方法

Self-Attention Neural Machine Translation for Automatic Software Repair

曹鹤玲 1刘昱 2韩栋2

作者信息

  • 1. 粮食信息处理与控制教育部重点实验室(河南工业大学),河南郑州 450001||河南工业大学信息科学与工程学院,河南郑州 450001||河南工业大学河南省粮食信息处理国际联合实验室,河南郑州 450001
  • 2. 粮食信息处理与控制教育部重点实验室(河南工业大学),河南郑州 450001||河南工业大学信息科学与工程学院,河南郑州 450001
  • 折叠

摘要

Abstract

Recurrent neural network has good ability of the processing for code sequences,and the patch generation model is mostly implemented by it.However,recurrent neural network-based patch generation models still have some limi-tations when dealing with long-distance dependencies in code sequences,and their repair success rate and repair efficiency is low.To address the issue,we present SNRepair,an automatic software fault repair based on self-attention neural machine translation.First,the subword tokenization technology is introduced to preprocess the dataset to alleviate the problem of out of vocabulary.Second,a Transformer program patch generation model that integrates local modeling is constructed to alle-viate the long-distance dependencies in the source code and make better use of local information.Third,the automatic fault localization technology is used to locate the possible fault position and the Transformer patch generation model through pa-rameter optimization is adopted to generate candidate patches.Finally,the candidate patches are verified by test cases.On the 395 real Java software faults in the Defects4J,the results show that the SNRepair has higher repair success rate and re-pair efficiency than the compared ones.

关键词

软件缺陷自动修复/神经机器翻译/自注意力机制/子词切分/局部建模

Key words

automatic software repair/neural machine translation/self-attention mechanism/subword tokenization/localness modeling

分类

信息技术与安全科学

引用本文复制引用

曹鹤玲,刘昱,韩栋..基于自注意力机制神经机器翻译的软件缺陷自动修复方法[J].电子学报,2024,52(3):945-956,12.

基金项目

国家自然科学基金(No.61602154) (No.61602154)

河南省高等学校重点科研项目(No.22A520024) (No.22A520024)

河南工业大学青年骨干教师培育项目(No.21420158) (No.21420158)

河南省重大公益专项(No.201300311200) National Natural Science Foundation of China(No.61602154) (No.201300311200)

Key Scientific Research Project of Colleges and Universities in Henan Province(No.22A520024) (No.22A520024)

Cultivation Programme for Young Backbone Teachers in Henan University of Technology(No.21420158) (No.21420158)

Major Public Welfare Project of Henan Province(No.201300311200) (No.201300311200)

电子学报

OA北大核心CSTPCD

0372-2112

访问量0
|
下载量0
段落导航相关论文