refactoring generator