Bug 15726 moves field comments from one field to another [quick fix]
20020508 public class A { int field; //field comment A(int fred){ _fred= fred; } } you are offered to create field _fred but then it steals the comment: int field; private int _fred; //field comment
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/astrewrite/ASTRewritingStatementsTest.java
}
		
		{ 
			ForStatement forStatement= (ForStatement) statements.get(3);
			
			Assignment assignment= ast.newAssignment();
			assignment.setLeftHandSide(ast.newSimpleName("j"));
			assignment.setOperator(Assignment.Operator.ASSIGN);
			assignment.setRightHandSide(ast.newNumberLiteral("3"));
			
			forStatement.initializers().add(assignment);
			
			rewrite.markAsInserted(assignment);	
			
			PrefixExpression prefixExpression= ast.newPrefixExpression();
			prefixExpression.setOperand(ast.newSimpleName("j"));
			prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
			
			forStatement.updaters().add(prefixExpression);
			
			rewrite.markAsInserted(prefixExpression);
		}
		
		{ 
			ForStatement forStatement= (ForStatement) statements.get(4);
			
			Assignment assignment= (Assignment) forStatement.initializers().get(0);
			SimpleName leftHandSide= (SimpleName) assignment.getLeftHandSide();
			
			VariableDeclarationFragment varFragment= ast.newVariableDeclarationFragment();