Community
Participate
Working Groups
Consider the following (correct) sample code: static class Node { private Node parent; public Node getParent() { return parent; } } Node getAncestor(Node node) { while (node.getParent() != null && node.getParent().getParent() != null) { node = node.getParent(); } return node; } Now try to use Eclipse refactoring option "extract local variable" for "node.getParent()" and you will get this incorrect code: Node getAncestor(Node node) { Node parent = node.getParent(); while (parent != null && parent.getParent() != null) { node = parent; } return node; } This bug was observed on "EasyEclipse Server Java" version 1.2.1, which is based on Eclipse build id M20060921-0945, although there's no way to know what's the exact corresponding official Eclipse version.
Moving to JDT/UI
*** This bug has been marked as a duplicate of bug 27740 ***