Bug 38892 ASTRewrite should support copying nodes more than once.
M1 Try is result currently in an exception: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: assertion failed; Node used as more than one copy source at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.jdt.internal.corext.Assert$AssertionFailedException.<init> (Assert.java:55) at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:136) at org.eclipse.jdt.internal.corext.dom.ASTRewrite.createCopy (ASTRewrite.java:289)
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/astrewrite/ASTRewritingMoveCodeTest.java
rewrite.markAsInserted(returnStatement);
			Block then= (Block) ifStatement.getThenStatement();
			then.statements().add(returnStatement);
	
			
			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);
		}	
					
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, 10, null);
		proposal.getCompilationUnitChange().setSave(true);
		
		proposal.apply(null);
		
		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");