A Large-Scale Empirical Comparison of Object-Oriented Cohesion Metrics

Cohesion is an attribute of software design quality for which many metrics have been proposed. The different proposals have been made largely on theoretical grounds, with little evidence of actual use. This makes it difficult to provide advice to software developers as to how to interpret the measurements any given metric produces. This paper presents the first large-scale empirical study of object- oriented cohesion metrics. We apply 16 metrics from the literature, as well as a number of variations, to 92 open source and industry Java applications ranging in size from a few classes to several thousand, over 100,000 classes in all. Our results show that by and large applications have similar distributions of measurements according to any given metric, but that the distributions can be quite different across metrics. This provides useful information for the ongoing empirical validation efforts for cohesion metrics.

[1]  Jason Crampton,et al.  The interpretation and utility of three cohesion metrics for object-oriented design , 2006, TSEM.

[2]  Doo-Hwan Bae,et al.  A cohesion measure for object‐oriented classes , 2000, Softw. Pract. Exp..

[3]  Martin Hitz,et al.  Measuring coupling and cohesion in object-oriented systems , 1995 .

[4]  Sallie M. Henry,et al.  Object-oriented metrics that predict maintainability , 1993, J. Syst. Softw..

[5]  Brian Henderson-Sellers,et al.  Coupling and cohesion (towards a valid metrics suite for object-oriented analysis and design) , 1996, Object Oriented Syst..

[6]  Chris F. Kemerer,et al.  Towards a metrics suite for object oriented design , 2017, OOPSLA '91.

[7]  Witold Pedrycz,et al.  An Empirical Exploration of the Distributions of the Chidamber and Kemerer Object-Oriented Metrics Suite , 2004, Empirical Software Engineering.

[8]  Letha H. Etzkorn,et al.  Design and Code Complexity Metrics for OO Classes , 2003 .

[9]  Lionel C. Briand,et al.  A comprehensive empirical validation of design measures for object-oriented systems , 1998, Proceedings Fifth International Software Metrics Symposium. Metrics (Cat. No.98TB100262).

[10]  Glenford J. Myers,et al.  Structured Design , 1974, IBM Syst. J..

[11]  James M. Bieman,et al.  Cohesion and reuse in an object-oriented system , 1995, SSR '95.

[12]  Shari Lawrence Pfleeger,et al.  Towards a Framework for Software Measurement Validation , 1995, IEEE Trans. Software Eng..

[13]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement in Object-Oriented Systems , 2004, Empirical Software Engineering.

[14]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[15]  Mourad Badri,et al.  A Proposal of a New Class Cohesion Criterion: An Empirical Study , 2004, J. Object Technol..

[16]  Letha H. Etzkorn,et al.  A Class Cohesion Metric For Object-Oriented Designs , 1999, J. Object Oriented Program..

[17]  Challa Bonja,et al.  Metrics for class cohesion and similarity between methods , 2006, ACM-SE 44.