Buggy code:
public IProgressMonitor progressMonitor ; public IWorkingCopy [ ] workingCopies ; public HandleFactory handleFactory ; public MatchLocatorParser parser ; public INameEnvironment nameEnvironment ; public NameLookup nameLookup ; public LookupEnvironment lookupEnvironment ; public HierarchyResolver hierarchyResolver ; boolean compilationAborted ; public PotentialMatchSet potentialMatches ; public int parseThreshold = - 1 ; public CompilerOptions options ; public CompilationUnitDeclaration [ ] unitsToProcess ; public PotentialMatch [ ] matchesToProcess ; public int totalUnits ; public PotentialMatch currentPotentialMatch ; public long resultCollectorTime = 0 ; 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 ) { } protected void addCompilationUnit ( ICompilationUnit sourceUnit , CompilationUnitDeclaration parsedUnit ) { } void addPotentialMatch ( IResource resource , Openable openable ) { } BinaryTypeBinding cacheBinaryType ( IType type ) throws JavaModelException { } public ClassFileReader classFileReader ( IType type ) { } protected void createAndResolveBindings ( PotentialMatch [ ] potentialMatches , int start , int length ) { } public IField createFieldHandle ( FieldDeclaration field , IType type ) { } protected boolean createHierarchyResolver ( PotentialMatch [ ] potentialMatches ) { } public IJavaElement createImportHandle ( ImportReference importRef ) { } public IInitializer createInitializerHandle ( TypeDeclaration typeDecl , FieldDeclaration initializer , IType type ) { } public IMethod createMethodHandle ( AbstractMethodDeclaration method , IType type ) { } public IType createTypeHandle ( char [ ] simpleTypeName ) { } public IType createTypeHandle ( IType parent , char [ ] simpleTypeName ) { } protected Openable getCurrentOpenable ( ) { } protected IResource getCurrentResource ( ) { } protected IType getFocusType ( ) { } public IBinaryType getBinaryInfo ( ClassFile classFile , IResource resource ) throws CoreException { } protected void getMethodBodies ( CompilationUnitDeclaration unit , int place ) { } public void initialize ( JavaProject project ) throws JavaModelException { } public void initialize ( JavaProject project , PotentialMatch [ ] potentialMatches ) throws JavaModelException { } public boolean hasAlreadyDefinedType ( CompilationUnitDeclaration parsedUnit ) { } private void locateMatches ( JavaProject javaProject ) throws JavaModelException { } private void locateMatches ( JavaProject javaProject , PotentialMatch [ ] potentialMatches , int start , int length ) 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 process ( CompilationUnitDeclaration unit , int i ) throws CoreException { MatchingNodeSet matchingNodeSet = null ; try { this . currentPotentialMatch = this . matchesToProcess [ i ] ; if ( ( this . currentPotentialMatch ) == null ) return ; matchingNodeSet = this . currentPotentialMatch . matchingNodeSet ; if ( ( unit == null ) || ( unit . isEmpty ( ) ) ) { if ( ( this . currentPotentialMatch . openable ) instanceof ClassFile ) { this . currentPotentialMatch . locateMatchesInClassFile ( ) ; } return ; } if ( hasAlreadyDefinedType ( unit ) ) { return ; } this . parser . matchSet = this . currentPotentialMatch . matchingNodeSet ; getMethodBodies ( unit , i ) ; matchingNodeSet . cuHasBeenResolved = this . compilationAborted ; matchingNodeSet . reportMatching ( unit ) ; <START_BUG> if ( ( ( ( this . pattern . needsResolve ) || ( matchingNodeSet . needsResolve ( ) ) ) && ( ( unit . types ) != null ) ) && ( ! ( this . compilationAborted ) ) ) { <END_BUG> if ( VERBOSE ) { System . out . println ( ( "Resolving<seq2seq4repair_space>" + ( this . currentPotentialMatch . openable . toStringWithAncestors ( ) ) ) ) ; } if ( ( unit . scope ) != null ) unit . scope . faultInTypes ( ) ; if ( ( unit . scope ) != null ) unit . scope . verifyMethods ( this . lookupEnvironment . methodVerifier ( ) ) ; unit . resolve ( ) ; unit . compilationResult . totalUnitsKnown = totalUnits ; matchingNodeSet . cuHasBeenResolved = true ; matchingNodeSet . reportMatching ( unit ) ; } } catch ( AbortCompilation e ) { if ( matchingNodeSet != null ) { matchingNodeSet . cuHasBeenResolved = true ; matchingNodeSet . reportMatching ( unit ) ; } if ( ! ( e instanceof AbortCompilationUnit ) ) { throw e ; } } finally { this . parser . matchSet = null ; this . currentPotentialMatch = null ; } } 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 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 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 ) { }

Fix:
if ( ( ( this . pattern . needsResolve ) && ( ( unit . types ) != null ) ) && ( ! ( this . compilationAborted ) ) ) {