Buggy code:
protected Hashtable fTypeToSuperInterfaces ; protected Hashtable fTypeToSubtypes ; protected TypeVector fRootClasses = new TypeVector ( ) ; protected Vector fInterfaces = new Vector ( 10 ) ; protected static final IType [ ] fgEmpty = new IType [ 0 ] ; protected IProgressMonitor fProgressMonitor = null ; protected Vector fChangeListeners = null ; protected Hashtable files = null ; protected Region fPackageRegion = null ; protected Region fRootRegion = null ; protected Region fProjectRegion = null ; protected boolean fIsActivated = false ; protected boolean fExists = true ; protected boolean computeSubtypes ; IJavaSearchScope scope ; public TypeHierarchy ( IType type , IJavaSearchScope scope , boolean computeSubtypes ) throws JavaModelException { } protected void activate ( ) { } private void addAllCheckingDuplicates ( Vector vector , IType [ ] collection ) { } protected void addInterface ( IType type ) { } protected void addRootClass ( IType type ) { } protected void addSubtype ( IType type , IType subtype ) { } public void addTypeHierarchyChangedListener ( ITypeHierarchyChangedListener listener ) { } protected void cacheSuperclass ( IType type , IType superclass ) { } protected void cacheSuperInterfaces ( IType type , IType [ ] superinterfaces ) { } protected void checkCanceled ( ) { } protected void compute ( ) throws CoreException , JavaModelException { } public boolean contains ( IType type ) { } protected void deactivate ( ) { } protected void destroy ( ) { } public void elementChanged ( ElementChangedEvent event ) { } public boolean exists ( ) { } protected void fireChange ( ) { } public IType [ ] getAllClasses ( ) { } public IType [ ] getAllInterfaces ( ) { } public IType [ ] getAllSubtypes ( IType type ) { } private IType [ ] getAllSubtypesForType ( IType type ) { } private void getAllSubtypesForType0 ( IType type , Vector subs ) { } public IType [ ] getAllSuperclasses ( IType type ) { } public IType [ ] getAllSuperInterfaces ( IType type ) { } private void getAllSuperInterfaces0 ( IType type , Vector supers ) { } public IType [ ] getAllSupertypes ( IType type ) { } private void getAllSupertypes0 ( IType type , Vector supers ) { } public IType [ ] getAllTypes ( ) { } public IType [ ] getExtendingInterfaces ( IType type ) { } private IType [ ] getExtendingInterfaces0 ( IType interfce ) { } public IType [ ] getImplementingClasses ( IType type ) { } private IType [ ] getImplementingClasses0 ( IType interfce ) { } public IType [ ] getRootClasses ( ) { } public IType [ ] getRootInterfaces ( ) { } public IType [ ] getSubclasses ( IType type ) { } public IType [ ] getSubtypes ( IType type ) { } private IType [ ] getSubtypesForType ( IType type ) { } public IType getSuperclass ( IType type ) { } public IType [ ] getSuperInterfaces ( IType type ) { } public IType [ ] getSupertypes ( IType type ) { } public IType getType ( ) { } protected IType [ ] growAndAddToArray ( IType [ ] array , IType [ ] additions ) { } protected IType [ ] growAndAddToArray ( IType [ ] array , IType addition ) { } private boolean hasSubtypeNamed ( String simpleName ) { } private boolean hasSuperTypeOrImportChange ( IJavaElementDelta delta ) { } private boolean hasTypeNamed ( String simpleName ) { } private boolean hasVisibilityChange ( IJavaElementDelta delta ) { } private boolean includesSupertypeOf ( IType type ) { } protected void initialize ( int size ) { } protected boolean isActivated ( ) { } private boolean isAffected ( IJavaElementDelta delta ) { } private boolean isAffectedByChildren ( IJavaElementDelta delta ) { } private boolean isAffectedByJavaModel ( IJavaElementDelta delta , IJavaElement element ) { } private boolean isAffectedByJavaProject ( IJavaElementDelta delta , IJavaElement element ) { switch ( delta . getKind ( ) ) { case IJavaElementDelta . ADDED : try { <START_BUG> IClasspathEntry [ ] classpath = this . javaProject ( ) . getResolvedClasspath ( true ) ; <END_BUG> for ( int i = 0 ; i < ( classpath . length ) ; i ++ ) { if ( ( ( classpath [ i ] . getEntryKind ( ) ) == ( IClasspathEntry . CPE_PROJECT ) ) && ( classpath [ i ] . getPath ( ) . equals ( element . getUnderlyingResource ( ) . getFullPath ( ) ) ) ) { return true ; } } return false ; } catch ( JavaModelException e ) { return false ; } case IJavaElementDelta . REMOVED : IJavaElement [ ] pkgs = fPackageRegion . getElements ( ) ; for ( int i = 0 ; i < ( pkgs . length ) ; i ++ ) { IJavaProject project = pkgs [ i ] . getJavaProject ( ) ; if ( ( project != null ) && ( project . equals ( element ) ) ) { return true ; } } return false ; case IJavaElementDelta . CHANGED : return isAffectedByChildren ( delta ) ; } return false ; } private boolean isAffectedByPackageFragment ( IJavaElementDelta delta , IJavaElement element ) { } private boolean isAffectedByPackageFragmentRoot ( IJavaElementDelta delta , IJavaElement element ) { } protected boolean isAffectedByType ( IJavaElementDelta delta , IJavaElement element ) { } public IJavaProject javaProject ( ) { } protected boolean packageRegionContainsSamePackageFragment ( IJavaElement element ) { } protected void pruneTypeHierarchy ( IType type , IProgressMonitor monitor ) throws JavaModelException { } public void refresh ( IProgressMonitor monitor ) throws JavaModelException { } protected void refreshCancelled ( OperationCanceledException oce ) throws JavaModelException { } protected void removeType ( IType type ) throws JavaModelException { } public void removeTypeHierarchyChangedListener ( ITypeHierarchyChangedListener listener ) { } private boolean subtypesIncludeSupertypeOf ( IType type ) { } public String toString ( ) { } private void toString ( StringBuffer buffer , IType type , int indent , boolean ascendant ) { }

Fix:
IClasspathEntry [ ] classpath = this . javaProject ( ) . getExpandedClasspath ( true ) ;