An empirical validation of object‐oriented class complexity metrics and their ability to predict error‐prone classes in highly iterative, or agile, software: a case study
Hector M. Olague, Letha Hughes Etzkorn, Sherri L. Messimer, Harry S. Delugach · Journal of Software Maintenance and Evolution Research and Practice · 2008
Abstract Empirical studies have shown complexity metrics to be good predictors of testing effort and maintainability in traditional, imperative programming languages. Empirical validation studies have also shown that complexity is a good predictor of initial quality and reliability in object‐oriented (OO) software. To date, one of the most empirically validated OO complexity metrics is the Chidamber and Kemerer Weighted Methods in a Class (WMC). However, there are many more OO complexity metrics whose predictive power has not been as extensively explored. In this study, we explore the predictive ability of several complexity‐related metrics for OO software that have not been heavily validated. We do this by exploring their ability to measure quality in an evolutionary software process, by correlating these metrics to defect data for six versions of Rhino, an open‐source implementation of JavaScript written in Java. Using statistical techniques such as Spearman's correlation, principal component analysis, binary logistic regression models and their respective validations, we show that some lesser known complexity metrics including Michuraet al.'s standard deviation method complexity and Etzkornet al.'s average method complexity are more consistent predictors of OO quality than any variant of the Chidamber and Kemerer WMC metric. We also show that these metrics are useful in identifying fault‐prone classes in software developed using highly iterative or agile software development processes. Copyright © 2008 John Wiley & Sons, Ltd.