GLA-SDP:一种基于GCN和LSTM的基于注意力的语义和静态特征融合的软件缺陷预测方法

IF 4.1 2区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Haining Meng , Han Wu , Xiaoqing Li , Xinhong Hei
{"title":"GLA-SDP:一种基于GCN和LSTM的基于注意力的语义和静态特征融合的软件缺陷预测方法","authors":"Haining Meng ,&nbsp;Han Wu ,&nbsp;Xiaoqing Li ,&nbsp;Xinhong Hei","doi":"10.1016/j.jss.2025.112630","DOIUrl":null,"url":null,"abstract":"<div><div>Software defect prediction (SDP) is crucial for improving software quality and optimizing resource allocation by identifying potential defects at early development stages. Traditional SDP methods rely on manually crafted static features, which often fail to capture the semantic and contextual information in code. Recent advances using abstract syntax trees (ASTs) have improved semantic feature extraction, yet they often neglect structural dependencies and lack effective integration with static features. To address these limitations, this study proposes GLA-SDP, a novel defect prediction model that fuses features through the integration of Graph Convolutional Networks (GCNs), Long Short-Term Memory (LSTM) networks, and an additive attention fusion mechanism. Specifically, a recursive AST-to-graph construction method is designed to extract rich semantic features using GCNs, while LSTMs are employed to capture sequential patterns from static code metrics. Furthermore, an attention-based fusion mechanism dynamically weight and combine semantic and static features, preserving their complementary importance in defect prediction. Extensive experiments on eight Java projects from the PROMISE dataset and four C-language projects from the Devign dataset demonstrate that GLA-SDP consistently outperforms state-of-the-art baselines, achieving average improvements of 37 % in F1-score and 24 % in MCC. These results highlight the superior accuracy and practical applicability of the proposed approach.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"231 ","pages":"Article 112630"},"PeriodicalIF":4.1000,"publicationDate":"2025-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"GLA-SDP: A novel attention-based semantic and static feature fusion method using GCN and LSTM for software defect prediction\",\"authors\":\"Haining Meng ,&nbsp;Han Wu ,&nbsp;Xiaoqing Li ,&nbsp;Xinhong Hei\",\"doi\":\"10.1016/j.jss.2025.112630\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Software defect prediction (SDP) is crucial for improving software quality and optimizing resource allocation by identifying potential defects at early development stages. Traditional SDP methods rely on manually crafted static features, which often fail to capture the semantic and contextual information in code. Recent advances using abstract syntax trees (ASTs) have improved semantic feature extraction, yet they often neglect structural dependencies and lack effective integration with static features. To address these limitations, this study proposes GLA-SDP, a novel defect prediction model that fuses features through the integration of Graph Convolutional Networks (GCNs), Long Short-Term Memory (LSTM) networks, and an additive attention fusion mechanism. Specifically, a recursive AST-to-graph construction method is designed to extract rich semantic features using GCNs, while LSTMs are employed to capture sequential patterns from static code metrics. Furthermore, an attention-based fusion mechanism dynamically weight and combine semantic and static features, preserving their complementary importance in defect prediction. Extensive experiments on eight Java projects from the PROMISE dataset and four C-language projects from the Devign dataset demonstrate that GLA-SDP consistently outperforms state-of-the-art baselines, achieving average improvements of 37 % in F1-score and 24 % in MCC. These results highlight the superior accuracy and practical applicability of the proposed approach.</div></div>\",\"PeriodicalId\":51099,\"journal\":{\"name\":\"Journal of Systems and Software\",\"volume\":\"231 \",\"pages\":\"Article 112630\"},\"PeriodicalIF\":4.1000,\"publicationDate\":\"2025-09-12\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Systems and Software\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0164121225002997\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0164121225002997","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

软件缺陷预测(SDP)是通过在早期开发阶段识别潜在缺陷来提高软件质量和优化资源分配的关键。传统的SDP方法依赖于手工制作的静态特性,这通常无法捕获代码中的语义和上下文信息。摘要抽象语法树(ast)在语义特征提取方面取得了长足的进步,但往往忽略了结构依赖关系,缺乏与静态特征的有效集成。为了解决这些限制,本研究提出了一种新的缺陷预测模型——GLA-SDP,该模型通过集成图卷积网络(GCNs)、长短期记忆(LSTM)网络和一种可加性注意力融合机制来融合特征。具体来说,设计了一种递归的AST-to-graph构造方法,利用GCNs提取丰富的语义特征,而lstm则从静态代码度量中捕获顺序模式。此外,基于注意力的融合机制动态加权和组合语义和静态特征,保持它们在缺陷预测中的互补性。在PROMISE数据集中的8个Java项目和Devign数据集中的4个c语言项目上进行的广泛实验表明,GLA-SDP始终优于最先进的基线,在f1得分方面实现了37%的平均提高,在MCC方面实现了24%的平均提高。结果表明,该方法具有较高的精度和实用性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
GLA-SDP: A novel attention-based semantic and static feature fusion method using GCN and LSTM for software defect prediction
Software defect prediction (SDP) is crucial for improving software quality and optimizing resource allocation by identifying potential defects at early development stages. Traditional SDP methods rely on manually crafted static features, which often fail to capture the semantic and contextual information in code. Recent advances using abstract syntax trees (ASTs) have improved semantic feature extraction, yet they often neglect structural dependencies and lack effective integration with static features. To address these limitations, this study proposes GLA-SDP, a novel defect prediction model that fuses features through the integration of Graph Convolutional Networks (GCNs), Long Short-Term Memory (LSTM) networks, and an additive attention fusion mechanism. Specifically, a recursive AST-to-graph construction method is designed to extract rich semantic features using GCNs, while LSTMs are employed to capture sequential patterns from static code metrics. Furthermore, an attention-based fusion mechanism dynamically weight and combine semantic and static features, preserving their complementary importance in defect prediction. Extensive experiments on eight Java projects from the PROMISE dataset and four C-language projects from the Devign dataset demonstrate that GLA-SDP consistently outperforms state-of-the-art baselines, achieving average improvements of 37 % in F1-score and 24 % in MCC. These results highlight the superior accuracy and practical applicability of the proposed approach.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Journal of Systems and Software
Journal of Systems and Software 工程技术-计算机:理论方法
CiteScore
8.60
自引率
5.70%
发文量
193
审稿时长
16 weeks
期刊介绍: The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to: •Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution •Agile, model-driven, service-oriented, open source and global software development •Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems •Human factors and management concerns of software development •Data management and big data issues of software systems •Metrics and evaluation, data mining of software development resources •Business and economic aspects of software development processes The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信