The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics

  • Authors:
  • Kalhed El Emam;Saïda Benlarbi;Nishith Goel;Shesh N. Rai

  • Affiliations:
  • Canada Institute for Information Technology, Ottawa, Ont., Canada;Cistel Technology, Nepean, Ont., Canada;Cistel Technology, Nepean, Ont., Canada;St. Jude Children's Research Hospital, Memphis, TN

  • Venue:
  • IEEE Transactions on Software Engineering
  • Year:
  • 2001

Quantified Score

Hi-index 0.01

Visualization

Abstract

Much effort has been devoted to the development and empirical validation of object-oriented metrics. The empirical validations performed thus far would suggest that a core set of validated metrics is close to being identified. However, none of these studies allow for the potentially confounding effect of class size. In this paper, we demonstrate a strong size confounding effect and question the results of previous object-oriented metrics validation studies. We first investigated whether there is a confounding effect of class size in validation studies of object-oriented metrics and show that, based on previous work, there is reason to believe that such an effect exists. We then describe a detailed empirical methodology for identifying those effects. Finally, we perform a study on a large C++ telecommunications framework to examine if size is really a confounder. This study considered the Chidamber and Kemerer metrics and a subset of the Lorenz and Kidd metrics. The dependent variable was the incidence of a fault attributable to a field failure (fault-proneness of a class). Our findings indicate that, before controlling for size, the results are very similar to previous studies: The metrics that are expected to be validated are indeed associated with fault-proneness. After controlling for size, none of the metrics we studied were associated with fault-proneness anymore. This demonstrates a strong size confounding effect and casts doubt on the results of previous object-oriented metrics validation studies. It is recommended that previous validation studies be reexamined to determine whether their conclusions would still hold after controlling for size and that future validation studies should always control for size.