Software Defect Prediction Using Abstract Syntax Trees Features and Object—Oriented Metrics
摘要
Bug prediction systems have developed to assist developers in prioritizing testing tasks as software releases become more frequent due to changing requirements. Previous studies used methods such as classifying modules as faulty or not, or performing multi-class classification to predict the number of bugs. Some studies used Object-Oriented (OO) metrics, while others used Abstract Syntax Trees (ASTs) to extract code features for bug prediction. This research treated bug prediction as a regression problem and used deep learning models, such as LSTM and CNN, to solve it. The study compared the results of LSTM and CNN models trained on OO metrics with classical machine learning models and a multilayer perceptron model, and found that their LSTM model performed better in terms of MAE and MRE than three of the classical models. The LSTM and CNN models were also trained on features extracted from file-level ASTs of the source code of projects and compared with the models trained on OO metrics. The CNN model trained on file-level AST features produced MAE results similar to the LSTM model trained on OO metrics, but outperformed it in terms of MRE.