Bug 24920 quick fix: fooled by additional dimentions in method declarations [quick fix]
public class DD { private int DD()[]{ }; } add return statement - it puts retrun 0 instead of return null
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/astrewrite/ASTRewritingStatementsTest.java
buf.append("    }\n");		
		buf.append("}\n");	
		ICompilationUnit cu= pack1.createCompilationUnit("A.java", buf.toString(), false, null);
		
		CompilationUnit astRoot= AST.parseCompilationUnit(cu, false);
		ASTRewrite rewrite= new ASTRewrite(astRoot);
		
		AST ast= astRoot.getAST();
		
		assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
		TypeDeclaration type= findTypeDeclaration(astRoot, "A");
		
		MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
		Block block= methodDecl.getBody();
		assertTrue("Parse errors", (block.getFlags() & ASTNode.MALFORMED) == 0);
		
		List statements= block.statements();
		assertTrue("Number of statements not 3", statements.size() == 3);
		{	
			VariableDeclarationStatement decl= (VariableDeclarationStatement) statements.get(0);
			
			
			VariableDeclarationStatement modifiedNode= ast.newVariableDeclarationStatement(ast.newVariableDeclarationFragment());
			modifiedNode.setModifiers(Modifier.FINAL);
			
			rewrite.markAsModified(decl, modifiedNode);
			
			PrimitiveType newType= ast.newPrimitiveType(PrimitiveType.BOOLEAN);
			rewrite.markAsReplaced(decl.getType(), newType);