Buggy code:
public class ColumnFamilyStore implements ColumnFamilyStoreMBean { private static int threshHold_ = 4 ; private static final int bufSize_ = ( 128 * 1024 ) * 1024 ; private static int compactionMemoryThreshold_ = 1 << 30 ; private static Logger logger_ = Logger . getLogger ( ColumnFamilyStore . class ) ; private final String table_ ; public final String columnFamily_ ; private final boolean isSuper_ ; private volatile Integer memtableSwitchCount = 0 ; private AtomicInteger fileIndexGenerator_ = new AtomicInteger ( 0 ) ; private AtomicReference < Memtable > memtable_ ; private AtomicReference < BinaryMemtable > binaryMemtable_ ; private Set < String > ssTables_ = new HashSet < String > ( ) ; private ReentrantReadWriteLock lock_ = new ReentrantReadWriteLock ( true ) ; private AtomicBoolean isCompacting_ = new AtomicBoolean ( false ) ; ColumnFamilyStore ( String table , String columnFamily , boolean isSuper , int indexValue ) throws IOException { } public static ColumnFamilyStore getColumnFamilyStore ( String table , String columnFamily ) throws IOException { } void onStart ( ) throws IOException { } List < String > getAllSSTablesOnDisk ( ) { } public String cfStats ( String newLineSeparator ) { } void addToList ( String file ) { } void touch ( String key , boolean fData ) throws IOException { } boolean forceCompaction ( List < Range > ranges , EndPoint target , long skip , List < String > fileList ) { } String getColumnFamilyName ( ) { } private static String [ ] getTableAndColumnFamilyName ( String filename ) { } protected static int getIndexFromFileName ( String filename ) { } String getNextFileName ( ) { } String getTempFileName ( ) { } String getTempFileName ( List < String > files ) { } void switchMemtable ( ) { } void switchBinaryMemtable ( String key , byte [ ] buffer ) throws IOException { } public void forceFlush ( ) { } void forceBlockingFlush ( ) throws IOException , InterruptedException , ExecutionException { } void forceFlushBinary ( ) { } void apply ( String key , ColumnFamily columnFamily , CommitLog . CommitLogContext cLogCtx ) throws IOException { } void applyBinary ( String key , byte [ ] buffer ) throws IOException { } public ColumnFamily getColumnFamily ( String key , String columnFamilyColumn , IFilter filter ) throws IOException { } public ColumnFamily getColumnFamily ( String key , String columnFamilyColumn , IFilter filter , int gcBefore ) throws IOException { } List < ColumnFamily > getColumnFamilies ( String key , String columnFamilyColumn , IFilter filter ) throws IOException { } private void getColumnFamilyFromDisk ( String key , String cf , List < ColumnFamily > columnFamilies , IFilter filter ) throws IOException { } private ColumnFamily fetchColumnFamily ( String key , String cf , IFilter filter , String ssTableFile ) throws IOException { } private void getColumnFamilyFromCurrentMemtable ( String key , String cf , IFilter filter , List < ColumnFamily > columnFamilies ) { } private static void merge ( List < ColumnFamily > columnFamilies ) { } private static ColumnFamily resolveAndRemoveDeleted ( List < ColumnFamily > columnFamilies ) { } static ColumnFamily removeDeleted ( ColumnFamily cf ) { } static ColumnFamily removeDeleted ( ColumnFamily cf , int gcBefore ) { if ( cf == null ) return null ; for ( String cname : new ArrayList < String > ( cf . getColumns ( ) . keySet ( ) ) ) { IColumn c = cf . getColumns ( ) . get ( cname ) ; if ( c instanceof SuperColumn ) { long minTimestamp = Math . max ( c . getMarkedForDeleteAt ( ) , cf . getMarkedForDeleteAt ( ) ) ; cf . remove ( cname ) ; SuperColumn sc = new SuperColumn ( cname ) ; sc . markForDeleteAt ( c . getLocalDeletionTime ( ) , c . getMarkedForDeleteAt ( ) ) ; for ( IColumn subColumn : c . getSubColumns ( ) ) { if ( ( subColumn . timestamp ( ) ) > minTimestamp ) { if ( ( ! ( subColumn . isMarkedForDelete ( ) ) ) || ( ( subColumn . getLocalDeletionTime ( ) ) > gcBefore ) ) { <START_BUG> sc . addColumn ( subColumn . name ( ) , subColumn ) ; <END_BUG> } } } if ( ( ( sc . getSubColumns ( ) . size ( ) ) > 0 ) || ( ( sc . getLocalDeletionTime ( ) ) > gcBefore ) ) { cf . addColumn ( sc ) ; } } else if ( ( ( c . isMarkedForDelete ( ) ) && ( ( c . getLocalDeletionTime ( ) ) <= gcBefore ) ) || ( ( c . timestamp ( ) ) <= ( cf . getMarkedForDeleteAt ( ) ) ) ) { cf . remove ( cname ) ; } } if ( ( ( cf . getColumnCount ( ) ) == 0 ) && ( ( cf . getLocalDeletionTime ( ) ) <= gcBefore ) ) { return null ; } return cf ; } void applyNow ( String key , ColumnFamily columnFamily ) throws IOException { } void onMemtableFlush ( CommitLog . CommitLogContext cLogCtx ) throws IOException { } void storeLocation ( String filename , BloomFilter bf ) { } PriorityQueue < FileStruct > initializePriorityQueue ( List < String > files , List < Range > ranges , int minBufferSize ) { } static Set < List < String > > getCompactionBuckets ( List < String > files , long min ) { } void doCompaction ( ) throws IOException { } void doMajorCompaction ( long skip ) { } void doMajorCompactionInternal ( long skip ) { } long getExpectedCompactedFileSize ( List < String > files ) { } String getMaxSizeFile ( List < String > files ) { } boolean doAntiCompaction ( List < Range > ranges , EndPoint target , List < String > fileList ) { } void forceCleanup ( ) { } void doCleanupCompaction ( ) { } void doCleanup ( String file ) { }

Fix:
sc . addColumn ( subColumn ) ;