Search-based composed refactorings

  • Erlend Kristiansen Institutt for informatikk, Universitetet i Oslo
  • Volker Stolz Institutt for informatikk, Universitetet i Oslo, Norge Institutt for data- og realfag, Høgskolen i Bergen, Norge


Refactorings are commonly applied to source code to improve its
structure and maintainability. Integrated development environments
(IDEs) such as Eclipse or NetBeans offer refactoring support for various
programming languages. Usually, the developer makes a particular
selection in the source code, and chooses to apply one of the refactorings,
which is then executed (with suitable pre-condition checks) by the IDE.
Here, we study how we can reuse two existing refactorings to
implement a more complex refactoring, and use heuristics to derive
suitable input arguments for the new refactoring. We show that our
combination of the Extract Method and Move Method refactoring can
automatically improve the code quality on a large Java code base.