On the ability of complexity metrics to predict fault-prone classes in object-oriented systems

被引:75
作者
Zhou, Yuming [1 ,2 ]
Xu, Baowen [1 ,2 ]
Leung, Hareton [3 ]
机构
[1] Nanjing Univ, State Key Lab Novel Software Technol, Nanjing, Peoples R China
[2] Nanjing Univ, Dept Comp Sci & Technol, Nanjing, Peoples R China
[3] Hong Kong Polytech Univ, Dept Comp, Hong Kong, Hong Kong, Peoples R China
基金
中国国家自然科学基金;
关键词
Complexity; Metrics; Fault-prone; Prediction; Logistic regression; Odds ratio; Concordant pairs; EMPIRICAL VALIDATION; SOFTWARE QUALITY; DESIGN METRICS; IDENTIFICATION; ACCURACY; MODELS; CURVE; AGILE; CODE; AREA;
D O I
10.1016/j.jss.2009.11.704
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Many studies use logistic regression models to investigate the ability of complexity metrics to predict fault-prone classes. However, it is not uncommon to see the inappropriate use of performance indictors such as odds ratio in previous studies. In particular, a recent study by Olague et al. uses the odds ratio associated with one unit increase in a metric to compare the relative magnitude of the associations between individual metrics and fault-proneness. In addition, the percents of concordant, discordant, and tied pairs are used to evaluate the predictive effectiveness of a univariate logistic regression model. Their results suggest that lesser known complexity metrics such as standard deviation method complexity (SDMC) and average method complexity (AMC) are better predictors than the two commonly used metrics: lines of code (LOC) and weighted method McCabe complexity (WMC). In this paper, however, we show that (1) the odds ratio associated with one standard deviation increase, rather than one unit increase, in a metric should be used to compare the relative magnitudes of the effects of individual metrics on fault-proneness. Otherwise, misleading results may be obtained; and that (2) the connection of the percents of concordant, discordant, and tied pairs with the predictive effectiveness of a univariate logistic regression model is false, as they indeed do not depend on the model. Furthermore, we use the data collected from three versions of Eclipse to re-examine the ability of complexity metrics to predict fault-proneness. Our experimental results reveal that: (1) many metrics exhibit moderate or almost moderate ability in discriminating between fault-prone and not fault-prone classes; (2) LOC and WMC are indeed better fault-proneness predictors than SDMC and AMC; and (3) the explanatory power of other complexity metrics in addition to LOC is limited. (C) 2009 Elsevier Inc. All rights reserved.
引用
收藏
页码:660 / 674
页数:15
相关论文
共 54 条
[1]  
[Anonymous], UND JAV US GUID REF
[2]  
[Anonymous], 2001, LOGISTIC REGRESSION
[3]  
[Anonymous], 2006, ISESE '06: Proceedings of the 5th International Symposium on Empirical Software Engineering. Volume II: Short Papers and Posters, DOI [10.1145/1159733.1159739, DOI 10.1145/1159733.1159739.]
[4]  
Arisholm E., 2006, ISESE 06 P 2006 ACMI, P8
[5]   A validation of object-oriented design metrics as quality indicators [J].
Basili, VR ;
Briand, LC ;
Melo, WL .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1996, 22 (10) :751-761
[6]  
Benlarbi S., 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002), P334, DOI 10.1109/ICSE.1999.841024
[7]  
Borenstein M., 2009, Introduction to meta-analysis, V1st edn, DOI 10.1002/9780470743386
[8]   The use of the area under the roc curve in the evaluation of machine learning algorithms [J].
Bradley, AP .
PATTERN RECOGNITION, 1997, 30 (07) :1145-1159
[9]   An investigation into coupling measures for C++ [J].
Briand, L ;
Devanbu, P ;
Melo, W .
PROCEEDINGS OF THE 1997 INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 1997, :412-421
[10]   Replicated case studies for investigating quality factors in object-oriented designs [J].
Briand L.C. ;
Wüst J. ;
Lounis H. .
Empirical Software Engineering, 2001, 6 (01) :11-58