Buggy code:
public class IndexAllProject extends IndexRequest implements IResourceVisitor { char [ ] [ ] currentExclusionPatterns ; IProject project ; IndexManager manager ; Hashtable indexedFileNames ; final String OK = "OK" ; final String DELETED = "DELETED" ; long indexLastModified ; public IndexAllProject ( IProject project , IndexManager manager ) { } 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 ( ! ( project . isOpen ( ) ) ) return IJob . COMPLETE ; IIndex index = manager . getIndex ( project . getFullPath ( ) , true , true ) ; 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 ) JobManager . verbose ( ( "-><seq2seq4repair_space>merging<seq2seq4repair_space>index<seq2seq4repair_space>" + ( index . getIndexFile ( ) ) ) ) ; index . save ( ) ; } catch ( IOException e ) { return IJob . FAILED ; } finally { monitor . exitWriteEnterRead ( ) ; } } this . indexLastModified = index . getIndexFile ( ) . lastModified ( ) ; this . 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 ( ) ; this . indexedFileNames . put ( fileName , DELETED ) ; } IJavaProject javaProject = JavaCore . create ( this . project ) ; IClasspathEntry [ ] entries = javaProject . getRawClasspath ( ) ; IWorkspaceRoot root = this . project . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 , length = entries . length ; i < length ; i ++ ) { if ( this . isCancelled ) return IJob . FAILED ; IClasspathEntry entry = entries [ i ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_SOURCE ) ) { IPath entryPath = entry . getPath ( ) ; IResource sourceFolder = root . findMember ( entryPath ) ; if ( sourceFolder != null ) { this . currentExclusionPatterns = ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) ; sourceFolder . accept ( this ) ; } } } IPath projectPath = this . project . getFullPath ( ) ; 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 ) { manager . addSource ( ( ( IFile ) ( value ) ) , projectPath ) ; } else if ( value == ( DELETED ) ) { manager . remove ( name , projectPath ) ; } } <START_BUG> manager . request ( new SaveProjectIndex ( manager , projectPath ) ) ; <END_BUG> } catch ( CoreException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>" + ( this . project ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } manager . removeIndex ( project . getFullPath ( ) ) ; return IJob . FAILED ; } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>" + ( this . project ) ) + "<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } manager . removeIndex ( project . getFullPath ( ) ) ; return IJob . FAILED ; } finally { monitor . exitRead ( ) ; } return IJob . COMPLETE ; } public String toString ( ) { } public boolean visit ( IResource resource ) { } }

Fix:
manager . request ( new SaveIndex ( manager , projectPath ) ) ;