Buggy code:
private static final String D_CF_CFCLOCKTYPE = "Timestamp" ; private static final String D_CF_COMPTYPE = "BytesType" ; private static final String D_CF_SUBCOMPTYPE = "" ; private static final String D_CF_RECONCILER = null ; public static final String D_COLDEF_INDEXTYPE = "KEYS" ; public static final String D_COLDEF_INDEXNAME = null ; final ClientState clientState = new ClientState ( ) ; private final IRequestScheduler requestScheduler ; public CassandraServer ( ) { } public Void login ( AuthenticationRequest auth_request ) throws AuthenticationException , AuthorizationException { } public ColumnOrSuperColumn get ( ByteBuffer key , ColumnPath columnPath , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , NotFoundException , TimedOutException , UnavailableException { } protected Map < DecoratedKey < ? > , ColumnFamily > readColumnFamily ( List < ReadCommand > commands , ConsistencyLevel consistency ) throws InvalidRequestException , TimedOutException , UnavailableException { } private List < Column > avronateSubColumns ( Collection < IColumn > columns ) { } private GenericArray < ColumnOrSuperColumn > avronateColumns ( Collection < IColumn > columns , boolean reverseOrder ) { } private GenericArray < ColumnOrSuperColumn > avronateSuperColumns ( Collection < IColumn > columns , boolean reverseOrder ) { } private GenericArray < ColumnOrSuperColumn > avronateColumnFamily ( ColumnFamily cf , boolean subColumnsOnly , boolean reverseOrder ) { } public List < ColumnOrSuperColumn > get_slice ( ByteBuffer key , ColumnParent columnParent , SlicePredicate predicate , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } private List < CoscsMapEntry > multigetSliceInternal ( String keyspace , List < ByteBuffer > keys , ColumnParent columnParent , SlicePredicate predicate , ConsistencyLevel consistencyLevel ) throws InvalidRequestException , TimedOutException , UnavailableException { } private List < CoscsMapEntry > getSlice ( List < ReadCommand > commands , ConsistencyLevel consistencyLevel ) throws InvalidRequestException , TimedOutException , UnavailableException { } public int get_count ( ByteBuffer key , ColumnParent columnParent , SlicePredicate predicate , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } public List < CoscsMapEntry > multiget_slice ( List < ByteBuffer > keys , ColumnParent columnParent , SlicePredicate predicate , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } public Void insert ( ByteBuffer key , ColumnParent parent , Column column , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } public Void remove ( ByteBuffer key , ColumnPath columnPath , long timestamp , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } private void doInsert ( ConsistencyLevel consistency , RowMutation rm ) throws TimedOutException , UnavailableException { } public Void batch_mutate ( List < MutationsMapEntry > mutationMap , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } private static IClock unavronateClock ( long timestamp ) { } private static RowMutation getRowMutationFromMutations ( String keyspace , byte [ ] key , Map < CharSequence , List < Mutation > > cfMap ) { } private static void addColumnOrSuperColumnToRowMutation ( RowMutation rm , String cfName , ColumnOrSuperColumn cosc ) { } private static void deleteColumnOrSuperColumnToRowMutation ( RowMutation rm , String cfName , Deletion del ) { } private static void applyMigrationOnStage ( final Migration m ) throws InvalidRequestException { } private org . apache . cassandra . thrift . ConsistencyLevel thriftConsistencyLevel ( ConsistencyLevel consistency ) { } public Void set_keyspace ( CharSequence keyspace ) throws InvalidRequestException { } public CharSequence system_add_keyspace ( KsDef ksDef ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_add_column_family ( CfDef cfDef ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_update_column_family ( CfDef cf_def ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_update_keyspace ( KsDef ks_def ) throws AvroRemoteException , InvalidRequestException { } public GenericArray < CharSequence > describe_keyspaces ( ) throws AvroRemoteException { } public Utf8 describe_cluster_name ( ) throws AvroRemoteException { } public Utf8 describe_version ( ) throws AvroRemoteException { } public Map < CharSequence , List < CharSequence > > check_schema_agreement ( ) { } protected void checkKeyspaceAndLoginAuthorized ( Permission perm ) throws InvalidRequestException { } private void schedule ( ) { <START_BUG> requestScheduler . queue ( Thread . currentThread ( ) , clientState . getSchedulingId ( ) ) ; <END_BUG> } private void release ( ) { } private CFMetaData convertToCFMetaData ( CfDef cf_def ) throws InvalidRequestException , ConfigurationException { } public KsDef describe_keyspace ( CharSequence keyspace ) throws AvroRemoteException , NotFoundException { } public CharSequence system_rename_column_family ( CharSequence old_name , CharSequence new_name ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_drop_column_family ( CharSequence column_family ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_drop_keyspace ( CharSequence keyspace ) throws AvroRemoteException , InvalidRequestException { } public CharSequence system_rename_keyspace ( CharSequence old_name , CharSequence new_name ) throws AvroRemoteException , InvalidRequestException { } public CharSequence describe_partitioner ( ) throws AvroRemoteException { } public List < CharSequence > describe_splits ( CharSequence cfName , CharSequence start_token , CharSequence end_token , int keys_per_split ) { } public List < KeyCountMapEntry > multiget_count ( List < ByteBuffer > keys , ColumnParent columnParent , SlicePredicate predicate , ConsistencyLevel consistencyLevel ) throws AvroRemoteException , InvalidRequestException , TimedOutException , UnavailableException { } public List < TokenRange > describe_ring ( CharSequence keyspace ) throws AvroRemoteException , InvalidRequestException { } public Void truncate ( CharSequence columnFamily ) throws AvroRemoteException , InvalidRequestException , UnavailableException { } public List < KeySlice > get_range_slices ( ColumnParent column_parent , SlicePredicate slice_predicate , KeyRange range , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException { } public List < KeySlice > get_indexed_slices ( ColumnParent column_parent , IndexClause index_clause , SlicePredicate column_predicate , ConsistencyLevel consistency_level ) throws InvalidRequestException , TimedOutException , UnavailableException { } private List < KeySlice > avronateKeySlices ( List < Row > rows , ColumnParent column_parent , SlicePredicate predicate ) { } private org . apache . cassandra . thrift . ColumnParent thriftColumnParent ( ColumnParent avro_column_parent ) { } private org . apache . cassandra . thrift . SlicePredicate thriftSlicePredicate ( SlicePredicate avro_pred ) { } private SliceRange thriftSliceRange ( SliceRange avro_range ) { } private org . apache . cassandra . thrift . IndexClause thriftIndexClause ( IndexClause avro_clause ) { }

Fix:
requestScheduler . queue ( Thread . currentThread ( ) , clientState . getSchedulingValue ( ) ) ;