Measuring Object-Oriented Class Cohesion Based on Complex Networks

Class cohesion has an immediate impact on maintainability, modifiability and understandability of the software. Here, a new metric of cohesion based on complex networks (CBCN) for measuring connectivity of class members was developed mainly relying on calculating class average clustering coefficient from graphs representing connectivity patterns of the various class members. In addition, the CBCN metric was assessed with theoretical validation according to four properties (nonnegativity and normalization, null and maximum values, monotonicity, cohesive modules) of the class cohesion theory. Based on data comparison with existing seventeen typical class cohesion metrics of class cohesion for a system, the CBCN metric was superior to others. Applying the CBCN metric to three open source software systems to calculate class average clustering coefficients, we found that understanding, modification and maintenance of classes in an open software system could be likely less difficult compared with those of others. Three open software systems have power-law distributions for the class average clustering coefficient, which makes possible the further understanding of the cohesion metric based on complex networks.

[1]  Duncan J. Watts,et al.  Collective dynamics of ‘small-world’ networks , 1998, Nature.

[2]  Mirjana Ivanovic,et al.  Characteristics of Class Collaboration Networks in Large Java Software Projects , 2011, Inf. Technol. Control..

[3]  Letha H. Etzkorn,et al.  COHESION METRIC FOR OBJECT-ORIENTED SYSTEMS BASED ON SEMANTIC CLOSENESS FROM DISAMBIGUITY , 2006, Appl. Artif. Intell..

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

[5]  Letha H. Etzkorn,et al.  A comparison of cohesion metrics for object-oriented systems , 2004, Inf. Softw. Technol..

[6]  Keqing He,et al.  A qualitative method for measuring the structural complexity of software systems based on complex networks , 2005, 12th Asia-Pacific Software Engineering Conference (APSEC'05).

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

[8]  Yuming Zhou,et al.  Comments on ‘A cohesion measure for object‐oriented classes’ by Heung Seok Chae, Yong Rae Kwon and Doo Hwan Bae (Softw. Pract. Exper. 2000; 30:1405–1431) , 2001, Softw. Pract. Exp..

[9]  Nathan LaBelle,et al.  Inter-Package Dependency Networks in Open-Source Software , 2004, ArXiv.

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

[11]  Jehad Al Dallal The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities , 2012, J. Syst. Softw..

[12]  Lionel C. Briand,et al.  An object-oriented high-level design-based class cohesion metric , 2010, Inf. Softw. Technol..

[13]  Jehad Al Dallal Incorporating transitive relations in low-level design-based class cohesion measurement , 2013, Softw. Pract. Exp..

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

[15]  Marko Bajec,et al.  Software systems through complex networks science: review, analysis and applications , 2012, Software Mining.

[16]  Jehad Al Dallal Theoretical Analysis for the Impact of Including Special Methods in Lack-of-Cohesion Computation , 2012 .

[17]  Tibor Gyimóthy,et al.  New Conceptual Coupling and Cohesion Metrics for Object-Oriented Systems , 2010, 2010 10th IEEE Working Conference on Source Code Analysis and Manipulation.

[18]  Yuming Zhou,et al.  A novel approach to measuring class cohesion based on dependence analysis , 2002, International Conference on Software Maintenance, 2002. Proceedings..

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

[20]  Albert,et al.  Emergence of scaling in random networks , 1999, Science.

[21]  Sallie M. Henry,et al.  Maintenance metrics for the object oriented paradigm , 1993, [1993] Proceedings First International Software Metrics Symposium.

[22]  R. Ferrer i Cancho,et al.  Scale-free networks from optimal design , 2002, cond-mat/0204344.

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

[24]  Lionel C. Briand,et al.  A Controlled Experiment for Evaluating Quality Guidelines on the Maintainability of Object-Oriented Designs , 2001, IEEE Trans. Software Eng..

[25]  Jehad Al Dallal Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics , 2012, Inf. Softw. Technol..

[26]  Yuming Zhou,et al.  More comments on ‘A cohesion measure for object‐oriented classes’ by Heung‐Seok Chae, Yong‐Rae Kwon and Doo‐Hwan Bae (Softw. Pract. Exper. 2000; 30:1405–1431) , 2003, Softw. Pract. Exp..

[27]  Jehad Al Dallal Measuring the Discriminative Power of Object-Oriented Class Cohesion Metrics , 2011, IEEE Transactions on Software Engineering.

[28]  Jehad Al Dallal Transitive-based object-oriented lack-of-cohesion metric , 2011, WCIT.

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

[30]  Edward Yourdon,et al.  Structured design : fundamentals of a discip!ine of computer proqram and system desiqn , 1979 .

[31]  Brian Henderson-Sellers,et al.  Object-Oriented Metrics , 1995, TOOLS.

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

[33]  Yixian Yang,et al.  Empirical analysis of software coupling networks in object-oriented software systems , 2010, 2010 IEEE International Conference on Software Engineering and Service Sciences.

[34]  Doo-Hwan Bae,et al.  A cohesion measure for object‐oriented classes , 2000 .

[35]  Lionel C. Briand,et al.  A Precise Method-Method Interaction-Based Cohesion Metric for Object-Oriented Classes , 2012, TSEM.

[36]  Christopher R. Myers,et al.  Software systems as complex networks: structure, function, and evolvability of software collaboration graphs , 2003, Physical review. E, Statistical, nonlinear, and soft matter physics.