Buggy code:
} public static final StorageService . Verb [ ] VERBS = StorageService . Verb . values ( ) ; public static final EnumMap < StorageService . Verb , Stage > verbStages = new EnumMap < StorageService . Verb , Stage > ( StorageService . Verb . class ) { } ; public static final RetryingScheduledThreadPoolExecutor scheduledTasks = new RetryingScheduledThreadPoolExecutor ( "ScheduledTasks" ) ; private TokenMetadata tokenMetadata_ = new TokenMetadata ( ) ; private IPartitioner partitioner = DatabaseDescriptor . getPartitioner ( ) ; public VersionedValueFactory valueFactory = new VersionedValue . VersionedValueFactory ( partitioner ) ; public static final StorageService instance = new StorageService ( ) ; public static IPartitioner getPartitioner ( ) { } public Collection < Range > getLocalRanges ( String table ) { } public Range getLocalPrimaryRange ( ) { } private Set < InetAddress > replicatingNodes = Collections . synchronizedSet ( new HashSet < InetAddress > ( ) ) ; private CassandraDaemon daemon ; private InetAddress removingNode ; private boolean isBootstrapMode ; private boolean isClientMode ; private boolean initialized ; private volatile boolean joined = false ; private String operationMode ; private MigrationManager migrationManager = new MigrationManager ( ) ; private volatile int totalCFs ; private volatile int remainingCFs ; public void finishBootstrapping ( ) { } public void setToken ( Token token ) { } public StorageService ( ) { } public void registerDaemon ( CassandraDaemon daemon ) { } public void stopGossiping ( ) { } public void startGossiping ( ) { } public void startRPCServer ( ) { } public void stopRPCServer ( ) { } public boolean isRPCServerRunning ( ) { } public void stopClient ( ) { } public boolean isInitialized ( ) { } public synchronized void initClient ( ) throws IOException , ConfigurationException { } public synchronized void initServer ( ) throws IOException , org . apache . cassandra . config . ConfigurationException { } private void joinTokenRing ( ) throws IOException , org . apache . cassandra . config . ConfigurationException { } public synchronized void joinRing ( ) throws IOException , org . apache . cassandra . config . ConfigurationException { } public boolean isJoined ( ) { } private void setMode ( String m , boolean log ) { } private void bootstrap ( Token token ) throws IOException { } public boolean isBootstrapMode ( ) { } public TokenMetadata getTokenMetadata ( ) { } public Map < Range , List < String > > getRangeToEndpointMap ( String keyspace ) { } public Map < Range , List < String > > getPendingRangeToEndpointMap ( String keyspace ) { } public Map < Range , List < InetAddress > > getRangeToAddressMap ( String keyspace ) { } public Map < Token , String > getTokenToEndpointMap ( ) { } private Map < Range , List < InetAddress > > constructRangeToEndpointMap ( String keyspace , List < Range > ranges ) { } public void onChange ( InetAddress endpoint , ApplicationState state , VersionedValue value ) { } private void handleStateBootstrap ( InetAddress endpoint , String [ ] pieces ) { } private void handleStateNormal ( InetAddress endpoint , String [ ] pieces ) { } private void handleStateLeaving ( InetAddress endpoint , String [ ] pieces ) { } private void handleStateLeft ( InetAddress endpoint , String [ ] pieces ) { } private void handleStateRemoving ( InetAddress endpoint , Token removeToken , String state ) { } private void excise ( Token token , InetAddress endpoint ) { } private void calculatePendingRanges ( ) { } public static void calculatePendingRanges ( AbstractReplicationStrategy strategy , String table ) { } private Multimap < InetAddress , Range > getNewSourceRanges ( String table , Set < Range > ranges ) { } private void sendReplicationNotification ( InetAddress local , InetAddress remote ) { <START_BUG> Message msg = new Message ( local , StorageService . Verb . REPLICATION_FINISHED , new byte [ 0 ] ) ; <END_BUG> IFailureDetector failureDetector = FailureDetector . instance ; while ( failureDetector . isAlive ( remote ) ) { IAsyncResult iar = MessagingService . instance ( ) . sendRR ( msg , remote ) ; try { iar . get ( DatabaseDescriptor . getRpcTimeout ( ) , TimeUnit . MILLISECONDS ) ; return ; } catch ( TimeoutException e ) { } } } private void restoreReplicaCount ( InetAddress endpoint , final InetAddress notifyEndpoint ) { } private Multimap < Range , InetAddress > getChangedRangesForLeaving ( String table , InetAddress endpoint ) { } public void onJoin ( InetAddress endpoint , EndpointState epState ) { } public void onAlive ( InetAddress endpoint , EndpointState state ) { } public void onRemove ( InetAddress endpoint ) { } public void onDead ( InetAddress endpoint , EndpointState state ) { } public double getLoad ( ) { } public String getLoadString ( ) { } public Map < String , String > getLoadMap ( ) { } public final void deliverHints ( InetAddress endpoint ) { } public final void deliverHints ( String host ) throws UnknownHostException { } public Token getLocalToken ( ) { } public String getToken ( ) { } public String getReleaseVersion ( ) { } public List < String > getLeavingNodes ( ) { } public List < String > getJoiningNodes ( ) { } public List < String > getLiveNodes ( ) { } public List < String > getUnreachableNodes ( ) { } private List < String > stringify ( Iterable < InetAddress > endpoints ) { } public int getCurrentGenerationNumber ( ) { } public void forceTableCleanup ( String tableName , String ... columnFamilies ) throws IOException , InterruptedException , ExecutionException { }

Fix:
Message msg = new Message ( local , StorageService . Verb . REPLICATION_FINISHED , new byte [ 0 ] , Gossiper . instance . getVersion ( remote ) ) ;