Buggy code:
public class IndexManager extends JobManager implements IIndexConstants { public SimpleLookupTable indexNames = new SimpleLookupTable ( ) ; private Map indexes = new HashMap ( 5 ) ; private boolean needToSave = false ; private static final CRC32 checksumCalculator = new CRC32 ( ) ; private IPath javaPluginLocation = null ; private SimpleLookupTable indexStates = null ; private File savedIndexNamesFile = new File ( getJavaPluginWorkingLocation ( ) . append ( "savedIndexNames.txt" ) . toOSString ( ) ) ; public static Integer SAVED_STATE = new Integer ( 0 ) ; public static Integer UPDATING_STATE = new Integer ( 1 ) ; public static Integer UNKNOWN_STATE = new Integer ( 2 ) ; public static Integer REBUILDING_STATE = new Integer ( 3 ) ; public synchronized void aboutToUpdateIndex ( IPath path , Integer newIndexState ) { } public void addBinary ( IFile resource , IPath indexPath ) { } public void addSource ( IFile resource , IPath indexPath ) { } public void cleanUpIndexes ( ) { SimpleLookupTable knownPaths = new SimpleLookupTable ( ) ; <START_BUG> SearchParticipant [ ] participants = org . eclipse . jdt . core . search . SearchEngine . getSearchParticipants ( ) ; <END_BUG> IJavaSearchScope scope = new JavaWorkspaceScope ( ) ; for ( int i = 0 , length = participants . length ; i < length ; i ++ ) { PatternSearchJob job = new PatternSearchJob ( null , participants [ i ] , scope , null ) ; Index [ ] selectedIndexes = job . getIndexes ( null ) ; for ( int j = 0 , max = selectedIndexes . length ; j < max ; j ++ ) { String path = selectedIndexes [ j ] . getIndexFile ( ) . getAbsolutePath ( ) ; knownPaths . put ( path , path ) ; } } if ( ( indexStates ) != null ) { Object [ ] keys = indexStates . keyTable ; for ( int i = 0 , l = keys . length ; i < l ; i ++ ) { String key = ( ( String ) ( keys [ i ] ) ) ; if ( ( key != null ) && ( ! ( knownPaths . containsKey ( key ) ) ) ) updateIndexState ( key , null ) ; } } File indexesDirectory = new File ( getJavaPluginWorkingLocation ( ) . toOSString ( ) ) ; if ( indexesDirectory . isDirectory ( ) ) { File [ ] indexesFiles = indexesDirectory . listFiles ( ) ; if ( indexesFiles != null ) { for ( int i = 0 , indexesFilesLength = indexesFiles . length ; i < indexesFilesLength ; i ++ ) { String fileName = indexesFiles [ i ] . getAbsolutePath ( ) ; if ( ( ! ( knownPaths . containsKey ( fileName ) ) ) && ( fileName . toLowerCase ( ) . endsWith ( ".index" ) ) ) { if ( JobManager . VERBOSE ) JobManager . verbose ( ( "Deleting<seq2seq4repair_space>index<seq2seq4repair_space>file<seq2seq4repair_space>" + ( indexesFiles [ i ] ) ) ) ; indexesFiles [ i ] . delete ( ) ; } } } } } String computeIndexName ( IPath path ) { } public synchronized Index getIndex ( IPath path , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndexForUpdate ( IPath path , boolean reuseExistingFile , boolean createIfMissing ) { } private SimpleLookupTable getIndexStates ( ) { } private IPath getJavaPluginWorkingLocation ( ) { } public void indexDocument ( SearchDocument searchDocument , SearchParticipant searchParticipant , Index index , IPath indexPath ) throws IOException { } public void indexAll ( IProject project ) { } public void indexLibrary ( IPath path , IProject requestingProject ) { } public void indexSourceFolder ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public void jobWasCancelled ( IPath path ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public Index peekAtIndex ( IPath path ) { } public String processName ( ) { } private void rebuildIndex ( String indexName , IPath path ) { } public synchronized Index recreateIndex ( IPath path ) { } public void remove ( String resourceName , IPath indexedContainer ) { } public synchronized void removeIndex ( IPath path ) { } public synchronized void removeIndexFamily ( IPath path ) { } public void removeSourceFolderFromIndex ( JavaProject javaProject , IPath sourceFolder , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public synchronized void reset ( ) { } public void saveIndex ( Index index ) throws IOException { } public void saveIndexes ( ) { } public void scheduleDocumentIndexing ( final SearchDocument searchDocument , final IPath indexPath , final SearchParticipant searchParticipant ) { } public String toString ( ) { } private char [ ] readIndexState ( ) { } private synchronized void updateIndexState ( String indexName , Integer indexState ) { } }

Fix:
SearchParticipant [ ] participants = org . eclipse . jdt . core . search . SearchEngine . getAvailableSearchParticipants ( ) ;