Buggy code:
public void addIndexes ( Directory ... dirs ) throws IOException { } public void addIndexes ( IndexReader ... readers ) throws IOException { } private SegmentInfoPerCommit copySegmentAsIs ( SegmentInfoPerCommit info , String segName , Map < String , String > dsNames , Set < String > dsFilesCopied , IOContext context , Set < String > copiedFiles ) throws IOException { } protected void doAfterFlush ( ) throws IOException { } protected void doBeforeFlush ( ) throws IOException { } public final void prepareCommit ( ) throws IOException { } public final void prepareCommit ( Map < String , String > commitUserData ) throws IOException { } private final Object commitLock = new Object ( ) ; public final void commit ( ) throws IOException { } public final void commit ( Map < String , String > commitUserData ) throws IOException { } private final void commitInternal ( Map < String , String > commitUserData ) throws IOException { } private final synchronized void finishCommit ( ) throws IOException { } private final Object fullFlushLock = new Object ( ) ; protected final void flush ( boolean triggerMerge , boolean applyAllDeletes ) throws IOException { } private boolean doFlush ( boolean applyAllDeletes ) throws IOException { } final synchronized void maybeApplyDeletes ( boolean applyAllDeletes ) throws IOException { } final synchronized void applyAllDeletes ( ) throws IOException { } public final long ramSizeInBytes ( ) { } DocumentsWriter getDocsWriter ( ) { } public final synchronized int numRamDocs ( ) { } private synchronized void ensureValidMerge ( MergePolicy . OneMerge merge ) { } private synchronized ReadersAndLiveDocs commitMergedDeletes ( MergePolicy . OneMerge merge ) throws IOException { } private synchronized boolean commitMerge ( MergePolicy . OneMerge merge ) throws IOException { assert testPoint ( "startCommitMerge" ) ; if ( hitOOM ) { throw new IllegalStateException ( "this<seq2seq4repair_space>writer<seq2seq4repair_space>hit<seq2seq4repair_space>an<seq2seq4repair_space>OutOfMemoryError;<seq2seq4repair_space>cannot<seq2seq4repair_space>complete<seq2seq4repair_space>merge" ) ; } if ( infoStream . isEnabled ( "IW" ) ) { infoStream . message ( "IW" , ( ( ( "commitMerge:<seq2seq4repair_space>" + ( segString ( merge . segments ) ) ) + "<seq2seq4repair_space>index=" ) + ( segString ( ) ) ) ) ; } assert merge . registerDone ; if ( merge . isAborted ( ) ) { if ( infoStream . isEnabled ( "IW" ) ) { infoStream . message ( "IW" , "commitMerge:<seq2seq4repair_space>skip:<seq2seq4repair_space>it<seq2seq4repair_space>was<seq2seq4repair_space>aborted" ) ; } return false ; } final ReadersAndLiveDocs mergedDeletes = ( ( merge . info . info . getDocCount ( ) ) == 0 ) ? null : commitMergedDeletes ( merge ) ; assert ( mergedDeletes == null ) || ( ( mergedDeletes . getPendingDeleteCount ( ) ) != 0 ) ; assert ! ( segmentInfos . contains ( merge . info ) ) ; final boolean allDeleted = ( ( ( merge . segments . size ( ) ) == 0 ) || ( ( merge . info . info . getDocCount ( ) ) == 0 ) ) || ( ( mergedDeletes != null ) && ( ( mergedDeletes . getPendingDeleteCount ( ) ) == ( merge . info . info . getDocCount ( ) ) ) ) ; if ( infoStream . isEnabled ( "IW" ) ) { if ( allDeleted ) { infoStream . message ( "IW" , ( ( ( "merged<seq2seq4repair_space>segment<seq2seq4repair_space>" + ( merge . info ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>100%<seq2seq4repair_space>deleted" ) + ( keepFullyDeletedSegments ? "" : ";<seq2seq4repair_space>skipping<seq2seq4repair_space>insert" ) ) ) ; } } final boolean dropSegment = allDeleted && ( ! ( keepFullyDeletedSegments ) ) ; assert ( ( merge . segments . size ( ) ) > 0 ) || dropSegment ; assert ( ( ( merge . info . info . getDocCount ( ) ) != 0 ) || ( keepFullyDeletedSegments ) ) || dropSegment ; segmentInfos . applyMergeChanges ( merge , dropSegment ) ; if ( mergedDeletes != null ) { if ( dropSegment ) { mergedDeletes . dropChanges ( ) ; } readerPool . release ( mergedDeletes ) ; if ( dropSegment ) { readerPool . drop ( mergedDeletes . info ) ; } } closeMergeReaders ( merge , false ) ; checkpoint ( ) ; if ( infoStream . isEnabled ( "IW" ) ) { <START_BUG> infoStream . message ( "IW" , ( "after<seq2seq4repair_space>commit:<seq2seq4repair_space>" + ( segString ( ) ) ) ) ; <END_BUG> } if ( ( ( merge . maxNumSegments ) != ( - 1 ) ) && ( ! dropSegment ) ) { if ( ! ( segmentsToMerge . containsKey ( merge . info ) ) ) { segmentsToMerge . put ( merge . info , Boolean . FALSE ) ; } } return true ; } private final void handleMergeException ( Throwable t , MergePolicy . OneMerge merge ) throws IOException { } public void merge ( MergePolicy . OneMerge merge ) throws IOException { } void mergeSuccess ( MergePolicy . OneMerge merge ) { } final synchronized boolean registerMerge ( MergePolicy . OneMerge merge ) throws IOException { } final synchronized void mergeInit ( MergePolicy . OneMerge merge ) throws IOException { } private synchronized void _mergeInit ( MergePolicy . OneMerge merge ) throws IOException { } static void setDiagnostics ( SegmentInfo info , String source ) { } private static void setDiagnostics ( SegmentInfo info , String source , Map < String , String > details ) { } final synchronized void mergeFinish ( MergePolicy . OneMerge merge ) { } private final synchronized void closeMergeReaders ( MergePolicy . OneMerge merge , boolean suppressExceptions ) throws IOException { } private int mergeMiddle ( MergePolicy . OneMerge merge ) throws IOException { } synchronized void addMergeException ( MergePolicy . OneMerge merge ) { } final int getBufferedDeleteTermsSize ( ) { } final int getNumBufferedDeleteTerms ( ) { } synchronized SegmentInfoPerCommit newestSegment ( ) { } public synchronized String segString ( ) { } public synchronized String segString ( Iterable < SegmentInfoPerCommit > infos ) { } public synchronized String segString ( SegmentInfoPerCommit info ) { } private synchronized void doWait ( ) { } private boolean keepFullyDeletedSegments ;

Fix:
infoStream . message ( "IW" , ( "after<seq2seq4repair_space>commitMerge:<seq2seq4repair_space>" + ( segString ( ) ) ) ) ;