Buggy code:
public class MatchLocator implements ITypeRequestor { public SearchPattern pattern ; public int detailLevel ; public IJavaSearchResultCollector collector ; public IJavaSearchScope scope ; public MatchLocatorParser parser ; public INameEnvironment nameEnvironment ; public NameLookup nameLookup ; public LookupEnvironment lookupEnvironment ; public HashtableOfObject parsedUnits ; public MatchingOpenableSet matchingOpenables ; private MatchingOpenable currentMatchingOpenable ; public HandleFactory handleFactory ; public IWorkingCopy [ ] workingCopies ; public HierarchyResolver hierarchyResolver ; public IProgressMonitor progressMonitor ; static final char [ ] EMPTY_FILE_NAME = CharOperation . NO_CHAR ; boolean compilationAborted ; public MatchLocator ( SearchPattern pattern , int detailLevel , IJavaSearchResultCollector collector , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { } public void accept ( IBinaryType binaryType , PackageBinding packageBinding ) { } public void accept ( ICompilationUnit sourceUnit ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { } public IField createFieldHandle ( FieldDeclaration field , IType type ) { } public IJavaElement createImportHandle ( ImportReference importRef ) { } public IInitializer createInitializerHandle ( TypeDeclaration typeDecl , FieldDeclaration initializer , IType type ) { } public IMethod createMethodHandle ( AbstractMethodDeclaration method , IType type ) { } private ClassFileReader classFileReader ( IType type ) { } public IType createTypeHandle ( char [ ] simpleTypeName ) { } public IType createTypeHandle ( IType parent , char [ ] simpleTypeName ) { } protected IResource getCurrentResource ( ) { } protected Scanner getScanner ( ) { } public void initialize ( JavaProject project ) throws JavaModelException { CompilerOptions options = new CompilerOptions ( project . getOptions ( true ) ) ; ProblemReporter problemReporter = new ProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , options , new DefaultProblemFactory ( ) ) ; this . lookupEnvironment = new LookupEnvironment ( this , options , problemReporter , this . nameEnvironment ) ; <START_BUG> this . parser = new MatchLocatorParser ( problemReporter , ( ( options . sourceLevel ) >= ( JDK1_4 ) ) ) ; <END_BUG> MatchingOpenable [ ] openables = this . matchingOpenables . getMatchingOpenables ( project . getPackageFragmentRoots ( ) ) ; for ( int i = 0 , length = openables . length ; i < length ; i ++ ) { MatchingOpenable matchingOpenable = openables [ i ] ; matchingOpenable . reset ( ) ; } this . parsedUnits = new HashtableOfObject ( 10 ) ; this . nameLookup = project . getNameLookup ( ) ; } public void initializeNameEnvironment ( JavaProject project ) throws JavaModelException { } public void locateMatches ( String [ ] filePaths , IWorkspace workspace , IWorkingCopy [ ] workingCopies ) throws JavaModelException { } public void locatePackageDeclarations ( IWorkspace workspace ) throws JavaModelException { } private void locatePackageDeclarations ( SearchPattern searchPattern , IWorkspace workspace ) throws JavaModelException { } public IType lookupType ( TypeBinding typeBinding ) { } public void report ( int sourceStart , int sourceEnd , IJavaElement element , int accuracy ) throws CoreException { } public void report ( IResource resource , int sourceStart , int sourceEnd , IJavaElement element , int accuracy ) throws CoreException { } public void reportBinaryMatch ( IMember binaryMember , IBinaryType info , int accuracy ) throws CoreException , JavaModelException { } public void reportBinaryMatch ( IResource resource , IMember binaryMember , IBinaryType info , int accuracy ) throws CoreException , JavaModelException { } public void reportFieldDeclaration ( FieldDeclaration fieldDeclaration , IJavaElement parent , int accuracy ) throws CoreException { } public void reportImport ( ImportReference reference , int accuracy ) throws CoreException { } public void reportMethodDeclaration ( AbstractMethodDeclaration methodDeclaration , IJavaElement parent , int accuracy ) throws CoreException { } public void reportPackageDeclaration ( ImportReference node ) { } public void reportPackageReference ( ImportReference node ) { } public void reportAccurateReference ( int sourceStart , int sourceEnd , char [ ] [ ] qualifiedName , IJavaElement element , int accuracy ) throws CoreException { } public void reportAccurateReference ( int sourceStart , int sourceEnd , char [ ] [ ] tokens , IJavaElement element , int [ ] accuracies ) throws CoreException { } public void reportReference ( AstNode reference , AbstractMethodDeclaration methodDeclaration , IJavaElement parent , int accuracy ) throws CoreException { } public void reportReference ( AstNode reference , TypeDeclaration typeDeclaration , FieldDeclaration fieldDeclaration , IJavaElement parent , int accuracy ) throws CoreException { } public void reportSuperTypeReference ( TypeReference typeRef , IJavaElement type , int accuracy ) throws CoreException { } public void reportTypeDeclaration ( TypeDeclaration typeDeclaration , IJavaElement parent , int accuracy ) throws CoreException { } void addMatchingOpenable ( IResource resource , Openable openable , CompilationUnitDeclaration parsedUnit , MatchSet matchSet ) { } BinaryTypeBinding cacheBinaryType ( IType type ) throws JavaModelException { } private INameEnvironment getNameEnvironment ( JavaProject project ) throws JavaModelException { } public CompilationUnitDeclaration dietParse ( final char [ ] source ) { } public char [ ] findSource ( ClassFile classFile ) { } public IBinaryType getBinaryInfo ( ClassFile classFile , IResource resource ) throws CoreException { } protected Openable getCurrentOpenable ( ) { } private void locateMatches ( JavaProject javaProject ) throws JavaModelException { } void createAndResolveBindings ( MatchingOpenable [ ] openables ) { } }

Fix:
this . parser = new MatchLocatorParser ( problemReporter , options . sourceLevel ) ;