Buggy code:
public class DeltaProcessor { protected JavaElementDelta fCurrentDelta ; protected IndexManager indexManager = new IndexManager ( ) ; Map roots ; Map otherRoots ; Openable currentElement ; HashSet projectsToUpdate = new HashSet ( ) ; static final IJavaElementDelta [ ] NO_DELTA = new IJavaElementDelta [ 0 ] ; public static boolean VERBOSE = false ; protected void addToParentInfo ( Openable child ) { } public static void checkProjectPropertyFileUpdate ( IResourceDelta delta , IJavaElement parent ) { } protected static void close ( Openable element ) { } private void cloneCurrentDelta ( IJavaProject project , IPackageFragmentRoot root ) { } protected void closeAffectedElements ( IResourceDelta delta ) { } protected void contentChanged ( Openable element , IResourceDelta delta ) { } protected Openable createElement ( IResource resource , int elementType , IJavaProject project ) { } protected void elementAdded ( Openable element , IResourceDelta delta ) { } protected void elementClosed ( Openable element , IResourceDelta delta ) { } protected void elementOpened ( Openable element , IResourceDelta delta ) { } protected void elementRemoved ( Openable element , IResourceDelta delta ) { } protected IJavaElementDelta [ ] filterRealDeltas ( IJavaElementDelta [ ] deltas ) { } protected boolean hasJavaNature ( IResource resource ) { } private JavaModelException newInvalidElementType ( ) { } protected void nonJavaResourcesChanged ( Openable element , IResourceDelta delta ) throws JavaModelException { } private void popUntilPrefixOf ( IPath path ) { } public IJavaElementDelta [ ] processResourceDelta ( IResourceDelta changes ) { } private boolean updateCurrentDeltaAndIndex ( IResourceDelta delta , int elementType , IJavaProject project ) throws JavaModelException { } protected void removeFromParentInfo ( Openable child ) { } protected boolean traverseDelta ( IResourceDelta delta , int elementType , IJavaProject currentProject ) { } private int elementType ( IResourceDelta delta , int parentType , boolean isPkgFragmentRoot ) { } private void initializeRoots ( IJavaModel model ) { } private boolean isOnClasspath ( IPath path ) { } protected void updateIndex ( Openable element , IResourceDelta delta ) { if ( ( indexManager ) == null ) return ; switch ( element . getElementType ( ) ) { case IJavaElement . JAVA_PROJECT : switch ( delta . getKind ( ) ) { case IResourceDelta . ADDED : case IResourceDelta . OPEN : indexManager . indexAll ( element . getJavaProject ( ) . getProject ( ) ) ; break ; } break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : switch ( delta . getKind ( ) ) { case IResourceDelta . ADDED : case IResourceDelta . CHANGED : if ( element instanceof JarPackageFragmentRoot ) { JarPackageFragmentRoot root = ( ( JarPackageFragmentRoot ) ( element ) ) ; if ( root . getJavaProject ( ) . getProject ( ) . getFullPath ( ) . isPrefixOf ( root . getPath ( ) ) ) { <START_BUG> indexManager . indexJarFile ( root . getPath ( ) , root . getJavaProject ( ) . getElementName ( ) ) ; <END_BUG> } } break ; case IResourceDelta . REMOVED : break ; } case IJavaElement . PACKAGE_FRAGMENT : switch ( delta . getKind ( ) ) { case IResourceDelta . ADDED : case IResourceDelta . REMOVED : IPackageFragment pkg = null ; if ( element instanceof IPackageFragmentRoot ) { IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( element ) ) ; pkg = root . getPackageFragment ( "" ) ; } else { pkg = ( ( IPackageFragment ) ( element ) ) ; } IResourceDelta [ ] children = delta . getAffectedChildren ( ) ; for ( int i = 0 , length = children . length ; i < length ; i ++ ) { IResourceDelta child = children [ i ] ; IResource resource = child . getResource ( ) ; if ( resource instanceof IFile ) { String extension = resource . getFileExtension ( ) ; if ( "java" . equalsIgnoreCase ( extension ) ) { Openable cu = ( ( Openable ) ( pkg . getCompilationUnit ( resource . getName ( ) ) ) ) ; this . updateIndex ( cu , child ) ; } else if ( "class" . equalsIgnoreCase ( extension ) ) { Openable classFile = ( ( Openable ) ( pkg . getClassFile ( resource . getName ( ) ) ) ) ; this . updateIndex ( classFile , child ) ; } } } break ; } break ; case IJavaElement . CLASS_FILE : IFile file = ( ( IFile ) ( delta . getResource ( ) ) ) ; IJavaProject project = element . getJavaProject ( ) ; IPath binaryFolderPath = element . getPackageFragmentRoot ( ) . getPath ( ) ; try { if ( binaryFolderPath . equals ( project . getOutputLocation ( ) ) ) { break ; } } catch ( JavaModelException e ) { } switch ( delta . getKind ( ) ) { case IResourceDelta . CHANGED : if ( ( ( delta . getFlags ( ) ) & ( IResourceDelta . CONTENT ) ) == 0 ) break ; case IResourceDelta . ADDED : if ( file . isLocal ( IResource . DEPTH_ZERO ) ) indexManager . add ( file , binaryFolderPath ) ; break ; case IResourceDelta . REMOVED : indexManager . remove ( file . getFullPath ( ) . toString ( ) , binaryFolderPath ) ; break ; } break ; case IJavaElement . COMPILATION_UNIT : file = ( ( IFile ) ( delta . getResource ( ) ) ) ; switch ( delta . getKind ( ) ) { case IResourceDelta . CHANGED : if ( ( ( delta . getFlags ( ) ) & ( IResourceDelta . CONTENT ) ) == 0 ) break ; case IResourceDelta . ADDED : if ( file . isLocal ( IResource . DEPTH_ZERO ) ) indexManager . add ( file , file . getProject ( ) . getProject ( ) . getFullPath ( ) ) ; break ;

Fix:
indexManager . indexLibrary ( root . getPath ( ) , root . getJavaProject ( ) . getProject ( ) ) ;