Buggy code:
public class TypeHierarchy implements IElementChangedListener , ITypeHierarchy { protected IType fType ; protected Hashtable fClassToSuperclass ; 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 ) { <START_BUG> if ( fExists ) { <END_BUG> if ( exists ( ) ) { if ( isAffected ( event . getDelta ( ) ) ) { fireChange ( ) ; } } else { destroy ( ) ; fireChange ( ) ; } } } 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 ) { } 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 ) { } private boolean typeHasSupertype ( IType type ) { } protected void worked ( int work ) { } }

Fix:
if ( ( fExists ) && ( this . isActivated ( ) ) ) {