Buggy code:
public class SSTableReader extends SSTable implements Comparable < SSTableReader > { private static final Logger logger = LoggerFactory . getLogger ( SSTableReader . class ) ; private static final int INDEX_FILE_BUFFER_BYTES = 16 * ( DatabaseDescriptor . getIndexInterval ( ) ) ; private static final Set < Reference < SSTableReader > > finalizers = new HashSet < Reference < SSTableReader > > ( ) ; private static final ReferenceQueue < SSTableReader > finalizerQueue = new ReferenceQueue < SSTableReader > ( ) { } ; public final long maxDataAge ; private SegmentedFile ifile ; private SegmentedFile dfile ; private IndexSummary indexSummary ; private Filter bf ; private InstrumentedCache < Pair < Descriptor , DecoratedKey > , Long > keyCache ; private BloomFilterTracker bloomFilterTracker = new BloomFilterTracker ( ) ; private volatile SSTableDeletingReference phantomReference ; public static long getApproximateKeyCount ( Iterable < SSTableReader > sstables ) { } public static SSTableReader open ( Descriptor desc ) throws IOException { } public static SSTableReader open ( Descriptor descriptor , Set < Component > components , CFMetaData metadata , IPartitioner partitioner ) throws IOException { } public static SSTableReader open ( Descriptor descriptor , Set < Component > components , Set < DecoratedKey > savedKeys , SSTableTracker tracker , CFMetaData metadata , IPartitioner partitioner ) throws IOException { } static SSTableReader internalOpen ( Descriptor desc , Set < Component > components , CFMetaData metadata , IPartitioner partitioner , SegmentedFile ifile , SegmentedFile dfile , IndexSummary isummary , Filter bf , long maxDataAge , EstimatedHistogram rowsize , EstimatedHistogram columncount ) throws IOException { } private SSTableReader ( Descriptor desc , Set < Component > components , CFMetaData metadata , IPartitioner partitioner , SegmentedFile ifile , SegmentedFile dfile , IndexSummary indexSummary , Filter bloomFilter , long maxDataAge , EstimatedHistogram rowSizes , EstimatedHistogram columnCounts ) throws IOException { } public void setTrackedBy ( SSTableTracker tracker ) { } void loadBloomFilter ( ) throws IOException { DataInputStream stream = null ; try { stream = new DataInputStream ( new BufferedInputStream ( new FileInputStream ( descriptor . filenameFor ( FILTER ) ) ) ) ; if ( descriptor . usesOldBloomFilter ) { <START_BUG> bf = LegacyBloomFilter . serializer ( ) . deserialize ( stream ) ; <END_BUG> } else { bf = BloomFilter . serializer ( ) . deserialize ( stream ) ; } } finally { FileUtils . closeQuietly ( stream ) ; } } private void load ( boolean recreatebloom , Set < DecoratedKey > keysToLoadInCache ) throws IOException { } private KeyPosition getIndexScanPosition ( DecoratedKey decoratedKey ) { } public void forceFilterFailures ( ) { } public Filter getBloomFilter ( ) { } public InstrumentedCache getKeyCache ( ) { } public long estimatedKeys ( ) { } public Collection < DecoratedKey > getKeySamples ( ) { } public List < Pair < Long , Long > > getPositionsForRanges ( Collection < Range > ranges ) { } public void cacheKey ( DecoratedKey key , Long info ) { } public Long getCachedPosition ( DecoratedKey key ) { } private Long getCachedPosition ( Pair < Descriptor , DecoratedKey > unifiedKey ) { } public long getPosition ( DecoratedKey decoratedKey , SSTableReader . Operator op ) { } public long length ( ) { } public void markCompacted ( ) { } public SSTableScanner getScanner ( int bufferSize , QueryFilter filter ) { } public SSTableScanner getDirectScanner ( int bufferSize ) { } public FileDataInput getFileDataInput ( DecoratedKey decoratedKey , int bufferSize ) { } public int compareTo ( SSTableReader o ) { } public AbstractType getColumnComparator ( ) { } public ColumnFamily createColumnFamily ( ) { } public ICompactSerializer2 < IColumn > getColumnSerializer ( ) { } public boolean newSince ( long age ) { } public static long readRowSize ( DataInput in , Descriptor d ) throws IOException { } public void createLinks ( String snapshotDirectoryPath ) throws IOException { } public static DecoratedKey decodeKey ( IPartitioner p , Descriptor d , ByteBuffer bytes ) { } public abstract static class Operator { public static final SSTableReader . Operator EQ = new SSTableReader . Operator . Equals ( ) ; public static final SSTableReader . Operator GE = new SSTableReader . Operator . GreaterThanOrEqualTo ( ) ; public static final SSTableReader . Operator GT = new SSTableReader . Operator . GreaterThan ( ) ; public abstract int apply ( int comparison ) { } static final class Equals extends SSTableReader . Operator { public int apply ( int comparison ) { } } static final class GreaterThanOrEqualTo extends SSTableReader . Operator { public int apply ( int comparison ) { } } static final class GreaterThan extends SSTableReader . Operator { public int apply ( int comparison ) { } } } public long getBloomFilterFalsePositiveCount ( ) { } public long getRecentBloomFilterFalsePositiveCount ( ) { } public long getBloomFilterTruePositiveCount ( ) { } public long getRecentBloomFilterTruePositiveCount ( ) { } }

Fix:
bf = LegacyBloomFilter . serializer ( ) . deserialize ( stream , 0 ) ;