Deep Semantic Feature Learning for Software Defect Prediction
Song Wang, Taiyue Liu, Jaechang Nam et al. · IEEE Transactions on Software Engineering · 2018
Software defect prediction, which predicts defective code regions, can assist developers in finding bugs and prioritizing their testing efforts. Traditional defect prediction features often fail to capture the semantic differences between different programs. This degrades the performance of the prediction models built on these traditional features. Thus, the capability to capture the semantics in programs is required to build accurate prediction models. To bridge the gap between semantics and defect prediction features, we propose leveraging a powerful representation-learning algorithm, deep learning, to learn the semantic representations of programs automatically from source code files and code changes. Specifically, we leverage a deep belief network (DBN) to automatically learn semantic features using token vectors extracted from the programs' abstract syntax trees (AST) (for file-level defect prediction models) and source code changes (for change-level defect prediction models). We examine the effectiveness of our approach on two file-level defect prediction tasks (i.e., file-level within-project defect prediction and file-level cross-project defect prediction) and two change-level defect prediction tasks (i.e., change-level within-project defect prediction and change-level cross-project defect prediction). Our experimental results indicate that the DBN-based semantic features can significantly improve the examined defect prediction tasks. Specifically, the improvements of semantic features against existing traditional features (in F1) range from 2.1 to 41.9 percentage points for file-level within-project defect prediction, from 1.5 to 13.4 percentage points for file-level cross-project defect prediction, from 1.0 to 8.6 percentage points for change-level within-project defect prediction, and from 0.6 to 9.9 percentage points for change-level cross-project defect prediction.
Cited by 320 works. doi:10.1109/tse.2018.2877612
Authors
References
- ImageNet classification with deep convolutional neural networks
- A Fast Learning Algorithm for Deep Belief Nets
- Reducing the Dimensionality of Data with Neural Networks
- Latent dirichlet allocation
- Data Mining: Practical Machine Learning Tools and Techniques
- SMOTE: Synthetic Minority Over-sampling Technique
- Foundations of statistical natural language processing
- Learning Deep Architectures for AI
- The WEKA data mining software
- Multi-column deep neural networks for image classification