Buggy code:
public class FixedPostingsReaderImpl extends PostingsReaderBase { final FixedIntBlockIndexInput freqIn ; final FixedIntBlockIndexInput docIn ; final FixedIntBlockIndexInput posIn ; final IndexInput payloadIn ; final IndexInput skipIn ; final int blocksize ; int skipInterval ; int maxSkipLevels ; int skipMinimum ; public FixedPostingsReaderImpl ( Directory dir , SegmentInfo segmentInfo , int readBufferSize , FixedIntStreamFactory intFactory , String codecId ) throws IOException { } public static void files ( SegmentInfo segmentInfo , String codecId , Collection < String > files ) { } @ Override public void init ( IndexInput termsIn ) throws IOException { } @ Override public void close ( ) throws IOException { } private static final class FixedTermState extends BlockTermState { Index docIndex ; Index posIndex ; long payloadFP ; long skipFP ; byte [ ] bytes ; ByteArrayDataInput bytesReader ; @ Override public Object clone ( ) { } @ Override public void copyFrom ( TermState _other ) { } @ Override public String toString ( ) { } } @ Override public BlockTermState newTermState ( ) throws IOException { } @ Override public void readTermsBlock ( IndexInput termsIn , FieldInfo fieldInfo , BlockTermState _termState ) throws IOException { } @ Override public void nextTerm ( FieldInfo fieldInfo , BlockTermState _termState ) throws IOException { final FixedPostingsReaderImpl . FixedTermState termState = ( ( FixedPostingsReaderImpl . FixedTermState ) ( _termState ) ) ; final boolean isFirstTerm = ( termState . termCount ) == 0 ; termState . docIndex . read ( termState . bytesReader , isFirstTerm ) ; if ( ! ( fieldInfo . omitTermFreqAndPositions ) ) { termState . posIndex . read ( termState . bytesReader , isFirstTerm ) ; if ( fieldInfo . storePayloads ) { if ( isFirstTerm ) { termState . payloadFP = termState . bytesReader . readVLong ( ) ; } else { termState . payloadFP += termState . bytesReader . readVLong ( ) ; } } } if ( ( termState . docFreq ) >= ( skipMinimum ) ) { if ( isFirstTerm ) { termState . skipFP = termState . bytesReader . readVLong ( ) ; } else { termState . skipFP += termState . bytesReader . readVLong ( ) ; } } else if ( isFirstTerm ) { <START_BUG> termState . skipFP = termState . bytesReader . readVLong ( ) ; <END_BUG> } } @ Override public DocsEnum docs ( FieldInfo fieldInfo , BlockTermState _termState , Bits skipDocs , DocsEnum reuse ) throws IOException { } private FixedPostingsReaderImpl . FixedBulkPostingsEnum lastBulkEnum ; @ Override public BulkPostingsEnum bulkPostings ( FieldInfo fieldInfo , BlockTermState _termState , BulkPostingsEnum reuse , boolean doFreqs , boolean doPositions ) throws IOException { } public DocsAndPositionsEnum docsAndPositions ( FieldInfo fieldInfo , BlockTermState _termState , Bits skipDocs , DocsAndPositionsEnum reuse ) throws IOException { } final class FixedDocsEnum extends DocsEnum { int docFreq ; int doc ; int count ; private boolean storePayloads ; private Bits skipDocs ; private final Reader docReader ; private final int [ ] docDeltaBuffer ; private int upto ; private long skipFP ; private final Index docIndex ; private final Index posIndex ; private final IntIndexInput startDocIn ; boolean skipped ; FixedSkipListReader skipper ; public FixedDocsEnum ( ) throws IOException { } FixedPostingsReaderImpl . FixedDocsEnum init ( FieldInfo fieldInfo , FixedPostingsReaderImpl . FixedTermState termState , Bits skipDocs ) throws IOException { } public boolean canReuse ( IntIndexInput docsIn ) { } @ Override public int nextDoc ( ) throws IOException { } @ Override public int freq ( ) { } @ Override public int docID ( ) { } @ Override public int advance ( int target ) throws IOException { } } final class FixedDocsAndFreqsEnum extends DocsEnum { int docFreq ; int doc ; int count ; int freq ; private boolean storePayloads ; private Bits skipDocs ; private final Reader docReader ; private final int [ ] docDeltaBuffer ; private final Reader freqReader ; private final int [ ] freqBuffer ; private int upto ; private long skipFP ; private final Index docIndex ; private final Index posIndex ; private final IntIndexInput startDocIn ; boolean skipped ; FixedSkipListReader skipper ; public FixedDocsAndFreqsEnum ( ) throws IOException { } FixedPostingsReaderImpl . FixedDocsAndFreqsEnum init ( FieldInfo fieldInfo , FixedPostingsReaderImpl . FixedTermState termState , Bits skipDocs ) throws IOException { } public boolean canReuse ( IntIndexInput docsIn ) { } @ Override public int nextDoc ( ) throws IOException { } @ Override public int freq ( ) { } @ Override public int docID ( ) { } @ Override public int advance ( int target ) throws IOException { } int scan ( int target ) throws IOException { } } final class FixedDocsAndPositionsEnum extends DocsAndPositionsEnum { int docFreq ; int doc ; int count ; int freq ; private Bits skipDocs ; private final Reader docReader ; private final int [ ] docDeltaBuffer ; private final Reader freqReader ; private final int [ ] freqBuffer ; private int upto ; private final Reader posReader ; private final int [ ] posBuffer ; private int posUpto ; private long skipFP ; private final IndexInput payloadIn ; private final Index docIndex ; private final Index posIndex ; private final IntIndexInput startDocIn ; private long payloadFP ; private int pendingPosCount ; private int position ; private boolean posSeekPending ; boolean skipped ; FixedSkipListReader skipper ; public FixedDocsAndPositionsEnum ( ) throws IOException { } FixedPostingsReaderImpl . FixedDocsAndPositionsEnum init ( FieldInfo fieldInfo , FixedPostingsReaderImpl . FixedTermState termState , Bits skipDocs ) throws IOException { } public boolean canReuse ( IntIndexInput docsIn ) { } @ Override public int nextDoc ( ) throws IOException { } @ Override public int freq ( ) { } @ Override public int docID ( ) { } @ Override public int advance ( int target ) throws IOException { } @ Override public int nextPosition ( ) throws IOException { } @ Override public BytesRef getPayload ( ) throws IOException { } @ Override public boolean hasPayload ( ) { } }

Fix:
termState . skipFP = 0 ;