Prediksi dan Deteksi Bug pada Visual Studio Code menggunakan Algoritma Naive Bayes
DOI:
https://doi.org/10.62951/repeater.v4i3.953Keywords:
Bug Prediction, Machine Learning, Naive Bayes, NASA JM1, Software Defect PredictionAbstract
Software quality is a critical aspect of modern software engineering. One of the primary challenges developers face is the early detection of bugs before software is released into the production environment. This study develops a bug prediction model using the Naive Bayes algorithm applied to the JM1 dataset from NASA's Metrics Data Program, sourced from Kaggle. The JM1 dataset consists of source code metrics from a NASA project, comprising 10,885 modules with 21 numerical features that include Halstead and McCabe metrics. All experimental stages were conducted using Python with the Pandas, Scikit-learn, NumPy, and Matplotlib libraries. Experimental results show that the Naive Bayes model achieved an accuracy of 79.93%, an ROC-AUC value of 0.6761, precision of 46.26%, recall of 23.52%, and an F1-Score of 31.18%. These findings indicate that while Naive Bayes effectively identifies non-defective modules, it faces challenges in detecting defective modules due to significant class imbalance (80.65% vs. 19.35%). The contributions of this study include an in-depth analysis of the impact of class imbalance on bug prediction performance, as well as recommendations for handling techniques such as SMOTE and ensemble learning to improve future performance.
Downloads
References
Abdu, A., Zhai, Z., Abdo, H. A., Algabri, R., Al-masni, M. A., Muhammad, M. S., & Gu, Y. H. (2024). Semantic and traditional feature fusion for software defect prediction using hybrid deep learning model. Scientific Reports, 14(1), 14771. https://doi.org/10.1038/s41598-024-65639-4
Arasteh, B., Arasteh, K., Ghaffari, A., & Ghanbarzadeh, R. (2024). A new binary chaos-based metaheuristic algorithm for software defect prediction. Cluster Computing, 27(7), 10093–10123. https://doi.org/10.1007/s10586-024-04486-4
Bowes, D., Hall, T., & Petrić, J. (2018). Software defect prediction: Do different classifiers find the same defects? Software Quality Journal, 26(2), 525–552. https://doi.org/10.1007/s11219-016-9353-3
Ghotra, B., McIntosh, S., & Hassan, A. E. (2017). Revisiting the impact of classification techniques on the performance of defect prediction models. Proceedings of the 37th International Conference on Software Engineering, 789–800. https://doi.org/10.1109/ICSE.2015.91
Hernández-Molinos, M. J., Sánchez-García, A. J., Barrientos-Martínez, R. E., Pérez-Arriaga, J. C., & Ocharán-Hernández, J. O. (2023). Software defect prediction with Bayesian approaches. Mathematics, 11(11), 2524. https://doi.org/10.3390/math11112524
Kaggle. (2024). NASA software defect datasets. https://www.kaggle.com/datasets/nasa/software-defect-datasets
Lessmann, S., Baesens, B., Mues, C., & Pietsch, S. (2008). Benchmarking classification models for software defect prediction: A proposed framework and novel findings. IEEE Transactions on Software Engineering, 34(4), 485–496. https://doi.org/10.1109/TSE.2008.35
Malhotra, R. (2015). A systematic review of machine learning techniques for software fault prediction. Applied Soft Computing, 27, 504–518. https://doi.org/10.1016/j.asoc.2014.11.023
Prastyo, E. H. A., Yaqin, M. A., Suhartono, Faisal, M., & Firdaus, R. A. J. (2024). Naive Bayes classification for software defect prediction. Transactions on Informatics and Data Science, 1(1), 11–20. https://doi.org/10.24090/tids.v1i1.12192
Rebro, D. A., Rossi, B., & Chren, S. (2023). Source code metrics for software defects prediction. arXiv. https://doi.org/10.48550/arXiv.2301.08022
Rumbutis, A., Paulikas, D., & Maskeliūnas, R. (2024). Machine learning techniques for software defect prediction: A review. Electronics, 13(2), 317. https://doi.org/10.3390/electronics13020317
Sayyad Shirabad, J., & Menzies, T. (2005). The PROMISE repository of software engineering databases. School of Information Technology and Engineering, University of Ottawa.
Taskeen, S., Qureshi, K. N., Bashir, A. K., & Jeon, G. (2023). A tertiary study on software defect prediction using machine learning techniques. IEEE Access, 11, 72866–72890. https://doi.org/10.1109/ACCESS.2023.3294360
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Repeater : Publikasi Teknik Informatika dan Jaringan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.




