Buggy code:
public abstract class SearchPattern implements IJavaSearchConstants , ISearchPattern , IIndexConstants { protected int matchMode ; protected boolean isCaseSensitive ; public boolean needsResolve = true ; public IJavaElement focus ; public static final int IMPOSSIBLE_MATCH = 0 ; public static final int POSSIBLE_MATCH = 1 ; public static final int ACCURATE_MATCH = 2 ; public static final int INACCURATE_MATCH = 3 ; public static final int COMPILATION_UNIT = 1 ; public static final int CLASS = 2 ; public static final int FIELD = 4 ; public static final int METHOD = 8 ; public SearchPattern ( int matchMode , boolean isCaseSensitive ) { } private static SearchPattern createConstructorPattern ( String patternString , int limitTo , int matchMode , boolean isCaseSensitive ) { } private static SearchPattern createFieldPattern ( String patternString , int limitTo , int matchMode , boolean isCaseSensitive ) { } private static SearchPattern createMethodPattern ( String patternString , int limitTo , int matchMode , boolean isCaseSensitive ) { } private static SearchPattern createPackagePattern ( String patternString , int limitTo , int matchMode , boolean isCaseSensitive ) { } public static SearchPattern createPattern ( String patternString , int searchFor , int limitTo , int matchMode , boolean isCaseSensitive ) { } public static SearchPattern createPattern ( IJavaElement element , int limitTo ) { } private static SearchPattern createTypePattern ( char [ ] simpleName , char [ ] packageName , char [ ] [ ] enclosingTypeNames , int limitTo ) { } private static SearchPattern createTypePattern ( String patternString , int limitTo , int matchMode , boolean isCaseSensitive ) { } protected abstract void decodeIndexEntry ( IEntryResult entryResult ) { } private static char [ ] [ ] enclosingTypeNames ( IType type ) { } public abstract void feedIndexRequestor ( IIndexSearchRequestor requestor , int detailLevel , int [ ] references , IndexInput input , IJavaSearchScope scope ) throws IOException { } public void findIndexMatches ( IIndex index , IIndexSearchRequestor requestor , int detailLevel , IProgressMonitor progressMonitor , IJavaSearchScope scope ) throws IOException { } public void findIndexMatches ( IndexInput input , IIndexSearchRequestor requestor , int detailLevel , IProgressMonitor progressMonitor , IJavaSearchScope scope ) throws IOException { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) throw new OperationCanceledException ( ) ; <START_BUG> IEntryResult [ ] entries = input . queryEntriesPrefixedBy ( indexEntryPrefix ( ) , isCaseSensitive ) ; <END_BUG> if ( entries == null ) return ; for ( int i = 0 , max = entries . length ; i < max ; i ++ ) { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) throw new OperationCanceledException ( ) ; IEntryResult entry = entries [ i ] ; decodeIndexEntry ( entry ) ; if ( matchIndexEntry ( ) ) { feedIndexRequestor ( requestor , detailLevel , entry . getFileReferences ( ) , input , scope ) ; } } } public abstract char [ ] indexEntryPrefix ( ) { } protected void matchCheck ( AstNode node , MatchSet set ) { } protected abstract int matchContainer ( ) { } public boolean matchesBinary ( Object binaryInfo , Object enclosingBinaryInfo ) { } protected boolean matchesName ( char [ ] pattern , char [ ] name ) { } protected boolean matchesType ( char [ ] simpleNamePattern , char [ ] qualificationPattern , char [ ] fullyQualifiedTypeName ) { } protected abstract boolean matchIndexEntry ( ) { } protected void matchReportImportRef ( ImportReference importRef , Binding binding , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected char [ ] toArrayName ( char [ ] simpleName , int dimensions ) { } public String toString ( ) { } public void initializePolymorphicSearch ( MatchLocator locator , IProgressMonitor progressMonitor ) { } public boolean isPolymorphicSearch ( ) { } public abstract int matchLevel ( AstNode node , boolean resolve ) { } public int matchLevel ( Binding binding ) { } protected int matchLevelAsSubtype ( ReferenceBinding type , char [ ] simpleNamePattern , char [ ] qualificationPattern ) { } protected int matchLevelForType ( char [ ] [ ] [ ] declaringTypes , ReferenceBinding receiverType ) { } protected int matchLevelForType ( char [ ] simpleNamePattern , char [ ] qualificationPattern , TypeBinding type ) { } }

Fix:
IEntryResult [ ] entries = input . queryEntriesPrefixedBy ( indexEntryPrefix ( ) ) ;