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/ASTRewritingTypeDeclTest.java
}
		{ 
			TypeDeclaration type= findTypeDeclaration(astRoot, "F");
			
			
			TypeDeclaration modifiedNode= ast.newTypeDeclaration();
			modifiedNode.setInterface(true); 
			modifiedNode.setModifiers(0);
			rewrite.markAsModified(type, modifiedNode);				
			
			List members= type.bodyDeclarations();
			assertTrue("Has declarations", members.size() == 1);
			MethodDeclaration methodDecl= createNewMethod(ast, "newFoo", true);
			rewrite.markAsReplaced((ASTNode) members.get(0), methodDecl);
		}
		
		{ 
			TypeDeclaration type= findTypeDeclaration(astRoot, "G");
			
			TypeDeclaration modifiedNode= ast.newTypeDeclaration();
			modifiedNode.setInterface(false); 
			modifiedNode.setModifiers(0);
			rewrite.markAsModified(type, modifiedNode);				
			
			SimpleName newSuperclass= ast.newSimpleName("Object");
			type.setSuperclass(newSuperclass);
			rewrite.markAsInserted(newSuperclass);
		}			
					
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, 10, null);