2015 IEEE International Conference on Software Maintenance and Evolution (ICSME) (2015)
Sept. 29, 2015 to Oct. 1, 2015
Jongwook Kim , University of Texas at Austin, 78712, USA
Don Batory , University of Texas at Austin, 78712, USA
Danny Dig , Oregon State University, Corvallis, 97333, USA
Retrofitting design patterns into a program by hand is tedious and error-prone. A programmer must distinguish refactorings that are provided by an Integrated Development Environment (IDE) from those that must be realized manually, determine a precise sequence of refactorings to apply, and perform this sequence repetitively to a laborious degree. We designed, implemented, and evaluated Reflective Refactoring (R2), a Java package to automate the creation of classical design patterns (Visitor, Abstract Factory, etc.), their inverses, and variants. We encoded 18 out of 23 Gang-of-Four design patterns as R2 scripts and explain why the remaining are inappropriate for refactoring engines. We evaluate the productivity and scalability of R2 with a case study of 6 real-world applications. In one case, R2 automatically created a Visitor with 276 visit methods by invoking 554 Eclipse refactorings in 10 minutes - an achievement that could not be done manually. R2 also sheds light on why refactoring correctness, expressiveness, and speed are critical issues for scripting in next-generation refactoring engines.
Manuals, Graphics, DVD
J. Kim, D. Batory and D. Dig, "Scripting parametric refactorings in Java to retrofit design patterns," 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME), Bremen, Germany, 2015, pp. 211-220.