Buggy code:
public class StorageProxy implements StorageProxyMBean { private static final Logger logger = LoggerFactory . getLogger ( StorageProxy . class ) ; private static final Random random = new Random ( ) ; private static final LatencyTracker readStats = new LatencyTracker ( ) ; private static final LatencyTracker rangeStats = new LatencyTracker ( ) ; private static final LatencyTracker writeStats = new LatencyTracker ( ) ; private static boolean hintedHandoffEnabled = DatabaseDescriptor . hintedHandoffEnabled ( ) ; private static final String UNREACHABLE = "UNREACHABLE" ; private StorageProxy ( ) { } public static void mutate ( List < RowMutation > mutations , ConsistencyLevel consistency_level ) throws TimeoutException , UnavailableException { } private static void addHintHeader ( Message message , InetAddress target ) throws IOException { } private static void insertLocalMessage ( final RowMutation rm , final IWriteResponseHandler responseHandler ) { } public static List < Row > readProtocol ( List < ReadCommand > commands , ConsistencyLevel consistency_level ) throws IOException , TimeoutException , InvalidRequestException , UnavailableException { } private static List < Row > weakRead ( List < ReadCommand > commands ) throws IOException , TimeoutException , UnavailableException { } private static List < Row > strongRead ( List < ReadCommand > commands , ConsistencyLevel consistency_level ) throws IOException , TimeoutException , UnavailableException { } public static List < Row > getRangeSlice ( RangeSliceCommand command , ConsistencyLevel consistency_level ) throws IOException , TimeoutException , UnavailableException { } public static Map < String , List < String > > describeSchemaVersions ( ) { } static List < AbstractBounds > getRestrictedRanges ( final AbstractBounds queryRange ) { } private static boolean randomlyReadRepair ( ReadCommand command ) { CFMetaData cfmd = DatabaseDescriptor . getTableMetaData ( command . table ) . get ( command . getColumnFamilyName ( ) ) ; <START_BUG> return ( cfmd . readRepairChance ) > ( StorageProxy . random . nextDouble ( ) ) ; <END_BUG> } public long getReadOperations ( ) { } public long getTotalReadLatencyMicros ( ) { } public double getRecentReadLatencyMicros ( ) { } public long getRangeOperations ( ) { } public long getTotalRangeLatencyMicros ( ) { } public double getRecentRangeLatencyMicros ( ) { } public long getWriteOperations ( ) { } public long getTotalWriteLatencyMicros ( ) { } public double getRecentWriteLatencyMicros ( ) { } public static List < Row > scan ( String keyspace , String column_family , IndexClause index_clause , SlicePredicate column_predicate , ConsistencyLevel consistency_level ) throws IOException , TimeoutException { } public boolean getHintedHandoffEnabled ( ) { } public void setHintedHandoffEnabled ( boolean b ) { } public static boolean isHintedHandoffEnabled ( ) { } static class weakReadLocalCallable implements Callable < Object > { private ReadCommand command ; weakReadLocalCallable ( ReadCommand command ) { } public Object call ( ) throws IOException { } } public static void truncateBlocking ( String keyspace , String cfname ) throws IOException , TimeoutException , UnavailableException { } private static boolean isAnyHostDown ( ) { } }

Fix:
return ( cfmd . getReadRepairChance ( ) ) > ( StorageProxy . random . nextDouble ( ) ) ;