Buggy code:
public class DiskIndex { String fileName ; private int headerInfoOffset ; private int numberOfChunks ; private int sizeOfLastChunk ; private int [ ] chunkOffsets ; private int documentReferenceSize ; private int startOfCategoryTables ; private HashtableOfIntValues categoryOffsets ; private int cacheUserCount ; private String [ ] [ ] cachedChunks ; private HashtableOfObject categoryTables ; private char [ ] cachedCategoryName ; public static final String SIGNATURE = "INDEX<seq2seq4repair_space>VERSION<seq2seq4repair_space>1.106" ; public static boolean DEBUG = false ; private static final int RE_INDEXED = - 1 ; private static final int DELETED = - 2 ; private static final int CHUNK_SIZE = 100 ; class IntList { int size ; int [ ] elements ; IntList ( int [ ] elements ) { } void add ( int newElement ) { } int [ ] asArray ( ) { } } DiskIndex ( String fileName ) { } SimpleSet addDocumentNames ( String substring , MemoryIndex memoryIndex ) throws IOException { } private HashtableOfObject addQueryResult ( HashtableOfObject results , char [ ] word , HashtableOfObject wordsToDocNumbers , MemoryIndex memoryIndex ) throws IOException { } HashtableOfObject addQueryResults ( char [ ] [ ] categories , char [ ] key , int matchRule , MemoryIndex memoryIndex ) throws IOException { if ( ( this . categoryOffsets ) == null ) return null ; HashtableOfObject results = null ; if ( key == null ) { for ( int i = 0 , l = categories . length ; i < l ; i ++ ) { HashtableOfObject wordsToDocNumbers = readCategoryTable ( categories [ i ] , true ) ; if ( wordsToDocNumbers != null ) { char [ ] [ ] words = wordsToDocNumbers . keyTable ; if ( results == null ) results = new HashtableOfObject ( wordsToDocNumbers . elementSize ) ; for ( int j = 0 , m = words . length ; j < m ; j ++ ) if ( ( words [ j ] ) != null ) results = addQueryResult ( results , words [ j ] , wordsToDocNumbers , memoryIndex ) ; } } if ( ( results != null ) && ( ( this . cachedChunks ) == null ) ) cacheDocumentNames ( ) ; } else <START_BUG> if ( matchRule == ( ( SearchPattern . R_EXACT_MATCH ) + ( SearchPattern . R_CASE_SENSITIVE ) ) ) { <END_BUG> for ( int i = 0 , l = categories . length ; i < l ; i ++ ) { HashtableOfObject wordsToDocNumbers = readCategoryTable ( categories [ i ] , false ) ; if ( ( wordsToDocNumbers != null ) && ( wordsToDocNumbers . containsKey ( key ) ) ) results = addQueryResult ( results , key , wordsToDocNumbers , memoryIndex ) ; } } else { for ( int i = 0 , l = categories . length ; i < l ; i ++ ) { HashtableOfObject wordsToDocNumbers = readCategoryTable ( categories [ i ] , false ) ; if ( wordsToDocNumbers != null ) { char [ ] [ ] words = wordsToDocNumbers . keyTable ; for ( int j = 0 , m = words . length ; j < m ; j ++ ) { char [ ] word = words [ j ] ; if ( ( word != null ) && ( Index . isMatch ( key , word , matchRule ) ) ) results = addQueryResult ( results , word , wordsToDocNumbers , memoryIndex ) ; } } } } if ( results == null ) return null ; return results ; } private void cacheDocumentNames ( ) throws IOException { } private String [ ] computeDocumentNames ( String [ ] onDiskNames , int [ ] positions , SimpleLookupTable indexedDocuments , MemoryIndex memoryIndex ) { } private void copyQueryResults ( HashtableOfObject categoryToWords , int newPosition ) { } File getIndexFile ( ) { } void initialize ( boolean reuseExistingFile ) throws IOException { } private void initializeFrom ( DiskIndex diskIndex , File newIndexFile ) throws IOException { } private void mergeCategories ( DiskIndex onDisk , int [ ] positions , DataOutputStream stream ) throws IOException { } private void mergeCategory ( char [ ] categoryName , DiskIndex onDisk , int [ ] positions , DataOutputStream stream ) throws IOException { } DiskIndex mergeWith ( MemoryIndex memoryIndex ) throws IOException { } private synchronized String [ ] readAllDocumentNames ( ) throws IOException { } private synchronized HashtableOfObject readCategoryTable ( char [ ] categoryName , boolean readDocNumbers ) throws IOException { } private void readChunk ( String [ ] docNames , DataInputStream stream , int index , int size ) throws IOException { } private int [ ] readDocumentArray ( DataInputStream stream , int arraySize ) throws IOException { } synchronized String readDocumentName ( int docNumber ) throws IOException { } synchronized int [ ] readDocumentNumbers ( Object arrayOffset ) throws IOException { } private void readHeaderInfo ( RandomAccessFile file ) throws IOException { } synchronized void startQuery ( ) { } synchronized void stopQuery ( ) { } private void writeAllDocumentNames ( String [ ] sortedDocNames , DataOutputStream stream ) throws IOException { } private void writeCategories ( DataOutputStream stream ) throws IOException { } private void writeCategoryTable ( char [ ] categoryName , HashtableOfObject wordsToDocs , DataOutputStream stream ) throws IOException { } private void writeDocumentNumbers ( int [ ] documentNumbers , DataOutputStream stream ) throws IOException { } private void writeHeaderInfo ( DataOutputStream stream ) throws IOException { } private void writeOffsetToHeader ( int offsetToHeader ) throws IOException { } }

Fix:
if ( matchRule == ( ( SearchPattern . R_EXACT_MATCH ) | ( SearchPattern . R_CASE_SENSITIVE ) ) ) {