Bug 117477 [clean up] add 'remove this qualifier' clean up
There is 'add this qualifier' clean up, but there are no 'remove this qualifier'. But what if I have CU with such code style and don't like it? About this code: private int i; void foo(int i) {this.i= i;} May be just check that there are no SingleVariableDeclaration with same identifier in parent method(s)? Plus such code is also possible: public class Test { private int field; private class Inner { private int field; public void foo(int i) { Test.this.field = i; } } } So, probably we should also check that there are no field hiding in parent classes.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java
private IJavaElement[] smallestCommonParents(IJavaElement[] elements) {
			if (elements.length == 1) {
				return elements;
			} else {
				List parents= new ArrayList();
				boolean hasParents= false;
				
				IJavaElement parent= getParent(elements[0]);
				if (parent == null) {
					parent= elements[0];
				} else {
					hasParents= true;
				}
				parents.add(parent);
				
				for (int i= 1; i < elements.length; i++) {
					parent= getParent(elements[i]);
					if (getParent(elements[i - 1]) != parent) {
						if (parent == null) {
							parent= elements[i];
						} else {
							hasParents= true;
						}
						if (!parents.contains(parent)) {
							parents.add(parent);
						}
					}
				}