Bug 123946 [quick assist] "Add keyword 'final' to all unchanged variables and properties"
This function can be provide with the "Format" function
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E {\n");
		buf.append("    private Integer foo() {\n");
		buf.append("        return (Integer) getNumber();\n");
		buf.append("    }\n");
		buf.append("    private Number getNumber() {return null;}\n");
		buf.append("}\n");
		String expected1= buf.toString();
		
		assertRefactoringResultAsExpected(refactoring, new String[] {expected1});
	}
	
	public void testAddParenthesis01() throws Exception {
		
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer 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("        while (i > 0 && i < 10)\n");
		buf.append("            System.out.println(1);\n");
		buf.append("        \n");
		buf.append("        boolean b= i != -1 && i > 10 && i < 100 || i > 20;\n");
		buf.append("        \n");
		buf.append("        do ; while (i > 5 && b || i < 100 && i > 90);\n");