Buggy code:
private boolean createExternalArchiveDelta ( HashSet refreshedElements , IProgressMonitor monitor ) { } private JavaElementDelta currentDelta ( ) { } private void deleting ( IProject project ) { } private void elementAdded ( Openable element , IResourceDelta delta , DeltaProcessor . RootInfo rootInfo ) { } private void elementRemoved ( Openable element , IResourceDelta delta , DeltaProcessor . RootInfo rootInfo ) { } private int elementType ( IResource res , int kind , int parentType , DeltaProcessor . RootInfo rootInfo ) { } public void flush ( ) { } private SourceElementParser getSourceElementParser ( Openable element ) { } private DeltaProcessor . RootInfo enclosingRootInfo ( IPath path , int kind ) { } private IPath externalPath ( IResource res ) { } public void fire ( IJavaElementDelta customDelta , int eventType ) { } private void firePostChangeDelta ( IJavaElementDelta deltaToNotify , IElementChangedListener [ ] listeners , int [ ] listenerMask , int listenerCount ) { } private void fireReconcileDelta ( IElementChangedListener [ ] listeners , int [ ] listenerMask , int listenerCount ) { } private boolean isAffectedBy ( IResourceDelta rootDelta ) { } private boolean isPrimaryWorkingCopy ( IJavaElement element , int elementType ) { } private boolean isResFilteredFromOutput ( DeltaProcessor . RootInfo rootInfo , DeltaProcessor . OutputsInfo info , IResource res , int elementType ) { } private IJavaElementDelta mergeDeltas ( Collection deltas ) { } private void notifyListeners ( IJavaElementDelta deltaToNotify , int eventType , IElementChangedListener [ ] listeners , int [ ] listenerMask , int listenerCount ) { } private void notifyTypeHierarchies ( IElementChangedListener [ ] listeners , int listenerCount ) { } private void nonJavaResourcesChanged ( Openable element , IResourceDelta delta ) throws JavaModelException { } private DeltaProcessor . RootInfo oldRootInfo ( IPath path , JavaProject project ) { } private ArrayList otherRootsInfo ( IPath path , int kind ) { } private DeltaProcessor . OutputsInfo outputsInfo ( DeltaProcessor . RootInfo rootInfo , IResource res ) { } private void popUntilPrefixOf ( IPath path ) { } private IJavaElementDelta processResourceDelta ( IResourceDelta changes ) { } public void resetProjectCaches ( ) { } public void registerJavaModelDelta ( IJavaElementDelta delta ) { } private void removeFromParentInfo ( Openable child ) { } public void resourceChanged ( IResourceChangeEvent event ) { int eventType = ( ( this . overridenEventType ) == ( - 1 ) ) ? event . getType ( ) : this . overridenEventType ; IResource resource = event . getResource ( ) ; IResourceDelta delta = event . getDelta ( ) ; switch ( eventType ) { case IResourceChangeEvent . PRE_DELETE : try { if ( ( ( resource . getType ( ) ) == ( IResource . PROJECT ) ) && ( ( ( IProject ) ( resource ) ) . hasNature ( JavaCore . NATURE_ID ) ) ) { deleting ( ( ( IProject ) ( resource ) ) ) ; } } catch ( CoreException e ) { } return ; case IResourceChangeEvent . PRE_REFRESH : IProject [ ] projects = null ; Object o = event . getSource ( ) ; if ( o instanceof IProject ) { projects = new IProject [ ] { ( ( IProject ) ( o ) ) } ; } else if ( o instanceof IWorkspace ) { projects = ( ( IWorkspace ) ( o ) ) . getRoot ( ) . getProjects ( IContainer . INCLUDE_HIDDEN ) ; } for ( int i = 0 ; ( projects != null ) && ( i < ( projects . length ) ) ; i ++ ) { JavaModelManager . getExternalManager ( ) . refreshReferences ( projects [ i ] , null ) ; } return ; case IResourceChangeEvent . POST_CHANGE : HashSet elementsToRefresh = this . state . removeExternalElementsToRefresh ( ) ; if ( ( isAffectedBy ( delta ) ) || ( elementsToRefresh != null ) ) { try { try { stopDeltas ( ) ; checkProjectsAndClasspathChanges ( delta ) ; if ( elementsToRefresh != null ) { createExternalArchiveDelta ( elementsToRefresh , null ) ; } HashMap classpathChanges = this . state . removeAllClasspathChanges ( ) ; if ( ( classpathChanges . size ( ) ) > 0 ) { boolean hasDelta = ( this . currentDelta ) != null ; JavaElementDelta javaDelta = currentDelta ( ) ; Iterator changes = classpathChanges . values ( ) . iterator ( ) ; while ( changes . hasNext ( ) ) { ClasspathChange change = ( ( ClasspathChange ) ( changes . next ( ) ) ) ; <START_BUG> int result = change . generateDelta ( javaDelta ) ; <END_BUG> if ( ( result & ( ClasspathChange . HAS_DELTA ) ) != 0 ) { hasDelta = true ; this . state . rootsAreStale = true ; change . requestIndexing ( ) ; this . state . addClasspathValidation ( change . project ) ; } if ( ( result & ( ClasspathChange . HAS_PROJECT_CHANGE ) ) != 0 ) { this . state . addProjectReferenceChange ( change . project , change . oldResolvedClasspath ) ; } if ( ( result & ( ClasspathChange . HAS_LIBRARY_CHANGE ) ) != 0 ) { this . state . addExternalFolderChange ( change . project , change . oldResolvedClasspath ) ; } } elementsToRefresh = this . state . removeExternalElementsToRefresh ( ) ; if ( elementsToRefresh != null ) { hasDelta |= createExternalArchiveDelta ( elementsToRefresh , null ) ; } if ( ! hasDelta ) this . currentDelta = null ; } IJavaElementDelta translatedDelta = processResourceDelta ( delta ) ; if ( translatedDelta != null ) { registerJavaModelDelta ( translatedDelta ) ; } } finally { this . sourceElementParserCache = null ; startDeltas ( ) ; } IElementChangedListener [ ] listeners ; int listenerCount ; synchronized ( this . state ) { listeners = this . state . elementChangedListeners ; listenerCount = this . state . elementChangedListenerCount ; } notifyTypeHierarchies ( listeners , listenerCount ) ; fire ( null , ElementChangedEvent . POST_CHANGE ) ;

Fix:
int result = change . generateDelta ( javaDelta , false ) ;