Program: 33106
Project: 33106
Buggy source:
@Test(timeout=TC_TIMEOUT) public void deviceUpdateParamsWithPushDisabled_Valid() throws InterruptedException {
  InstrumentationRegistry.getTargetContext().bindService(new Intent(InstrumentationRegistry.getTargetContext(),RCDevice.class),this,Context.BIND_AUTO_CREATE);
  await().atMost(SIGNALING_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  final RCDevice device=binder.getService();
  Handler clientHandler=new Handler(Looper.getMainLooper());
  final HashMap<String,Object> params=new HashMap<String,Object>();
  clientHandler.post(new Runnable(){
    @Override public void run(){
      device.clearCache();
      params.put(RCDevice.ParameterKeys.INTENT_INCOMING_CALL,new Intent(RCDevice.ACTION_INCOMING_CALL,null,InstrumentationRegistry.getTargetContext(),CallActivity.class));
      params.put(RCDevice.ParameterKeys.INTENT_INCOMING_MESSAGE,new Intent(RCDevice.ACTION_INCOMING_MESSAGE,null,InstrumentationRegistry.getTargetContext(),MessageActivity.class));
      params.put(RCDevice.ParameterKeys.SIGNALING_DOMAIN,SERVER_HOST + "String_Node_Str" + SERVER_PORT);
      params.put(RCDevice.ParameterKeys.SIGNALING_USERNAME,CLIENT_NAME);
      params.put(RCDevice.ParameterKeys.SIGNALING_PASSWORD,CLIENT_PASSWORD);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_URL,ICE_URL);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME,ICE_USERNAME);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD,ICE_PASSWORD);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN,ICE_DOMAIN);
      params.put(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED,true);
      params.put(RCDevice.ParameterKeys.SIGNALING_SECURE_ENABLED,false);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ENABLE_PUSH_FOR_ACCOUNT,true);
      params.put(RCDevice.ParameterKeys.DEBUG_JAIN_DISABLE_CERTIFICATE_VERIFICATION,true);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_APPLICATION_NAME,PUSH_APPLICATION_NAME);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ACCOUNT_EMAIL,PUSH_ACCOUNT);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ACCOUNT_PASSWORD,PUSH_PASSWORD);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_PUSH_DOMAIN,PUSH_DOMAIN);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_HTTP_DOMAIN,HTTP_DOMAIN);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_FCM_SERVER_KEY,PUSH_FCM_KEY);
      device.setLogLevel(Log.VERBOSE);
      try {
        device.initialize(InstrumentationRegistry.getTargetContext(),params,IntegrationTests.this);
      }
 catch (      RCException e) {
        Log.e(TAG,"String_Node_Str" + e.errorText);
      }
    }
  }
);
  await().atMost(PUSH_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  assertThat(context.get("String_Node_Str")).isEqualTo(RCClient.ErrorCodes.SUCCESS.ordinal());
  deviceReconfigured=false;
  params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ENABLE_PUSH_FOR_ACCOUNT,false);
  clientHandler.post(new Runnable(){
    @Override public void run(){
      try {
        device.reconfigure(params);
      }
 catch (      Exception e) {
        Log.e(TAG,"String_Node_Str" + e.toString());
      }
    }
  }
);
  await().atMost(PUSH_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  assertThat(context.get("String_Node_Str")).isEqualTo(RCClient.ErrorCodes.SUCCESS.ordinal());
  clientHandler.post(new Runnable(){
    @Override public void run(){
      device.clearCache();
      device.release();
    }
  }
);
  await().atMost(SIGNALING_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  InstrumentationRegistry.getTargetContext().unbindService(this);
}

Fixed version (ground truth):
@Test(timeout=TC_TIMEOUT) public void deviceUpdateParamsWithPushDisabled_Valid() throws InterruptedException {
  InstrumentationRegistry.getTargetContext().bindService(new Intent(InstrumentationRegistry.getTargetContext(),RCDevice.class),this,Context.BIND_AUTO_CREATE);
  await().atMost(SIGNALING_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  final RCDevice device=binder.getService();
  Handler clientHandler=new Handler(Looper.getMainLooper());
  final HashMap<String,Object> params=new HashMap<String,Object>();
  clientHandler.post(new Runnable(){
    @Override public void run(){
      device.clearCache();
      params.put(RCDevice.ParameterKeys.INTENT_INCOMING_CALL,new Intent(RCDevice.ACTION_INCOMING_CALL,null,InstrumentationRegistry.getTargetContext(),CallActivity.class));
      params.put(RCDevice.ParameterKeys.INTENT_INCOMING_MESSAGE,new Intent(RCDevice.ACTION_INCOMING_MESSAGE,null,InstrumentationRegistry.getTargetContext(),MessageActivity.class));
      params.put(RCDevice.ParameterKeys.SIGNALING_DOMAIN,SERVER_HOST + "String_Node_Str" + SERVER_PORT);
      params.put(RCDevice.ParameterKeys.SIGNALING_USERNAME,CLIENT_NAME);
      params.put(RCDevice.ParameterKeys.SIGNALING_PASSWORD,CLIENT_PASSWORD);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_URL,ICE_URL);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME,ICE_USERNAME);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD,ICE_PASSWORD);
      params.put(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN,ICE_DOMAIN);
      params.put(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED,true);
      params.put(RCDevice.ParameterKeys.SIGNALING_SECURE_ENABLED,false);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ENABLE_PUSH_FOR_ACCOUNT,true);
      params.put(RCDevice.ParameterKeys.DEBUG_DISABLE_CERTIFICATE_VERIFICATION,true);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_APPLICATION_NAME,PUSH_APPLICATION_NAME);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ACCOUNT_EMAIL,PUSH_ACCOUNT);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ACCOUNT_PASSWORD,PUSH_PASSWORD);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_PUSH_DOMAIN,PUSH_DOMAIN);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_HTTP_DOMAIN,HTTP_DOMAIN);
      params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_FCM_SERVER_KEY,PUSH_FCM_KEY);
      device.setLogLevel(Log.VERBOSE);
      try {
        device.initialize(InstrumentationRegistry.getTargetContext(),params,IntegrationTests.this);
      }
 catch (      RCException e) {
        Log.e(TAG,"String_Node_Str" + e.errorText);
      }
    }
  }
);
  await().atMost(PUSH_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  assertThat(context.get("String_Node_Str")).isEqualTo(RCClient.ErrorCodes.SUCCESS.ordinal());
  deviceReconfigured=false;
  params.put(RCDevice.ParameterKeys.PUSH_NOTIFICATIONS_ENABLE_PUSH_FOR_ACCOUNT,false);
  clientHandler.post(new Runnable(){
    @Override public void run(){
      try {
        device.reconfigure(params);
      }
 catch (      Exception e) {
        Log.e(TAG,"String_Node_Str" + e.toString());
      }
    }
  }
);
  await().atMost(PUSH_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  assertThat(context.get("String_Node_Str")).isEqualTo(RCClient.ErrorCodes.SUCCESS.ordinal());
  clientHandler.post(new Runnable(){
    @Override public void run(){
      device.clearCache();
      device.release();
    }
  }
);
  await().atMost(SIGNALING_TIMEOUT,TimeUnit.SECONDS).until(fieldIn(this).ofType(boolean.class).andWithName("String_Node_Str"),equalTo(true));
  InstrumentationRegistry.getTargetContext().unbindService(this);
}