Abstract
Cross-project defect prediction (CPDP) uses the labeled data from external source software projects to compensate the shortage of useful data in the target project, in order to build a meaningful classification model. However, the distribution gap between software features extracted from the source and the target projects may be too large to make the mixed data useful for training. In this paper, we propose a cluster-based novel method FeSCH (Feature Selection Using Clusters of Hybrid-Data) to alleviate the distribution differences by feature selection. FeSCH includes two phases. The feature clustering phase clusters features using a density-based clustering method, and the feature selection phase selects features from each cluster using a ranking strategy. For CPDP, we design three different heuristic ranking strategies in the second phase. To investigate the prediction performance of FeSCH, we design experiments based on real-world software projects, and study the effects of design options in FeSCH (such as ranking strategy, feature selection ratio, and classifiers). The experimental results prove the effectiveness of FeSCH. Firstly, compared with the state-of-the-art baseline methods, FeSCH achieves better performance and its performance is less affected by the classifiers used. Secondly, FeSCH enhances the performance by effectively selecting features across feature categories, and provides guidelines for selecting useful features for defect prediction.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Nam J, Pan S J, Kim S. Transfer defect learning. In Proc. the 35th Int. Conf. Software Engineering, May 2013, pp.382-391.
Zhang F, Keivanloo I, Zou Y. Data transformation in cross-project defect prediction. Empir. Softw. Eng., 2017, 22(6): 3186-3218.
Herbold S. Training data selection for cross-project defect prediction. In Proc. the 9th Int. Conf. Predictive Models in Software Engineering, October 2013, Article No. 6.
Turhan B, Menzies T, Bener A B, Di Stefano J. On the relative value of cross-company and within-company data for defect prediction. Empir. Softw. Eng., 2009, 14(5): 540-578.
Peters F, Menzies T, Marcus A. Better cross company defect prediction. In Proc. the 10th Working Conf. Mining Software Repositories, May 2013, pp.409-418.
Amasaki S, Kawata K, Yokogawa T. Improving cross-project defect prediction methods with data simplification. In Proc. the 41st Euromicro Conf. Software Engineering and Advanced Applications, August 2015, pp.96-103.
Rodriguez A, Laio A. Clustering by fast search and find of density peaks. Science, 2014, 344(6191): 1492-1496.
Briand L C, Melo W L, Wust J. Assessing the applicability of fault-proneness models across object-oriented software projects. IEEE Trans. Softw. Eng., 2002, 28(7): 706-720.
Zimmermann T, Nagappan N, Gall H, Giger E, Murphy B. Cross-project defect prediction: A large scale experiment on data vs. domain vs. process. In Proc. the 7th Joint Meeting of the European Software Engineering Conf. and the ACM SIGSOFT Symp. the Foundations of Software Engineering, August 2009, pp.91-100.
He Z M, Shu F D, Yang Y, Li M S, Wang Q. An investigation on the feasibility of cross-project defect prediction. Autom. Softw. Eng., 2012, 19(2): 167-199.
Ma Y, Luo G C, Zeng X, Chen A G. Transfer learning for cross-company software defect prediction. Inf. Softw. Technol., 2012, 54(3): 248-256.
Ryu D, Jang J I, Baik J. A hybrid instance selection using nearest-neighbor for cross-project defect prediction. J. Comput. Sci. Technol., 2015, 30(5): 969-980.
Herbold S, Trautsch A, Grabowski J. Global vs. local models for cross-project defect prediction. Empir. Softw. Eng., 2017, 22(4): 1866-1902.
Wang S, Liu T Y, Tan L. Automatically learning semantic features for defect prediction. In Proc. the 38th Int. Conf. Software Engineering, May 2016, pp.297-308.
Chen L, Fang B, Shang Z W, Tang Y Y. Negative samples reduction in cross-company software defects prediction. Inf. Softw. Technol., 2015, 62: 6777.
Canfora G, De Lucia A, Di Penta M, Oliveto R, Panichella A, Panichella S. Multi-objective cross-project defect prediction. In Proc. the 6th Int. Conf. Software Testing Verification and Validation, March 2013, pp.252-261.
Panichella A, Oliveto R, De Lucia A. Cross-project defect prediction models: L’union fait la force. In Proc. Conf. Software Maintenance Reengineering and Reverse Engineering, February 2014, pp.164-173.
Zhang Y, Lo D, Xia X, Sun J L. An empirical study of classifier combination for cross-project defect prediction. In Proc. the 39th Annual Computer Software and Applications Conf., July 2015, 2: 264-269.
Zhang F, Mockus A, Keivanloo I, Zou Y. Towards building a universal defect prediction model. In Proc. the 11th Working Conf. Mining Software Repositories, May 2014, pp.182-191.
Xia X, Lo D, Pan S J, Nagappan N, Wang X Y. HYDRA: Massively compositional model for cross-project defect prediction. IEEE Trans. Softw. Eng., 2016, 42(10): 977-998.
Herbold S. CrossPare: A tool for benchmarking cross-project defect predictions. In Proc. the 30th ACM/IEEE Int. Conf. Automated Software Engineering Workshop November 2015, pp.90-96.
Nam J, Kim S. Heterogeneous defect prediction. In Proc. the 10th Joint Meeting on Foundations of Software Engineering, September 2015, pp.508-519.
Jing X Y, Wu F, Dong X W, Qi F M, Xu B W. Heterogeneous cross-company defect prediction by unified metric representation and CCA-based transfer learning. In Proc. the 10th Joint Meeting on Foundations of Software Engineering, August 30-September 4, 2015, pp.496-507.
Kamei Y, Fukushima T, McIntosh S, Yamashita K, Ubayashi N, Hassan A E. Studying just-in-time defect prediction using cross-project models. Empir. Softw. Eng., 2016, 21(5): 2072-2106.
Hosseini S, Turhan B, Mäntylä M. Search based training data selection for cross project defect prediction. In Proc. the 12th Int. Conf. Predictive MODELS and Data Analytics in Software Engineering, September 2016, Article No. 3.
Nam J, Kim S. CLAMI: Defect prediction on unlabeled datasets. In Proc. the 30th ACM/IEEE Int. Conf. Automated Software Engineering, November 2015, pp.452-463.
Zhang F, Zheng Q, Zou Y, Hassan A E. Cross-project defect prediction using a connectivity-based unsupervised classifier. In Proc. the 38th Int. Conf. Software Engineering, May 2016, pp.309-320.
Gao K H, Khoshgoftaar T M, Wang H J, Seliya N. Choosing software metrics for defect prediction: An investigation on feature selection techniques. Softw.: Pract. Exper., 2011, 41(5): 579-606.
Shivaji S, Whitehead E J, Akella R, Kim S. Reducing features to improve code change-based bug prediction. IEEE Trans. Softw. Eng., 2013, 39(4): 552-569.
Xu Z, Liu J, Yang Z J, An G G, Jia X Y. The impact of feature selection on defect prediction performance: An empirical comparison. In Proc. the 27th IEEE Int. Symp. Software Reliability Engineering, October 2016, pp.309-320.
Xu Z, Liu J, Xia Z, Yuan P P. An empirical study on the equivalence and stability of feature selection for noisy software defect data. In Proc. the 29th Int. Conf. Software Engineering and Knowledge Engineering, July 2017, pp.191-196.
Ghotra B, McIntosh S, Hassan A E. A large-scale study of the impact of feature selection techniques on defect classification models. In Proc. the 14th Int. Conf. Mining Software Repositories, May 2017, pp.146-157.
Liu S L, Chen X, Liu W S, Chen J Q, Gu Q, Chen D X. FECAR: A feature selection framework for software defect prediction. In Proc. the 38th Annual Computer Software and Applications Conf., July 2014, pp.426-435.
LiuWS, Liu S L, Gu Q, Chen J Q, Chen X, Chen D X. Empirical studies of a two-stage data preprocessing approach for software fault prediction. IEEE Trans. Reliab., 2016, 65(1): 38-53.
Liu W S, Chen X, Gu Q, Liu S L, Chen D X. A clusteranalysis-based feature-selection method for software defect prediction. Sci. Sin. Inf., 2016, 46(9): 1298-1320.
Reshef D N, Reshef Y A, Finucane H K, Grossman S R, McVean G, Turnbaugh P J, Lander E S, Mitzenmacher M, Sabeti P C. Detecting novel associations in large data sets. Science, 2011, 334(6062): 1518-1524.
Fan R E, Chang K W, Hsieh C J, Wang X R, Lin C J. LIBLINEAR: A library for large linear classification. J. Mach. Learn. Res., 2008, 9: 1871-1874.
Wu R X, Zhang H Y, Kim S, Cheung S C. ReLink: Recovering links between bugs and changes. In Proc. the 19th ACM SIGSOFT Symp. and the 13th European Conf. Foundations of Software Engineering, September 2011, pp.15-25.
D’Ambros M, Lanza M, Robbes R. An extensive comparison of bug prediction approaches. In Proc. the 7th IEEE Working Conf. Mining Software Repositories, May 2010, pp.31-41.
Author information
Authors and Affiliations
Corresponding author
Electronic supplementary material
Below is the link to the electronic supplementary material.
ESM 1
(PDF 218 kb)
Rights and permissions
About this article
Cite this article
Ni, C., Liu, WS., Chen, X. et al. A Cluster Based Feature Selection Method for Cross-Project Software Defect Prediction. J. Comput. Sci. Technol. 32, 1090–1107 (2017). https://doi.org/10.1007/s11390-017-1785-0
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11390-017-1785-0