Buggy code:
public class CodeSnippetScope extends BlockScope { protected CodeSnippetScope ( int kind , Scope parent ) { } public CodeSnippetScope ( BlockScope parent ) { } public CodeSnippetScope ( BlockScope parent , int variableCount ) { } public final boolean canBeSeenByForCodeSnippet ( FieldBinding fieldBinding , TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { } public final boolean canBeSeenByForCodeSnippet ( MethodBinding methodBinding , TypeBinding receiverType , InvocationSite invocationSite , Scope scope ) { } public final boolean canBeSeenByForCodeSnippet ( ReferenceBinding referenceBinding , ReferenceBinding receiverType ) { } public MethodBinding findExactMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding findFieldForCodeSnippet ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { if ( receiverType . isBaseType ( ) ) return null ; if ( receiverType . isArrayType ( ) ) { TypeBinding leafType = receiverType . leafComponentType ( ) ; if ( leafType instanceof ReferenceBinding ) if ( ! ( ( ( ReferenceBinding ) ( leafType ) ) . canBeSeenBy ( this ) ) ) { return new ProblemFieldBinding ( ( ( ReferenceBinding ) ( leafType ) ) , fieldName , ReceiverTypeNotVisible ) ; } if ( CharOperation . equals ( fieldName , LENGTH ) ) <START_BUG> return LengthField ; <END_BUG> return null ; } ReferenceBinding currentType = ( ( ReferenceBinding ) ( receiverType ) ) ; if ( ! ( currentType . canBeSeenBy ( this ) ) ) return new ProblemFieldBinding ( currentType , fieldName , ReceiverTypeNotVisible ) ; FieldBinding field = currentType . getField ( fieldName ) ; if ( field != null ) { if ( canBeSeenByForCodeSnippet ( field , currentType , invocationSite , this ) ) return field ; else return new ProblemFieldBinding ( field . declaringClass , fieldName , NotVisible ) ; } ReferenceBinding [ ] [ ] interfacesToVisit = null ; int lastPosition = - 1 ; FieldBinding visibleField = null ; boolean keepLooking = true ; boolean notVisible = false ; while ( keepLooking ) { ReferenceBinding [ ] itsInterfaces = currentType . superInterfaces ( ) ; if ( itsInterfaces != ( NoSuperInterfaces ) ) { if ( interfacesToVisit == null ) interfacesToVisit = new ReferenceBinding [ 5 ] [ ] ; if ( ( ++ lastPosition ) == ( interfacesToVisit . length ) ) System . arraycopy ( interfacesToVisit , 0 , ( interfacesToVisit = new ReferenceBinding [ lastPosition * 2 ] [ ] ) , 0 , lastPosition ) ; interfacesToVisit [ lastPosition ] = itsInterfaces ; } if ( ( currentType = currentType . superclass ( ) ) == null ) break ; if ( ( field = currentType . getField ( fieldName ) ) != null ) { keepLooking = false ; if ( canBeSeenByForCodeSnippet ( field , receiverType , invocationSite , this ) ) { if ( visibleField == null ) visibleField = field ; else return new ProblemFieldBinding ( visibleField . declaringClass , fieldName , Ambiguous ) ; } else { notVisible = true ; } } } if ( interfacesToVisit != null ) { ProblemFieldBinding ambiguous = null ; done : for ( int i = 0 ; i <= lastPosition ; i ++ ) { ReferenceBinding [ ] interfaces = interfacesToVisit [ i ] ; for ( int j = 0 , length = interfaces . length ; j < length ; j ++ ) { ReferenceBinding anInterface = interfaces [ j ] ; if ( ( ( anInterface . tagBits ) & ( InterfaceVisited ) ) == 0 ) { anInterface . tagBits |= InterfaceVisited ; if ( ( field = anInterface . getField ( fieldName ) ) != null ) { if ( visibleField == null ) { visibleField = field ; } else { ambiguous = new ProblemFieldBinding ( visibleField . declaringClass , fieldName , Ambiguous ) ; break done ; } } else { ReferenceBinding [ ] itsInterfaces = anInterface . superInterfaces ( ) ; if ( itsInterfaces != ( NoSuperInterfaces ) ) { if ( ( ++ lastPosition ) == ( interfacesToVisit . length ) ) System . arraycopy ( interfacesToVisit , 0 , ( interfacesToVisit = new ReferenceBinding [ lastPosition * 2 ] [ ] ) , 0 , lastPosition ) ; interfacesToVisit [ lastPosition ] = itsInterfaces ; } } } } } for ( int i = 0 ; i <= lastPosition ; i ++ ) { ReferenceBinding [ ] interfaces = interfacesToVisit [ i ] ; for ( int j = 0 , length = interfaces . length ; j < length ; j ++ ) interfaces [ j ] . tagBits &= ~ ( InterfaceVisited ) ; } if ( ambiguous != null ) return ambiguous ; } if ( visibleField != null ) return visibleField ; if ( notVisible ) return new ProblemFieldBinding ( currentType , fieldName , NotVisible ) ; return null ; } public MethodBinding findMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public MethodBinding findMethodForArray ( ArrayBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , ReferenceBinding receiverType ) { } public MethodBinding getConstructor ( ReferenceBinding receiverType , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding getFieldForCodeSnippet ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding getImplicitMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } }

Fix:
return ArrayBinding . ArrayLength ;