The interpretation and utility of three cohesion metrics for object-oriented design

The concept of cohesion in a class has been the subject of various recent empirical studies and has been measured using many different metrics. In the structured programming paradigm, the software engineering community has adopted an informal yet meaningful and understandable definition of cohesion based on the work of Yourdon and Constantine. The object-oriented (OO) paradigm has formalised various cohesion measures, but the argument over the most meaningful of those metrics continues to be debated. Yet achieving highly cohesive software is fundamental to its comprehension and thus its maintainability. In this article we subject two object-oriented cohesion metrics, CAMC and NHD, to a rigorous mathematical analysis in order to better understand and interpret them. This analysis enables us to offer substantial arguments for preferring the NHD metric to CAMC as a measure of cohesion. Furthermore, we provide a complete understanding of the behaviour of these metrics, enabling us to attach a meaning to the values calculated by the CAMC and NHD metrics. In addition, we introduce a variant of the NHD metric and demonstrate that it has several advantages over CAMC and NHD. While it may be true that a generally accepted formal and informal definition of cohesion continues to elude the OO software engineering community, there seems considerable value in being able to compare, contrast, and interpret metrics which attempt to measure the same features of software.

[1]  Victor R. Basili,et al.  A Validation of Object-Oriented Design Metrics as Quality Indicators , 1996, IEEE Trans. Software Eng..

[2]  Letha H. Etzkorn,et al.  Clarifying specialized forms of association in UML and OML , 1998 .

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

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

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

[6]  Carl G. Davis,et al.  A Hierarchical Model for Object-Oriented Design Quality Assessment , 2002, IEEE Trans. Software Eng..

[7]  Glenford J. Myers,et al.  Structured Design , 1999, IBM Syst. J..

[8]  Hermann Kaindl,et al.  Coupling and cohesion metrics for knowledge-based systems using frames and rules , 2004, TSEM.

[9]  Mark Harman,et al.  An empirical study of amorphous slicing as a program comprehension support tool , 2000, Proceedings IWPC 2000. 8th International Workshop on Program Comprehension.

[10]  Sandro Morasca,et al.  Property-Based Software Engineering Measurement , 1996, IEEE Trans. Software Eng..

[11]  Emilia Mendes,et al.  Design Level Hypothesis Testing Through Reverse Engineering Of Object-Oriented Software , 2004, Int. J. Softw. Eng. Knowl. Eng..

[12]  Sandro Morasca,et al.  Defining and Validating Measures for Object-Based High-Level Design , 1999, 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]  Sallie M. Henry,et al.  Maintenance metrics for the object oriented paradigm , 1993, [1993] Proceedings First International Software Metrics Symposium.

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

[16]  Shari Lawrence Pfleeger,et al.  Software metrics (2nd ed.): a rigorous and practical approach , 1997 .

[17]  James F. Power,et al.  Run-Time Cohesion Metrics: An Empirical Investigation , 2004, Software Engineering Research and Practice.

[18]  Arun Lakhotia Rule-based approach to computing module cohesion , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[19]  James M. Bieman,et al.  Measuring Functional Cohesion , 1994, IEEE Trans. Software Eng..

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

[21]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

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

[23]  Taghi M. Khoshgoftaar,et al.  Measuring coupling and cohesion: an information-theory approach , 1999, Proceedings Sixth International Software Metrics Symposium (Cat. No.PR00403).

[24]  W. J. Langford Statistical Methods , 1959, Nature.