Liability Cohesion Metric - The Usefulness of Cohesion Metrics in Identifying Classes with Structural Problems
Abstract
Several class cohesion metrics have been proposed in the literature.However, there is no consensual approach to measure class cohesion yet. An important issue in this topic is that it is difficult to assess cohesion quantitatively because this is a semantical concept. In the present work, we carried out an experimental study in order to find out evidences that cohesion metrics are significant indicators of the structural quality of classes. We evaluated four cohesion metrics: LCOM, LCOM4, TCC and COR. Cohesion of Responsibility (COR) is defined in this work as an indicator of the number of responsibilities implemented by a class. The definition of COR aims to generate values which are simple and easy to interpret. Findings of this work show that metrics like COR are usefull in identifying classes with design deviances.
Keywords:
Cohesion Metrics, Class Identification, Structural Problems
References
Abreu, F. B. and Carapuça, R. (1994). Object-oriented software engineering: Measuring and controlling the development process. In Proceedings of 4th Int. Conf. of Software Quality, McLean, Estados Unidos.
Al-Dallal, J. (2009). Software similarity-based functional cohesion metric. IET Software, 3(1):46–57.
Basili, V. R., Briand, L. C., and Melo, W. L. (1996). A validation of object-oriented design metrics as quality indicators. IEEE Trans. Softw. Eng., 22:751–761.
Bieman, J. M. and Kang, B.-K. (1995). Cohesion and reuse in an object-oriented system. SIGSOFT Softw. Eng. Notes, 20:259–262.
Briand, L. C., Daly, J. W., and Wust, J. (1998a). A unified framework for cohesion measurement in object-oriented systems. Empirical Softw. Eng., 3(1):65–117.
Briand, L. C., Wust, J., Daly, J., and Porter, V. (1998b). A comprehensive empirical validation of design measures for object-oriented systems. In Proceedings of the 5th International Symposium on Software Metrics, METRICS ’98, pages 246–, Washington, DC, USA. IEEE Computer Society.
Chidamber, S. R. and Kemerer, C. F. (1994). A metrics suite for object oriented design. IEEE Trans. Softw. Eng., 20:476–493.
Counsell, S., Swift, S., and Crampton, J. (2006). The interpretation and utility of three co hesion metrics for object-oriented design. ACM Trans. Softw. Eng. Methodol., 15:123–149.
Czibula, I. G. and Czibula, G. (2008). Clustering based automatic refactorings identification. In Proceedings of the 2008 10th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, pages 253–256, Washington, DC, Esta dos Unidos. IEEE Computer Society.
Ferreira, K. A. M. (2006). Avaliaçao de Conectividade em Sistemas Orientados por Objetos. Dissertaçao de Mestrado - DCC/UFMG., Belo Horizonte, Brasil.
Ferreira, K. A. M. (2011). Um Modelo de Predição de Amplitude da Propagação de Modificações Contratuais em Software Orientado por Objetos. Tese de Doutorado - DCC/UFMG., Belo Horizonte, Brasil.
Ferreira, K. A. M., Bigonha, M. A. S., Bigonha, R., Mendes, L. F. O., and Almeida, H. C. (2009). Reference values for object-oriented software. In XXIII Brazilian Symposium on Software Engineering, pages 62–72, Fortaleza, Ceara, Brazil.
Fowler, M. (1999). Refactoring - Improving the Design of Existing Code. Addison Wesley.
Gyimothy, T., Ferenc, R., and Siket, I. (2005). Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Transactions on Software Engineering, 31:897–910.
Hitz, M. and Montazeri, B. (1995). Measuring coupling and cohesion in object-oriented systems. In Int. Symposium on Applied Corporate Computing, Monterrey, Mexico.
Jancke, S. (2010). Smell Detection in Context. Diploma thesis. University of Bonn. Bonn, Germany., http://dirkriehle.com/computer-science/research/dissertation/.
Kessentini, M., Vaucher, S., and Sahraoui, H. (2010). Deviance from perfection is a better criterion than closeness to evil when identifying risky code. In Proceedings of the IEEE/ACM International conference on Automated Software Engineering, ASE ’10, pages 113–122, New York, NY, Estados Unidos. ACM.
Kitchenham, B. (2009). What’s up with software metrics? - a preliminary mapping study. The Journal of Systems and Software, 83:37–51.
Lincke, R., Lundberg, J., and Lowe, W. (2008). Comparing software metrics tools. In ISSTA ’08: Proceedings of the 2008 International Symposium on Software Testing and Analysis, pages 131–142, New York, NY, Estados Unidos. ACM.
Marcus, A. and Poshyvanyk, D. (2005). The conceptual cohesion of classes. In Proceedings of the 21st IEEE International Conference on Software Maintenance, pages 133–142, Washington, DC, Estados Unidos. IEEE Computer Society.
Marinescu, R. (1998). Using object-oriented metrics for automatic design flaws detection in large scale systems. In Workshop ion on Object-Oriented Technology, ECOOP ’98, pages 252–255, London, UK. Springer-Verlag.
Makel a, S. and Lepp anen, V. (2007). Cliente based object-oriented cohesion metrics. In IEEE 31st Annual International Computer Software and Applications Conference, pages 743–748, Beijing.
Myers, G. J. (1975). Reliable software through composite design. Petrocelli/Charter, Nova York, 2 edition.
Olague, H. M., Etzkorn, L. H., Gholston, S., and Quattlebaum, S. (2007). Empirical validation of three software metrics suites to predict fault-proneness of object-oriented classes developed using highly iterative or agile software development processes. IEEE Trans. Softw. Eng., 33:402–419.
Olbrich, S., Cruzes, D. S., Basili, V., and Zazworka, N. (2009). The evolution and impact of code smells: A case study of two open source systems. In ESEM ’09: Proceed ings of the 2009 3rd International Symposium on Empirical Software Engineering and Measurement, pages 390–400, Washington, DC, Estados Unidos. IEEE Computer Society.
Pressman, R. S. (2006). Engenharia de Software. MacGraw Hill, Rio de Janeiro, 6 edition.
Riehle, D. (2000). Framework Design: A Role Modeling Approach. Dissertation No. 13509, ETH Zurich., http://dirkriehle.com/computer-science/research/dissertation/.
Singh, Y., Kaur, A., and Malhotra, R. (2010). Empirical validation of object-oriented metrics for predicting fault proneness models. Software Quality Journal, 18:3–35. 10.1007/s11219-009-9079-6.
Zhou, Y. and Leung, H. (2006). Empirical analysis of object-oriented design metrics for predicting high and low severity faults. IEEE Transactions on Software Engineering, 32(10):771–789.
Al-Dallal, J. (2009). Software similarity-based functional cohesion metric. IET Software, 3(1):46–57.
Basili, V. R., Briand, L. C., and Melo, W. L. (1996). A validation of object-oriented design metrics as quality indicators. IEEE Trans. Softw. Eng., 22:751–761.
Bieman, J. M. and Kang, B.-K. (1995). Cohesion and reuse in an object-oriented system. SIGSOFT Softw. Eng. Notes, 20:259–262.
Briand, L. C., Daly, J. W., and Wust, J. (1998a). A unified framework for cohesion measurement in object-oriented systems. Empirical Softw. Eng., 3(1):65–117.
Briand, L. C., Wust, J., Daly, J., and Porter, V. (1998b). A comprehensive empirical validation of design measures for object-oriented systems. In Proceedings of the 5th International Symposium on Software Metrics, METRICS ’98, pages 246–, Washington, DC, USA. IEEE Computer Society.
Chidamber, S. R. and Kemerer, C. F. (1994). A metrics suite for object oriented design. IEEE Trans. Softw. Eng., 20:476–493.
Counsell, S., Swift, S., and Crampton, J. (2006). The interpretation and utility of three co hesion metrics for object-oriented design. ACM Trans. Softw. Eng. Methodol., 15:123–149.
Czibula, I. G. and Czibula, G. (2008). Clustering based automatic refactorings identification. In Proceedings of the 2008 10th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, pages 253–256, Washington, DC, Esta dos Unidos. IEEE Computer Society.
Ferreira, K. A. M. (2006). Avaliaçao de Conectividade em Sistemas Orientados por Objetos. Dissertaçao de Mestrado - DCC/UFMG., Belo Horizonte, Brasil.
Ferreira, K. A. M. (2011). Um Modelo de Predição de Amplitude da Propagação de Modificações Contratuais em Software Orientado por Objetos. Tese de Doutorado - DCC/UFMG., Belo Horizonte, Brasil.
Ferreira, K. A. M., Bigonha, M. A. S., Bigonha, R., Mendes, L. F. O., and Almeida, H. C. (2009). Reference values for object-oriented software. In XXIII Brazilian Symposium on Software Engineering, pages 62–72, Fortaleza, Ceara, Brazil.
Fowler, M. (1999). Refactoring - Improving the Design of Existing Code. Addison Wesley.
Gyimothy, T., Ferenc, R., and Siket, I. (2005). Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Transactions on Software Engineering, 31:897–910.
Hitz, M. and Montazeri, B. (1995). Measuring coupling and cohesion in object-oriented systems. In Int. Symposium on Applied Corporate Computing, Monterrey, Mexico.
Jancke, S. (2010). Smell Detection in Context. Diploma thesis. University of Bonn. Bonn, Germany., http://dirkriehle.com/computer-science/research/dissertation/.
Kessentini, M., Vaucher, S., and Sahraoui, H. (2010). Deviance from perfection is a better criterion than closeness to evil when identifying risky code. In Proceedings of the IEEE/ACM International conference on Automated Software Engineering, ASE ’10, pages 113–122, New York, NY, Estados Unidos. ACM.
Kitchenham, B. (2009). What’s up with software metrics? - a preliminary mapping study. The Journal of Systems and Software, 83:37–51.
Lincke, R., Lundberg, J., and Lowe, W. (2008). Comparing software metrics tools. In ISSTA ’08: Proceedings of the 2008 International Symposium on Software Testing and Analysis, pages 131–142, New York, NY, Estados Unidos. ACM.
Marcus, A. and Poshyvanyk, D. (2005). The conceptual cohesion of classes. In Proceedings of the 21st IEEE International Conference on Software Maintenance, pages 133–142, Washington, DC, Estados Unidos. IEEE Computer Society.
Marinescu, R. (1998). Using object-oriented metrics for automatic design flaws detection in large scale systems. In Workshop ion on Object-Oriented Technology, ECOOP ’98, pages 252–255, London, UK. Springer-Verlag.
Makel a, S. and Lepp anen, V. (2007). Cliente based object-oriented cohesion metrics. In IEEE 31st Annual International Computer Software and Applications Conference, pages 743–748, Beijing.
Myers, G. J. (1975). Reliable software through composite design. Petrocelli/Charter, Nova York, 2 edition.
Olague, H. M., Etzkorn, L. H., Gholston, S., and Quattlebaum, S. (2007). Empirical validation of three software metrics suites to predict fault-proneness of object-oriented classes developed using highly iterative or agile software development processes. IEEE Trans. Softw. Eng., 33:402–419.
Olbrich, S., Cruzes, D. S., Basili, V., and Zazworka, N. (2009). The evolution and impact of code smells: A case study of two open source systems. In ESEM ’09: Proceed ings of the 2009 3rd International Symposium on Empirical Software Engineering and Measurement, pages 390–400, Washington, DC, Estados Unidos. IEEE Computer Society.
Pressman, R. S. (2006). Engenharia de Software. MacGraw Hill, Rio de Janeiro, 6 edition.
Riehle, D. (2000). Framework Design: A Role Modeling Approach. Dissertation No. 13509, ETH Zurich., http://dirkriehle.com/computer-science/research/dissertation/.
Singh, Y., Kaur, A., and Malhotra, R. (2010). Empirical validation of object-oriented metrics for predicting fault proneness models. Software Quality Journal, 18:3–35. 10.1007/s11219-009-9079-6.
Zhou, Y. and Leung, H. (2006). Empirical analysis of object-oriented design metrics for predicting high and low severity faults. IEEE Transactions on Software Engineering, 32(10):771–789.
Published
2011-06-06
How to Cite
FERREIRA, Kecia A. M.; BIGONHA, Mariza A. S.; BIGONHA, Roberto S.; ALMEIDA, Heitor C.; NEVES, Roberta Coeli das.
Liability Cohesion Metric - The Usefulness of Cohesion Metrics in Identifying Classes with Structural Problems. In: BRAZILIAN SOFTWARE QUALITY SYMPOSIUM (SBQS), 10. , 2011, Curitiba.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2011
.
p. 9-23.
DOI: https://doi.org/10.5753/sbqs.2011.15384.
