Buggy code:
public class SourceTypeBinding extends ReferenceBinding { public ReferenceBinding superclass ; public ReferenceBinding [ ] superInterfaces ; public FieldBinding [ ] fields ; public MethodBinding [ ] methods ; public ReferenceBinding [ ] memberTypes ; public TypeVariableBinding [ ] typeVariables ; public ClassScope scope ; public static final int METHOD_EMUL = 0 ; public static final int FIELD_EMUL = 1 ; public static final int CLASS_LITERAL_EMUL = 2 ; public static final int RECEIVER_TYPE_EMUL = 3 ; HashMap [ ] synthetics ; char [ ] genericReferenceTypeSignature ; public SourceTypeBinding ( char [ ] [ ] compoundName , PackageBinding fPackage , ClassScope scope ) { } private void addDefaultAbstractMethod ( MethodBinding abstractMethod ) { } public void addDefaultAbstractMethods ( ) { } public FieldBinding addSyntheticFieldForInnerclass ( LocalVariableBinding actualOuterLocalVariable ) { } public FieldBinding addSyntheticFieldForInnerclass ( ReferenceBinding enclosingType ) { } public FieldBinding addSyntheticFieldForClassLiteral ( TypeBinding targetType , BlockScope blockScope ) { } public FieldBinding addSyntheticFieldForAssert ( BlockScope blockScope ) { } public FieldBinding addSyntheticFieldForEnumValues ( ) { } public SyntheticMethodBinding addSyntheticMethod ( FieldBinding targetField , boolean isReadAccess ) { } public SyntheticMethodBinding addSyntheticEnumMethod ( char [ ] selector ) { } public SyntheticMethodBinding addSyntheticMethod ( MethodBinding targetMethod , boolean isSuperAccess ) { } public SyntheticMethodBinding addSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge , MethodBinding targetMethod ) { } public void collectSubstitutes ( Scope currentScope , TypeBinding otherType , Map substitutes , int constraint ) { } public int kind ( ) { } public char [ ] computeUniqueKey ( boolean withAccessFlags ) { } void faultInTypesForFieldsAndMethods ( ) { } public FieldBinding [ ] fields ( ) { } public char [ ] genericTypeSignature ( ) { } public char [ ] genericSignature ( ) { } public long getAnnotationTagBits ( ) { } public MethodBinding [ ] getDefaultAbstractMethods ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , CompilationUnitScope refScope ) { } public FieldBinding getField ( char [ ] fieldName , boolean needResolve ) { } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public FieldBinding getSyntheticField ( LocalVariableBinding actualOuterLocalVariable ) { } public FieldBinding getSyntheticField ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch ) { } public SyntheticMethodBinding getSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isGenericType ( ) { } public ReferenceBinding [ ] memberTypes ( ) { } public FieldBinding getUpdatedFieldBinding ( FieldBinding targetField , ReferenceBinding newDeclaringClass ) { } public MethodBinding getUpdatedMethodBinding ( MethodBinding targetMethod , ReferenceBinding newDeclaringClass ) { } public boolean hasMemberTypes ( ) { } public MethodBinding [ ] methods ( ) { } private FieldBinding resolveTypeFor ( FieldBinding field ) { if ( ( ( field . modifiers ) & ( AccUnresolved ) ) == 0 ) return field ; if ( ( fPackage . environment . options . sourceLevel ) >= ( ClassFileConstants . JDK1_5 ) ) { if ( ( ( field . getAnnotationTagBits ( ) ) & ( AnnotationDeprecated ) ) != 0 ) field . modifiers |= AccDeprecated ; else if ( ( ( field . modifiers ) & ( AccDeprecated ) ) != 0 ) scope . problemReporter ( ) . missingDeprecatedAnnotationForField ( field . sourceField ( ) ) ; } if ( ( isViewedAsDeprecated ( ) ) && ( ! ( field . isDeprecated ( ) ) ) ) field . modifiers |= AccDeprecatedImplicitly ; FieldDeclaration [ ] fieldDecls = scope . referenceContext . fields ; for ( int f = 0 , length = fieldDecls . length ; f < length ; f ++ ) { if ( ( fieldDecls [ f ] . binding ) != field ) continue ; MethodScope initializationScope = ( field . isStatic ( ) ) ? scope . referenceContext . staticInitializerScope : scope . referenceContext . initializerScope ; FieldBinding previousField = initializationScope . initializedField ; try { initializationScope . initializedField = field ; FieldDeclaration fieldDecl = fieldDecls [ f ] ; <START_BUG> TypeBinding fieldType = ( ( fieldDecl . getKind ( ) ) == ( AbstractVariableDeclaration . ENUM_CONSTANT ) ) ? this : fieldDecl . type . resolveType ( initializationScope , true ) ; <END_BUG> field . type = fieldType ; field . modifiers &= ~ ( AccUnresolved ) ; if ( fieldType == null ) { fieldDecls [ f ] . binding = null ; return null ; } if ( fieldType == ( VoidBinding ) ) { scope . problemReporter ( ) . variableTypeCannotBeVoid ( fieldDecls [ f ] ) ; fieldDecls [ f ] . binding = null ; return null ; } if ( ( fieldType . isArrayType ( ) ) && ( ( ( ( ArrayBinding ) ( fieldType ) ) . leafComponentType ) == ( VoidBinding ) ) ) { scope . problemReporter ( ) . variableTypeCannotBeVoidArray ( fieldDecls [ f ] ) ; fieldDecls [ f ] . binding = null ; return null ; } TypeBinding leafType = fieldType . leafComponentType ( ) ; if ( ( leafType instanceof ReferenceBinding ) && ( ( ( ( ( ReferenceBinding ) ( leafType ) ) . modifiers ) & ( AccGenericSignature ) ) != 0 ) ) { field . modifiers |= AccGenericSignature ; } } finally { initializationScope . initializedField = previousField ; } return field ; } return null ; } private MethodBinding resolveTypesFor ( MethodBinding method ) { } public final int sourceEnd ( ) { } public final int sourceStart ( ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } public SyntheticMethodBinding [ ] syntheticMethods ( ) { } public FieldBinding [ ] syntheticFields ( ) { } public String toString ( ) { } public TypeVariableBinding [ ] typeVariables ( ) { } void verifyMethods ( MethodVerifier verifier ) { } }

Fix:
TypeBinding fieldType = ( ( fieldDecl . getKind ( ) ) == ( AbstractVariableDeclaration . ENUM_CONSTANT ) ) ? initializationScope . convertToRawType ( this ) : fieldDecl . type . resolveType ( initializationScope , true ) ;