rewrite.markAsRemoved(ifStatement);
rewrite.markAsRemoved(ifStatement, null);
	public void testChangesInMoveCD() 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 void foo() {\n");		buf.append("        if (System.out == null) {\n");		buf.append("            gee( /* cool */);\n");		buf.append("        }\n");		buf.append("    }\n");		buf.append("    public void goo() {\n");		buf.append("        x= 1;\n");		buf.append("    }\n");		buf.append("}\n");		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);				CompilationUnit astRoot= createAST(cu);		NewASTRewrite rewrite= new NewASTRewrite(astRoot.getAST());		AST ast= astRoot.getAST();		assertTrue("Code has errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);				TypeDeclaration type= findTypeDeclaration(astRoot, "E");				{ // replace statement in goo with moved ifStatement from foo. add a node to if statement			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");			assertTrue("Cannot find foo", methodDecl != null);						List fooStatements= methodDecl.getBody().statements();			assertTrue("Cannot find if statement", fooStatements.size() == 1);						// prepare ifStatement to move			IfStatement ifStatement= (IfStatement) fooStatements.get(0);			rewrite.markAsRemoved(ifStatement);						ASTNode placeHolder= rewrite.createCopyPlaceholder(ifStatement);						// add return statement to ifStatement block			ReturnStatement returnStatement= ast.newReturnStatement();			Block then= (Block) ifStatement.getThenStatement();			rewrite.getListRewrite(then, Block.STATEMENTS_PROPERTY).insertLast(returnStatement, null);				// replace statement in goo with moved ifStatement			MethodDeclaration methodGoo= findMethodDeclaration(type, "goo");			assertTrue("Cannot find goo", methodGoo != null);						List gooStatements= methodGoo.getBody().statements();			assertTrue("Cannot find statement in goo", gooStatements.size() == 1);						rewrite.markAsReplaced((ASTNode) gooStatements.get(0), placeHolder);		}								String preview= evaluateRewrite(cu, rewrite);				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    public void foo() {\n");		buf.append("    }\n");		buf.append("    public void goo() {\n");		buf.append("        if (System.out == null) {\n");		buf.append("            gee( /* cool */);\n");		buf.append("            return;\n");		buf.append("        }\n");		buf.append("    }\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());	}