Buggy code:
public class IndexBinaryFolder extends IndexRequest { IFolder folder ; public IndexBinaryFolder ( IFolder folder , IndexManager manager ) { } public boolean equals ( Object o ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) ) return true ; if ( ! ( this . folder . 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" ; if ( max == 0 ) { this . folder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) { if ( isCancelled ) return false ; if ( ( proxy . getType ( ) ) == ( IResource . FILE ) ) { if ( Util . isClassFileName ( proxy . getName ( ) ) ) { IFile file = ( ( IFile ) ( proxy . requestResource ( ) ) ) ; if ( ( file . getLocation ( ) ) != null ) indexedFileNames . put ( new JavaSearchDocument ( file , null ) . getPath ( ) , file ) ; } return false ; } return true ; } } , IResource . NONE ) ; } else { for ( int i = 0 ; i < max ; i ++ ) indexedFileNames . put ( paths [ i ] , DELETED ) ; final long indexLastModified = index . getIndexFile ( ) . lastModified ( ) ; this . folder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) { if ( isCancelled ) return false ; if ( ( proxy . getType ( ) ) == ( IResource . FILE ) ) { if ( Util . isClassFileName ( proxy . getName ( ) ) ) { IFile file = ( ( IFile ) ( proxy . requestResource ( ) ) ) ; IPath location = file . getLocation ( ) ; if ( location != null ) { String path = new JavaSearchDocument ( file , null ) . getPath ( ) ; indexedFileNames . put ( path , ( ( ( indexedFileNames . get ( path ) ) == null ) || ( indexLastModified < ( location . toFile ( ) . lastModified ( ) ) ) ? ( ( Object ) ( file ) ) : ( ( Object ) ( OK ) ) ) ) ; } } return false ; } return true ; } } , IResource . NONE ) ; } Object [ ] names = indexedFileNames . keyTable ; Object [ ] values = indexedFileNames . valueTable ; for ( int i = 0 , length = names . length ; i < length ; i ++ ) { String name = ( ( String ) ( names [ i ] ) ) ; if ( name != null ) { if ( this . isCancelled ) return false ; Object value = values [ i ] ; if ( value != OK ) { if ( value == DELETED ) this . manager . remove ( name , this . containerPath ) ; else { this . manager . addBinary ( ( ( IFile ) ( value ) ) , this . containerPath ) ; } } } } this . manager . request ( new SaveIndex ( this . containerPath , this . manager ) ) ; } catch ( CoreException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>" + ( this . folder ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } this . manager . removeIndex ( this . containerPath ) ; return false ; } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>" + ( this . folder ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } this . manager . removeIndex ( this . containerPath ) ; return false ; } finally { monitor . exitRead ( ) ; } return true ; } public int hashCode ( ) { } protected Integer updatedIndexState ( ) { } public String toString ( ) { } }

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