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
rewrite.markAsModified(fragment, modifierNode);
		}
		
		{ 
			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(1);
			
			Expression initializer= ast.newNumberLiteral("1");
			rewrite.markAsInserted(initializer);
			
			assertTrue("Has initializer", fragment.getInitializer() == null);
			fragment.setInitializer(initializer);
		}
		
		{ 
			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(2);
			
			assertTrue("Has no initializer", fragment.getInitializer() != null);
			rewrite.markAsRemoved(fragment.getInitializer());
		}
		{ 
			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(3);			
			
			VariableDeclarationFragment modifierNode= ast.newVariableDeclarationFragment();
			modifierNode.setExtraDimensions(4);
			
			rewrite.markAsModified(fragment, modifierNode);
			Expression initializer= ast.newNullLiteral();
			rewrite.markAsInserted(initializer);