Buggy code:
public class IndexManager extends JobManager implements IIndexConstants { public SimpleLookupTable indexLocations = new SimpleLookupTable ( ) ; private SimpleLookupTable indexes = new SimpleLookupTable ( ) ; private boolean needToSave = false ; private static final CRC32 checksumCalculator = new CRC32 ( ) ; private IPath javaPluginLocation = null ; private SimpleLookupTable indexStates = null ; private File savedIndexNamesFile = new File ( getSavedIndexesDirectory ( ) , "savedIndexNames.txt" ) ; public static final Integer SAVED_STATE = new Integer ( 0 ) ; public static final Integer UPDATING_STATE = new Integer ( 1 ) ; public static final Integer UNKNOWN_STATE = new Integer ( 2 ) ; public static final Integer REBUILDING_STATE = new Integer ( 3 ) ; public static boolean DEBUG = false ; public synchronized void aboutToUpdateIndex ( IPath containerPath , Integer newIndexState ) { } public void addBinary ( IFile resource , IPath containerPath ) { } public void addSource ( IFile resource , IPath containerPath , SourceElementParser parser ) { } public void cleanUpIndexes ( ) { } public IPath computeIndexLocation ( IPath containerPath ) { } public void deleteIndexFiles ( ) { } private void deleteIndexFiles ( SimpleSet pathsToKeep ) { } public void ensureIndexExists ( IPath indexLocation , IPath containerPath ) { } public SourceElementParser getSourceElementParser ( IJavaProject project , ISourceElementRequestor requestor ) { } public synchronized Index getIndex ( IPath indexLocation ) { } public synchronized Index getIndex ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndex ( IPath containerPath , IPath indexLocation , boolean reuseExistingFile , boolean createIfMissing ) { } public Index [ ] getIndexes ( IPath [ ] locations , IProgressMonitor progressMonitor ) { } public synchronized Index getIndexForUpdate ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } private SimpleLookupTable getIndexStates ( ) { } private IPath getJavaPluginWorkingLocation ( ) { } private File getSavedIndexesDirectory ( ) { } public void indexDocument ( SearchDocument searchDocument , SearchParticipant searchParticipant , Index index , IPath indexLocation ) { } public void indexAll ( IProject project ) { } public void indexLibrary ( IPath path , IProject requestingProject ) { } public void indexSourceFolder ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public synchronized void jobWasCancelled ( IPath containerPath ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public String processName ( ) { } private void rebuildIndex ( IPath indexLocation , IPath containerPath ) { } public synchronized Index recreateIndex ( IPath containerPath ) { } public void remove ( String containerRelativePath , IPath indexedContainer ) { } public synchronized void removeIndex ( IPath containerPath ) { } public synchronized void removeIndexPath ( IPath path ) { } public synchronized void removeIndexFamily ( IPath path ) { } public void removeSourceFolderFromIndex ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public synchronized void reset ( ) { } public synchronized boolean resetIndex ( IPath containerPath ) { String containerPathString = ( ( containerPath . getDevice ( ) ) == null ) ? containerPath . toString ( ) : containerPath . toOSString ( ) ; try { IPath indexLocation = computeIndexLocation ( containerPath ) ; Index index = getIndex ( indexLocation ) ; if ( JobManager . VERBOSE ) { Util . verbose ( ( ( ( "-><seq2seq4repair_space>reseting<seq2seq4repair_space>index:<seq2seq4repair_space>" + indexLocation ) + "<seq2seq4repair_space>for<seq2seq4repair_space>path:<seq2seq4repair_space>" ) + containerPathString ) ) ; } if ( index == null ) { return ( recreateIndex ( containerPath ) ) != null ; } <START_BUG> index . reset ( false ) ; <END_BUG> return true ; } catch ( IOException e ) { if ( JobManager . VERBOSE ) { Util . verbose ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>reset<seq2seq4repair_space>index<seq2seq4repair_space>for<seq2seq4repair_space>path:<seq2seq4repair_space>" + containerPathString ) ) ; e . printStackTrace ( ) ; } return false ; } } public void saveIndex ( Index index ) throws IOException { } public void saveIndexes ( ) { } public void scheduleDocumentIndexing ( final SearchDocument searchDocument , IPath container , final IPath indexLocation , final SearchParticipant searchParticipant ) { } public String toString ( ) { } private char [ ] [ ] readIndexState ( String dirOSString ) { } private synchronized void removeIndexesState ( IPath [ ] locations ) { } private synchronized void updateIndexState ( IPath indexLocation , Integer indexState ) { } private void writeSavedIndexNamesFile ( ) { } }

Fix:
index . reset ( ) ;