A comprehensive approach to enhance fault prediction through code-comment analysis with CodeBERT
摘要
Software Fault Prediction (SFP) is a key step in enhancing the quality and accuracy of source code. This study examines various combinations of software code metrics and CodeBERT approaches, aiming to extract valuable information from both code and comments for comprehensive code embedding. This study employs advanced code-embedding methodologies, incorporating code and comments and utilizing the state-of-the-art CodeBERT model. The study uses the stacking classifier ensemble approach, with logistic regression and XGBoost as the ultimate estimators, alongside 22 classifiers across 41 diverse datasets. The results indicate that the proposed approach successfully predicts faulty source codes based on accuracy and Area under Curve (AUC). Through the experiment, the proposed approach achieved an accuracy of 80.39% and an AUC of 0.7458.