Buggy code:
public class IndexBinaryFolder extends IndexRequest { IFolder folder ; IndexManager manager ; IProject project ; public IndexBinaryFolder ( IFolder folder , IndexManager manager , IProject project ) { } public boolean belongsTo ( String jobFamily ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) return IJob . COMPLETE ; if ( ! ( this . folder . isAccessible ( ) ) ) return IJob . COMPLETE ; IIndex index = manager . getIndex ( this . folder . getFullPath ( ) ) ; if ( index == null ) return IJob . COMPLETE ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return IJob . COMPLETE ; try { monitor . enterRead ( ) ; if ( index . hasChanged ( ) ) { try { monitor . exitRead ( ) ; monitor . enterWrite ( ) ; if ( IndexManager . VERBOSE ) System . out . println ( ( "-><seq2seq4repair_space>merging<seq2seq4repair_space>index<seq2seq4repair_space>:<seq2seq4repair_space>" + ( index . getIndexFile ( ) ) ) ) ; index . save ( ) ; } catch ( IOException e ) { return IJob . FAILED ; } finally { monitor . exitWrite ( ) ; monitor . enterRead ( ) ; } } final String OK = "OK" ; final String DELETED = "DELETED" ; final long indexLastModified = index . getIndexFile ( ) . lastModified ( ) ; final Hashtable indexedFileNames = new Hashtable ( 100 ) ; IQueryResult [ ] results = index . queryInDocumentNames ( "" ) ; for ( int i = 0 , max = ( results == null ) ? 0 : results . length ; i < max ; i ++ ) { String fileName = results [ i ] . getPath ( ) ; indexedFileNames . put ( fileName , DELETED ) ; } this . folder . accept ( new IResourceVisitor ( ) { public boolean visit ( IResource resource ) { if ( isCancelled ) return false ; if ( ( resource . getType ( ) ) == ( IResource . FILE ) ) { String extension = resource . getFileExtension ( ) ; if ( ( extension != null ) && ( extension . equalsIgnoreCase ( "class" ) ) ) { IPath path = resource . getLocation ( ) ; if ( path != null ) { File resourceFile = path . toFile ( ) ; String name = new IFileDocument ( ( ( IFile ) ( resource ) ) ) . getName ( ) ; if ( ( indexedFileNames . get ( name ) ) == null ) { indexedFileNames . put ( name , resource ) ; } else { indexedFileNames . put ( name , ( ( resourceFile . lastModified ( ) ) > indexLastModified ? ( ( Object ) ( resource ) ) : ( ( Object ) ( OK ) ) ) ) ; } } } return false ; } return true ; } } ) ; Enumeration names = indexedFileNames . keys ( ) ; while ( names . hasMoreElements ( ) ) { if ( this . isCancelled ) return IJob . FAILED ; String name = ( ( String ) ( names . nextElement ( ) ) ) ; Object value = indexedFileNames . get ( name ) ; if ( value instanceof IFile ) { <START_BUG> manager . add ( ( ( IFile ) ( value ) ) , this . folder . getFullPath ( ) ) ; <END_BUG> } else if ( value == DELETED ) { manager . remove ( name , this . project . getFullPath ( ) ) ; } } } catch ( CoreException e ) { return IJob . FAILED ; } catch ( IOException e ) { return IJob . FAILED ; } finally { monitor . exitRead ( ) ; } return IJob . COMPLETE ; } public String toString ( ) { } }

Fix:
manager . addBinary ( ( ( IFile ) ( value ) ) , this . folder . getFullPath ( ) ) ;