Buggy code:
public class CodeSnippetSingleNameReference extends SingleNameReference implements InvocationSite , ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetSingleNameReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public TypeBinding checkFieldAccess ( BlockScope scope ) { } 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 , MethodBinding writeAccessor , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void generateReceiver ( CodeStream codeStream ) { } public TypeBinding getReceiverType ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo , boolean isReadAccess ) { if ( ( this . delegateThis ) == null ) { super . manageSyntheticAccessIfNecessary ( currentScope , flowInfo , isReadAccess ) ; return ; } if ( ! ( flowInfo . isReachable ( ) ) ) return ; if ( ( this . constant ) != ( NotAConstant ) ) return ; if ( ( this . binding ) instanceof ParameterizedFieldBinding ) { ParameterizedFieldBinding parameterizedField = ( ( ParameterizedFieldBinding ) ( this . binding ) ) ; this . codegenBinding = parameterizedField . originalField ; FieldBinding fieldCodegenBinding = ( ( FieldBinding ) ( this . codegenBinding ) ) ; if ( ( ( fieldCodegenBinding . type . tagBits ) & ( TagBits . HasTypeVariable ) ) != 0 ) { this . genericCast = fieldCodegenBinding . type . genericCast ( currentScope . boxing ( parameterizedField . type ) ) ; } } if ( ( ( this . bits ) & ( Binding . FIELD ) ) != 0 ) { FieldBinding fieldBinding = ( ( FieldBinding ) ( this . binding ) ) ; if ( ( ( ( fieldBinding . declaringClass ) != ( this . delegateThis . type ) ) && ( ( fieldBinding . declaringClass ) != null ) ) && ( ! ( fieldBinding . isConstantValue ( ) ) ) ) { <START_BUG> CompilerOptions options = currentScope . environment ( ) . options ; <END_BUG> if ( ( ( ( ( options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ( options . complianceLevel ) >= ( ClassFileConstants . JDK1_4 ) ) || ( ! ( fieldBinding . isStatic ( ) ) ) ) ) && ( ( fieldBinding . declaringClass . id ) != ( TypeIds . T_JavaLangObject ) ) ) || ( ! ( fieldBinding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) { this . codegenBinding = currentScope . enclosingSourceType ( ) . getUpdatedFieldBinding ( ( ( FieldBinding ) ( this . codegenBinding ) ) , ( ( ReferenceBinding ) ( this . delegateThis . type . erasure ( ) ) ) ) ; } } } } public TypeBinding reportError ( BlockScope scope ) { } }

Fix:
CompilerOptions options = currentScope . compilerOptions ( ) ;