Open osmarleandro opened 3 years ago
Osmar, In this case, the MOVE was not detected because the similarity score between the method before/after is not higher than 0.5 (in fact is exactly 0.5). Unfortunately, when the method is very small, even small changes may cause this.
By the way, you may want to take a look at RefDiffExampleWithDebugger.java. It may help finding out the reason why a refactoring is not detected.
Hi @danilofes, thanks for your attention and support.
As you explained, I understand that the similarity score in small programs is not high enough. Is there any future solution to this issue?
Summary
In the source code of osmarleandro/spring-boot@0022080 commit, I applied a single Move Method refactoring to getType(Class) method in MBeanInfoFactory class, moving to JmxOperationResponseMapper interface. RefDiff yields a single Inline Method refactoring as result. Why is the Move Method refactoring instance not detected?
Code example
Diff fragment between the commit osmarleandro/spring-boot@0022080 and their parent.
Environment details
RefDiff 2.0
Steps to reproduce
Actual results
Expected results
An instance of the Move Method refactoring applied to getType(Class) method in MBeanInfoFactory class and moved to JmxOperationResponseMapper interface.