journal article·2024Open access

Software Defect Prediction Method Based on Stable Learning

Xin Fan, Jingen Mao, Liangjue Lian, Li Yu, Wei Zheng, Yun Ge

Computers, Materials & Continua· Volume 78· Issue 1

Abstract

The purpose of software defect prediction is to identify defect-prone code modules to assist software quality assurance teams with the appropriate allocation of resources and labor. In previous software defect prediction studies, transfer learning was effective in solving the problem of inconsistent project data distribution. However, target projects often lack sufficient data, which affects the performance of the transfer learning model. In addition, the presence of uncorrelated features between projects can decrease the prediction accuracy of the transfer learning model. To address these problems, this article propose a software defect prediction method based on stable learning (SDP-SL) that combines code visualization techniques and residual networks. This method first transforms code files into code images using code visualization techniques and then constructs a defect prediction model based on these code images. During the model training process, target project data are not required as prior knowledge. Following the principles of stable learning, this paper dynamically adjusted the weights of source project samples to eliminate dependencies between features, thereby capturing the “invariance mechanism” within the data. This approach explores the genuine relationship between code defect features and labels, thereby enhancing defect prediction performance. To evaluate the performance of SDP-SL, this article conducted comparative experiments on 10 open-source projects in the PROMISE dataset. The experimental results demonstrated that in terms of the F-measure, the proposed SDP-SL method outperformed other within-project defect prediction methods by 2.11%–44.03%. In cross-project defect prediction, the SDP-SL method provided an improvement of 5.89%–25.46% in prediction performance compared to other cross-project defect prediction methods. Therefore, SDP-SL can effectively enhance within- and cross-project defect predictions.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Software Engineering Research · Software Reliability and Analysis Research · Software System Performance and Reliability

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (27)

Show source-provided references
1. Progress on approaches to software defect prediction10.1049/iet-sen.2017.0148 ↗
2. A systematic review of unsupervised learning techniques for software defect prediction10.1016/j.infsof.2020.106287 ↗
3. Data preparation for software vulnerability prediction: A systematic literature review10.1109/TSE.2022.3171202 ↗
4. Joint feature representation learning and progressive distribution matching for cross-project defect prediction10.1016/j.infsof.2021.106588 ↗
5. Software vulnerability detection using deep neural networks: A survey10.1109/JPROC.2020.2993293 ↗
6. Automatically learning semantic features for defect prediction
7. Software defect prediction via convolutional neural network
8. Domain adaptation via transfer component analysis10.1109/TNN.2010.2091281 ↗
9. H. K. Dam, T. Pham, S. W. Ng, T. Tran and C. J. Kim, “A deep tree-based model for software defect prediction,” arXiv preprint arXiv:1802.00921, 2018.
10. Software visualization and deep transfer learning for effective software defect prediction
11. Stable learning establishes some common ground between causal inference and machine learning10.1038/s42256-022-00445-z ↗
12. Liu · Advances in Neural Information Processing Systems · 2014 · 27
13. Hu · Uncertainty in Artificial Intelligence · 2020 · 292
14. Independently interpretable lasso: A new regularizer for sparse regression with uncorrelated variables
15. Deep stable learning for out-of-distribution generalization
16. Halstead · Elements of Software Science · 1977
17. A complexity measure10.1109/TSE.1976.233837 ↗
18. A metrics suite for object oriented design10.1109/32.295895 ↗
19. A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction
20. DeepLineDP: Towards a deep learning approach for line-level defect prediction10.1109/TSE.2022.3144348 ↗
21. The impact of context metrics on just-in-time defect prediction10.1007/s10664-019-09736-3 ↗
22. Transfer defect learning
23. Negative samples reduction in cross-company software defects prediction10.1016/j.infsof.2015.01.014 ↗
24. CADV: A software visualization approach for code annotations distribution10.1016/j.infsof.2022.107089 ↗
25. Visualization-based software defect prediction via convolutional neural network with global self-attention
26. Learning de-biased representations with biased representations
27. Approximate kernel-based conditional independence tests for fast non-parametric causal discovery10.1515/jci-2018-0017 ↗