International Journal of Emerging Research in Engineering, Science, and Management
Vol. 5, Issue 3, pp. 145-161, Jul-Sep 2026.
https://doi.org/10.58482/ijeresm.v5i3.10
Received: 31 May 2026 | Revised: 09 Sep 2026 | Accepted: 21 Sep 2026 | Published: 29 Sep 2026
This work is licensed under a Creative Commons Attribution 4.0 International License.
Multi-Source Transfer Weighted Learning with Random Forest for Cross-Project Software Defect Prediction
1Kummarikunta Sandhya
2P. Radhika Raju
3A. Anandarao
1Research Scholar, Dept. of CSE, Jawaharlal Nehru Technological University Anantapur, Ananthapuramu, Andhra Pradesh, India.
2Assistant Professor, Dept. Of CSE, JNTUA College of Engineering, Ananthapuramu, Andhra Pradesh, India.
3Professor, Dept. Of CSE, JNTUA College of Engineering, Ananthapuramu, Andhra Pradesh, India.
Abstract: Accurate software defect prediction is essential for identifying fault-prone modules early and reducing software testing and maintenance costs. However, Within-Project Defect Prediction (WPDP) models may perform poorly when the target project has limited labeled defect data. Cross-Project Defect Prediction (CPDP) addresses this limitation by transferring knowledge from other projects, but heterogeneous feature distributions, source–target mismatch, and negative transfer remain significant challenges. This study proposes a Multi-Source Transfer Weighted Learning with Random Forest (MS-TWL+RF) framework for software defect prediction across heterogeneous projects. The proposed framework combines transferability estimation at the dataset, feature, and instance levels. Linear Maximum Mean Discrepancy (MMD) assigns weights to source projects based on their distributional similarity to the target project. In contrast, feature weights jointly consider distribution similarity and mutual information-based predictive relevance. A domain classifier is used to assign instance-level weights according to their representativeness of the target domain. Correlation Alignment (CORAL) subsequently reduces covariance discrepancies between the source and target feature spaces before classification using a weighted Random Forest model. The proposed framework is evaluated on the JM1, KC1, CM1, KC2, and PC1 projects and compared with AlexNet+RF, ResNet50+RF, TransTab+RF, and XTab+RF. For the JM1 target project, the proposed method achieves 98.7% target-domain accuracy, 98.9% precision, 98.7% recall, and 98.8% F1-score, with an AUC of 0.992. It also obtains Kappa, MCC, and Jaccard scores of 0.980, 0.981, and 0.990, respectively. The results indicate that combining multi-level transfer weighting with covariance alignment can help address the effects of heterogeneous source projects in cross-project software defect prediction.
Keywords: Software defect prediction, cross-project defect prediction, multi-source CPDP, transfer learning, Random Forest, transfer weighting.
References
- A. Deshmukh, D. S. Patil, J. S. S. Mohan, G. Balamurugan, and A. K. Tyagi, “Transforming next Generation-Based artificial intelligence for software development,” Advances in logistics, operations, and management science book series, pp. 30–66, 2023. https://doi.org/10.4018/978-1-6684-8088-5.ch003
- O. P. Omondiagbe, S. A. Licorish, and S. G. MacDonell, “Improving transfer learning for software cross-project defect prediction,” Applied Intelligence, vol. 54, no. 7, pp. 5593–5616, Apr. 2024. https://doi.org/10.1007/s10489-024-05459-1
- J. Chen, J. Ding, K. C. Tan, J. Qian, and K. Li, “MBL-CPDP: A Multi-Objective Bilevel Method for Cross-Project Defect Prediction,” IEEE Transactions on Software Engineering, vol. 51, no. 8, pp. 2305–2328, Aug. 2025. https://doi.org/10.1109/TSE.2025.3577808
- Y. Wang, Y. Li, H. Wang, L. Zhao, and X. Zhang, “Better knowledge enhancement for Privacy‐Preserving Cross‐Project Defect Prediction,” Journal of Software Evolution and Process, vol. 37, no. 1, Jan. 2025. https://doi.org/10.1002/smr.2761
- T. Lei, J. Xue, D. Man, Y. Wang, M. Li, and Z. Kong, “SDP-MTF: A composite transfer learning and feature fusion for Cross-Project software defect prediction,” Electronics, vol. 13, no. 13, p. 2439, Jun. 2024. https://doi.org/10.3390/electronics13132439
- A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” Communications of the ACM, vol. 60, no. 6, pp. 84–90, May 2017. https://doi.org/10.1145/3065386
- K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, pp. 770–778, 2016. https://doi.org/10.1109/CVPR.2016.90
- Q. Qian, Y. Wang, T. Zhang, and Y. Qin, “Maximum mean square discrepancy: A new discrepancy representation metric for mechanical fault transfer diagnosis,” Knowledge-Based Systems, vol. 276, p. 110748, Jul. 2023. https://doi.org/10.1016/j.knosys.2023.110748
- G. Zhang, T. Zhou, and Y. Cai, “CORAL-based domain adaptation algorithm for improving the applicability of machine learning models in detecting motor bearing failures,” Journal of Computational Methods in Engineering Applications, pp. 1–17, Nov. 2023. https://doi.org/10.62836/jcmea.v3i1.030108
- T. Li, Z. Wang, and P. Shi, “Within-project and cross-project defect prediction based on model averaging,” Scientific Reports, vol. 15, no. 1, p. 6390, Feb. 2025. https://doi.org/10.1038/s41598-025-90832-4
- K. Javed, R. Shengbing, M. Asim, and M. A. Wani, “Cross-Project defect prediction based on domain adaptation and LSTM optimization,” Algorithms, vol. 17, no. 5, p. 175, Apr. 2024. https://doi.org/10.3390/a17050175
- J. Bai, J. Jia, and L. F. Capretz, “A three-stage transfer learning framework for multi-source cross-project software defect prediction,” Information and Software Technology, vol. 150, p. 106985, Jun. 2022. https://doi.org/10.1016/j.infsof.2022.106985
- S. Jiang, J. Zhang, F. Guo, T. Ouyang, and J. Li, “Balanced adversarial tight matching for Cross‐Project defect prediction,” IET Software, vol. 2024, no. 1, Jan. 2024. https://doi.org/10.1049/2024/1561351
- Y. Wang, Y. Li, H. Wang, L. Zhao, and X. Zhang, “Better knowledge enhancement for Privacy‐Preserving Cross‐Project Defect Prediction,” Journal of Software Evolution and Process, vol. 37, no. 1, Jan. 2025. https://doi.org/10.1002/smr.2761
- H. Song, Y. Pan, F. Guo, X. Zhang, L. Ma, and S. Jiang, “CONCPDP: a Cross‐Project defect Prediction method integrating contrastive pretraining and category boundary adjustment,” IET Software, vol. 2024, no. 1, Jan. 2024. https://doi.org/10.1049/2024/5102699
- Y. Zhao, Y. Zhu, Q. Yu, and X. Chen, “Cross-Project defect prediction considering multiple data distribution simultaneously,” Symmetry, vol. 14, no. 2, p. 401, Feb. 2022. https://doi.org/10.3390/sym14020401
- Z. Hu and Y. Zhu, “Cross‐project defect prediction method based on genetic algorithm feature selection,” Engineering Reports, vol. 5, no. 12, May 2023. https://doi.org/10.1002/eng2.12670
- H. Tao et al., “Cross‐Project Defect Prediction Using Transfer Learning with Long Short‐Term Memory Networks,” IET Software, vol. 2024, no. 1, Jan. 2024. https://doi.org/10.1049/2024/5550801
- A. Abdu et al., “Cross-project software defect prediction based on the reduction and hybridization of software metrics,” Alexandria Engineering Journal, vol. 112, pp. 161–176, Nov. 2024. https://doi.org/10.1016/j.aej.2024.10.034
- A. Abdu, Z. Zhai, H. A. Abdo, R. Algabri, and S. Lee, “Graph-Based feature learning for Cross-Project software defect prediction,” Computers, Materials & Continua, vol. 77, no. 1, pp. 161–180, Jan. 2023. https://doi.org/10.32604/cmc.2023.043680
- R. Haque, A. Ali, S. McClean, I. Cleland, and J. Noppen, “Heterogeneous Cross-Project Defect Prediction Using Encoder Networks and Transfer Learning,” IEEE Access, vol. 12, pp. 409–419, 2024. https://doi.org/10.1109/ACCESS.2023.3343329
- N. Zhang, K. Zhu, and D. Zhu, “IAPCP: an effective Cross‐Project defect prediction model via Intra‐Domain alignment and Programming‐Based distribution adaptation,” IET Software, vol. 2024, no. 1, Jan. 2024. https://doi.org/10.1049/2024/5358773
- P. Ardimento, L. Aversano, M. L. Bernardi, M. Cimitile, and M. Iammarino, “Just-in-time software defect prediction using deep temporal convolutional networks,” Neural Computing and Applications, vol. 34, no. 5, pp. 3981–4001, Nov. 2021. https://doi.org/10.1007/s00521-021-06659-3
- J. Yao, B. Liu, Y. Wu, and Z. Li, “Multi-Source heterogeneous kernel mapping in software defect prediction,” Applied Sciences, vol. 13, no. 9, p. 5526, Apr. 2023. https://doi.org/10.3390/app13095526
- F. Li, P. Yang, J. W. Keung, W. Hu, H. Luo, and X. Yu, “Revisiting ‘revisiting supervised methods for effort‐aware cross‐project defect prediction,’” IET Software, vol. 17, no. 4, pp. 472–495, Jun. 2023. https://doi.org/10.1049/sfw2.12133
- T. Lei, J. Xue, D. Man, Y. Wang, M. Li, and Z. Kong, “SDP-MTF: A composite transfer learning and feature fusion for Cross-Project software defect prediction,” Electronics, vol. 13, no. 13, p. 2439, Jun. 2024. https://doi.org/10.3390/electronics13132439
- T. Lei, J. Xue, Y. Wang, Z. Niu, Z. Shi, and Y. Zhang, “WCM‐WTRA: A Cross‐Project defect Prediction method based on feature Selection and Distance‐Weight Transfer Learning,” Chinese Journal of Electronics, vol. 31, no. 2, pp. 354–366, Mar. 2022. https://doi.org/10.1049/cje.2021.00.119
- J. Zou, Z. Li, X. Liu, and H. Tong, “MSCPDPLab: A MATLAB toolbox for transfer learning based multi-source cross-project defect prediction,” SoftwareX, vol. 21, p. 101286, Dec. 2022. https://doi.org/10.1016/j.softx.2022.101286
- H. Yamamoto, D. Wang, G. K. Rajbahadur, M. Kondo, Y. Kamei, and N. Ubayashi, “Towards Privacy Preserving Cross Project Defect Prediction with Federated Learning,” 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), Taipa, Macao, pp. 485–496, 2023. https://doi.org/10.1109/SANER56733.2023.00052
- A. Wang, Y. Feng, M. Yang, H. Wu, Y. Iwahori, and H. Chen, “Cross-Project Software Defect Prediction Using Differential Perception Combined with Inheritance Federated Learning,” Electronics, vol. 13, no. 24, p. 4893, Dec. 2024. https://doi.org/10.3390/electronics13244893
- I. Mehmood et al., “A Novel Approach to Improve Software Defect Prediction Accuracy Using Machine Learning,” IEEE Access, vol. 11, pp. 63579–63597, 2023. https://doi.org/10.1109/ACCESS.2023.3287326
- C. Pan, M. Lu, B. Xu, and H. Gao, “An improved CNN model for Within-Project software defect prediction,” Applied Sciences, vol. 9, no. 10, p. 2138, May 2019. https://doi.org/10.3390/app9102138
- G. Giray, K. E. Bennin, Ö. Köksal, Ö. Babur, and B. Tekinerdogan, “On the use of deep learning in software defect prediction,” Journal of Systems and Software, vol. 195, p. 111537, Oct. 2022. https://doi.org/10.1016/j.jss.2022.111537
- N. A. A. Khleel and K. Nehéz, “Software defect prediction using a bidirectional LSTM network combined with oversampling techniques,” Cluster Computing, vol. 27, no. 3, pp. 3615–3638, Oct. 2023. https://doi.org/10.1007/s10586-023-04170-z
- M. Ali et al., “Software Defect Prediction Using an Intelligent Ensemble-Based Model,” IEEE Access, vol. 12, pp. 20376–20395, 2024. https://doi.org/10.1109/ACCESS.2024.3358201
- L.-Q. Chen, C. Wang, and S.-L. Song, “Software defect prediction based on nested-stacking and heterogeneous feature selection,” Complex & Intelligent Systems, vol. 8, no. 4, pp. 3333–3348, Feb. 2022. https://doi.org/10.1007/s40747-022-00676-y
- Y. Z. Bala, P. Abdul Samat, K. Y. Sharif, and N. Manshor, “Improving Cross-Project Software Defect Prediction Method Through Transformation and Feature Selection Approach,” IEEE Access, vol. 11, pp. 2318–2326, 2023. https://doi.org/10.1109/ACCESS.2022.3231456
- Y. Tang, Q. Dai, M. Yang, T. Du, and L. Chen, “Software defect prediction ensemble learning algorithm based on adaptive variable sparrow search algorithm,” International Journal of Machine Learning and Cybernetics, vol. 14, no. 6, pp. 1967–1987, Jan. 2023. https://doi.org/10.1007/s13042-022-01740-2
- J. Sayyad Shirabad and T. J. Menzies, “The PROMISE Repository of Software Engineering Databases,” School of Information Technology and Engineering, University of Ottawa, Canada, 2005. http://promise.site.uottawa.ca/SERepository
- Z. Wang and J. Sun, “TransTab: Learning transferable tabular transformers across tables,” Advances in Neural Information Processing Systems, vol. 35, pp. 2902–2915, 2022. https://doi.org/10.52202/068431-0210
- B. Zhu, X. Shi, N. Erickson, M. Li, G. Karypis, and M. Shoaran, “XTab: Cross-table pretraining for tabular transformers,” in Proceedings of the 40th International Conference on Machine Learning, vol. 202, pp. 43181–43204, 2023.
- S. Kaliraj, A. M. Kishoore, and V. Sivakumar, “Software Fault Prediction Using Cross-Project Analysis: A Study on Class Imbalance and Model Generalization,” IEEE Access, vol. 12, pp. 64212–64227, 2024. https://doi.org/10.1109/ACCESS.2024.3397494
© 2026 The Author(s). Published by IJERESM. This work is licensed under the Creative Commons Attribution 4.0 International License.
Archiving: All articles are permanently archived in Zenodo IJERESM Community.
