Share This Article:

Exploring Design Level Class Cohesion Metrics

Abstract Full-Text HTML Download Download as PDF (Size:169KB) PP. 384-390
DOI: 10.4236/jsea.2010.34043    5,173 Downloads   9,595 Views   Citations

ABSTRACT

In object oriented paradigm, cohesion of a class refers to the degree to which members of the class are interrelated. Metrics have been defined to measure cohesiveness of a class both at design and source code levels. In comparison to source code level class cohesion metrics, only a few design level class cohesion metrics have been proposed. Design level class cohesion metrics are based on the assumption that if all the methods of a class have access to similar para-meter types then they all process closely related information. A class with a large number of parameter types common in its methods is more cohesive than a class with less number of parameter types common in its methods. In this paper, we review the design level class cohesion metrics with a special focus on metrics which use similarity of parameter types of methods of a class as the basis of its cohesiveness. Basically three metrics fall in this category: Cohesion among Methods of a Class (CAMC), Normalized Hamming Distance (NHD), and Scaled NHD (SNHD). Keeping in mind the anomalies in the definitions of the existing metrics, a variant of the existing metrics is introduced. It is named NHD Modified (NHDM). An automated metric collection tool is used to collect the metric data from an open source software program. The metric data is then subjected to statistical analysis.

Conflicts of Interest

The authors declare no conflicts of interest.

Cite this paper

K. Kaur and H. Singh, "Exploring Design Level Class Cohesion Metrics," Journal of Software Engineering and Applications, Vol. 3 No. 4, 2010, pp. 384-390. doi: 10.4236/jsea.2010.34043.

References

[1] P. Chidamber and C. Kemerer, “Towards a Metrics Suite for Object Oriented Design,” Proceedings of 6th ACM Conference on Object Oriented Programming, Systems, Languages and Applications, Phoenix, Arizona, 1991, pp. 197-211.
[2] L. Briand, J. Wust, J. Daly and D. Porter, “Exploring the Relationships between Design Measures and Software Quality in Object Oriented Systems,” Journal of Systems and Software, Vol. 51, No. 3, 2000, pp. 245-273.
[3] J. Bansiya and C. Davis, “A Hierarchical Model for Object Oriented Quality Assessment,” IEEE Transactions on Software Engineering, Vol. 28, No. 1, 2002, pp. 4-17.
[4] T. Gyimothy, R. Ferenc and I. Siket, “Empirical Validation of Object-Oriented Metrics on Open Source Software for Fault Prediction,” IEEE Transactions on Software Enineering, Vol. 31, No. 10, 2005, pp. 897-910.
[5] Z. Zhou and H. Leung, “Empirical Analysis of Object- Oriented Design Metrics for Predicting High and Low Severity Faults,” IEEE Transactions on Software Engi-neering, Vol. 32, No. 10, 2006, pp. 771-789.
[6] M. Marcus and D. Poshyvanyk, “Using the Conceptual Cohesion of Classes for Fault Prediction in Object-Orien- ted System,” IEEE Transactions on Software Engineering, Vol. 34, No. 2, 2008.
[7] J. Lee, S. Jung, S. Kim, W. Jang and D. Ham,“Component Identification Method with Coupling and Cohesion,” Proceedings of the Eighth Asia-Pacific Software Engineering Conference, December 2001, pp. 79-86.
[8] G. Gui and D. Scott, “Measuring Software Component Reusability by Coupling and Cohesion Metrics,” Journal of Computers, Vol. 4, No 9, Academy Publishers, 2009, pp. 797-805.
[9] J. Bansiya, L. Etzkorn, C. Davis and W. Li, “A Class Cohesion Metric for Object Oriented Designs,” Journal of Object Oriented Programming, Vol. 11, No. 8, 1999, pp. 47-52.
[10] S. Counsell, S. Swift and J. Crampton, “The Interpretation and Utility of Three Cohesion Metrics for Object- Oriented Design,” ACM Transactions on Software Engineering and Methodology, Vol. 15, No. 2, 2006, pp. 123-149.
[11] J. Dallal, “A Design-Based Cohesion Metric for Object- Oriented Classes,” Proceedings of the International Conference on Computer and Information Science and Engineering, 2007, pp. 301-306.
[12] W. Li and S. Henry, “Object-Oriented Metrics that Predict Maintainability,” Journal of Systems and Software, Vol. 23, No. 2, 1993, pp. 111-122.
[13] S. Chidamber and C. Kemerer, “A Metrics Suite for Object Oriented Design,” IEEE Transactions on Software Engineering, Vol. 20, 1994, pp. 476-493.
[14] M. Hitz and B. Montazeri, “Measuring Coupling and Cohesion in Object-Oriented Systems,” Proceedings of International Symosium on Applied Corporate Computing, 1995.
[15] J. Bieman and B. Kang, “Cohesion and Reuse in an Object-Oriented System,” Proceedings of the 1995 Sym- posium on Software Reusability, ACM Press, 1995, pp. 259-262.
[16] B. Henderson-Sellers, L. Constantine and I. Graham, “Coupling and Cohesion (towards a Valid Metrics Suite for Object-Oriented Analysis and Design),” Object Ori- ented Systems, Vol. 3, 1996, pp. 143-158.
[17] L. Briand, J. Daly and J. Wust, “A Unified Framework for Cohesion Measurement in Object-Oriented Systems,” Empirical Software Engineering, Vol. 3, No. 1, 1998, pp. 65-117.
[18] H. Chae, Y. Kwon and D. Bae, “A Cohesion Measure for Object-Oriented Classes,” Software Practice and Expe-rience, Vol. 30, No. 12, 2000, pp. 1405-1431.
[19] Z. Chen, Y. Zhou and B. Xu, “A Novel Approach to Measuring Class Cohesion Based on Dependence Analy-sis,” Proceedings of the International Conference on Software Maintenance, 2002, pp. 377-384.
[20] L. Badri and M. Badri, “A Proposal of a New Class Co-hesion Criter Ion: An Empirical Study,” Journal of Object Technology, Vol. 3, No. 4, 2004.
[21] J. Wang, Y. Zhou, L. Wen, Y. Chen, H. Lu and B. Xu, “DMC: A More Precise Cohesion Measure for Classes,” Information and Software Technology, Vol. 47, No. 3, pp. 176-180, 2005.
[22] C. Bonja and E. Kidanmariam, “Metrics for Class Cohesion and Similarity between Methods,” Proceedings of the 44th Annual Southeast Regional Conference, ACM Press, New York, 2006, pp. 91-95.
[23] G. Cox, , L. Etzkorn and W. Hughes, “Cohesion Metric for Object-Oriented Systems Based on Semantic Close- ness from Disambiguity,” Applied Artificial Intelligence, Vol 20, No. 5, 2006, pp. 419-436.
[24] L. Fernández and R. Peña, “A Sensitive Metric of Class Cohesion,” International Journal of Information Theories and Applications, Vol. 13, No. 1, 2006, pp. 82-91.
[25] S. Makela and V. Leppanen, “Client Based Object Oriented Cohesion Metrics,” 31st Annual International Computer Software and Applications Conference, Vol. 2, 2007, pp. 743-748.
[26] A. Marcus and D. Poshyvanyk, “The Conceptual Cohe- sion of Classes,” Proceedings of 21st IEEE International Conference on Software Maintenance, 2005, pp. 133-142.
[27] J. Dallal and L. Briand, “An Object-Oriented High-Level Design-Based Class Cohesion Metric,” Simula Technical Report (2009-1), Version 2, Simula Research Laboratory, 2009.

  
comments powered by Disqus

Copyright © 2018 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.