• DocumentCode
    3694211
  • Title

    Scripting parametric refactorings in Java to retrofit design patterns

  • Author

    Jongwook Kim;Don Batory;Danny Dig

  • Author_Institution
    University of Texas at Austin, 78712, USA
  • fYear
    2015
  • Firstpage
    211
  • Lastpage
    220
  • Abstract
    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.
  • Keywords
    "Manuals","Graphics","DVD"
  • Publisher
    ieee
  • Conference_Titel
    Software Maintenance and Evolution (ICSME), 2015 IEEE International Conference on
  • Type

    conf

  • DOI
    10.1109/ICSM.2015.7332467
  • Filename
    7332467