Buggy code:
public class CassandraServer implements Cassandra . Iface { public static String TOKEN_MAP = "token<seq2seq4repair_space>map" ; private static Logger logger = LoggerFactory . getLogger ( CassandraServer . class ) ; private static final List < ColumnOrSuperColumn > EMPTY_COLUMNS = Collections . emptyList ( ) ; private static final List < Column > EMPTY_SUBCOLUMNS = Collections . emptyList ( ) ; private ThreadLocal < AccessLevel > loginDone = new ThreadLocal < AccessLevel > ( ) { @ Override protected AccessLevel initialValue ( ) { } } ; private ThreadLocal < String > keySpace = new ThreadLocal < String > ( ) ; private final StorageService storageService ; public CassandraServer ( ) { } protected Map < DecoratedKey , ColumnFamily > readColumnFamily ( List < ReadCommand > commands , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public List < Column > thriftifySubColumns ( Collection < IColumn > columns ) { } public List < ColumnOrSuperColumn > thriftifyColumns ( Collection < IColumn > columns , boolean reverseOrder ) { } private List < ColumnOrSuperColumn > thriftifySuperColumns ( Collection < IColumn > columns , boolean reverseOrder ) { } private static Clock thriftifyIClock ( IClock clock ) { } private Map < byte [ ] , List < ColumnOrSuperColumn > > getSlice ( List < ReadCommand > commands , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } private List < ColumnOrSuperColumn > thriftifyColumnFamily ( ColumnFamily cf , boolean subcolumnsOnly , boolean reverseOrder ) { } public List < ColumnOrSuperColumn > get_slice ( byte [ ] key , ColumnParent column_parent , SlicePredicate predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public Map < byte [ ] , List < ColumnOrSuperColumn > > multiget_slice ( List < byte [ ] > keys , ColumnParent column_parent , SlicePredicate predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } private Map < byte [ ] , List < ColumnOrSuperColumn > > multigetSliceInternal ( String keyspace , List < byte [ ] > keys , ColumnParent column_parent , SlicePredicate predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public ColumnOrSuperColumn get ( byte [ ] key , ColumnPath column_path , ConsistencyLevel consistency_level ) throws InvalidRequestException , NotFoundException , TimedOutException , UnavailableException { } public int get_count ( byte [ ] key , ColumnParent column_parent , SlicePredicate predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public Map < byte [ ] , Integer > multiget_count ( String table , List < byte [ ] > keys , ColumnParent column_parent , SlicePredicate predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public void insert ( byte [ ] key , ColumnParent column_parent , Column column , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public void batch_mutate ( Map < byte [ ] , Map < String , List < Mutation > > > mutation_map , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } public void remove ( byte [ ] key , ColumnPath column_path , Clock clock , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } private void doInsert ( ConsistencyLevel consistency_level , RowMutation rm ) throws TimedOutException , UnavailableException { } public Map < String , Map < String , String > > describe_keyspace ( String table ) throws NotFoundException { } public List < KeySlice > get_range_slices ( ColumnParent column_parent , SlicePredicate predicate , KeyRange range , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException , TException { } public Set < String > describe_keyspaces ( ) throws TException { } public String describe_cluster_name ( ) throws TException { } public String describe_version ( ) throws TException { } public List < TokenRange > describe_ring ( String keyspace ) throws InvalidRequestException { } public List < String > describe_splits ( String keyspace , String cfName , String start_token , String end_token , int keys_per_split ) throws TException { } public AccessLevel login ( AuthenticationRequest auth_request ) throws AuthenticationException , AuthorizationException , TException { } public void logout ( ) { } protected void checkKeyspaceAndLoginAuthorized ( AccessLevel level ) throws InvalidRequestException { } public String system_add_column_family ( CfDef cf_def ) throws InvalidRequestException , TException { } public String system_drop_column_family ( String column_family ) throws InvalidRequestException , TException { } public String system_rename_column_family ( String old_name , String new_name ) throws InvalidRequestException , TException { } public String system_add_keyspace ( KsDef ks_def ) throws InvalidRequestException , TException { } public String system_drop_keyspace ( String keyspace ) throws InvalidRequestException , TException { } public String system_rename_keyspace ( String old_name , String new_name ) throws InvalidRequestException , TException { } private CFMetaData convertToCFMetaData ( CfDef cf_def ) throws ConfigurationException , InvalidRequestException { } public void truncate ( String cfname ) throws InvalidRequestException , UnavailableException , TException { } public void set_keyspace ( String keyspace ) throws InvalidRequestException , TException { if ( ( DatabaseDescriptor . getTableDefinition ( keyspace ) ) == null ) { throw new InvalidRequestException ( "Keyspace<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } <START_BUG> if ( ( ( keySpace . get ( ) ) != null ) && ( ! ( keySpace . get ( ) . equals ( keyspace ) ) ) ) ; <END_BUG> loginDone . set ( NONE ) ; keySpace . set ( keyspace ) ; } public Map < String , List < String > > check_schema_agreement ( ) throws InvalidRequestException , TException { } }

Fix:
if ( ( ( keySpace . get ( ) ) != null ) && ( ! ( keySpace . get ( ) . equals ( keyspace ) ) ) )