Buggy code:
class TransactionManager { private static Subscription subscription = null ; private static Subscription cardPaymentSubscription = null ; private static Subscription paymentStatusSubscription = null ; private static Subscription cardSubscription = null ; private static Subscription deleteCardSubscription = null ; private static Subscription offersSubscription = null ; public static void registerCard ( final Activity activity , CardTokenRequest cardTokenRequest , final String userId , final TransactionCallback callBack ) { final VeritransSDK veritransSDK = VeritransSDK . getVeritransSDK ( ) ; final String merchantToken = veritransSDK . getMerchantToken ( activity ) ; if ( ( veritransSDK != null ) && ( merchantToken != null ) ) { VeritranceApiInterface apiInterface = VeritransRestAdapter . getApiClient ( activity , true ) ; if ( apiInterface != null ) { <START_BUG> final Observable < RegisterCardResponse > observable = apiInterface . registerCard ( cardTokenRequest . getCardNumber ( ) , cardTokenRequest . getCardExpiryMonth ( ) , cardTokenRequest . getCardExpiryYear ( ) , cardTokenRequest . getClientKey ( ) ) ; <END_BUG> TransactionManager . subscription = observable . subscribeOn ( Schedulers . io ( ) ) . observeOn ( AndroidSchedulers . mainThread ( ) ) . subscribe ( new rx . Observer < RegisterCardResponse > ( ) { @ Override public void onCompleted ( ) { if ( ( ( TransactionManager . subscription ) != null ) && ( ! ( TransactionManager . subscription . isUnsubscribed ( ) ) ) ) { TransactionManager . subscription . unsubscribe ( ) ; } TransactionManager . releaseResources ( ) ; } @ Override public void onError ( Throwable throwable ) { Logger . e ( "error<seq2seq4repair_space>while<seq2seq4repair_space>getting<seq2seq4repair_space>token<seq2seq4repair_space>:<seq2seq4repair_space>" , ( "" + ( throwable . getMessage ( ) ) ) ) ; callBack . onFailure ( throwable . getMessage ( ) , null ) ; TransactionManager . releaseResources ( ) ; } @ Override public void onNext ( RegisterCardResponse registerCardResponse ) { TransactionManager . releaseResources ( ) ; if ( registerCardResponse != null ) { if ( ( veritransSDK != null ) && ( veritransSDK . isLogEnabled ( ) ) ) { TransactionManager . displayResponse ( registerCardResponse ) ; } registerCardResponse . setUserId ( userId ) ; VeritranceApiInterface apiInterface = VeritransRestAdapter . getMerchantApiClient ( activity , true ) ; if ( apiInterface != null ) { Observable < CardResponse > registerCard = apiInterface . registerCard ( merchantToken , registerCardResponse ) ; TransactionManager . cardSubscription = registerCard . subscribeOn ( Schedulers . io ( ) ) . observeOn ( AndroidSchedulers . mainThread ( ) ) . subscribe ( new rx . Observer < CardResponse > ( ) { @ Override public void onCompleted ( ) { } @ Override public void onError ( Throwable e ) { Log . e ( "CardSubscriber" , e . getMessage ( ) ) ; } @ Override public void onNext ( CardResponse cardResponse ) { } } ) ; } if ( registerCardResponse . getStatusCode ( ) . trim ( ) . equalsIgnoreCase ( SUCCESS_CODE_200 ) ) { callBack . onSuccess ( registerCardResponse ) ; } else { if ( ( registerCardResponse != null ) && ( ! ( TextUtils . isEmpty ( registerCardResponse . getStatusMessage ( ) ) ) ) ) { callBack . onFailure ( registerCardResponse . getStatusMessage ( ) , registerCardResponse ) ; } else { callBack . onFailure ( ERROR_EMPTY_RESPONSE , registerCardResponse ) ; } } } else { callBack . onFailure ( ERROR_EMPTY_RESPONSE , null ) ; Logger . e ( ERROR_EMPTY_RESPONSE ) ; } } } ) ; } else { callBack . onFailure ( ERROR_UNABLE_TO_CONNECT , null ) ; Logger . e ( ERROR_UNABLE_TO_CONNECT ) ; TransactionManager . releaseResources ( ) ; } } else { callBack . onFailure ( ERROR_SDK_IS_NOT_INITIALIZED , null ) ; Logger . e ( ERROR_SDK_IS_NOT_INITIALIZED ) ; TransactionManager . releaseResources ( ) ; } } public static void getToken ( Activity activity , CardTokenRequest cardTokenRequest , final TokenCallBack callBack ) { } public static void paymentUsingPermataBank ( final Activity activity , final PermataBankTransfer permataBankTransfer , final TransactionCallback callBack ) { } public static void paymentUsingCard ( Activity activity , CardTransfer cardTransfer , final TransactionCallback cardPaymentTransactionCallback ) { } public static void paymentUsingMandiriClickPay ( final Activity activity , final MandiriClickPayRequestModel mandiriClickPayRequestModel , final TransactionCallback callBack ) { } public static void paymentUsingMandiriBillPay ( Activity activity , MandiriBillPayTransferModel mandiriBillPayTransferModel , final TransactionCallback callBack ) { } public static void paymentUsingCIMBPay ( Activity activity , CIMBClickPayModel cimbClickPayModel , final TransactionCallback callback ) { } public static void paymentUsingMandiriECash ( Activity activity , MandiriECashModel mandiriECashModel , final TransactionCallback callback ) { } public static void paymentUsingEpayBri ( Activity activity , EpayBriTransfer epayBriTransfer , final TransactionCallback callback ) { } public static void getPaymentStatus ( Activity activity , String id , final PaymentStatusCallback callback ) { } public static void paymentUsingIndosatDompetku ( final Activity activity , final IndosatDompetkuRequest indosatDompetkuRequest , final TransactionCallback callback ) { } public static void paymentUsingIndomaret ( final Activity activity , final IndomaretRequestModel indomaretRequestModel , final TransactionCallback callback ) { } public static void paymentUsingBBMMoney ( final Activity activity , final BBMMoneyRequestModel bbmMoneyRequestModel , final TransactionCallback callback ) { } public static void saveCards ( final Activity activity , final CardTokenRequest cardTokenRequest , final SavedCardCallback callback ) { } public static void getCards ( final Activity activity , final SavedCardCallback callback ) { } private static void displayTokenResponse ( TokenDetailsResponse tokenDetailsResponse ) { } private static void displayResponse ( TransactionResponse transferResponse ) { } private static void releaseResources ( ) { } public static void deleteCard ( final Activity activity , CardTokenRequest creditCard , final DeleteCardCallback callback ) { } public static void getOffers ( final Activity activity , final GetOffersCallback callback ) { } No newline ; at end ; of file ; }

Fix:
final Observable < RegisterCardResponse > observable = apiInterface . registerCard ( cardTokenRequest . getCardNumber ( ) , String . valueOf ( cardTokenRequest . getCardExpiryMonth ( ) ) , cardTokenRequest . getCardExpiryYear ( ) , cardTokenRequest . getClientKey ( ) ) ;