<p>Just-In-Time Defect Prediction (JITDP), as an important means to improve software quality and reduce maintenance costs, has received widespread attention in recent years. However, existing methods generally neglect multi-scale temporal features during the development process, lack dynamic modeling of developer behavior and project lifecycle, and have limited robustness when facing concept drift. To address these limitations, this paper proposes a novel Multi-Scale Temporal Defect Prediction framework (MSTDP) that integrates commit behavior patterns at temporal granularities of hours, days, and weeks, combining code semantic information, developer behavioral features, and lifecycle-aware mechanisms to comprehensively characterize the dynamic evolution patterns of defect introduction. MSTDP achieves deep feature fusion through cross-attention mechanisms and constructs a concept drift analysis module to enhance the model’s adaptability across different evolutionary stages. Empirical results on 9 large-scale open-source projects demonstrate that MSTDP achieves optimal performance across all evaluation metrics: average accuracy of 76.89% (0.56% improvement), precision of 61.02% (0.53% improvement), recall of 67.82% (0.64% improvement), F1-score of 60.93% (0.46% improvement), and AUC of 81.88% (0.52% improvement), significantly outperforming 7 mainstream baseline methods including JITBoost, FENSE, and JIT-CF. Wilcoxon signed-rank tests confirm the statistical significance of these improvements (<InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\varvec{p &lt; 0.05}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="bold-italic">p</mi> <mo mathvariant="bold">&lt;</mo> <mn mathvariant="bold">0.05</mn> </mrow> </math></EquationSource> </InlineEquation>). The research results validate the effectiveness of this method for efficient and accurate defect prediction in dynamic software engineering environments, demonstrating stronger generalization capability and robustness against concept drift.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

MSTDP: a multi-scale temporal deep learning framework for just-in-time software defect prediction with cross-attention fusion

  • Ziyang Liu,
  • ChunHong Yuan,
  • Hengjun Liu,
  • Xiangyu Li,
  • Shengrui Liu,
  • Xiang Zhou,
  • Zhikui Tian

摘要

Just-In-Time Defect Prediction (JITDP), as an important means to improve software quality and reduce maintenance costs, has received widespread attention in recent years. However, existing methods generally neglect multi-scale temporal features during the development process, lack dynamic modeling of developer behavior and project lifecycle, and have limited robustness when facing concept drift. To address these limitations, this paper proposes a novel Multi-Scale Temporal Defect Prediction framework (MSTDP) that integrates commit behavior patterns at temporal granularities of hours, days, and weeks, combining code semantic information, developer behavioral features, and lifecycle-aware mechanisms to comprehensively characterize the dynamic evolution patterns of defect introduction. MSTDP achieves deep feature fusion through cross-attention mechanisms and constructs a concept drift analysis module to enhance the model’s adaptability across different evolutionary stages. Empirical results on 9 large-scale open-source projects demonstrate that MSTDP achieves optimal performance across all evaluation metrics: average accuracy of 76.89% (0.56% improvement), precision of 61.02% (0.53% improvement), recall of 67.82% (0.64% improvement), F1-score of 60.93% (0.46% improvement), and AUC of 81.88% (0.52% improvement), significantly outperforming 7 mainstream baseline methods including JITBoost, FENSE, and JIT-CF. Wilcoxon signed-rank tests confirm the statistical significance of these improvements ( \(\varvec{p < 0.05}\) p < 0.05 ). The research results validate the effectiveness of this method for efficient and accurate defect prediction in dynamic software engineering environments, demonstrating stronger generalization capability and robustness against concept drift.