Buggy code:
public class ClassScope extends Scope { public TypeDeclaration referenceContext ; public ClassScope ( Scope parent , TypeDeclaration context ) { } void buildAnonymousTypeBinding ( SourceTypeBinding enclosingType , ReferenceBinding supertype ) { } private void buildFields ( ) { } void buildFieldsAndMethods ( ) { } private LocalTypeBinding buildLocalType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } void buildLocalTypeBinding ( SourceTypeBinding enclosingType ) { } private void buildMethods ( ) { } SourceTypeBinding buildType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } private void checkAndSetModifiers ( ) { } private void checkAndSetModifiersForField ( FieldBinding fieldBinding , FieldDeclaration fieldDecl ) { } private void checkForInheritedMemberTypes ( SourceTypeBinding sourceType ) { ReferenceBinding currentType = sourceType ; ReferenceBinding [ ] [ ] interfacesToVisit = null ; int lastPosition = - 1 ; do { if ( ( ( currentType . tagBits ) & ( HasNoMemberTypes ) ) != 0 ) break ; <START_BUG> if ( ( currentType . memberTypes ( ) ) != ( NoMemberTypes ) ) <END_BUG> return ; 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 ; } } while ( ( currentType = currentType . superclass ( ) ) != null ) ; boolean hasMembers = false ; if ( interfacesToVisit != 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 ( ( ( anInterface . tagBits ) & ( HasNoMemberTypes ) ) != 0 ) continue ; if ( ( anInterface . memberTypes ( ) ) != ( NoMemberTypes ) ) { hasMembers = true ; break done ; } 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 ( ! hasMembers ) interfaces [ j ] . tagBits |= HasNoMemberTypes ; } } } if ( ! hasMembers ) { currentType = sourceType ; do { currentType . tagBits |= HasNoMemberTypes ; } while ( ( currentType = currentType . superclass ( ) ) != null ) ; } } private void connectMemberTypes ( ) { } private boolean connectSuperclass ( ) { } private boolean connectSuperInterfaces ( ) { } void connectTypeHierarchy ( ) { } private void connectTypeHierarchyWithoutMembers ( ) { } private boolean detectCycle ( SourceTypeBinding sourceType , ReferenceBinding superType , TypeReference reference ) { } private ReferenceBinding findSupertype ( TypeReference typeReference ) { } public ProblemReporter problemReporter ( ) { } public TypeDeclaration referenceType ( ) { } public String toString ( ) { } }

Fix:
if ( currentType . hasMemberTypes ( ) )