Buggy code:
class BufferedDeletesStream { private final List < FrozenBufferedDeletes > deletes = new ArrayList < FrozenBufferedDeletes > ( ) ; private long nextGen = 1 ; private Term lastDeleteTerm ; private PrintStream infoStream ; private final AtomicLong bytesUsed = new AtomicLong ( ) ; private final AtomicInteger numTerms = new AtomicInteger ( ) ; private final int messageID ; public BufferedDeletesStream ( int messageID ) { } private synchronized void message ( String message ) { } public synchronized void setInfoStream ( PrintStream infoStream ) { } public synchronized long push ( FrozenBufferedDeletes packet ) { packet . setDelGen ( ( ( nextGen ) ++ ) ) ; assert packet . any ( ) ; assert checkDeleteStats ( ) ; assert ( packet . delGen ( ) ) < ( nextGen ) ; assert ( deletes . isEmpty ( ) ) || ( ( deletes . get ( ( ( deletes . size ( ) ) - 1 ) ) . delGen ( ) ) < ( packet . delGen ( ) ) ) : "Delete<seq2seq4repair_space>packets<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>order" ; deletes . add ( packet ) ; numTerms . addAndGet ( packet . numTermDeletes ) ; bytesUsed . addAndGet ( packet . bytesUsed ) ; if ( ( infoStream ) != null ) { <START_BUG> message ( ( ( ( ( ( "push<seq2seq4repair_space>deletes<seq2seq4repair_space>" + packet ) + "<seq2seq4repair_space>delGen=" ) + ( packet . delGen ( ) ) ) + "<seq2seq4repair_space>packetCount=" ) + ( deletes . size ( ) ) ) ) ; <END_BUG> } assert checkDeleteStats ( ) ; return packet . delGen ( ) ; } public synchronized void clear ( ) { } public boolean any ( ) { } public int numTerms ( ) { } public long bytesUsed ( ) { } public static class ApplyDeletesResult { public final boolean anyDeletes ; public final long gen ; public final List < SegmentInfo > allDeleted ; ApplyDeletesResult ( boolean anyDeletes , long gen , List < SegmentInfo > allDeleted ) { } } private static final Comparator < SegmentInfo > sortSegInfoByDelGen = new Comparator < SegmentInfo > ( ) { @ Override public int compare ( SegmentInfo si1 , SegmentInfo si2 ) { } } ; public synchronized BufferedDeletesStream . ApplyDeletesResult applyDeletes ( IndexWriter . ReaderPool readerPool , List < SegmentInfo > infos ) throws IOException { } synchronized long getNextGen ( ) { } public synchronized void prune ( SegmentInfos segmentInfos ) { } private synchronized void prune ( int count ) { } private synchronized long applyTermDeletes ( Iterable < Term > termsIter , SegmentReader reader ) throws IOException { } public static class QueryAndLimit { public final Query query ; public final int limit ; public QueryAndLimit ( Query query , int limit ) { } } private synchronized long applyQueryDeletes ( Iterable < BufferedDeletesStream . QueryAndLimit > queriesIter , SegmentReader reader ) throws IOException { } private boolean checkDeleteTerm ( Term term ) { } private boolean checkDeleteStats ( ) { } }

Fix:
message ( ( ( ( ( ( ( ( "push<seq2seq4repair_space>deletes<seq2seq4repair_space>" + packet ) + "<seq2seq4repair_space>delGen=" ) + ( packet . delGen ( ) ) ) + "<seq2seq4repair_space>packetCount=" ) + ( deletes . size ( ) ) ) + "<seq2seq4repair_space>totBytesUsed=" ) + ( bytesUsed . get ( ) ) ) ) ;