Goal of this project is to learn how to find chunks of java source code which can be functionally refactored and become clones after this refactoring. Then we're going to use existing clones find'n'replace algorithms to refactor obtained clones automatically.
IntelliJ IDEA has been chosen as development environment and provider of base refactoring mechanisms.
STEPS:
- For each file:
- We find places where builtin functional refactorings can be applied, and apply them.
- In obtained refactored methods we choose expressions to extract as first-class functions paramaters, and extract them.
- We launch builtin mechanism for finding and removing clones, and remove them.
Example of obtained result can be seen here: https://github.com/simiyutin/java_functional_clones/wiki/Example-of-refactoring