Buggy code:
public class IndexManager extends JobManager implements IIndexConstants { public SimpleLookupTable indexLocations = 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 containerPath , Integer newIndexState ) { } public void addBinary ( IFile resource , IPath containerPath ) { } public void addSource ( IFile resource , IPath containerPath , SourceElementParser parser ) { } public void cleanUpIndexes ( ) { } public String computeIndexLocation ( IPath containerPath ) { } public void ensureIndexExists ( String indexLocation , IPath containerPath ) { } public SourceElementParser getSourceElementParser ( IJavaProject project , ISourceElementRequestor requestor ) { Map options = project . getOptions ( true ) ; options . put ( JavaCore . COMPILER_TASK_TAGS , "" ) ; <START_BUG> SourceElementParser parser = new SourceElementParser ( requestor , new DefaultProblemFactory ( Locale . getDefault ( ) ) , new CompilerOptions ( options ) , true , true , false ) ; <END_BUG> parser . reportOnlyOneSyntaxError = true ; parser . javadocParser . checkDocComment = true ; parser . javadocParser . reportProblems = false ; return parser ; } public synchronized Index getIndex ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndex ( IPath containerPath , String indexLocation , boolean reuseExistingFile , boolean createIfMissing ) { } public synchronized Index getIndex ( String indexLocation ) { } public synchronized Index getIndexForUpdate ( IPath containerPath , boolean reuseExistingFile , boolean createIfMissing ) { } private SimpleLookupTable getIndexStates ( ) { } private IPath getJavaPluginWorkingLocation ( ) { } 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 void jobWasCancelled ( IPath containerPath ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public String processName ( ) { } private void rebuildIndex ( String 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 void saveIndex ( Index index ) throws IOException { } public void saveIndexes ( ) { } public void scheduleDocumentIndexing ( final SearchDocument searchDocument , IPath container , final String indexLocation , final SearchParticipant searchParticipant ) { } public String toString ( ) { } private char [ ] readIndexState ( ) { } private synchronized void removeIndexesState ( String [ ] locations ) { } private synchronized void updateIndexState ( String indexLocation , Integer indexState ) { } private void writeSavedIndexNamesFile ( ) { } }

Fix:
SourceElementParser parser = new IndexingParser ( requestor , new DefaultProblemFactory ( Locale . getDefault ( ) ) , new CompilerOptions ( options ) , true , true , false ) ;