Software defect detection is important to prevent system failures and increased maintenance costs. However, the complexity of modern software makes manual testing inefficient, so machine learning approaches are used. The main challenge of this approach is data imbalance, where defective cases are far fewer, causing the model to overlook the minority class and reducing detection capability, even though accuracy appears high. This study aims to address class imbalance in software defect detection by applying the NR-Clustering SMOTE method to improve machine learning performance—the classification methods using Random Forest. NR-Clustering SMOTE not only oversamples the minority class but also incorporates a noise-reduction mechanism to remove minority data that may degrade classification performance. The results show that NR-Clustering SMOTE improves the performance of Random Forest compared with the original data, SMOTE, and NR-Modified SMOTE across all evaluation metrics, namely accuracy, recall, and F1-score. These findings indicate that integrating noise reduction and SMOTE-based data balancing using Manhattan distance within each cluster produces a more representative data distribution, thereby improving the model’s ability to classify software defect cases more accurately. Therefore, this study confirms that NR-Clustering SMOTE effectively improves Random Forest performance for software defect detection compared with existing approaches.
Copyrights © 2026