Suppr超能文献

基于方法调用序列的细粒度软件缺陷预测

Fine-Grained Software Defect Prediction Based on the Method-Call Sequence.

机构信息

College of Aerospace Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing, China.

Software Evaluation Center, Nanchang Hangkong University, Nanchang 330063, Jiangxi, China.

出版信息

Comput Intell Neurosci. 2022 Aug 3;2022:4311548. doi: 10.1155/2022/4311548. eCollection 2022.

Abstract

Currently, software defect-prediction technology is being extensively researched in the design of metrics. However, the research objects are mainly limited to coarse-grained entities such as classes, files, and packages, and there is a wide range of defects that are difficult to predict in actual situations. To further explore the information between sequences of method calls and to learn the code semantics and syntactic structure between methods, we generated a method-call sequence that retains the code context structure information and the token sequence representing semantic information. We embedded the token sequence into the method-call sequence and encoded it into a fixed-length real-valued vector. We then built a defect-prediction model based on the transformer, which maps the code-vector representation containing the method-call sequences to a low-dimensional vector space to generate semantic features and syntactic structure features and also predicts the defect density of the method-call sequence. We conducted experiments on 10 open-source projects using the ELFF dataset. The experimental results show that the method-call sequence-level prediction effect is better than the class-level effect, and the prediction results are more stable than those of the method level. The mean absolute error (MAE) value of our approach was 8% lower than that of the other deep-learning methods.

摘要

目前,软件缺陷预测技术在度量设计中得到了广泛的研究。然而,研究对象主要局限于类、文件和包等粗粒度实体,在实际情况下存在着大量难以预测的缺陷。为了进一步探索方法调用序列之间的信息,并学习方法之间的代码语义和语法结构,我们生成了一个保留代码上下文结构信息和表示语义信息的令牌序列的方法调用序列。我们将令牌序列嵌入到方法调用序列中,并将其编码为固定长度的实值向量。然后,我们基于转换器构建了一个缺陷预测模型,该模型将包含方法调用序列的代码向量表示映射到低维向量空间,以生成语义特征和语法结构特征,并预测方法调用序列的缺陷密度。我们使用 ELFF 数据集在 10 个开源项目上进行了实验。实验结果表明,方法调用序列级别的预测效果优于类级别,并且预测结果比方法级别更稳定。我们的方法的平均绝对误差(MAE)值比其他深度学习方法低 8%。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0e88/9365544/01a606e9ce6a/CIN2022-4311548.001.jpg

相似文献

1
Fine-Grained Software Defect Prediction Based on the Method-Call Sequence.基于方法调用序列的细粒度软件缺陷预测
Comput Intell Neurosci. 2022 Aug 3;2022:4311548. doi: 10.1155/2022/4311548. eCollection 2022.
5
CRaDLe: Deep code retrieval based on semantic Dependency Learning.CRaDLe:基于语义依存学习的深度代码检索
Neural Netw. 2021 Sep;141:385-394. doi: 10.1016/j.neunet.2021.04.019. Epub 2021 Apr 26.
6
Temporal Relation Extraction with Joint Semantic and Syntactic Attention.基于联合语义和句法注意力的时间关系抽取。
Comput Intell Neurosci. 2022 Apr 28;2022:5680971. doi: 10.1155/2022/5680971. eCollection 2022.
7
Predicting the number of defects in a new software version.预测新版本软件中的缺陷数量。
PLoS One. 2020 Mar 18;15(3):e0229131. doi: 10.1371/journal.pone.0229131. eCollection 2020.
9
Enriching query semantics for code search with reinforcement learning.用强化学习丰富代码搜索的查询语义。
Neural Netw. 2022 Jan;145:22-32. doi: 10.1016/j.neunet.2021.09.025. Epub 2021 Oct 11.

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验