buffer= new StringBuffer(); buffer.append("package test3;\n"); buffer.append("import java.io.Serializable;\n"); buffer.append("public class Test3 {\n"); buffer.append("    protected int var1;\n"); buffer.append("    protected int var2;\n"); buffer.append("    @SuppressWarnings(\"serial\")\n"); buffer.append("    public void test() {\n"); buffer.append("        Serializable var3= new Serializable() {\n"); buffer.append("            int var4;\n"); buffer.append("        };\n"); buffer.append("    }\n"); buffer.append("}\n"); expected[2]= buffer.toString();
	public void testAnonymousClass() throws Exception {		System.out.println(JavaCore.getOption(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));				IPackageFragment package3= fSourceFolder.createPackageFragment("test3", false, null); //$NON-NLS-1$		StringBuffer buffer= new StringBuffer();		buffer.append("package test3;\n"); //$NON-NLS-1$		buffer.append("import java.io.Serializable;\n"); //$NON-NLS-1$		buffer.append("public class Test3 {\n"); //$NON-NLS-1$		buffer.append("    protected int var1;\n"); //$NON-NLS-1$		buffer.append("    protected int var2;\n"); //$NON-NLS-1$		buffer.append("    public void test() {\n"); //$NON-NLS-1$		buffer.append("        Serializable var3= new Serializable() {\n"); //$NON-NLS-1$		buffer.append("            int var4;\n"); //$NON-NLS-1$		buffer.append("        };\n"); //$NON-NLS-1$		buffer.append("    }\n"); //$NON-NLS-1$		buffer.append("}\n"); //$NON-NLS-1$		ICompilationUnit unit3= package3.createCompilationUnit("Test3.java", buffer.toString(), false, null); //$NON-NLS-1$		fProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());		CompilationUnit root3= getASTRoot(unit3);		ArrayList proposals= collectCorrections(unit3, root3);		assertCorrectLabels(proposals);		String[] expected= new String[3];				buffer= new StringBuffer();		buffer.append("package test3;\n"); //$NON-NLS-1$		buffer.append("import java.io.Serializable;\n"); //$NON-NLS-1$		buffer.append("public class Test3 {\n"); //$NON-NLS-1$		buffer.append("    protected int var1;\n"); //$NON-NLS-1$		buffer.append("    protected int var2;\n"); //$NON-NLS-1$		buffer.append("    public void test() {\n"); //$NON-NLS-1$		buffer.append("        Serializable var3= new Serializable() {\n"); //$NON-NLS-1$		buffer.append("            " + FIELD_COMMENT + "\n");		buffer.append("            private static final long serialVersionUID = 0L;\n"); //$NON-NLS-1$		buffer.append("            int var4;\n"); //$NON-NLS-1$		buffer.append("        };\n"); //$NON-NLS-1$		buffer.append("    }\n"); //$NON-NLS-1$		buffer.append("}\n"); //$NON-NLS-1$		expected[0]= buffer.toString();				buffer= new StringBuffer();		buffer.append("package test3;\n"); //$NON-NLS-1$		buffer.append("import java.io.Serializable;\n"); //$NON-NLS-1$		buffer.append("public class Test3 {\n"); //$NON-NLS-1$		buffer.append("    protected int var1;\n"); //$NON-NLS-1$		buffer.append("    protected int var2;\n"); //$NON-NLS-1$		buffer.append("    public void test() {\n"); //$NON-NLS-1$		buffer.append("        Serializable var3= new Serializable() {\n"); //$NON-NLS-1$		buffer.append("            " + FIELD_COMMENT + "\n");		buffer.append("            private static final long serialVersionUID = 1L;\n"); //$NON-NLS-1$		buffer.append("            int var4;\n"); //$NON-NLS-1$		buffer.append("        };\n"); //$NON-NLS-1$		buffer.append("    }\n"); //$NON-NLS-1$		buffer.append("}\n"); //$NON-NLS-1$		expected[1]= buffer.toString();				buffer= new StringBuffer();		buffer.append("package test3;\n"); //$NON-NLS-1$		buffer.append("import java.io.Serializable;\n"); //$NON-NLS-1$		buffer.append("public class Test3 {\n"); //$NON-NLS-1$		buffer.append("    protected int var1;\n"); //$NON-NLS-1$		buffer.append("    protected int var2;\n"); //$NON-NLS-1$		buffer.append("    @SuppressWarnings(\"serial\")\n"); //$NON-NLS-1$		buffer.append("    public void test() {\n"); //$NON-NLS-1$		buffer.append("        Serializable var3= new Serializable() {\n"); //$NON-NLS-1$		buffer.append("            int var4;\n"); //$NON-NLS-1$		buffer.append("        };\n"); //$NON-NLS-1$		buffer.append("    }\n"); //$NON-NLS-1$		buffer.append("}\n"); //$NON-NLS-1$		expected[2]= buffer.toString();						assertEqualStringsIgnoreOrder(getPreviewContents(proposals), expected);	}