Buggy code:
public class Memtable implements Comparable < Memtable > , IFlushable { private static final Logger logger = LoggerFactory . getLogger ( Memtable . class ) ; private static final double MIN_SANE_LIVE_RATIO = 1.0 ; private static final double MAX_SANE_LIVE_RATIO = 64.0 ; private static final MemoryMeter meter = new MemoryMeter ( ) ; private static final ExecutorService meterExecutor = new ThreadPoolExecutor ( 1 , 1 , Integer . MAX_VALUE , TimeUnit . MILLISECONDS , new SynchronousQueue < Runnable > ( ) ) { @ Override protected void afterExecute ( Runnable r , Throwable t ) { } } ; private volatile boolean isFrozen ; private final AtomicLong currentThroughput = new AtomicLong ( 0 ) ; private final AtomicLong currentOperations = new AtomicLong ( 0 ) ; private final long creationTime ; private final ConcurrentNavigableMap < DecoratedKey , ColumnFamily > columnFamilies = new ConcurrentSkipListMap < DecoratedKey , ColumnFamily > ( ) ; public final ColumnFamilyStore cfs ; private final long THRESHOLD ; private final long THRESHOLD_COUNT ; static volatile Memtable activelyMeasuring ; public Memtable ( ColumnFamilyStore cfs ) { } public int compareTo ( Memtable rhs ) { } public long getLiveSize ( ) { } public long getSerializedSize ( ) { } public long getOperations ( ) { } boolean isThresholdViolated ( ) { } boolean isFrozen ( ) { } void freeze ( ) { } void put ( DecoratedKey key , ColumnFamily columnFamily ) { } public void updateLiveRatio ( ) { if ( ! ( MemoryMeter . isInitialized ( ) ) ) { Memtable . logger . warn ( "MemoryMeter<seq2seq4repair_space>uninitialized<seq2seq4repair_space>(jamm<seq2seq4repair_space>not<seq2seq4repair_space>specified<seq2seq4repair_space>as<seq2seq4repair_space>java<seq2seq4repair_space>agent);<seq2seq4repair_space>assuming<seq2seq4repair_space>liveRatio<seq2seq4repair_space>of<seq2seq4repair_space>10.0.<seq2seq4repair_space>Usually<seq2seq4repair_space>this<seq2seq4repair_space>means<seq2seq4repair_space>cassandra-env.sh<seq2seq4repair_space>disabled<seq2seq4repair_space>jamm<seq2seq4repair_space>because<seq2seq4repair_space>you<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>buggy<seq2seq4repair_space>JRE;<seq2seq4repair_space>upgrade<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>Sun<seq2seq4repair_space>JRE<seq2seq4repair_space>instead" ) ; cfs . liveRatio = 10.0 ; return ; } Runnable runnable = new Runnable ( ) { public void run ( ) { Memtable . activelyMeasuring = Memtable . this ; long start = System . currentTimeMillis ( ) ; long deepSize = Memtable . meter . measure ( columnFamilies ) ; int objects = 0 ; for ( Map . Entry < DecoratedKey , ColumnFamily > entry : columnFamilies . entrySet ( ) ) { deepSize += ( Memtable . meter . measureDeep ( entry . getKey ( ) ) ) + ( Memtable . meter . measureDeep ( entry . getValue ( ) ) ) ; objects += entry . getValue ( ) . getColumnCount ( ) ; } double newRatio = ( ( double ) ( deepSize ) ) // ( currentThroughput . get ( ) ) ; if ( newRatio < ( Memtable . MIN_SANE_LIVE_RATIO ) ) { Memtable . logger . warn ( "setting<seq2seq4repair_space>live<seq2seq4repair_space>ratio<seq2seq4repair_space>to<seq2seq4repair_space>minimum<seq2seq4repair_space>of<seq2seq4repair_space>1.0<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>{}" , newRatio ) ; newRatio = Memtable . MIN_SANE_LIVE_RATIO ; } if ( newRatio > ( Memtable . MAX_SANE_LIVE_RATIO ) ) { <START_BUG> Memtable . logger . warn ( "setting<seq2seq4repair_space>live<seq2seq4repair_space>ratio<seq2seq4repair_space>to<seq2seq4repair_space>maximum<seq2seq4repair_space>of<seq2seq4repair_space>64<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>{},<seq2seq4repair_space>newRatio" ) ; <END_BUG> newRatio = Memtable . MAX_SANE_LIVE_RATIO ; } cfs . liveRatio = Math . max ( cfs . liveRatio , newRatio ) ; Memtable . logger . info ( "{}<seq2seq4repair_space>liveRatio<seq2seq4repair_space>is<seq2seq4repair_space>{}<seq2seq4repair_space>(just-counted<seq2seq4repair_space>was<seq2seq4repair_space>{}).<seq2seq4repair_space>calculation<seq2seq4repair_space>took<seq2seq4repair_space>{}ms<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>columns" , new Object [ ] { cfs , cfs . liveRatio , newRatio , ( System . currentTimeMillis ( ) ) - start , objects } ) ; Memtable . activelyMeasuring = null ; } } ; try { Memtable . meterExecutor . submit ( runnable ) ; } catch ( RejectedExecutionException e ) { Memtable . logger . debug ( "Meter<seq2seq4repair_space>thread<seq2seq4repair_space>is<seq2seq4repair_space>busy;<seq2seq4repair_space>skipping<seq2seq4repair_space>liveRatio<seq2seq4repair_space>update<seq2seq4repair_space>for<seq2seq4repair_space>{}" , cfs ) ; } } private void resolve ( DecoratedKey key , ColumnFamily cf ) { } public String contents ( ) { } private SSTableReader writeSortedContents ( ReplayPosition context ) throws IOException { } public void flushAndSignal ( final CountDownLatch latch , ExecutorService sorter , final ExecutorService writer , final ReplayPosition context ) { } 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 ) { } public static IColumnIterator getNamesIterator ( final DecoratedKey key , final ColumnFamily cf , final NamesQueryFilter filter ) { } public ColumnFamily getColumnFamily ( DecoratedKey key ) { } void clearUnsafe ( ) { } public boolean isExpired ( ) { } }

Fix:
Memtable . logger . warn ( "setting<seq2seq4repair_space>live<seq2seq4repair_space>ratio<seq2seq4repair_space>to<seq2seq4repair_space>maximum<seq2seq4repair_space>of<seq2seq4repair_space>64<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>{}" , newRatio ) ;