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.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
}
		
		for (int i= 0; i < fixes.length; i++) {
			ICleanUp fix= fixes[i];
			Map fixOptions= fix.getRequiredOptions();
			if (fixOptions != null) {
				options.putAll(fixOptions);
			}
		}
		JavaCore.setOptions(options);
	}
	
	private void assertRefactoringResultAsExpected(CleanUpRefactoring refactoring, String[] expected) throws CoreException {
		refactoring.checkAllConditions(new NullProgressMonitor());
		CompositeChange change= (CompositeChange)refactoring.createChange(null);
		Change[] children= change.getChildren();
		String[] previews= new String[children.length]; 
		for (int i= 0; i < children.length; i++) {
			previews[i]= ((TextEditBasedChange)children[i]).getPreviewContent(null);
		}
		assertEqualStringsIgnoreOrder(previews, expected);
	}
	
	private void assertRefactoringHasNoChange(CleanUpRefactoring refactoring) throws CoreException {
		refactoring.checkAllConditions(new NullProgressMonitor());
		CompositeChange change= (CompositeChange)refactoring.createChange(null);
		Change[] children= change.getChildren();
		StringBuffer buf= new StringBuffer();
		buf.append("Refactoring should generate no changes but does change:\n");
		for (int i= 0; i < children.length; i++) {