Software Defect Prediction Using Machine Learning and Deep Learning Techniques

Software defect prediction (SDP) has become a critical component in modern software development, aiming to identify potential bugs early in the development process. Despite advancements in the field, existing SDP models often struggle with accuracy and class imbalance issues, limiting their practical application in real-world software development environments. The increasing complexity of software systems necessitates more robust and accurate defect prediction techniques to enhance software quality and reduce development costs. This study aims to enhance software defect prediction through machine learning and deep learning techniques, focusing on improving accuracy and addressing class imbalance. The research seeks to develop and compare various machine learning and deep learning models to identify the most effective approach for early defect detection in software development processes. The study employs a comprehensive methodology utilizing Random Forest, Support Vector Machines (SVM), Naive Bayes, Artificial Neural Networks (ANN), and Convolutional Neural Networks (CNN) algorithms. The JM1 NASA software defect dataset was used, consisting of 10,885 instances with 22 code metric attributes. To address class imbalance, a hybrid sampling technique (SMOTE-Tomek) was implemented. Models were evaluated using multiple performance metrics including accuracy, precision, recall, F1-score, and AUC-ROC. This approach allows for a thorough comparison of traditional machine learning and deep learning techniques in the context of software defect prediction. The Random Forest model achieved the best overall performance with an accuracy of 82.3%, recall of 96.8%, F1-score of 0.898, and precision of 83.7%, significantly outperforming previous benchmarks. The CNN model also showed promise, achieving 81.95% accuracy and 95.90% recall. These results demonstrated substantial improvements in handling class imbalance and overall predictive performance compared to existing studies. The high recall rates suggest that these models, particularly Random Forest, are effective at identifying a large proportion of defects, which is crucial in software development where missing defects can be costly. However, the study also highlighted the ongoing challenge of balancing precision and recall in software defect prediction. The findings contribute to the refinement of software defect prediction methodologies, offering improved models for early defect detection in software development processes and opening avenues for further research in applying machine learning to software engineering challenges

Download Paper