Buggy code:
public class Memtable implements Comparable < Memtable > , IFlushable { private static final Logger logger = LoggerFactory . getLogger ( Memtable . class ) ; private boolean isFrozen ; private final int THRESHOLD = ( ( DatabaseDescriptor . getMemtableThroughput ( ) ) * 1024 ) * 1024 ; private final int THRESHOLD_COUNT = ( ( int ) ( ( ( DatabaseDescriptor . getMemtableOperations ( ) ) * 1024 ) * 1024 ) ) ; private final AtomicInteger currentThroughput = new AtomicInteger ( 0 ) ; private final AtomicInteger currentOperations = new AtomicInteger ( 0 ) ; private final long creationTime ; private final ConcurrentNavigableMap < DecoratedKey , ColumnFamily > columnFamilies = new ConcurrentSkipListMap < DecoratedKey , ColumnFamily > ( ) ; private final IPartitioner partitioner ; private final ColumnFamilyStore cfs ; public Memtable ( ColumnFamilyStore cfs , IPartitioner partitioner ) { } public int compareTo ( Memtable rhs ) { } public int getCurrentThroughput ( ) { } public int getCurrentOperations ( ) { } boolean isThresholdViolated ( ) { } boolean isFrozen ( ) { } void freeze ( ) { } void put ( DecoratedKey key , ColumnFamily columnFamily ) { } private void resolve ( DecoratedKey key , ColumnFamily cf ) { } public String contents ( ) { } private SSTableReader writeSortedContents ( ) throws IOException { } public void flushAndSignal ( final CountDownLatch latch , ExecutorService sorter , final ExecutorService writer ) { } public String toString ( ) { } public Iterator < Map . Entry < DecoratedKey , ColumnFamily > > getEntryIterator ( DecoratedKey startWith ) { } public boolean isClean ( ) { } public String getTableName ( ) { } public static IColumnIterator getSliceIterator ( final DecoratedKey key , final ColumnFamily cf , SliceQueryFilter filter , AbstractType typeComparator ) { assert cf != null ; final boolean isSuper = cf . isSuper ( ) ; <START_BUG> final Collection < IColumn > filteredColumns = ( filter . reversed ) ? filter . applyPredicate ( cf . getReverseSortedColumns ( ) ) : filter . applyPredicate ( cf . getSortedColumns ( ) ) ; <END_BUG> IColumn startColumn = ( isSuper ) ? new SuperColumn ( filter . start , null , cf . getClockType ( ) , cf . getReconciler ( ) ) : new Column ( filter . start ) ; Comparator < IColumn > comparator = filter . getColumnComparator ( typeComparator ) ; final PeekingIterator < IColumn > filteredIter = Iterators . peekingIterator ( filteredColumns . iterator ( ) ) ; if ( ( ! ( filter . reversed ) ) || ( ( filter . start . length ) != 0 ) ) { while ( ( filteredIter . hasNext ( ) ) && ( ( comparator . compare ( filteredIter . peek ( ) , startColumn ) ) < 0 ) ) { filteredIter . next ( ) ; } } return new AbstractColumnIterator ( ) { public ColumnFamily getColumnFamily ( ) { return cf ; } public DecoratedKey getKey ( ) { return key ; } public boolean hasNext ( ) { return filteredIter . hasNext ( ) ; } public IColumn next ( ) { return filteredIter . next ( ) ; } } ; } public static IColumnIterator getNamesIterator ( final DecoratedKey key , final ColumnFamily cf , final NamesQueryFilter filter ) { } public ColumnFamily getColumnFamily ( DecoratedKey key ) { } void clearUnsafe ( ) { } public boolean isExpired ( ) { } }

Fix:
final Collection < IColumn > filteredColumns = ( filter . reversed ) ? cf . getReverseSortedColumns ( ) : cf . getSortedColumns ( ) ;