Closed rsain closed 5 years ago
@rsain Out of all possible blocks to extract, which one did you select?
It seems only B2 block (0/20) creates the problem you reported. For all other blocks the code is refactored correctly.
Screenshot showing the refactored code after the fix
I still can replicate the issue when running JDeodorant over the entire project. However, when running JDeodorant over a single class (JSONObject) the refactoring is applied correctly.
Project: Perseo-core (https://github.com/telefonicaid/perseo-core) Commit: 19189b66cbb0ba97edad41147f749e3bb2d7d2fb Package: src.main.java.org.json Classname: JSONObject Method: private void populateMap(Object bean) Operating system: Linux Debian Eclipse version: 2019-03 (4.11.0) JDeodorant plug-in version: 5.0.70
When I perform Long Method refactoring from the JDeodorant Eclipse plug-in on the populateMap method, a block of code is duplicated in the extracted method. Because of this, a local variable is defined twice and the project contains compilation errors.