RefactoringMiner
RefactoringMiner copied to clipboard
Cannot detect Extract Method when multiple conditions are extracted to if else condition into a new method
Problem
Refactoring Miner was not able to detect that getData was extracted from dataAttr
Steps to Reproduce
- Go to https://github.com/mkshiblu/practice/commit/d521357223d71fb57dba9d61afbe84a6d2672ac5
- Run the chrome extension
Observed Behavior
- No refactorings are reported by RefactoringMiner.
Java Diff

Note
-
The Above Java Example Test Code is a close recreation to this. Checkout it for some interesting comments from the developer.
-
Source code is compilable because of the addition of mock classes.
This is a rather rare scenario, which would take a lot of effort to implement. Supporting the matching of conditional expressions with if statements is interesting though.