Buggy code:
public class StorageService implements IEndpointStateChangeSubscriber , StorageServiceMBean { private static Logger logger_ = LoggerFactory . getLogger ( StorageService . class ) ; public static final int RING_DELAY = 30 * 1000 ; public enum Verb { MUTATION , BINARY , READ_REPAIR , READ , READ_RESPONSE , STREAM_INITIATE , STREAM_INITIATE_DONE , STREAM_REPLY , STREAM_REQUEST , RANGE_SLICE , BOOTSTRAP_TOKEN , TREE_REQUEST , TREE_RESPONSE , GOSSIP_DIGEST_SYN , GOSSIP_DIGEST_ACK , GOSSIP_DIGEST_ACK2 , DEFINITIONS_ANNOUNCE , DEFINITIONS_UPDATE_RESPONSE , TRUNCATE , SCHEMA_CHECK , INDEX_SCAN ; } 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 ) { } ; private static IPartitioner partitioner_ = DatabaseDescriptor . getPartitioner ( ) ; public static final VersionedValueFactory valueFactory = new VersionedValue . VersionedValueFactory ( StorageService . partitioner_ ) ; public static final StorageService instance = new StorageService ( ) ; public static IPartitioner getPartitioner ( ) { } public Collection < Range > getLocalRanges ( String table ) { } public Range getLocalPrimaryRange ( ) { } private TokenMetadata tokenMetadata_ = new TokenMetadata ( ) ; private StorageMetadata storageMetadata_ ; private ExecutorService consistencyManager_ = new org . apache . cassandra . concurrent . JMXEnabledThreadPoolExecutor ( DatabaseDescriptor . getConsistencyThreads ( ) , DatabaseDescriptor . getConsistencyThreads ( ) , StageManager . KEEPALIVE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) , new NamedThreadFactory ( "CONSISTENCY-MANAGER" ) ) ; private Map < String , AbstractReplicationStrategy > replicationStrategies ; private boolean isBootstrapMode ; private boolean isClientMode ; private boolean initialized ; private String operationMode ; private MigrationManager migrationManager = new MigrationManager ( ) ; public void finishBootstrapping ( ) { } public void setToken ( Token token ) { } public StorageService ( ) { } public AbstractReplicationStrategy getReplicationStrategy ( String table ) { } public void initReplicationStrategy ( String table ) { } public void clearReplicationStrategy ( String table ) { } public static AbstractReplicationStrategy createReplicationStrategy ( TokenMetadata tokenMetadata , String table ) { } public void stopClient ( ) { } public synchronized void initClient ( ) throws IOException { } public synchronized void initServer ( ) throws IOException { } private void setMode ( String m , boolean log ) { } private void startBootstrap ( Token token ) throws IOException { isBootstrapMode = true ; SystemTable . updateToken ( token ) ; <START_BUG> Gossiper . instance . addLocalApplicationState ( STATUS , StorageService . valueFactory . normal ( token ) ) ; <END_BUG> setMode ( ( ( "Joining:<seq2seq4repair_space>sleeping<seq2seq4repair_space>" + ( StorageService . RING_DELAY ) ) + "<seq2seq4repair_space>ms<seq2seq4repair_space>for<seq2seq4repair_space>pending<seq2seq4repair_space>range<seq2seq4repair_space>setup" ) , true ) ; try { Thread . sleep ( StorageService . RING_DELAY ) ; } catch ( InterruptedException e ) { throw new AssertionError ( e ) ; } setMode ( "Bootstrapping" , true ) ; new org . apache . cassandra . dht . BootStrapper ( org . apache . cassandra . utils . FBUtilities . getLocalAddress ( ) , token , tokenMetadata_ ) . startBootstrap ( ) ; } public boolean isBootstrapMode ( ) { } public TokenMetadata getTokenMetadata ( ) { } public void doConsistencyCheck ( Row row , List < InetAddress > endpoints , ReadCommand command ) { } 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 removeEndpointLocally ( InetAddress endpoint ) { } private void calculatePendingRanges ( ) { } public static void calculatePendingRanges ( AbstractReplicationStrategy strategy , String table ) { } private void restoreReplicaCount ( InetAddress endpoint ) { } 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 Set < String > getLeavingNodes ( ) { } public Set < String > getJoiningNodes ( ) { } public Set < String > getLiveNodes ( ) { } public Set < String > getUnreachableNodes ( ) { } private Set < String > stringify ( Collection < InetAddress > endpoints ) { } private List < String > stringify ( List < InetAddress > endpoints ) { } public int getCurrentGenerationNumber ( ) { } public void forceTableCleanup ( ) throws IOException { } public void forceTableCleanup ( String tableName ) throws IOException { } public void forceTableCompaction ( ) throws IOException { } public void forceTableCompaction ( String tableName ) throws IOException { }

Fix:
Gossiper . instance . addLocalApplicationState ( STATUS , StorageService . valueFactory . bootstrapping ( token ) ) ;