Buggy code:
public class SepPostingsReaderImpl extends PostingsReaderBase { final IntIndexInput freqIn ; final IntIndexInput docIn ; final IntIndexInput posIn ; final IndexInput payloadIn ; final IndexInput skipIn ; int skipInterval ; int maxSkipLevels ; int skipMinimum ; public SepPostingsReaderImpl ( Directory dir , SegmentInfo segmentInfo , int readBufferSize , IntStreamFactory 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 SepTermState extends BlockTermState { Index docIndex ; Index posIndex ; Index freqIndex ; 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 SepPostingsReaderImpl . SepTermState termState = ( ( SepPostingsReaderImpl . SepTermState ) ( _termState ) ) ; final boolean isFirstTerm = ( termState . termCount ) == 0 ; termState . docIndex . read ( termState . bytesReader , isFirstTerm ) ; if ( ! ( fieldInfo . omitTermFreqAndPositions ) ) { termState . freqIndex . read ( termState . bytesReader , isFirstTerm ) ; 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 SepPostingsReaderImpl . SepBulkPostingsEnum 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 { } class SepDocsEnum extends DocsEnum { int docFreq ; int doc ; int count ; int freq ; private boolean omitTF ; private boolean storePayloads ; private Bits skipDocs ; private final BlockReader docReader ; private final int [ ] docDeltaBuffer ; private int docDeltaUpto ; private int docDeltaLimit ; private final BlockReader freqReader ; private final int [ ] freqBuffer ; private int freqUpto ; private int freqLimit ; private long skipFP ; private final Index docIndex ; private final Index freqIndex ; private final Index posIndex ; private final IntIndexInput startDocIn ; boolean skipped ; SepSkipListReader skipper ; public SepDocsEnum ( ) throws IOException { } SepPostingsReaderImpl . SepDocsEnum init ( FieldInfo fieldInfo , SepPostingsReaderImpl . SepTermState 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 { } } class SepDocsAndPositionsEnum extends DocsAndPositionsEnum { int docFreq ; int doc ; int count ; int freq ; private boolean storePayloads ; private Bits skipDocs ; private final BlockReader docReader ; private final int [ ] docDeltaBuffer ; private int docDeltaUpto ; private int docDeltaLimit ; private final BlockReader freqReader ; private final int [ ] freqBuffer ; private int freqUpto ; private int freqLimit ; private final BlockReader posReader ; private final int [ ] posBuffer ; private int posUpto ; private int posLimit ; private long skipFP ; private final IndexInput payloadIn ; private final Index docIndex ; private final Index freqIndex ; private final Index posIndex ; private final IntIndexInput startDocIn ; private long payloadFP ; private int pendingPosCount ; private int position ; private int payloadLength ; private long pendingPayloadBytes ; private boolean payloadPending ; private boolean posSeekPending ; boolean skipped ; SepSkipListReader skipper ; public SepDocsAndPositionsEnum ( ) throws IOException { } SepPostingsReaderImpl . SepDocsAndPositionsEnum init ( FieldInfo fieldInfo , SepPostingsReaderImpl . SepTermState 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 { } private int nextPosInt ( ) throws IOException { } private BytesRef payload ; @ Override public BytesRef getPayload ( ) throws IOException { } @ Override public boolean hasPayload ( ) { } } class SepBulkPostingsEnum extends BulkPostingsEnum { private int docFreq ; private final BlockReader docReader ; private final Index docIndex ; private final BlockReader freqReader ; private final Index freqIndex ; private final BlockReader posReader ; private final Index posIndex ; private final boolean storePayloads ; private final boolean omitTF ; private long skipFP ; private final IntIndexInput startDocIn ; private boolean skipped ; private SepSkipListReader skipper ;

Fix:
termState . skipFP = 0 ;