Improving Refactoring Speed by 10X

Author(s): Jongwook Kim, Don Batory, Danny Dig, Maider Azanza
Venue: Software Engineering (ICSE), 2016 IEEE/ACM 38th International Conference on
Date: 03 April 2017

Class/Experience Level: Undergraduate Student


In major IDEs, refactoring has become one of the core functionalities. Manual refactoring is labor intensive and error prone. The article introduces a refactoring tool which supports refactoring scripts. Most of the design patterns in the Gang-of-Four book can be written as a refactoring script. The refactoring tool, R3, is implemented using the combinations of databases and AST pretty-printing, allowing the R3 to refactor only by modifying the database while achieving to have a codebase about half the size of traditional JDT refactoring engine. R3 has a support for writing and executing refactored scripts. R3 was able to outperform JDT Refactoring Engine (JDTRE) in refactoring scripts, executing 10 times faster, has a smaller code footprint, and improves correctness when adding design patterns. Current OO refactoring engines are still slow, does not provide scripting, and have a complex code base and R3 improves in these fields.