Source:
<code>private ASTRewrite doInitField() { FieldDeclaration field= getFieldDeclaration(fVariableBinding.getName()); if (field == null) { return null; } AST ast= fAstNode.getAST(); <START> ASTRewrite rewrite= ASTRewrite.create(ast); <END> ITypeBinding type= fVariableBinding.getType(); String variableTypeName= type.getName(); VariableDeclarationFragment newFragment= ast.newVariableDeclarationFragment(); newFragment.setName(ast.newSimpleName(fVariableBinding.getName())); FieldDeclaration declaration= ast.newFieldDeclaration(newFragment); declaration.modifiers().addAll(ast.newModifiers(fVariableBinding.getModifiers())); Expression expression= null; if (type.isPrimitive()) { declaration.setType(ast.newPrimitiveType(PrimitiveType.toCode(variableTypeName))); expression= ast.newNumberLiteral(); } else if ("String".equals(variableTypeName)) { declaration.setType(ast.newSimpleType(ast.newName(variableTypeName))); expression= ast.newStringLiteral(); } else { if (type.isParameterizedType()) { Type newType= createParameterizedType(ast, type); declaration.setType(newType); } else { SimpleType newSimpleType= ast.newSimpleType(ast.newName(variableTypeName)); declaration.setType(newSimpleType); } if (hasDefaultConstructor()) { ClassInstanceCreation cic= ast.newClassInstanceCreation(); cic.setType(ast.newSimpleType(ast.newName(variableTypeName))); expression= cic; } else { expression= ast.newNullLiteral(); } } newFragment.setInitializer(expression); rewrite.replace(field, declaration, null); setEndPosition(rewrite.track(expression)); return rewrite; }</code><technical_language>reason move 'rewrite' below. here. change easier understand</technical_language>

Target:
private ASTRewrite doInitField() { FieldDeclaration field= getFieldDeclaration(fVariableBinding.getName()); if (field == null) { return null; } AST ast= fAstNode.getAST(); ITypeBinding type= fVariableBinding.getType(); String variableTypeName= type.getName(); VariableDeclarationFragment newFragment= ast.newVariableDeclarationFragment(); newFragment.setName(ast.newSimpleName(fVariableBinding.getName())); FieldDeclaration declaration= ast.newFieldDeclaration(newFragment); declaration.modifiers().addAll(ast.newModifiers(fVariableBinding.getModifiers())); Expression expression= null; if (type.isPrimitive()) { declaration.setType(ast.newPrimitiveType(PrimitiveType.toCode(variableTypeName))); expression= ast.newNumberLiteral(); } else if ("String".equals(variableTypeName)) { declaration.setType(ast.newSimpleType(ast.newName(variableTypeName))); expression= ast.newStringLiteral(); } else { if (type.isParameterizedType()) { Type newType= createParameterizedType(ast, type); declaration.setType(newType); } else { SimpleType newSimpleType= ast.newSimpleType(ast.newName(variableTypeName)); declaration.setType(newSimpleType); } if (hasDefaultConstructor()) { ClassInstanceCreation cic= ast.newClassInstanceCreation(); cic.setType(ast.newSimpleType(ast.newName(variableTypeName))); expression= cic; } else { expression= ast.newNullLiteral(); } } newFragment.setInitializer(expression); ASTRewrite rewrite= ASTRewrite.create(ast); rewrite.replace(field, declaration, null); setEndPosition(rewrite.track(expression)); return rewrite; }