Buggy code:
public static final RetryingScheduledThreadPoolExecutor scheduledTasks = new RetryingScheduledThreadPoolExecutor ( "ScheduledTasks" ) ; public static final RetryingScheduledThreadPoolExecutor tasks = new RetryingScheduledThreadPoolExecutor ( "NonPeriodicTasks" ) ; 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 volatile boolean efficientCrossDCWrites ; 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 updateEfficientCrossDCWriteMode ( ) { } 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 ) { } 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 ) { <START_BUG> if ( ( ! ( isClientMode ) ) && ( state . hasToken ( ) ) ) <END_BUG> deliverHints ( endpoint ) ; } 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 ( ) { } public String [ ] getAllDataFileLocations ( ) { } public String [ ] getAllDataFileLocationsForTable ( String table ) { } public String getCommitLogLocation ( ) { } public String getSavedCachesLocation ( ) { } private List < String > stringify ( Iterable < InetAddress > endpoints ) { } public int getCurrentGenerationNumber ( ) { } public void forceTableCleanup ( String tableName , String ... columnFamilies ) throws IOException , InterruptedException , ExecutionException { } public void scrub ( String tableName , String ... columnFamilies ) throws IOException , InterruptedException , ExecutionException { } public void forceTableCompaction ( String tableName , String ... columnFamilies ) throws IOException , InterruptedException , ExecutionException { } public void invalidateKeyCaches ( String tableName , String ... columnFamilies ) throws IOException { } public void invalidateRowCaches ( String tableName , String ... columnFamilies ) throws IOException { } public void takeSnapshot ( String tableName , String tag ) throws IOException { } private Table getValidTable ( String tableName ) throws IOException { } public void takeAllSnapshot ( String tag ) throws IOException { }

Fix:
if ( ( ! ( isClientMode ) ) && ( StorageService . instance . getTokenMetadata ( ) . isMember ( endpoint ) ) )