The Effectiveness of Refactoring, Based on a Compatibility Testing Taxonomy and a Dependency Graph

In this paper, we describe and then appraise a testing taxonomy proposed by van Deursen and Moonen (VD&M) based on the post-refactoring repeatability of tests. Four categories of refactoring are identified by VD&M ranging from semantic-preserving to incompatible, where, for the former, no new tests are required and for the latter, a completely new test set has to be developed. In our appraisal of the taxonomy, we heavily stress the need for the inter-dependence of the refactoring categories to be considered when making refactoring decisions and we base that need on a refactoring dependency graph developed as part of the research. We demonstrate that while incompatible refactorings may be harmful and time-consuming from a testing perspective, semantic-preserving refactorings can have equally unpleasant hidden ramifications despite their advantages. In fact, refactorings which fall into neither category have the most interesting properties. We support our results with empirical refactoring data drawn from seven Java open-source systems (OSS) and from the same analysis form a tentative categorization of code smells

[1]  J. Herbsleb,et al.  Two case studies of open source software development: Apache and Mozilla , 2002, TSEM.

[2]  William F. Opdyke,et al.  Lifecycle and refactoring patterns that support evolution and reuse , 1995 .

[3]  Lionel C. Briand,et al.  A Controlled Experiment for Evaluating Quality Guidelines on the Maintainability of Object-Oriented Designs , 2001, IEEE Trans. Software Eng..

[4]  Patrick Nixon,et al.  Composite Refactorings for Java Programs , 2000 .

[5]  Carlos Castro,et al.  Proceedings of the ACM Symposium on Applied Computing , 2003 .

[6]  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.

[7]  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..

[8]  Arie van Deursen,et al.  The Video Store Revisited – Thoughts on Refactoring and Testing , 2002 .

[9]  Arie van Deursen,et al.  An empirical study into class testability , 2006, J. Syst. Softw..

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

[11]  Michael D. Ernst,et al.  Automatic test factoring for java , 2005, ASE '05.

[12]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[13]  Giancarlo Succi,et al.  Extreme Programming Perspectives , 2002 .

[14]  Lionel C. Briand,et al.  A measurement framework for object-oriented software testability , 2005, Inf. Softw. Technol..

[15]  James M. Bieman,et al.  Open source software development: a case study of FreeBSD , 2004 .

[16]  Oscar Nierstrasz,et al.  Finding refactorings via change metrics , 2000, OOPSLA '00.

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

[18]  Arie van Deursen,et al.  Refactoring test code , 2001 .

[19]  Steve Counsell,et al.  Extracting refactoring trends from open-source software and a possible solution to the 'related refactoring' conundrum , 2006, SAC '06.

[20]  Ralph E. Johnson,et al.  Designing Reuseable Classes , 1988 .

[21]  Emilia Mendes,et al.  Trends in Java code changes: the key to identification of refactorings? , 2003, PPPJ.

[22]  Arie van Deursen,et al.  Refactoring: Emerging Trends and Open Problems , 2003 .

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

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

[25]  Rachel Harrison,et al.  Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems , 2000, J. Syst. Softw..