Buggy code:
public class IndexBasedHierarchyBuilder extends HierarchyBuilder { protected Hashtable cuToHandle ; protected IJavaSearchScope scope ; protected Hashtable binariesFromIndexMatches ; private static class Queue { public char [ ] [ ] names = new char [ 10 ] [ ] ; public int start = 0 ; public int end = - 1 ; public void add ( char [ ] name ) { } public char [ ] retrieve ( ) { } public String toString ( ) { } } public IndexBasedHierarchyBuilder ( TypeHierarchy hierarchy , IJavaSearchScope scope ) throws JavaModelException { } private void addInfoFromBinaryIndexMatch ( Openable handle , HierarchyBinaryType binaryType , Vector infos ) throws JavaModelException { } private void addInfoFromOpenClassFile ( ClassFile classFile , Vector infos ) throws JavaModelException { } private void addInfoFromOpenCU ( CompilationUnit cu , Vector infos ) throws JavaModelException { } private void addInfoFromOpenSourceType ( SourceType type , Vector infos ) throws JavaModelException { } public void build ( boolean computeSubtypes ) throws CoreException , JavaModelException { } private void buildForProject ( JavaProject project , Vector infos , Vector units ) throws JavaModelException { IType focusType = this . getType ( ) ; if ( ( focusType != null ) && ( focusType . getJavaProject ( ) . equals ( project ) ) ) { try { infos . addElement ( ( ( org . eclipse . jdt . internal . core . JavaElement ) ( focusType ) ) . getRawInfo ( ) ) ; } catch ( JavaModelException e ) { return ; } } IGenericType [ ] genericTypes ; int infosSize = infos . size ( ) ; if ( infosSize > 0 ) { genericTypes = new IGenericType [ infosSize ] ; infos . copyInto ( genericTypes ) ; } else { genericTypes = new IGenericType [ 0 ] ; } ICompilationUnit [ ] compilationUnits ; int unitsSize = units . size ( ) ; if ( unitsSize > 0 ) { compilationUnits = new ICompilationUnit [ unitsSize ] ; units . copyInto ( compilationUnits ) ; } else { compilationUnits = new ICompilationUnit [ 0 ] ; } if ( ( infosSize > 0 ) || ( unitsSize > 0 ) ) { this . searchableEnvironment = ( ( SearchableEnvironment ) ( project . getSearchableNameEnvironment ( ) ) ) ; if ( ( focusType != null ) && ( focusType . getJavaProject ( ) . equals ( project ) ) ) { this . searchableEnvironment . unitToLookInside = ( ( CompilationUnit ) ( focusType . getCompilationUnit ( ) ) ) ; } this . nameLookup = project . getNameLookup ( ) ; <START_BUG> this . hierarchyResolver = new HierarchyResolver ( this . searchableEnvironment , this , new DefaultProblemFactory ( ) ) ; <END_BUG> if ( focusType != null ) { char [ ] fullyQualifiedName = focusType . getFullyQualifiedName ( ) . toCharArray ( ) ; this . hierarchyResolver . setFocusType ( CharOperation . splitOn ( '.' , fullyQualifiedName ) ) ; } this . hierarchyResolver . resolve ( genericTypes , compilationUnits ) ; if ( ( focusType != null ) && ( focusType . getJavaProject ( ) . equals ( project ) ) ) { this . searchableEnvironment . unitToLookInside = null ; } } } private void buildFromPotentialSubtypes ( String [ ] allPotentialSubTypes ) { } private void createCompilationUnitFromPath ( Openable handle , String osPath , Vector units ) throws JavaModelException { } private void createInfoFromClassFile ( Openable handle , String osPath , Vector infos ) throws JavaModelException { } private void createInfoFromClassFileInJar ( Openable classFile , Vector infos ) throws JavaModelException { } private String [ ] determinePossibleSubTypes ( ) throws CoreException , JavaModelException { } protected IType getHandle ( IGenericType genericType ) { } public static void searchAllPossibleSubTypes ( IWorkspace workbench , IType type , IJavaSearchScope scope , final Hashtable binariesFromIndexMatches , final IPathRequestor pathRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) throws CoreException , JavaModelException { } }

Fix:
this . hierarchyResolver = new HierarchyResolver ( this . searchableEnvironment , JavaCore . getOptions ( ) , this , new DefaultProblemFactory ( ) ) ;