Buggy code:
public class HierarchyResolver implements ITypeRequestor { public class MissingType implements IGenericType { public String simpleName ; public MissingType ( String simpleName ) { } public char [ ] getFileName ( ) { } public int getModifiers ( ) { } public boolean isBinaryType ( ) { } public boolean isClass ( ) { } public boolean isInterface ( ) { } public String toString ( ) { } } private ReferenceBinding focusType ; private boolean superTypesOnly ; private boolean hasMissingSuperClass ; LookupEnvironment lookupEnvironment ; private CompilerOptions options ; HierarchyBuilder requestor ; private ReferenceBinding [ ] typeBindings ; private int typeIndex ; private IGenericType [ ] typeModels ; public HierarchyResolver ( INameEnvironment nameEnvironment , Map settings , HierarchyBuilder requestor , IProblemFactory problemFactory ) { } public HierarchyResolver ( LookupEnvironment lookupEnvironment , HierarchyBuilder requestor ) { } public void accept ( IBinaryType binaryType , PackageBinding packageBinding ) { } public void accept ( ICompilationUnit sourceUnit ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { } private IGenericType findSuperClass ( IGenericType type , ReferenceBinding typeBinding ) { } private IGenericType [ ] findSuperInterfaces ( IGenericType type , ReferenceBinding typeBinding ) { } private void remember ( IGenericType suppliedType , ReferenceBinding typeBinding ) { } private void remember ( IType type , ReferenceBinding typeBinding ) { } private void rememberAllTypes ( CompilationUnitDeclaration parsedUnit , org . eclipse . jdt . core . ICompilationUnit cu , boolean includeLocalTypes ) { } private void rememberWithMemberTypes ( TypeDeclaration typeDecl , IType typeHandle ) { } private void reportHierarchy ( IType focus , CompilationUnitDeclaration parsedUnit , BinaryTypeBinding binaryTypeBinding ) { } private void reset ( ) { } public void resolve ( IGenericType suppliedType ) { } public void resolve ( Openable [ ] openables , HashSet localTypes , IProgressMonitor monitor ) { try { int openablesLength = openables . length ; CompilationUnitDeclaration [ ] parsedUnits = new CompilationUnitDeclaration [ openablesLength ] ; boolean [ ] hasLocalType = new boolean [ openablesLength ] ; org . eclipse . jdt . core . ICompilationUnit [ ] cus = new org . eclipse . jdt . core . ICompilationUnit [ openablesLength ] ; int unitsIndex = 0 ; CompilationUnitDeclaration focusUnit = null ; BinaryTypeBinding focusBinaryBinding = null ; IType focus = this . requestor . getType ( ) ; Openable focusOpenable = null ; if ( focus != null ) { if ( focus . isBinary ( ) ) { focusOpenable = ( ( Openable ) ( focus . getClassFile ( ) ) ) ; } else { focusOpenable = ( ( Openable ) ( focus . getCompilationUnit ( ) ) ) ; } } Parser parser = new Parser ( this . lookupEnvironment . problemReporter , true ) ; for ( int i = 0 ; i < openablesLength ; i ++ ) { Openable openable = openables [ i ] ; if ( openable instanceof org . eclipse . jdt . core . ICompilationUnit ) { org . eclipse . jdt . core . ICompilationUnit cu = ( ( org . eclipse . jdt . core . ICompilationUnit ) ( openable ) ) ; boolean containsLocalType = false ; if ( localTypes == null ) { <START_BUG> containsLocalType = false ; <END_BUG> } else { IPath path = cu . getPath ( ) ; containsLocalType = localTypes . contains ( path . toString ( ) ) ; } CompilationUnitDeclaration parsedUnit = null ; if ( cu . isOpen ( ) ) { CompilationResult result = new CompilationResult ( ( ( ICompilationUnit ) ( cu ) ) . getFileName ( ) , i , openablesLength , this . options . maxProblemsPerUnit ) ; SourceTypeElementInfo [ ] typeInfos = null ; try { IType [ ] topLevelTypes = cu . getTypes ( ) ; int topLevelLength = topLevelTypes . length ; typeInfos = new SourceTypeElementInfo [ topLevelLength ] ; for ( int j = 0 ; j < topLevelLength ; j ++ ) { IType topLevelType = topLevelTypes [ j ] ; typeInfos [ j ] = ( ( SourceTypeElementInfo ) ( ( ( JavaElement ) ( topLevelType ) ) . getElementInfo ( ) ) ) ; } } catch ( JavaModelException e ) { } if ( ! containsLocalType ) { parsedUnit = SourceTypeConverter . buildCompilationUnit ( typeInfos , SourceTypeConverter . MEMBER_TYPE , this . lookupEnvironment . problemReporter , result ) ; } else { parsedUnit = ElementInfoConverter . buildCompilationUnit ( typeInfos , true , this . lookupEnvironment . problemReporter , result ) ; parsedUnit . bits |= ASTNode . HasAllMethodBodies ; } } else { IResource file = cu . getResource ( ) ; String osPath = file . getLocation ( ) . toOSString ( ) ; ICompilationUnit sourceUnit = this . requestor . createCompilationUnitFromPath ( openable , osPath ) ; CompilationResult unitResult = new CompilationResult ( sourceUnit , i , openablesLength , this . options . maxProblemsPerUnit ) ; parsedUnit = parser . dietParse ( sourceUnit , unitResult ) ; } if ( parsedUnit != null ) { hasLocalType [ unitsIndex ] = containsLocalType ; cus [ unitsIndex ] = cu ; parsedUnits [ ( unitsIndex ++ ) ] = parsedUnit ; try { this . lookupEnvironment . buildTypeBindings ( parsedUnit ) ; if ( openable . equals ( focusOpenable ) ) { focusUnit = parsedUnit ; } } catch ( AbortCompilation e ) { } } } else { ClassFile classFile = ( ( ClassFile ) ( openable ) ) ; IBinaryType binaryType = null ; if ( classFile . isOpen ( ) ) { IType type = classFile . getType ( ) ; try { binaryType = ( ( IBinaryType ) ( ( ( JavaElement ) ( type ) ) . getElementInfo ( ) ) ) ; } catch ( JavaModelException e ) { } } else { if ( classFile . getPackageFragmentRoot ( ) . isArchive ( ) ) { binaryType = this . requestor . createInfoFromClassFileInJar ( classFile ) ; }

Fix:
containsLocalType = true ;