Source:
<code>public AnnotatedDeclaredType fromNewClass(NewClassTree newClassTree) { <START> AnnotatedDeclaredType enclosingType = null; <END> if (newClassTree.getEnclosingExpression() != null) { enclosingType = (AnnotatedDeclaredType) getReceiverType(newClassTree); } if (TreeUtils.isDiamondTree(newClassTree) && newClassTree.getClassBody() == null) { AnnotatedDeclaredType type = (AnnotatedDeclaredType) toAnnotatedType(TreeUtils.typeOf(newClassTree), false); if (((com.sun.tools.javac.code.Type) type.actualType) .tsym .getTypeParameters() .nonEmpty()) { Pair<Tree, AnnotatedTypeMirror> ctx = this.visitorState.getAssignmentContext(); if (ctx != null) { AnnotatedTypeMirror ctxtype = ctx.second; fromNewClassContextHelper(type, ctxtype); } else { TreePath p = getPath(newClassTree); AnnotatedTypeMirror ctxtype = TypeArgInferenceUtil.assignedTo(this, p); if (ctxtype != null) { fromNewClassContextHelper(type, ctxtype); } else { type.setWasRaw(); } } } AnnotatedDeclaredType fromTypeTree = (AnnotatedDeclaredType) TypeFromTree.fromTypeTree(this, newClassTree.getIdentifier()); type.replaceAnnotations(fromTypeTree.getAnnotations()); type.setEnclosingType(enclosingType); return type; } else if (newClassTree.getClassBody() != null) { AnnotatedDeclaredType type = (AnnotatedDeclaredType) toAnnotatedType(TreeUtils.typeOf(newClassTree), false); List<? extends AnnotationTree> annos = newClassTree.getClassBody().getModifiers().getAnnotations(); type.addAnnotations(TreeUtils.annotationsFromTypeAnnotationTrees(annos)); type.setEnclosingType(enclosingType); return type; } else { AnnotatedDeclaredType type = (AnnotatedDeclaredType) TypeFromTree.fromTypeTree(this, newClassTree.getIdentifier()); type.setEnclosingType(enclosingType); return type; } }</code><technical_language>about: java final AnnotatedDeclaredType enclosingType; if (newClassTree.getEnclosingExpression() != null) { enclosingType = (AnnotatedDeclaredType) getReceiverType(newClassTree); } else { enclosingType = null; }</technical_language>

Target:
public AnnotatedDeclaredType fromNewClass(NewClassTree newClassTree) { AnnotatedDeclaredType enclosingType; if (newClassTree.getEnclosingExpression() != null) { enclosingType = (AnnotatedDeclaredType) getReceiverType(newClassTree); } else { enclosingType = null; } if (TreeUtils.isDiamondTree(newClassTree) && newClassTree.getClassBody() == null) { AnnotatedDeclaredType type = (AnnotatedDeclaredType) toAnnotatedType(TreeUtils.typeOf(newClassTree), false); if (((com.sun.tools.javac.code.Type) type.actualType) .tsym .getTypeParameters() .nonEmpty()) { Pair<Tree, AnnotatedTypeMirror> ctx = this.visitorState.getAssignmentContext(); if (ctx != null) { AnnotatedTypeMirror ctxtype = ctx.second; fromNewClassContextHelper(type, ctxtype); } else { TreePath p = getPath(newClassTree); AnnotatedTypeMirror ctxtype = TypeArgInferenceUtil.assignedTo(this, p); if (ctxtype != null) { fromNewClassContextHelper(type, ctxtype); } else { type.setWasRaw(); } } } AnnotatedDeclaredType fromTypeTree = (AnnotatedDeclaredType) TypeFromTree.fromTypeTree(this, newClassTree.getIdentifier()); type.replaceAnnotations(fromTypeTree.getAnnotations()); type.setEnclosingType(enclosingType); return type; } else if (newClassTree.getClassBody() != null) { AnnotatedDeclaredType type = (AnnotatedDeclaredType) toAnnotatedType(TreeUtils.typeOf(newClassTree), false); List<? extends AnnotationTree> annos = newClassTree.getClassBody().getModifiers().getAnnotations(); type.addAnnotations(TreeUtils.annotationsFromTypeAnnotationTrees(annos)); type.setEnclosingType(enclosingType); return type; } else { AnnotatedDeclaredType type = (AnnotatedDeclaredType) TypeFromTree.fromTypeTree(this, newClassTree.getIdentifier()); type.setEnclosingType(enclosingType); return type; } }