Bug 23362 DOM: incorrect length for InfixExpression.
Latest Head 2002/09/10. package test1; public class E { public void foo() { i= (1 + 2) * 3; } } The infix expression for "1 + 2" has a length of 3. It should be 5.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/astrewrite/ASTRewritingExpressionsTest.java
assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
		List bodyDeclarations= type.bodyDeclarations();
		assertTrue("Number of bodyDeclarations not 3", bodyDeclarations.size() == 3);
		{ 
			MethodDeclaration methodDecl= (MethodDeclaration) bodyDeclarations.get(0);
			SuperConstructorInvocation invocation= (SuperConstructorInvocation) methodDecl.getBody().statements().get(0);
			SimpleName newExpression= ast.newSimpleName("x");
			rewrite.markAsInserted(newExpression);
			invocation.setExpression(newExpression);
			
			
			ASTNode arg= ast.newNumberLiteral("1");
			rewrite.markAsInserted(arg);
			
			invocation.arguments().add(arg);		
		}
		{ 
			MethodDeclaration methodDecl= (MethodDeclaration) bodyDeclarations.get(1);
			SuperConstructorInvocation invocation= (SuperConstructorInvocation) methodDecl.getBody().statements().get(0);
			MethodInvocation expression= (MethodInvocation) invocation.getExpression();
			rewrite.markAsRemoved(expression);
			
			ASTNode placeHolder= rewrite.createCopyTarget((ASTNode) expression.arguments().get(0));
			
			ASTNode arg1= (ASTNode) invocation.arguments().get(0);
			
			rewrite.markAsReplaced(arg1, placeHolder);
		}