Buggy code:
public class FieldReference extends Reference implements InvocationSite { public Expression receiver ; public char [ ] token ; public FieldBinding binding ; protected FieldBinding codegenBinding ; public MethodBinding [ ] syntheticAccessors ; public static final int READ = 0 ; public static final int WRITE = 1 ; public long nameSourcePosition ; public TypeBinding receiverType ; public TypeBinding genericCast ; public FieldReference ( char [ ] source , long pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean isCompound ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public void computeConversion ( Scope scope , TypeBinding runtimeTimeType , TypeBinding compileTimeType ) { } public FieldBinding fieldBinding ( ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public static final Constant getConstantFor ( FieldBinding binding , Reference reference , boolean isImplicit , Scope referenceScope ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo , boolean isReadAccess ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { boolean receiverCast = false ; if ( ( this . receiver ) instanceof CastExpression ) { this . receiver . bits |= IgnoreNeedForCastCheckMASK ; receiverCast = true ; } this . receiverType = receiver . resolveType ( scope ) ; if ( ( this . receiverType ) == null ) { constant = NotAConstant ; return null ; } if ( receiverCast ) { if ( ( ( ( CastExpression ) ( this . receiver ) ) . expression . resolvedType ) == ( this . receiverType ) ) { scope . problemReporter ( ) . unnecessaryCast ( ( ( CastExpression ) ( this . receiver ) ) ) ; } } FieldBinding fieldBinding = this . codegenBinding = this . binding = scope . getField ( this . receiverType , token , this ) ; if ( ! ( fieldBinding . isValidBinding ( ) ) ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , this . receiverType ) ; return null ; } TypeBinding receiverErasure = this . receiverType . erasure ( ) ; if ( receiverErasure instanceof ReferenceBinding ) { ReferenceBinding match = ( ( ReferenceBinding ) ( receiverErasure ) ) . findSuperTypeErasingTo ( ( ( ReferenceBinding ) ( fieldBinding . declaringClass . erasure ( ) ) ) ) ; if ( match == null ) { this . receiverType = fieldBinding . declaringClass ; } } this . receiver . computeConversion ( scope , this . receiverType , this . receiverType ) ; if ( isFieldUseDeprecated ( fieldBinding , scope , ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) != 0 ) ) ) { scope . problemReporter ( ) . deprecatedField ( fieldBinding , this ) ; } boolean isImplicitThisRcv = receiver . isImplicitThis ( ) ; constant = FieldReference . getConstantFor ( fieldBinding , this , isImplicitThisRcv , scope ) ; if ( ! isImplicitThisRcv ) { constant = NotAConstant ; } if ( fieldBinding . isStatic ( ) ) { if ( ! ( isImplicitThisRcv || ( ( ( receiver ) instanceof NameReference ) && ( ( ( ( ( NameReference ) ( receiver ) ) . bits ) & ( Binding . TYPE ) ) != 0 ) ) ) ) { scope . problemReporter ( ) . nonStaticAccessToStaticField ( this , fieldBinding ) ; } if ( ( ! isImplicitThisRcv ) && ( ( fieldBinding . declaringClass ) != ( receiverType ) ) ) { scope . problemReporter ( ) . indirectAccessToStaticField ( this , fieldBinding ) ; } } <START_BUG> return this . resolvedType = ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) == 0 ) ? fieldBinding . type . capture ( ) : fieldBinding . type ; <END_BUG> } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int index ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
return this . resolvedType = ( ( ( this . bits ) & ( IsStrictlyAssignedMASK ) ) == 0 ) ? fieldBinding . type . capture ( scope , this . sourceEnd ) : fieldBinding . type ;