Buggy code:
public class StorageProxy implements StorageProxyMBean { private static final Logger logger = LoggerFactory . getLogger ( StorageProxy . class ) ; private static ScheduledExecutorService repairExecutor = new ScheduledThreadPoolExecutor ( 1 ) ; 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 sendMessages ( String localDataCenter , Map < String , Multimap < Message , InetAddress > > dcMessages ) throws IOException { for ( Map . Entry < String , Multimap < Message , InetAddress > > entry : dcMessages . entrySet ( ) ) { String dataCenter = entry . getKey ( ) ; Map < Message , Collection < InetAddress > > messagesForDataCenter = entry . getValue ( ) . asMap ( ) ; for ( Map . Entry < Message , Collection < InetAddress > > messages : messagesForDataCenter . entrySet ( ) ) { Message message = messages . getKey ( ) ; Iterator < InetAddress > iter = messages . getValue ( ) . iterator ( ) ; assert iter . hasNext ( ) ; InetAddress target = iter . next ( ) ; while ( iter . hasNext ( ) ) { InetAddress destination = iter . next ( ) ; if ( dataCenter . equals ( localDataCenter ) ) { assert ( message . getHeader ( FORWARD_HEADER ) ) == null ; <START_BUG> MessagingService . instance ( ) . sendOneWay ( message , target ) ; <END_BUG> } else { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; byte [ ] previousHints = message . getHeader ( FORWARD_HEADER ) ; if ( previousHints != null ) dos . write ( previousHints ) ; dos . write ( destination . getAddress ( ) ) ; message . setHeader ( FORWARD_HEADER , bos . toByteArray ( ) ) ; } } MessagingService . instance ( ) . sendOneWay ( message , target ) ; } } } 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 > fetchRows ( List < ReadCommand > commands , ConsistencyLevel consistency_level ) throws IOException , TimeoutException , UnavailableException { } static < T > ReadCallback < T > getReadCallback ( IResponseResolver < T > resolver , String table , ConsistencyLevel consistencyLevel ) { } private static RepairCallback < Row > repair ( ReadCommand command , List < InetAddress > endpoints ) throws IOException { } 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 ) { } public long getReadOperations ( ) { } public long getTotalReadLatencyMicros ( ) { } public double getRecentReadLatencyMicros ( ) { } public long [ ] getTotalReadLatencyHistogramMicros ( ) { } public long [ ] getRecentReadLatencyHistogramMicros ( ) { } public long getRangeOperations ( ) { } public long getTotalRangeLatencyMicros ( ) { } public double getRecentRangeLatencyMicros ( ) { } public long [ ] getTotalRangeLatencyHistogramMicros ( ) { } public long [ ] getRecentRangeLatencyHistogramMicros ( ) { } public long getWriteOperations ( ) { } public long getTotalWriteLatencyMicros ( ) { } public double getRecentWriteLatencyMicros ( ) { } public long [ ] getTotalWriteLatencyHistogramMicros ( ) { } public long [ ] getRecentWriteLatencyHistogramMicros ( ) { } public static List < Row > scan ( String keyspace , String column_family , IndexClause index_clause , SlicePredicate column_predicate , ConsistencyLevel consistency_level ) throws IOException , TimeoutException , UnavailableException { } public boolean getHintedHandoffEnabled ( ) { } public void setHintedHandoffEnabled ( boolean b ) { } public static boolean isHintedHandoffEnabled ( ) { } public static void truncateBlocking ( String keyspace , String cfname ) throws IOException , TimeoutException , UnavailableException { } private static boolean isAnyHostDown ( ) { } private static class RepairRunner extends WrappedRunnable { private final IResponseResolver < Row > resolver ; private final ReadCommand command ; private final List < InetAddress > endpoints ; public RepairRunner ( IResponseResolver < Row > resolver , ReadCommand command , List < InetAddress > endpoints ) { } protected void runMayThrow ( ) throws IOException { } } }

Fix:
MessagingService . instance ( ) . sendOneWay ( message , destination ) ;