Buggy code:
public class Memtable implements Comparable < Memtable > { private static Logger logger_ = Logger . getLogger ( Memtable . class ) ; private static Set < ExecutorService > runningExecutorServices_ = new org . cliffc . high_scale_lib . NonBlockingHashSet < ExecutorService > ( ) ; private boolean isFrozen_ ; public static void shutdown ( ) { } private Memtable . MemtableThreadPoolExecutor executor_ ; private int threshold_ = ( ( DatabaseDescriptor . getMemtableSize ( ) ) * 1024 ) * 1024 ; private int thresholdCount_ = ( ( int ) ( ( ( DatabaseDescriptor . getMemtableObjectCount ( ) ) * 1024 ) * 1024 ) ) ; private AtomicInteger currentSize_ = new AtomicInteger ( 0 ) ; private AtomicInteger currentObjectCount_ = new AtomicInteger ( 0 ) ; private String table_ ; private String cfName_ ; private long creationTime_ ; private Map < String , ColumnFamily > columnFamilies_ = new HashMap < String , ColumnFamily > ( ) ; Memtable ( String table , String cfName ) { } class Putter implements Runnable { private String key_ ; private ColumnFamily columnFamily_ ; Putter ( String key , ColumnFamily cf ) { } public void run ( ) { } } class Getter implements Callable < ColumnFamily > { private String key_ ; private String columnFamilyName_ ; private IFilter filter_ ; Getter ( String key , String cfName ) { } Getter ( String key , String cfName , IFilter filter ) { } public ColumnFamily call ( ) { } } public int compareTo ( Memtable rhs ) { } public int getCurrentSize ( ) { } public int getCurrentObjectCount ( ) { } void resolveSize ( int oldSize , int newSize ) { } void resolveCount ( int oldCount , int newCount ) { } boolean isThresholdViolated ( ) { } String getColumnFamily ( ) { } int getPendingTasks ( ) { } private synchronized void enqueueFlush ( CommitLog . CommitLogContext cLogCtx ) { } void put ( String key , ColumnFamily columnFamily , CommitLog . CommitLogContext cLogCtx ) throws IOException { } public void forceflush ( ) { } void flushOnRecovery ( ) throws IOException { } private void resolve ( String key , ColumnFamily columnFamily ) { } void putOnRecovery ( String key , ColumnFamily columnFamily ) { } ColumnFamily getLocalCopy ( String key , String columnFamilyColumn , IFilter filter ) { String [ ] values = RowMutation . getColumnAndColumnFamily ( columnFamilyColumn ) ; ColumnFamily columnFamily = null ; if ( ( values . length ) == 1 ) { columnFamily = columnFamilies_ . get ( key ) ; } else { ColumnFamily cFamily = columnFamilies_ . get ( key ) ; if ( cFamily == null ) return null ; if ( ( values . length ) == 2 ) { IColumn column = cFamily . getColumn ( values [ 1 ] ) ; if ( column != null ) { columnFamily = cFamily . cloneMeShallow ( ) ; columnFamily . addColumn ( column ) ; } } else { assert ( values . length ) == 3 ; SuperColumn superColumn = ( ( SuperColumn ) ( cFamily . getColumn ( values [ 1 ] ) ) ) ; if ( superColumn != null ) { IColumn subColumn = superColumn . getSubColumn ( values [ 2 ] ) ; if ( subColumn != null ) { columnFamily = cFamily . cloneMeShallow ( ) ; SuperColumn container = new SuperColumn ( superColumn . name ( ) ) ; container . markForDeleteAt ( superColumn . getLocalDeletionTime ( ) , superColumn . getMarkedForDeleteAt ( ) ) ; <START_BUG> container . addColumn ( subColumn . name ( ) , subColumn ) ; <END_BUG> columnFamily . addColumn ( container ) ; } } } } return filter . filter ( columnFamilyColumn , columnFamily ) ; } ColumnFamily get ( String key , String cfName , IFilter filter ) { } void flush ( CommitLog . CommitLogContext cLogCtx ) throws IOException { } private class MemtableThreadPoolExecutor extends DebuggableThreadPoolExecutor { FutureTask flushQueuer ; public MemtableThreadPoolExecutor ( ) { } protected void terminated ( ) { } public void flushWhenTerminated ( final CommitLog . CommitLogContext cLogCtx ) { } } public Iterator < String > sortedKeyIterator ( ) { } }

Fix:
container . addColumn ( subColumn ) ;