Buggy code:
public final class ColumnFamilyStore implements ColumnFamilyStoreMBean { private static Logger logger_ = Logger . getLogger ( ColumnFamilyStore . class ) ; private static final int BUFSIZE = ( 128 * 1024 ) * 1024 ; private static NonBlockingHashMap < String , Set < Memtable > > memtablesPendingFlush = new NonBlockingHashMap < String , Set < Memtable > > ( ) ; private static ExecutorService flusher_ = new org . apache . cassandra . concurrent . DebuggableThreadPoolExecutor ( DatabaseDescriptor . getFlushMinThreads ( ) , DatabaseDescriptor . getFlushMaxThreads ( ) , Integer . MAX_VALUE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) , new ThreadFactoryImpl ( "MEMTABLE-FLUSHER-POOL" ) ) ; private final String table_ ; public final String columnFamily_ ; private final boolean isSuper_ ; private volatile Integer memtableSwitchCount = 0 ; private AtomicInteger fileIndexGenerator_ = new AtomicInteger ( 0 ) ; private Memtable memtable_ ; private ReentrantReadWriteLock memtableLock_ = new ReentrantReadWriteLock ( true ) ; private AtomicReference < BinaryMemtable > binaryMemtable_ ; private SortedMap < String , SSTableReader > ssTables_ = new TreeMap < String , SSTableReader > ( new FileNameComparator ( FileNameComparator . Descending ) ) ; private ReentrantReadWriteLock sstableLock_ = new ReentrantReadWriteLock ( true ) ; private TimedStatsDeque readStats_ = new TimedStatsDeque ( 60000 ) ; private TimedStatsDeque writeStats_ = new TimedStatsDeque ( 60000 ) ; ColumnFamilyStore ( String table , String columnFamilyName , boolean isSuper , int indexValue ) throws IOException { } public static ColumnFamilyStore getColumnFamilyStore ( String table , String columnFamily ) throws IOException { } void onStart ( ) throws IOException { } public String cfStats ( String newLineSeparator ) { } void addToList ( SSTableReader file ) { } boolean forceCompaction ( List < Range > ranges , EndPoint target , long skip , List < String > fileList ) { } public String getColumnFamilyName ( ) { } private static String getColumnFamilyFromFileName ( String filename ) { } protected static int getIndexFromFileName ( String filename ) { } String getTempSSTablePath ( ) { } String getTempSSTableFileName ( ) { } void switchMemtable ( Memtable oldMemtable , CommitLog . CommitLogContext ctx ) { } void switchBinaryMemtable ( String key , byte [ ] buffer ) throws IOException { } public void forceFlush ( ) { } void forceBlockingFlush ( ) throws IOException , InterruptedException , ExecutionException { } public void forceFlushBinary ( ) { <START_BUG> if ( memtable_ . isClean ( ) ) <END_BUG> return ; ColumnFamilyStore . submitFlush ( binaryMemtable_ . get ( ) ) ; } void apply ( String key , ColumnFamily columnFamily , CommitLog . CommitLogContext cLogCtx ) throws IOException { } void applyBinary ( String key , byte [ ] buffer ) throws IOException { } private static void merge ( List < ColumnFamily > columnFamilies ) { } private static ColumnFamily resolveAndRemoveDeleted ( List < ColumnFamily > columnFamilies ) { } static ColumnFamily removeDeleted ( ColumnFamily cf ) { } public static int getDefaultGCBefore ( ) { } static ColumnFamily removeDeleted ( ColumnFamily cf , int gcBefore ) { } void applyNow ( String key , ColumnFamily columnFamily ) throws IOException { } void onMemtableFlush ( CommitLog . CommitLogContext cLogCtx ) throws IOException { } void storeLocation ( SSTableReader sstable ) { } private PriorityQueue < FileStruct > initializePriorityQueue ( List < String > files , List < Range > ranges ) throws IOException { } static Set < List < String > > getCompactionBuckets ( Iterable < String > files , long min ) { } int doCompaction ( int minThreshold , int maxThreshold ) throws IOException { } void doMajorCompaction ( long skip ) throws IOException { } void doMajorCompactionInternal ( long skip ) throws IOException { } long getExpectedCompactedFileSize ( List < String > files ) { } String getMaxSizeFile ( List < String > files ) { } boolean doAntiCompaction ( List < Range > ranges , EndPoint target , List < String > fileList ) throws IOException { } void forceCleanup ( ) { } void doCleanupCompaction ( ) throws IOException { } void doCleanup ( String file ) throws IOException { } boolean doFileAntiCompaction ( List < String > files , List < Range > ranges , EndPoint target , List < String > fileList ) throws IOException { } private int doFileCompaction ( List < String > files , int minBufferSize ) throws IOException { } public static List < Memtable > getUnflushedMemtables ( String cfName ) { } private static Set < Memtable > getMemtablesPendingFlushNotNull ( String columnFamilyName ) { } private static void submitFlush ( final Memtable memtable , final CommitLog . CommitLogContext cLogCtx ) { } static void submitFlush ( final BinaryMemtable binaryMemtable ) { } public boolean isSuper ( ) { } public void flushMemtableOnRecovery ( ) throws IOException { } public int getMemtableColumnsCount ( ) { } public int getMemtableDataSize ( ) { } public int getMemtableSwitchCount ( ) { } private Memtable getMemtableThreadSafe ( ) { } public Iterator < String > memtableKeyIterator ( ) throws InterruptedException , ExecutionException { } public Collection < SSTableReader > getSSTables ( ) { } public ReentrantReadWriteLock . ReadLock getReadLock ( ) { } public int getReadCount ( ) { } public double getReadLatency ( ) { } public int getPendingTasks ( ) { } public int getWriteCount ( ) { } public double getWriteLatency ( ) { } public ColumnFamily getColumnFamily ( String key , QueryPath path , byte [ ] start , byte [ ] finish , boolean reversed , int limit ) throws IOException { } public ColumnFamily getColumnFamily ( QueryFilter filter ) throws IOException { } public ColumnFamily getColumnFamily ( QueryFilter filter , int gcBefore ) throws IOException { } public RangeReply getKeyRange ( final String startWith , final String stopAt , int maxResults ) throws IOException , InterruptedException , ExecutionException { } private RangeReply getKeyRangeUnsafe ( final String startWith , final String stopAt , int maxResults ) throws IOException , InterruptedException , ExecutionException { }

Fix:
if ( binaryMemtable_ . get ( ) . isClean ( ) )