南通大学学报(自然科学版)2024,Vol.23Issue(3):23-33,11.DOI:10.12194/j.ntu.20240117001
基于缺陷报告降噪和抽象语法树表示的软件缺陷定位方法
Software defect localization method based on defect report denoising and abstract syntax tree representation
摘要
Abstract
Automated defect localization methods can accelerate the process by which programmers use defect reports to pinpoint defect code in complex software systems.Existing defect localization methods face two main issues:neglecting the impact of noisy information in defect reports and losing significant contextual structural information during code representation.To address these issues,a novel automated defect localization method,named BRFN(bug report fault localization),is proposed.This method first encodes the abstract syntax tree of the program using a bidirectional information propagation mechanism.It then employs TextCNN and attention mechanisms to learn defect-relevant features from defect reports.Finally,it calculates the correlation between defect reports and source code files to perform defect localization.The effectiveness of the BRFN method is evaluated based on four widely used software projects for defect localization research.Experimental results show that BRFN outperforms existing methods such as BugLocator,LS-CNN,and CAST across multiple evaluation metrics.Specifically,BRFN improves Acc@1,MRR,and MAP by 56.3%,43.4%,and 46%,respectively,on four open-source projects.Additionally,ablation experiments are conducted to validate the contribution of each module in BRFN.The results indicate that both the defect report denois-ing strategy and bidirectional information propagation strategy enhance the accuracy of defect localization.关键词
缺陷定位/深度学习/信息检索/注意力机制/程序表示学习Key words
defect localization/deep learning/information retrieval/attention mechanism/program representation learning分类
信息技术与安全科学引用本文复制引用
石翔宇,鞠小林,陈翔..基于缺陷报告降噪和抽象语法树表示的软件缺陷定位方法[J].南通大学学报(自然科学版),2024,23(3):23-33,11.基金项目
国家自然科学基金面上项目(61673384) (61673384)
江苏省现代教育技术研究项目(2022-R-98984) (2022-R-98984)