Buggy code:
@ Deprecated class Lucene3xTermVectorsReader extends TermVectorsReader { static final int FORMAT_UTF8_LENGTH_IN_BYTES = 4 ; public static final int FORMAT_CURRENT = Lucene3xTermVectorsReader . FORMAT_UTF8_LENGTH_IN_BYTES ; public static final int FORMAT_MINIMUM = Lucene3xTermVectorsReader . FORMAT_UTF8_LENGTH_IN_BYTES ; static final int FORMAT_SIZE = 4 ; public static final byte STORE_POSITIONS_WITH_TERMVECTOR = 1 ; public static final byte STORE_OFFSET_WITH_TERMVECTOR = 2 ; public static final String VECTORS_FIELDS_EXTENSION = "tvf" ; public static final String VECTORS_DOCUMENTS_EXTENSION = "tvd" ; public static final String VECTORS_INDEX_EXTENSION = "tvx" ; private FieldInfos fieldInfos ; private IndexInput tvx ; private IndexInput tvd ; private IndexInput tvf ; private int size ; private int numTotalDocs ; private int docStoreOffset ; private final CompoundFileDirectory storeCFSReader ; private final int format ; Lucene3xTermVectorsReader ( FieldInfos fieldInfos , IndexInput tvx , IndexInput tvd , IndexInput tvf , int size , int numTotalDocs , int docStoreOffset , int format ) { } public Lucene3xTermVectorsReader ( Directory d , SegmentInfo si , FieldInfos fieldInfos , IOContext context ) throws IOException , CorruptIndexException { } void seekTvx ( final int docNum ) throws IOException { } private int checkValidFormat ( IndexInput in ) throws IOException , CorruptIndexException { } public void close ( ) throws IOException { } int size ( ) { } private class TVFields extends Fields { private final int [ ] fieldNumbers ; private final long [ ] fieldFPs ; private final Map < Integer , Integer > fieldNumberToIndex = new HashMap < Integer , Integer > ( ) ; public TVFields ( int docID ) throws IOException { } @ Override public FieldsEnum iterator ( ) throws IOException { } @ Override public Terms terms ( String field ) throws IOException { } @ Override public int size ( ) { } } private class TVTerms extends Terms { private final int numTerms ; private final long tvfFPStart ; private final boolean unicodeSortOrder ; public TVTerms ( long tvfFP ) throws IOException { } @ Override public TermsEnum iterator ( TermsEnum reuse ) throws IOException { } @ Override public long size ( ) { } @ Override public long getSumTotalTermFreq ( ) { } @ Override public long getSumDocFreq ( ) { } @ Override public int getDocCount ( ) { } @ Override public Comparator < BytesRef > getComparator ( ) { } } static class TermAndPostings { BytesRef term ; int freq ; int [ ] positions ; int [ ] startOffsets ; int [ ] endOffsets ; } private class TVTermsEnum extends TermsEnum { private boolean unicodeSortOrder ; private final IndexInput origTVF ; private final IndexInput tvf ; private int numTerms ; private int currentTerm ; private boolean storePositions ; private boolean storeOffsets ; private Lucene3xTermVectorsReader . TermAndPostings [ ] termAndPostings ; public TVTermsEnum ( ) throws IOException { } public boolean canReuse ( IndexInput tvf ) { } public void reset ( int numTerms , long tvfFPStart , boolean unicodeSortOrder ) throws IOException { } private void readVectors ( ) throws IOException { } @ Override public SeekStatus seekCeil ( BytesRef text , boolean useCache ) throws IOException { } @ Override public void seekExact ( long ord ) { } @ Override public BytesRef next ( ) throws IOException { } @ Override public BytesRef term ( ) { } @ Override public long ord ( ) { } @ Override public int docFreq ( ) { } @ Override public long totalTermFreq ( ) { } @ Override <START_BUG> public DocsEnum docs ( Bits liveDocs , DocsEnum reuse , int flags ) throws IOException { <END_BUG> Lucene3xTermVectorsReader . TVDocsEnum docsEnum ; if ( ( reuse != null ) && ( reuse instanceof Lucene3xTermVectorsReader . TVDocsEnum ) ) { docsEnum = ( ( Lucene3xTermVectorsReader . TVDocsEnum ) ( reuse ) ) ; } else { docsEnum = new Lucene3xTermVectorsReader . TVDocsEnum ( ) ; } docsEnum . reset ( liveDocs , termAndPostings [ currentTerm ] ) ; return docsEnum ; } @ Override public DocsAndPositionsEnum docsAndPositions ( Bits liveDocs , DocsAndPositionsEnum reuse , int flags ) throws IOException { } @ Override public Comparator < BytesRef > getComparator ( ) { } } private static class TVDocsEnum extends DocsEnum { private boolean didNext ; private int doc = - 1 ; private int freq ; private Bits liveDocs ; @ Override public int freq ( ) throws IOException { } @ Override public int docID ( ) { } @ Override public int nextDoc ( ) { } @ Override public int advance ( int target ) { } public void reset ( Bits liveDocs , Lucene3xTermVectorsReader . TermAndPostings termAndPostings ) { } } private static class TVDocsAndPositionsEnum extends DocsAndPositionsEnum { private boolean didNext ; private int doc = - 1 ; private int nextPos ; private Bits liveDocs ; private int [ ] positions ; private int [ ] startOffsets ; private int [ ] endOffsets ; @ Override public int freq ( ) throws IOException { } @ Override public int docID ( ) { } @ Override public int nextDoc ( ) { } @ Override public int advance ( int target ) { } public void reset ( Bits liveDocs , Lucene3xTermVectorsReader . TermAndPostings termAndPostings ) { } @ Override public BytesRef getPayload ( ) { } @ Override public boolean hasPayload ( ) { } @ Override public int nextPosition ( ) { } @ Override public int startOffset ( ) { } @ Override public int endOffset ( ) { } } @ Override public Fields get ( int docID ) throws IOException { } @ Override public TermVectorsReader clone ( ) { } protected boolean sortTermsByUnicode ( ) { } }

Fix:
public DocsEnum docs ( Bits liveDocs , DocsEnum reuse , boolean needsFreqs ) throws IOException {