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
rewrite.markAsReplaced(tryStatement.getFinally(), body);
		}
		{ 
			TryStatement tryStatement= (TryStatement) blockStatements.get(1);
			
			List catchClauses= tryStatement.catchClauses();
			
			CatchClause catchClause= ast.newCatchClause();
			SingleVariableDeclaration decl= ast.newSingleVariableDeclaration();
			decl.setType(ast.newSimpleType(ast.newSimpleName("Exception")));
			decl.setName(ast.newSimpleName("x"));
			catchClause.setException(decl);
			
			rewrite.markAsReplaced((ASTNode) catchClauses.get(0), catchClause);
					
			rewrite.markAsRemoved(tryStatement.getFinally());
		}
		{ 
			TryStatement tryStatement= (TryStatement) blockStatements.get(2);
			
			List catchClauses= tryStatement.catchClauses();
			rewrite.markAsRemoved((ASTNode) catchClauses.get(0));
			
			
			Block body= ast.newBlock();
			body.statements().add(ast.newReturnStatement());
			rewrite.markAsInserted(body);
			
			tryStatement.setFinally(body);