skip to main content
10.1145/2577080.2577096acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

An empirical study on how developers reason about module cohesion

Published:22 April 2014Publication History

ABSTRACT

Several cohesion metrics have been proposed to support development and maintenance activities. The most traditional ones are the structural cohesion metrics, which rely on structural information in the source code. For instance, many of these metrics quantify cohesion based how methods and attributes are related to each other within a given module. Recently, conceptual cohesion metrics have been proposed for computing cohesion based on the responsibilities a given module realizes. Besides different flavors of cohesion, there is a lack of empirical evidence about how developers actually perceive cohesion and what kind of cohesion measurement aligns with developers' perception. In this paper we fill this gap by empirically investigating developers opinion through a web-based survey, which involved 80 participants from 9 countries with different levels of programming experience. We found that: most of the developers are familiar with cohesion; and they perceive cohesion based on class responsibilities, thus associating more with conceptual cohesion measurement. These results support the claim that conceptual cohesion seems to be more intuitive and closer to the human-oriented view of software cohesion. Moreover, the results showed that conceptual cohesion measurement captures the developers' notion of cohesion better than traditional structural cohesion measurement.

References

  1. G. Bavota, B. Dit, R. Oliveto, M. Di Penta, D. Poshyvanyk, and A. De Lucia. An empirical study on the developers' perception of software coupling. In Proceedings of the 2013 International Conference on Software Engineering, ICSE '13, pages 692--701, Piscataway, NJ, USA, 2013. IEEE Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. M. Bieman and B.-K. Kang. Cohesion and reuse in an object-oriented system. SIGSOFT Softw. Eng. Notes, 20 (SI): 259--262, Aug. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }briand:1998L. C. Briand, J. W. Daly, and J. Wüst. A unified framework for cohesion measurement in object-orientedsystems. Empirical Softw. Engg., 3 (1): 65--117, July 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. P. Buse and W. R. Weimer. Learning a metric for code readability. IEEE Transactions on Software Engineering, 36 (4): 546--558, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. R. Chidamber and C. F. Kemerer. A metrics suite for object oriented design. IEEE Trans. Softw. Eng., 20 (6): 476--493, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Counsell, S. Swift, A. Tucker, and E. Mendes. Object-oriented cohesion subjectivity amongst experienced and novice developers: an empirical study. SIGSOFT Softw. Eng. Notes, 31 (5): 1--10, Sept. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. nez, Anquetil, Delamaro, and de Camargo}durelli:2013R. S. Durelli, D. S. M. Santibánez, N. Anquetil, M. E. Delamaro, and V. V. de Camargo. A systematic review on mining techniques for crosscutting concerns. In Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC '13, pages 1080--1087, New York, NY, USA, 2013. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Etzkorn and H. Delugach. Towards a semantic metrics suite for object-oriented design. In Proceedings of the Technology of Object-Oriented Languages and Systems, TOOLS '00, pages 71--, Washington, DC, USA, 2000. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Feigenspan, C. Kästner, J. Liebig, S. Apel, and S. Hanenberg. Measuring programming experience. In Proceedings of the 20th International Conference on Program Comprehension (ICPC), pages 73--82, Los Alamitos, CA, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  10. N. E. Fenton and S. L. Pfleeger. Software Metrics: A Rigorous and Practical Approach. PWS Publishing Co., Boston, MA, USA, 2nd edition, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Figueiredo, N. Cacho, C. Sant'Anna, M. Monteiro, U. Kulesza, A. Garcia, S. Soares, F. Ferrari, S. Khan, F. Castor Filho, and F. Dantas. Evolving software product lines with aspects: an empirical study on design stability. In Proceedings of the 30th International Conference on Software engineering, ICSE '08, pages 261--270, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Figueiredo, C. Sant'Anna, A. Garcia, and C. Lucena. Applying and evaluating concern-sensitive design heuristics. Journal of Systems and Software, 85 (2): 227--243, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. L. Fleiss. Measuring Nominal Scale Agreement Among Many Raters. Psychological Bulletin, 76 (5): 378--382, 1971.Google ScholarGoogle ScholarCross RefCross Ref
  14. A. Garcia, C. Sant'Anna, E. Figueiredo, U. Kulesza, C. Lucena, and A. von Staa. Modularizing design patterns with aspects: a quantitative study. In Proceedings of the 4th international conference on Aspect-oriented software development, AOSD '05, pages 3--14, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Gwet. Handbook of Inter-Rater Reliability (3rd Edition): The Definitive Guide to Measuring the Extent of Agreement Among Multiple Raters. Advanced Analytics Press, 3 edition, 2012.Google ScholarGoogle Scholar
  16. B. Henderson-Sellers. Software Metrics. Prentice Hall, UK, 1996.Google ScholarGoogle Scholar
  17. M. Hitz and B. Montazeri. Measuring coupling and cohesion in object-oriented systems. In Proc. Intl. Sym. on Applied Corporate Computing, 1995.Google ScholarGoogle Scholar
  18. B. Katzmarski and R. Koschke. Program complexity metrics and programmer opinions. In Proc. 20th IEEE International Conference on Program Comprehension, pages 17--26. IEEE, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  19. A. G. Koru and J. J. Tian. Comparing high-change modules and modules with the highest measurement values in two large-scale open-source products. IEEE Trans. Softw. Eng., 31: 625--642, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. R. Landis and G. G. Koch. The Measurement of Observer Agreement for Categorical Data. Biometrics, 33 (1): 159--174, Mar. 1977.Google ScholarGoogle ScholarCross RefCross Ref
  21. Y. S. Lee and B. S. Liang. Measuring the coupling and cohesion of an object-oriented program based on information flow. In Prof. Intl. Conference on Software Quality, 1995.Google ScholarGoogle Scholar
  22. Y. Liu, D. Poshyvanyk, R. Ferenc, T. Gyimothy, and N. Chrisochoides. Modeling class cohesion as mixtures of latent topics. In 25th IEEE International Conference on Software Maintenance, September 20--26, 2009, Edmonton, Alberta, Canada, pages 233--242. IEEE, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  23. M. V. Mäntylä and C. Lassenius. Drivers for software refactoring decisions. In Proceedings of the 2006 ACM/IEEE international symposium on Empirical software engineering, ISESE '06, pages 297--306, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Marcus and D. Poshyvanyk. The conceptual cohesion of classes. In Proceedings of the 21st IEEE International Conference on Software Maintenance, ICSM '05, pages 133--142, Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Marcus, D. Poshyvanyk, and R. Ferenc. Using the conceptual cohesion of classes for fault prediction in object-oriented systems. IEEE Transactions on Software Engineering, 34: 287--300, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. C. Martin. Agile Software Development: Principles, Patterns, and Practices. Prentice Hall PTR, Upper Saddle River, NJ, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Punter, M. Ciolkowski, B. Freimut, and I. John. Conducting on-line surveys in software engineering. In Proceedings of the 2003 International Symposium on Empirical Software Engineering, ISESE '03, pages 80--, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. P. Robillard and G. C. Murphy. Representing concerns in source code. ACM Trans. Softw. Eng. Methodol., 16 (1), Feb. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. B. Seaman. Qualitative methods in empirical studies of software engineering. IEEE Trans Softw. Eng., 25: 557--572, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. F. Shull, J. Singer, and D. I. K. Sjberg. Guide to Advanced Empirical Software Engineering. Springer Publishing Company, Incorporated, 1st edition, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. B. Silva. Developers reasoning about module cohesion: companion website, Oct. 2013. URL http://homes.dcc.ufba.br/textasciitilde brunocs/CohesionSurveyResults.html.Google ScholarGoogle Scholar
  32. B. Silva, C. Sant'Anna, C. Chavez, and A. Garcia. Concern-based cohesion: Unveiling a hidden dimension of cohesion measurement. In Proc. 20th IEEE International Conference on Program Comprehension, pages 103--112. IEEE, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  33. E. Smith, R. Loftin, E. Murphy-Hill, C. Bird, and T. Zimmermann. Improving developer participation rates in surveys. In Proceedings of the 6th International Workshop on Cooperative and Human Aspects of Software Engineering, May 2013.Google ScholarGoogle ScholarCross RefCross Ref
  34. W. P. Stevens, G. J. Myers, and L. L. Constantine. Structured design. IBM Systems Journal, 13 (2): 115 --139, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An empirical study on how developers reason about module cohesion

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Other conferences
      MODULARITY '14: Proceedings of the 13th international conference on Modularity
      April 2014
      264 pages
      ISBN:9781450327725
      DOI:10.1145/2577080

      Copyright © 2014 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 22 April 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      MODULARITY '14 Paper Acceptance Rate21of60submissions,35%Overall Acceptance Rate41of139submissions,29%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader