Making refactoring decisions in large-scale Java systems: an empirical stance

Decisions on which classes to refactor are fraught with difficulty. The problem of identifying candidate classes becomes acute when confronted with large systems comprising hundreds or thousands of classes. In this paper, we describe a metric by which key classes, and hence candidates for refactoring, can be identified. Measures quantifying the usage of two forms of coupling, inheritance and aggregation, together with two other class features (number of methods and attributes) were extracted from the source code of three large Java systems. Our research shows that metrics from other research domains can be adapted to the software engineering process. Substantial differences were found between each of the systems in terms of the key classes identified and hence opportunities for refactoring those classes varied between those systems.

[1]  K. Beck,et al.  Extreme Programming Explained , 2002 .

[2]  Steve Counsell,et al.  Power law distributions in class relationships , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[3]  Don S. Batory,et al.  Evolving Object-Oriented Designs with Refactorings , 2004, Automated Software Engineering.

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

[5]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[6]  Huberman,et al.  Strong regularities in world wide web surfing , 1998, Science.

[7]  Shlomo Moran,et al.  The stochastic approach for link-structure analysis (SALSA) and the TKC effect , 2000, Comput. Networks.

[8]  George Loizou,et al.  The role of constructors in the context of refactoring object-oriented systems , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[9]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[10]  Ralph E. Johnson,et al.  Creating abstract superclasses by refactoring , 1993, CSC '93.

[11]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[12]  Rajeev Motwani,et al.  The PageRank Citation Ranking : Bringing Order to the Web , 1999, WWW 1999.

[13]  Emilia Mendes,et al.  Architectural level hypothesis testing through reverse engineering of object-oriented software , 2000, Proceedings IWPC 2000. 8th International Workshop on Program Comprehension.

[14]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[15]  Ralph E. Johnson,et al.  Refactoring and Aggregation , 1993, ISOTAS.

[16]  Mark Levene,et al.  Zipf's Law for Web Surfers , 2001, Knowledge and Information Systems.

[17]  Brian Foote,et al.  Designing Reusable Classes , 2001 .

[18]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[19]  Craig Silverstein,et al.  Analysis of a Very Large Altavista Query Log" SRC Technical note #1998-14 , 1998 .