Toward an Implementation of the "Form Template Method" Refactoring

This paper presents an implementation of the "form template method" refactoring. This transformation has not been automated yet, but has many similarities with other transformations such as clone detection and removal or method extraction. Forming a template method is a difficult process because it has to deal with code statements directly. Few abstractions and algorithms have been investigated yet, compared to transformations dealing with higher level aspects such as the classes, methods, fields and their relations. We present a new algorithm that performs this transformation in a semi-automated way on Java programs. We state the difficulties inherent to this transformation and propose solutions to handle them.

[1]  Béat Hirsbrunner,et al.  FOOD: An Intermediate Model for Automated Refactoring , 2006, SoMeT.

[2]  B. Hirsbrunner,et al.  An Algorithm for Detecting and Removing Clones in Java Code , 2006 .

[3]  J. W. Hunt,et al.  An Algorithm for Differential File Comparison , 2008 .

[4]  Tom Mens,et al.  On the Use of Graph Transformations for Model Refactoring , 2005, GTTSE.

[5]  Magdalena Balazinska,et al.  Partial redesign of Java software systems based on clone analysis , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[6]  David Ryan Koes,et al.  Programmer specified pointer independence , 2004, MSP '04.

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

[8]  Elizabeth Burd,et al.  Evaluating clone detection tools for use during preventative maintenance , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[9]  Susan Horwitz,et al.  Effective, automatic procedure extraction , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[10]  Oege de Moor,et al.  JunGL: a scripting language for refactoring , 2006, ICSE.

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