Buggy code:
public class IndexAllProject extends IndexRequest { IProject project ; public IndexAllProject ( IProject project , IndexManager manager ) { } public boolean equals ( Object o ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) ) return true ; if ( ! ( project . isAccessible ( ) ) ) return true ; Index index = this . manager . getIndexForUpdate ( this . containerPath , true , true ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = this . manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; saveIfNecessary ( index , monitor ) ; <START_BUG> String [ ] paths = index . queryInDocumentNames ( "" ) ; <END_BUG> int max = ( paths == null ) ? 0 : paths . length ; final SimpleLookupTable indexedFileNames = new SimpleLookupTable ( ( max == 0 ? 33 : max + 11 ) ) ; final String OK = "OK" ; final String DELETED = "DELETED" ; for ( int i = 0 ; i < max ; i ++ ) indexedFileNames . put ( paths [ i ] , DELETED ) ; final long indexLastModified = ( max == 0 ) ? 0L : index . getIndexFile ( ) . lastModified ( ) ; JavaProject javaProject = ( ( JavaProject ) ( JavaCore . create ( this . project ) ) ) ; IClasspathEntry [ ] entries = javaProject . getRawClasspath ( false , false ) ; IWorkspaceRoot root = this . project . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 , length = entries . length ; i < length ; i ++ ) { if ( this . isCancelled ) return false ; IClasspathEntry entry = entries [ i ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_SOURCE ) ) { IResource sourceFolder = root . findMember ( entry . getPath ( ) ) ; if ( sourceFolder != null ) { final HashSet outputs = new HashSet ( ) ; if ( ( sourceFolder . getType ( ) ) == ( IResource . PROJECT ) ) { outputs . add ( javaProject . getOutputLocation ( false , false ) ) ; for ( int j = 0 ; j < length ; j ++ ) { IPath output = entries [ j ] . getOutputLocation ( ) ; if ( output != null ) { outputs . add ( output ) ; } } } final boolean hasOutputs = ! ( outputs . isEmpty ( ) ) ; final char [ ] [ ] patterns = ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) ; if ( max == 0 ) { sourceFolder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) { if ( isCancelled ) return false ; switch ( proxy . getType ( ) ) { case IResource . FILE : if ( Util . isJavaFileName ( proxy . getName ( ) ) ) { IFile file = ( ( IFile ) ( proxy . requestResource ( ) ) ) ; if ( ( ( file . getLocation ( ) ) != null ) && ( ( patterns == null ) || ( ! ( org . eclipse . jdt . internal . core . util . Util . isExcluded ( file , patterns ) ) ) ) ) indexedFileNames . put ( new JavaSearchDocument ( file , null ) . getPath ( ) , file ) ; } return false ; case IResource . FOLDER : if ( ( patterns != null ) && ( org . eclipse . jdt . internal . core . util . Util . isExcluded ( proxy . requestResource ( ) , patterns ) ) ) return false ; if ( hasOutputs && ( outputs . contains ( proxy . requestFullPath ( ) ) ) ) { return false ; } } return true ; } } , IResource . NONE ) ; } else { sourceFolder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) { if ( isCancelled ) return false ; switch ( proxy . getType ( ) ) { case IResource . FILE : if ( Util . isJavaFileName ( proxy . getName ( ) ) ) { IFile file = ( ( IFile ) ( proxy . requestResource ( ) ) ) ; IPath location = file . getLocation ( ) ; if ( ( location != null ) && ( ( patterns == null ) || ( ! ( org . eclipse . jdt . internal . core . util . Util . isExcluded ( file , patterns ) ) ) ) ) { String path = new JavaSearchDocument ( file , null ) . getPath ( ) ; indexedFileNames . put ( path , ( ( ( indexedFileNames . get ( path ) ) == null ) || ( indexLastModified < ( location . toFile ( ) . lastModified ( ) ) ) ? ( ( Object ) ( file ) ) : ( ( Object ) ( OK ) ) ) ) ; } } return false ; case IResource . FOLDER : if ( ( patterns != null ) && ( org . eclipse . jdt . internal . core . util . Util . isExcluded ( proxy . requestResource ( ) , patterns ) ) ) return false ; if ( hasOutputs && ( outputs . contains ( proxy . requestFullPath ( ) ) ) ) { return false ; } } return true ; } } , IResource . NONE ) ; } } } }

Fix:
String [ ] paths = index . queryDocumentNames ( "" ) ;