Gottumukkala Devi Priya, P V G D Prasad Reddy, Rao S Krishna
Department of CS&SE, TDR-HUB, Andhra University, Visakhapatnam, India.
Department of CS&SE, Andhra University, Visakhapatnam, India.
Sci Rep. 2025 Jul 14;15(1):25428. doi: 10.1038/s41598-025-11458-0.
The occurrence of software defects remains a major obstacle in software engineering, resulting in costly debugging and maintenance efforts. This study introduces a new angle for software defect prediction (SDP), utilizing advanced natural language processing (NLP) and machine learning (ML) techniques. In this work, the proposed methodology, BERT-MOC, combines the power of BERTopic, a transformer-based topic modeling technique, with a multioutput classifier to predict software defects and the root cause (reason) of defects. BERTopic is used to extract the root cause of the defect from textual descriptions of software defects, creating a meaningful representation of the software artifacts. These topic representations are then combined with the defect log data set.A multi-output classifier is trained on the combined dataset to predict multiple outputs, i.e., defect/not defect and defect root cause, simultaneously. As an estimator, Logistic Regression, Decision Tree Classifier, Kneighbor Classifier, Random Forest Classifier, and Ensemble Method-Voting are included in the MultiOutput Classifier. The proposed model is evaluated by the metrics hamming loss, accuracy, F1-score, precision, recall, and Jaccard similarity. The multi-output classifier with ensemble method voting as an estimator achieved the highest performance with 97% accuracy and F1-score to predict the root cause of the defect and 94% accuracy and F1-score to predict defect or not.
软件缺陷的出现仍然是软件工程中的一个主要障碍,会导致成本高昂的调试和维护工作。本研究引入了一种软件缺陷预测(SDP)的新视角,利用先进的自然语言处理(NLP)和机器学习(ML)技术。在这项工作中,所提出的方法BERT-MOC将基于变压器的主题建模技术BERTopic的强大功能与多输出分类器相结合,以预测软件缺陷及其根本原因(理由)。BERTopic用于从软件缺陷的文本描述中提取缺陷的根本原因,创建软件工件的有意义表示。然后将这些主题表示与缺陷日志数据集相结合。在组合数据集上训练多输出分类器,以同时预测多个输出,即缺陷/无缺陷和缺陷根本原因。作为估计器,多输出分类器中包括逻辑回归、决策树分类器、K近邻分类器、随机森林分类器和集成方法投票。所提出的模型通过汉明损失、准确率、F1分数、精确率、召回率和杰卡德相似度等指标进行评估。以集成方法投票作为估计器的多输出分类器在预测缺陷根本原因时达到了最高性能,准确率和F1分数为97%,在预测是否存在缺陷时准确率和F1分数为94%。