A Survey on Cross-Project Software Defect Prediction Methods
Xiang CHEN,Li-Ping WANG,Qing GU,Zan WANG,Chao NI,Wang-Shu LIU,Qiu-Ping WANG
DOI: https://doi.org/10.11897/SP.J.1016.2018.00254
2018-01-01
Chinese Journal of Computers
Abstract:Software defect prediction firstly analyzes and mines software historical repositories to extract program modules and label them.It secondly designs novel metrics,which have strong correlation with defects,based on the analysis on code complexity or development process.Then it uses these metrics to measure these program modules.It finally uses a specific machine learning algorithm to construct software defect prediction models,which are trained on these datasets.Therefore software defect prediction can optimize the software testing resource allocation by identifying the potential defect modules in advance.However in real software development,a project,which needs defect prediction,maybe a new project or it maybe has less training data.A simple solution is directly using training data from other projects to construct the model.However application domain,development process,used programming language,developer experience of different projects may be not same.This will cause the distribution of corresponding datasets to be large and result in the poor performance of defect prediction.Therefore,how to effectively transfer the knowledge of the source project to build a defect prediction model for the target project has attracted the attention of researchers,and this problem is called cross-project defect prediction (CPDP).We conduct a comprehensive survey on this topic and classify existing methods into three categories:supervised learning based methods,unsupervised learning based methods,and semi-supervised learning based methods.In particular,the supervised learning based methods will use the modules of the source project to construct the model.These methods can be further classified into two categories:homogeneous cross-project defect learning and heterogeneous crossproject defect prediction based on whether the source project and the target project use the same metric set.For the former,researchers design novel methods by using metric value transformation,instance selection and weight setting,feature mapping and selection,ensemble learning,class imbalance learning.For the latter,the issue is more challenging and researchers design novel methods by using feature mapping and canonical correlation analysis.The unsupervised learning based methods will attempt to make a prediction on the modules of the target project immediately.The assumption of these methods is that the metric value of defective modules has the tendency to be higher than the metric value of non-defective modules.Researchers design novel methods by using cluster algorithms.The semi-supervised learning based methods will use the modules of the source project and some labeled programs in the target project together to construct the model.These methods try to improve the performance of CPDP by identifying some representative program modules in the target project and label them manually.Researchers design novel methods by using ensemble learning and TrAdaBoost.We summarize and comment the existing research work for each category in sequence.Then we analyze the commonly used performance metrics and benchmarks in empirical studies in CPDP for other researchers to better design empirical studies.Finally we conclude this paper and discuss some potentially future research work from four dimensions:dataset gathering,dataset preprocessing,CPDP model construction and evaluation,and CPDP model application.