RefactoringMiner
RefactoringMiner copied to clipboard
[JavaRecreation of JS Extract Method] Rename variable is not detected when the declaration type is var and unused
Problem
Refactoring Miner was not able to detect that variable d was renamed to responseData.
Steps to Reproduce
- Go to https://github.com/mkshiblu/practice/commit/b582281fe26daf8a4b8247e63fce7b9690ef24f0
- Run the chrome extension
Observed Behavior
- Only extract method settle was reported by RefactoringMiner.
Expected Behavior
- The rename variable
dtoresponseDatashould have been reported.
Java Diff

Original JS Diff

** Original Js commitURl**
https://github.com/axios/axios/commit/d23f9d5d4782e5849362895f8b648ed587999706#diff-586c04c24608b86a074073c5514cc195be5c4c87ddb56da233f6d998ada4159f
Note
- Changing
vartoStringdidn't produce the rename var refactoring. - The variable is unused.
- Another commit with the same variable with usage where refactoringminer detects correctly even if the type
var
https://github.com/mkshiblu/practice/commit/190e9a7dc72807c8077e007419478e429c526e02

- Source code is compilable because of the addition of mock classes.