Bug 129807 [cleanup] Add final cleanup should only add keyword on methods with body
I20060223-1656 + ZRH plugin export The final keyword should only be added on methods with body. In particular, final should be omitted for interface methods and abstract methods.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
refactoring.addCompilationUnit(cu1);
		ICleanUp cleanUp1= new ControlStatementsCleanUp(ControlStatementsCleanUp.ADD_BLOCK_TO_CONTROL_STATEMENTS);
		ICleanUp cleanUp2= new ExpressionsCleanUp(ExpressionsCleanUp.ADD_PARANOIC_PARENTHESIS);
		refactoring.addCleanUp(cleanUp1);
		refactoring.addCleanUp(cleanUp2);
		
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E {\n");
		buf.append("    void foo(int i) {\n");
		buf.append("        if ((i == 0) || (i == 1)) {\n");
		buf.append("            System.out.println(i);\n");
		buf.append("        }\n");
		buf.append("        \n");
		buf.append("        while ((i > 0) && (i < 10)) {\n");
		buf.append("            System.out.println(1);\n");
		buf.append("        }\n");
		buf.append("        \n");
		buf.append("        boolean b= ((i != -1) && (i > 10) && (i < 100)) || (i > 20);\n");
		buf.append("        \n");
		buf.append("        do {\n");
		buf.append("            ;\n");
		buf.append("        } while (((i > 5) && b) || ((i < 100) && (i > 90)));\n");
		buf.append("    }\n");
		buf.append("}\n");
		String expected1= buf.toString();
		
		assertRefactoringResultAsExpected(refactoring, new String[] {expected1});
	}