ASTRewriteCorrectionProposal proposal= (ASTRewriteCorrectionProposal) proposals.get(0); String preview= proposal.getCompilationUnitChange().getPreviewContent();
boolean addReturnType= true, doRename= true;  for (int i= 0; i < proposals.size(); i++) { Object elem= proposals.get(i); if (elem instanceof ASTRewriteCorrectionProposal) { ASTRewriteCorrectionProposal proposal= (ASTRewriteCorrectionProposal) elem; assertTrue("duplicated entries", addReturnType); addReturnType= false;
	public void testArrayTypeReturnDeclMissing() 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("    public foo() {\n");		buf.append("        return new int[][] { { 1, 2 }, { 2, 3 } };\n");		buf.append("    }\n");		buf.append("}\n");		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);				CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);		IProblem[] problems= astRoot.getProblems();		assertNumberOf("problems", problems.length, 1);				ProblemPosition problemPos= new ProblemPosition(problems[0], cu);		ArrayList proposals= new ArrayList();				JavaCorrectionProcessor.collectCorrections(problemPos,  proposals);		assertNumberOf("proposals", proposals.size(), 1);		assertCorrectLabels(proposals);				ASTRewriteCorrectionProposal proposal= (ASTRewriteCorrectionProposal) proposals.get(0);		String preview= proposal.getCompilationUnitChange().getPreviewContent();		buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    public int[][] foo() {\n");		buf.append("        return new int[][] { { 1, 2 }, { 2, 3 } };\n");		buf.append("    }\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());	}