Abstract
Cohesion is a design quality that has a great impact on the posterior development and maintenance. As software evolves, the cohesion of the system becomes weaker due to the changes introduced during evolution. Over evolution, a single responsibility class may be unintentionally assigned other responsibilities, which makes the class less cohesive and more complex and consequently increases the complexity of the entire system. There has been much work on decomposing class responsibilities based on internal class relationships such as method-attribute referencing and internal method calls. However, object-oriented systems involve significant external class relationships carrying important behavioral semantics, which should be taken into account in identifying class responsibilities. In this paper, we present a novel approach for identifying and decomposing classes responsibilities based on method similarity using both internal and external class relationships.We extend the existing work for measuring similarity of internal class relationships and present a distance-based method for measuring external class relationships. We evaluate the approach using three open source applications — JMeter, JHotDraw, and ArgoUML. The evaluation shows that the presented approach improves precision over the existing work. We validate the results using independent samples T-test and ANOVA applied to a set of hypotheses. The validation confirms that the results are statistically significant.
Similar content being viewed by others
References
Martin R C. Agile Software Development: Principles, Patterns, and Practices. London: Prentice Hall, 2003
Chatzigeorgiou A, Xanthos S, Stephanides G. Evaluating objectoriented designs with link analysis. In: Proceedings of the 26th International Conference on Software Engineering. 2004, 656–665
Joshi P, Joshi, R K. Concept analysis for class cohesion. In: Proceedings of the 13th European Conference on Software Maintenance and Reengineering. 2009, 237–240
Cassell K, Andreae P, Groves L, Noble J. Towards automating classsplitting using betweenness clustering. In: Proceedings of the 24th IEEE/ACM International Conference on Automated Software Engineering. 2009, 595–599
Fokaefs M, Tsantalis N, Chatzigeorgiou A, Sander J. Decomposing object-oriented class modules using an agglomerative clustering technique. In: Proceedings of IEEE International Conference on Software Maintenance. 2009, 93–101
Al Dallal J, Briand L C. A precise method-method interaction-based cohesion metric for object-oriented classes. ACM Transactions on Software Engineering and Methodology, 2012, 21(2)
Al Dallal J. Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics. Information and Software Technology, 2012, 54(4): 396–416
Al Dallal J. Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics. Information and Software Technology, 2012, 54(10): 1125–1141
Simon F, Steinbruckner F, Lewerentz C. Metrics based refactoring. In: Proceedings of the 5th European Conference on Software Maintenance and Reengineering. 2001, 30–38
Tsantalis N, Chatzigeorgiou A. Identification of move method refactoring opportunities. IEEE Transactions on Software Engineering. 2009, 35(3): 347–367
Fokaefs M, Tsantalis N, Stroulia E, Chatzigeorgiou A. Identification and application of Extract Class refactorings in object-oriented systems. Journal of Systems and Software. 2012, 85(10): 2241–2260
Tan P N, Steinbach M, Kumar V. Introduction to Data Mining. Boston: Addison Wesley, 2005
Bavota G, De Lucia A, Oliveto R. Journal of Systems and Software. 2011, 84(3): 397–414
Resnik P. Using information content to evaluate semantic similarity in a taxonomy. In: Proceedings of International Joint Conference on Artificial Intelligence. 1995, 448–453
Chidamber S R, Kemerer C F. Towards a metrics suite for object oriented design. In: Proceedings of International Conference on Object- Oriented Programming, System, Languages, and Application. 1991, 197–211
Chidamber S R, Kemerer C F. A metrics suite for object oriented design. IEEE Transactions on Software Engineering. 1994, 20(6): 476–493
Li W, Henry S. Object-oriented metrics that predict maintainability. Journal of Systems and Software, 1993, 23(2): 111–122
Henderson-Seller B. Object-Oriented Metrics: Measures of Complexity. New Jersey: Prentice Hall, 1995
Bieman J, Kang B. Cohesion and reuse in an object-oriented system. In: Proceedings of Symposium on Software Reusability. 1995, 259–262
Hitz M, Montazeri B. Measuring coupling and cohesion in objectoriented systems. In: Proceedings of International Symposium on Applied Corporate Computing. 1995
Briand L, Morasca S, Basili V. Definding and Validating High-level Design Metrics. Technical Report UMIACS-TR-94-75. 1994
Badri L, Badri M. A proposal of a new class cohesion criterion: an empirical study. Journal of Object Technology, 2004, 3(4): 145–159
Bonja C, Kidanmariam E. Metrics for class cohesion and similarity between methods. In: Proceedings of the Annual ACM Southeast Regional Conference. 2006
Briand L C, Daly J W, Wust J. A unified framework for cohesion measurement in object-oriented systems. In: Proceedings of the 4th IEEECS International Software Metrics Symposium. 1997, 43–53
Marcus A, Poshyvanyk D. The conceptual cohesion of classes. In: Proceedings of the 21st International Conference on Software Maintenance. 2005, 133–142
Martin R. Clean Code: A Handbook of Agile Software Craftsmanship. New Jersey: Prentice Hall, 2008
Papadimitriou C H, Steiglitz K. Combinatorial Optimization: Algorithms and Complexity. New York: Dover Publications, 1998
Bavota G, Lucia A, Marcus A, Oliveto R. A two-step technique for extract class refactoring. In: Proceedings of IEEE/ACM International Conference on Automated Software Engineering. 2010, 151–154
Manning C D, Raghavan P, Schütze H. Introduction to Information Retrieval. Cambridge: Cambridge University Press, 2008
Fowler M, Beck K, Brant J, Opdyke W, Roberts D. Refactoring: Improving the Design of Existing Code. New Jersey: Addison-Wesley Professional, 1999
Sarkar S, Rama G M, Kak A C. API-based and information-theoretic metrics for measuring the quality of software modularization. IEEE Transactions on Software Engineering, 2007, 33(1): 14–32
Gui G, Scott P D. Coupling and cohesion measures for evaluation of component reusability. In: Proceedings of the 2006 ACM International Workshop on Mining software repositories. 2006, 18–21
Briand L, Daly J W, Wüst J. A unified framework for coupling measurement in object-oriented systems. IEEE Transactions on Software Engineering, 1999, 25(1): 91–121
Rijsbergen C. Information Retrieval. London: Butterworth, 1979
Ott R L, Longnecker M. An Introduction to Statistical Methods and Data Analysis. 6th ed. Monterey: Brooks/Cole, 2010
Jacod J, Shiriaev A N. Limit Theorems for Stochastic Processes. New York: Springer-Verlag, 1987
Author information
Authors and Affiliations
Corresponding author
Additional information
Junha Lee is a post-doctor of the Department of Computer Science and Engineering at Oakland University, USA. He received the PhD in computer science from Sogang University, South Korea in 2014. During his PhD work, he worked as a senior constant at Software Engineering Expert Group, South Korea from 2010 to 2012, and as a software architect at Unmanned Vehicle Team of Sogang University. His research focuses on software maintenance, adoptive software, and unmanned autonomous vehicle.
Dae-Kyoo Kim is an associate professor of the Department of Computer Science and Engineering at Oakland University, USA. He received the PhD in computer science from Colorado State University, USA in 2004. During his PhD work, he worked as a technical specialist at NASA/Ames Research Center in 2003. From 1997 to 2000, he worked as a senior software engineer at McHugh Software International developing logistics systems. He is a senior member of the IEEE Computer Society. His research interests include UML modeling, smart grid, design pattern formalization, model refactoring, software architecture modeling, access control modeling, and software process.
Suntae Kim is an associate professor of the Department of Software Engineering at Chonbuk National University, South Korea. He received the PhD degree in computer science and engineering from Sogang University, South Korea in 2010. He worked in Software Craft Corporation Limited, as a senior consultant and engineer for financial enterprise systems during 2002–2004. He developed Android based smart TV middleware from 2009 to 2010. His research focuses on software architecture, design patterns, requirements engineering, and source code mining.
Sooyong Park is a professor of the Department of Computer Science and Engineering at Sogang University, South Korea. He received his PhD degree in information technology from George Mason University, USA. His research focuses on financial technology, internet of things and software dynamic analysis.
Electronic supplementary material
Rights and permissions
About this article
Cite this article
Lee, J., Kim, DK., Kim, S. et al. Decomposing class responsibilities using distance-based method similarity. Front. Comput. Sci. 10, 612–630 (2016). https://doi.org/10.1007/s11704-015-5001-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11704-015-5001-5