基于细粒度代码表示和特征融合的即时软件缺陷预测方法  

Just-In-Time Software Defect Prediction Approach Based on Fine-grained Code Representationand Feature Fusion

在线阅读下载全文

作  者:朱晓燕[1] 王文格 王嘉寅 张选平[1] ZHU Xiaoyan;WANG Wenge;WANG Jiayin;ZHANG Xuanping(School of Computer Scienceand Technology,Xi’an Jiaotong University,Xi’an 710049,China)

机构地区:[1]西安交通大学计算机科学与技术学院,西安710049

出  处:《计算机科学》2025年第1期242-249,共8页Computer Science

基  金:国家自然科学基金(72274152)。

摘  要:即时软件缺陷预测指在软件更改初次提交之际预测该更改引入缺陷的倾向。此类预测针对单一程序变更,而非在粗粒度上进行。由于其即时性和可追溯性,该技术已在持续测试等领域得到广泛应用。目前的研究中,提取变更代码表示的方法粒度较粗,仅标出了变更行,而没有进行细粒度的标记。此外,现有的使用提交内容进行缺陷预测的方法,仅仅是把提交消息与变更代码的特征进行简单拼接,缺失了在特征空间上的深度对齐,这使得在提交消息质量参差不齐的情况下,会出现预测结果易受噪声干扰的情形,并且现有方法也未将领域专家设计的人工特征以及变更内容中的语义语法信息综合起来进行预测。为了解决上述问题,提出了一种基于细粒度代码表征和特征融合的即时软件缺陷预测方法。通过引入新的变更嵌入计算方法来在细粒度上表示变更代码。同时,引入特征对齐模块,降低提交消息中噪声对方法性能的影响。此外,使用神经网络从人工设计的特征中学习专业知识,充分利用现有特征进行预测。实验结果表明,相较于现有方法,该方法在3个性能指标上均有显著提升。Just-in-time software defect prediction(JIT-SDP)aims to predict the defect tendency of software changes at the time when they are first committed.Such predictions are made on a single program change rather than on a coarse granularity.It has been widely used in fields such as continuous testing due to its immediacy and traceability.Existing JIT-SDP studies extract features from code changes at a coarse granularity,merely marking the changed lines without fine-grained tagging.Moreover,studies based on commit content are limited to simple concatenation of features extracted from commit messages and code changes,lacking deep alignment in feature space.This makes the prediction results tend to be disturbed by noise when the quality of committed message cannot be guaranteed.Existing methods also fail to fully utilize artificial features designed by domain experts and semantic syntax structure information in commit content at the same time,thus not fully leveraging existing features.To address these problems,a JIT-SDP approach based on fine-grained code changes and feature fusion is proposed.The method introduces new change embeddings to represent code changes at a fine granularity.By designing a feature alignment module,the impact of noise in low-quality commit message on performance is reduced.Meanwhile,neural networks are used to learn domain-specific knowledge from artificial features and fully utilize existing features.Experimental results show that compared to existing me-thods,this approach improves significantly on three performance metrics.

关 键 词:即时软件缺陷预测 特征融合 软件工程 深度学习 代码表示 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象