Buggy code:
public void add ( String cf , int id ) { } public void add ( String cf , int id , String type ) { } public boolean isEmpty ( ) { } int getColumnFamilyId ( String columnFamily ) { } public static String getColumnFamilyName ( int id ) { } String getColumnFamilyType ( String cfName ) { } Set < String > getColumnFamilies ( ) { } int size ( ) { } boolean isValidColumnFamily ( String cfName ) { } public String toString ( ) { } public static int getColumnFamilyCount ( ) { } } public static class BootstrapCompletionHandler implements IStreamComplete { public void onStreamCompletion ( String host , StreamContextManager . StreamContext streamContext , StreamContextManager . StreamStatus streamStatus ) throws IOException { } } public static class BootStrapInitiateVerbHandler implements IVerbHandler { public void doVerb ( Message message ) { } private Map < String , String > getNewNames ( StreamContextManager [ ] streamContexts ) throws IOException { } private void addStreamContext ( String host , StreamContextManager . StreamContext streamContext , StreamContextManager . StreamStatus streamStatus ) { } } private static Lock createLock_ = new ReentrantLock ( ) ; private static Map < String , Table > instances_ = new HashMap < String , Table > ( ) ; private String table_ ; private Table . TableMetadata tableMetadata_ ; private Map < String , ColumnFamilyStore > columnFamilyStores_ = new HashMap < String , ColumnFamilyStore > ( ) ; private DBAnalyticsSource dbAnalyticsSource_ ; private SortedSet < String > applicationColumnFamilies_ ; public static Table open ( String table ) throws IOException { } public Set < String > getColumnFamilies ( ) { } Map < String , ColumnFamilyStore > getColumnFamilyStores ( ) { } public ColumnFamilyStore getColumnFamilyStore ( String cfName ) { } public String tableStats ( String newLineSeparator , DecimalFormat df ) { } public void onStart ( ) throws IOException { } public void forceCleanup ( ) { } public void clearSnapshot ( ) { } public boolean forceCompaction ( List < Range > ranges , EndPoint target , List < String > fileList ) { } public void forceCompaction ( ) { } public List < SSTableReader > getAllSSTablesOnDisk ( ) { } private Table ( String table ) throws IOException { } boolean isApplicationColumnFamily ( String columnFamily ) { } int getColumnFamilyId ( String columnFamily ) { } boolean isValidColumnFamily ( String columnFamily ) { } @ Deprecated public Row get ( String key ) throws IOException { } @ Deprecated public ColumnFamily get ( String key , String cfName ) throws IOException { } @ Deprecated public Row getRow ( String key , String cfName ) throws IOException { } public Row getRow ( QueryFilter filter ) throws IOException { } void apply ( Row row ) throws IOException { } void applyNow ( Row row ) throws IOException { } public void flush ( boolean fRecovery ) throws IOException { } void load ( Row row ) throws IOException { } public SortedSet < String > getApplicationColumnFamilies ( ) { } public List < String > getKeyRange ( String columnFamily , final String startWith , final String stopAt , int maxResults ) throws IOException , InterruptedException , ExecutionException { } private List < String > getKeyRangeUnsafe ( final String cfName , final String startWith , final String stopAt , int maxResults ) throws IOException , InterruptedException , ExecutionException { final Comparator < String > comparator = StorageService . getPartitioner ( ) . getDecoratedKeyComparator ( ) ; List < Iterator < String > > iterators = new ArrayList < Iterator < String > > ( ) ; ColumnFamilyStore cfs = getColumnFamilyStore ( cfName ) ; Predicate p = new Predicate ( ) { public boolean evaluate ( Object key ) { String st = ( ( String ) ( key ) ) ; return ( ( comparator . compare ( startWith , st ) ) <= 0 ) && ( ( stopAt . isEmpty ( ) ) || ( ( comparator . compare ( st , stopAt ) ) <= 0 ) ) ; } } ; iterators . add ( IteratorUtils . filteredIterator ( cfs . memtableKeyIterator ( ) , p ) ) ; for ( Memtable memtable : ColumnFamilyStore . getUnflushedMemtables ( cfName ) ) { iterators . add ( IteratorUtils . filteredIterator ( Memtable . getKeyIterator ( memtable . getKeys ( ) ) , p ) ) ; } for ( SSTableReader sstable : cfs . getSSTables ( ) ) { FileStruct fs = sstable . getFileStruct ( ) ; fs . seekTo ( startWith ) ; iterators . add ( fs ) ; } Iterator < String > collated = IteratorUtils . collatedIterator ( comparator , iterators ) ; Iterable < String > reduced = new ReducingIterator < String > ( collated ) { String current ; public void reduce ( String current ) { this . current = current ; } protected String getReduced ( ) { return current ; } } ; try { List < String > keys = new ArrayList < String > ( ) ; for ( String current : reduced ) { if ( ( ! ( stopAt . isEmpty ( ) ) ) && ( ( comparator . compare ( stopAt , current ) ) < 0 ) ) { break ; } <START_BUG> if ( ( ColumnFamilyStore . removeDeleted ( cfs . getColumnFamily ( new SliceQueryFilter ( current , new QueryPath ( cfName ) , "" , "" , true , 1 ) ) , Integer . MAX_VALUE ) ) != null ) { <END_BUG> keys . add ( current ) ; } if ( ( keys . size ( ) ) >= maxResults ) { break ; } } return keys ; } finally { for ( Iterator iter : iterators ) { if ( iter instanceof FileStruct ) { ( ( FileStruct ) ( iter ) ) . close ( ) ; } } } } }

Fix:
if ( ( cfs . getColumnFamily ( new SliceQueryFilter ( current , new QueryPath ( cfName ) , "" , "" , true , 1 ) , Integer . MAX_VALUE ) ) != null ) {