nus-yam/ex-repair huggingface dataset:
Program: 115666
Project: 115666
Buggy source:
/** 
 * Update an existing tenant
 * @param id        tenant id
 * @param admin     username
 * @param firstName first name
 * @param lastName  last name
 * @param password  password
 * @param domain    domain name
 * @param email     email
 * @throws CommandException
 */
public void updateTenant(int id,String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstName(firstName);
    tenantInfo.setLastName(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    tenantInfo.setTenantId(id);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + domain);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Update an existing tenant
 * @param id        tenant id
 * @param admin     username
 * @param firstName first name
 * @param lastName  last name
 * @param password  password
 * @param domain    domain name
 * @param email     email
 * @throws CommandException
 */
public void updateTenant(int id,String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstName(firstName);
    tenantInfo.setLastName(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    tenantInfo.setTenantId(id);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      String resultString=CliUtils.getHttpResponseString(response);
      String errorMsg=gson.fromJson(resultString,ResponseMessageBean.class).getMessage();
      System.out.println(errorMsg);
    }
 else {
      System.out.println("String_Node_Str" + domain);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115667
Project: 115667
Buggy source:
/** 
 * Update tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 200 if tenant is successfully updated, 404 if specified tenant not found
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response updateTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.updateExistingTenant(tenantInfoBean);
    return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
 catch (  TenantNotFoundException ex) {
    return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  InvalidEmailException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getEmail()))).build();
  }
catch (  Exception e) {
    String msg="String_Node_Str" + tenantInfoBean.getTenantDomain();
    log.error(msg,e);
    throw new RestAPIException(msg);
  }
}

Fixed version (ground truth):
/** 
 * Update tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 200 if tenant is successfully updated, 404 if specified tenant not found
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response updateTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.updateExistingTenant(tenantInfoBean);
    return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
 catch (  TenantNotFoundException ex) {
    return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  InvalidEmailException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getEmail()))).build();
  }
catch (  InvalidDomainException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
catch (  Exception e) {
    String msg="String_Node_Str" + tenantInfoBean.getTenantDomain();
    log.error(msg,e);
    throw new RestAPIException(msg);
  }
}
Program: 115672
Project: 115672
Buggy source:
public NetworkPartitionAlreadyExistsException(String message){
  super(message);
}

Fixed version (ground truth):
public NetworkPartitionAlreadyExistsException(String msg,Exception ex){
  super(msg,ex);
  this.setMessage(msg);
}
Program: 115673
Project: 115673
Buggy source:
/** 
 * Add network partition
 * @param networkPartitionBean Network Partition
 * @return 201 if network partition successfully added, 409 if network partition already exists
 * @throws RestAPIException
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException {
  String networkPartitionId=networkPartitionBean.getId();
  try {
    StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
  }
 catch (  CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
    return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
catch (  CloudControllerServiceInvalidNetworkPartitionExceptionException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
  return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",networkPartitionId))).build();
}

Fixed version (ground truth):
/** 
 * Add network partition
 * @param networkPartitionBean Network Partition
 * @return 201 if network partition successfully added, 409 if network partition already exists
 * @throws RestAPIException
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException {
  String networkPartitionId=networkPartitionBean.getId();
  try {
    StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
  }
 catch (  CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
    String backendErrorMessage=e.getFaultMessage().getNetworkPartitionAlreadyExistsException().getMessage();
    return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,backendErrorMessage)).build();
  }
catch (  CloudControllerServiceInvalidNetworkPartitionExceptionException e) {
    String backendErrorMessage=e.getFaultMessage().getInvalidNetworkPartitionException().getMessage();
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,backendErrorMessage)).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
  return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",networkPartitionId))).build();
}
Program: 115674
Project: 115674
Buggy source:
/** 
 * Add new tenant
 * @param admin     username
 * @param firstName first name
 * @param lastName  last name
 * @param password  password
 * @param domain    domain name
 * @param email     email
 * @throws CommandException
 */
public void addTenant(String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstName(firstName);
    tenantInfo.setLastName(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + domain);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Add new tenant
 * @param admin     username
 * @param firstName first name
 * @param lastName  last name
 * @param password  password
 * @param domain    domain name
 * @param email     email
 * @throws CommandException
 */
public void addTenant(String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstName(firstName);
    tenantInfo.setLastName(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode == 201) {
      System.out.println("String_Node_Str" + domain);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      String errorMsg=gson.fromJson(resultString,ResponseMessageBean.class).getMessage();
      System.out.println(errorMsg);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115675
Project: 115675
Buggy source:
/** 
 * Update tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 200 if tenant is successfully updated, 404 if specified tenant not found
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response updateTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.updateExistingTenant(tenantInfoBean);
  }
 catch (  TenantNotFoundException ex) {
    Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  InvalidEmailException e) {
    Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  Exception e) {
    String msg="String_Node_Str" + tenantInfoBean.getTenantDomain();
    log.error(msg,e);
    throw new RestAPIException(msg);
  }
  return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
}

Fixed version (ground truth):
/** 
 * Update tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 200 if tenant is successfully updated, 404 if specified tenant not found
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response updateTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.updateExistingTenant(tenantInfoBean);
    return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
 catch (  TenantNotFoundException ex) {
    return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  InvalidEmailException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getEmail()))).build();
  }
catch (  Exception e) {
    String msg="String_Node_Str" + tenantInfoBean.getTenantDomain();
    log.error(msg,e);
    throw new RestAPIException(msg);
  }
}
Program: 115676
Project: 115676
Buggy source:
/** 
 * Adds the tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 201 if the tenant is successfully added
 * @throws RestAPIException the rest api exception
 */
@POST @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response addTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.addTenant(tenantInfoBean);
  }
 catch (  InvalidEmailException e) {
    Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
catch (  InvalidDomainException e) {
    Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(tenantInfoBean.getTenantDomain()).build();
  return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
}

Fixed version (ground truth):
/** 
 * Adds the tenant.
 * @param tenantInfoBean the tenant info bean
 * @return 201 if the tenant is successfully added
 * @throws RestAPIException the rest api exception
 */
@POST @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response addTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws RestAPIException {
  try {
    StratosApiV41Utils.addTenant(tenantInfoBean);
    URI url=uriInfo.getAbsolutePathBuilder().path(tenantInfoBean.getTenantDomain()).build();
    return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
 catch (  InvalidEmailException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getEmail()))).build();
  }
catch (  InvalidDomainException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,String.format("String_Node_Str",tenantInfoBean.getTenantDomain()))).build();
  }
}
Program: 115677
Project: 115677
Buggy source:
/** 
 * Activate tenant
 * @param tenantDomain domain name of the tenant
 * @throws CommandException
 */
public void activateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_ACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Activate tenant
 * @param tenantDomain domain name of the tenant
 * @throws CommandException
 */
public void activateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_ACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      String errorMsg=gson.fromJson(resultString,ResponseMessageBean.class).getMessage();
      System.out.println(errorMsg);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115678
Project: 115678
Buggy source:
/** 
 * Deactivate tenant
 * @param tenantDomain domain name of the tenant
 * @throws CommandException
 */
public void deactivateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_DEACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Deactivate tenant
 * @param tenantDomain domain name of the tenant
 * @throws CommandException
 */
public void deactivateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_DEACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      String errorMsg=gson.fromJson(resultString,ResponseMessageBean.class).getMessage();
      System.out.println(errorMsg);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115679
Project: 115679
Buggy source:
/** 
 * Activate tenant.
 * @param tenantDomain the tenant domain
 * @return 200 if tenant activated successfully
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response activateTenant(@PathParam("String_Node_Str") String tenantDomain) throws RestAPIException {
  StratosApiV41Utils.activateTenant(tenantDomain);
  return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantDomain))).build();
}

Fixed version (ground truth):
/** 
 * Activate tenant.
 * @param tenantDomain the tenant domain
 * @return 200 if tenant activated successfully
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response activateTenant(@PathParam("String_Node_Str") String tenantDomain) throws RestAPIException {
  try {
    StratosApiV41Utils.activateTenant(tenantDomain);
  }
 catch (  InvalidDomainException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
  return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantDomain))).build();
}
Program: 115680
Project: 115680
Buggy source:
/** 
 * Deactivate tenant.
 * @param tenantDomain the tenant domain
 * @return 200 if tenant deactivated successfully
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response deactivateTenant(@PathParam("String_Node_Str") String tenantDomain) throws RestAPIException {
  StratosApiV41Utils.deactivateTenant(tenantDomain);
  return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantDomain))).build();
}

Fixed version (ground truth):
/** 
 * Deactivate tenant.
 * @param tenantDomain the tenant domain
 * @return 200 if tenant deactivated successfully
 * @throws RestAPIException the rest api exception
 */
@PUT @Path("String_Node_Str") @Consumes("String_Node_Str") @Produces("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response deactivateTenant(@PathParam("String_Node_Str") String tenantDomain) throws RestAPIException {
  try {
    StratosApiV41Utils.deactivateTenant(tenantDomain);
  }
 catch (  InvalidDomainException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
  return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",tenantDomain))).build();
}
Program: 115681
Project: 115681
Buggy source:
/** 
 * Deactivate Tenant
 * @param tenantDomain tenantDomain
 * @throws RestAPIException
 */
public static void deactivateTenant(String tenantDomain) throws RestAPIException {
  TenantManager tenantManager=ServiceHolder.getTenantManager();
  int tenantId;
  try {
    tenantId=tenantManager.getTenantId(tenantDomain);
    if (tenantId != -1) {
      try {
        TenantMgtUtil.deactivateTenant(tenantDomain,tenantManager,tenantId);
      }
 catch (      Exception e) {
        String msg="String_Node_Str" + tenantDomain;
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
      try {
        TenantMgtUtil.triggerTenantDeactivation(tenantId);
      }
 catch (      StratosException e) {
        String msg="String_Node_Str";
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
    }
 else {
      String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
      throw new RestAPIException(msg);
    }
  }
 catch (  UserStoreException e) {
    String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
}

Fixed version (ground truth):
/** 
 * Deactivate Tenant
 * @param tenantDomain tenantDomain
 * @throws RestAPIException
 */
public static void deactivateTenant(String tenantDomain) throws RestAPIException {
  TenantManager tenantManager=ServiceHolder.getTenantManager();
  int tenantId;
  try {
    tenantId=tenantManager.getTenantId(tenantDomain);
    if (tenantId != -1) {
      try {
        TenantMgtUtil.deactivateTenant(tenantDomain,tenantManager,tenantId);
      }
 catch (      Exception e) {
        String msg="String_Node_Str" + tenantDomain;
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
      try {
        TenantMgtUtil.triggerTenantDeactivation(tenantId);
      }
 catch (      StratosException e) {
        String msg="String_Node_Str";
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
    }
 else {
      String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
      throw new InvalidDomainException(msg);
    }
  }
 catch (  UserStoreException e) {
    String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
}
Program: 115682
Project: 115682
Buggy source:
/** 
 * Activate a Tenant
 * @param tenantDomain tenantDomainName
 * @throws RestAPIException
 */
public static void activateTenant(String tenantDomain) throws RestAPIException {
  TenantManager tenantManager=ServiceHolder.getTenantManager();
  int tenantId;
  try {
    tenantId=tenantManager.getTenantId(tenantDomain);
    if (tenantId != -1) {
      try {
        TenantMgtUtil.activateTenant(tenantDomain,tenantManager,tenantId);
      }
 catch (      Exception e) {
        String msg="String_Node_Str" + tenantDomain;
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
      try {
        TenantMgtUtil.triggerTenantActivation(tenantId);
      }
 catch (      StratosException e) {
        String msg="String_Node_Str";
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
    }
 else {
      String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
      throw new RestAPIException(msg);
    }
  }
 catch (  UserStoreException e) {
    String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
}

Fixed version (ground truth):
/** 
 * Activate a Tenant
 * @param tenantDomain tenantDomainName
 * @throws RestAPIException
 */
public static void activateTenant(String tenantDomain) throws RestAPIException {
  TenantManager tenantManager=ServiceHolder.getTenantManager();
  int tenantId;
  try {
    tenantId=tenantManager.getTenantId(tenantDomain);
    if (tenantId != -1) {
      try {
        TenantMgtUtil.activateTenant(tenantDomain,tenantManager,tenantId);
      }
 catch (      Exception e) {
        String msg="String_Node_Str" + tenantDomain;
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
      try {
        TenantMgtUtil.triggerTenantActivation(tenantId);
      }
 catch (      StratosException e) {
        String msg="String_Node_Str";
        log.error(msg,e);
        throw new RestAPIException(msg,e);
      }
    }
 else {
      String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
      throw new InvalidDomainException(msg);
    }
  }
 catch (  UserStoreException e) {
    String msg="String_Node_Str" + tenantDomain + "String_Node_Str";
    log.error(msg,e);
    throw new RestAPIException(msg,e);
  }
}
Program: 115684
Project: 115684
Buggy source:
public void undeployEntity(String serviceEndpoint,String entityName,String entityId){
  try {
    int responseCode=executeDelete(serviceEndpoint.replace("String_Node_Str",entityId));
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode == 500) {
      System.out.println("String_Node_Str");
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName,entityId));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName,entityId);
    System.out.println(message);
    log.error(message,e);
  }
}

Fixed version (ground truth):
public void undeployEntity(String serviceEndpoint,String entityName,String entityId){
  try {
    String responseMessage=executeDelete(serviceEndpoint.replace("String_Node_Str",entityId));
    System.out.println(responseMessage);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName,entityId);
    System.out.println(message);
    log.error(message,e);
  }
}
Program: 115685
Project: 115685
Buggy source:
private int executeDelete(String serviceEndpoint) throws IOException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=doDelete(httpClient,getBaseURL() + serviceEndpoint);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
    return responseCode;
  }
  finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
private String executeDelete(String serviceEndpoint) throws IOException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=doDelete(httpClient,getBaseURL() + serviceEndpoint);
    String result=getHttpResponseString(response);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    return gson.fromJson(result,ResponseMessageBean.class).getMessage();
  }
  finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115686
Project: 115686
Buggy source:
public void deleteEntity(String serviceEndpoint,String identifier,String entityName){
  try {
    int responseCode=executeDelete(serviceEndpoint);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode == 500) {
      System.out.println("String_Node_Str");
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName,identifier));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    log.error(message,e);
  }
}

Fixed version (ground truth):
public void deleteEntity(String serviceEndpoint,String identifier,String entityName){
  try {
    String responseMessage=executeDelete(serviceEndpoint);
    System.out.println(responseMessage);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    log.error(message,e);
  }
}
Program: 115687
Project: 115687
Buggy source:
/** 
 * Updates the Deployment Policy Definition.
 * @param deploymentPolicyID the deployment policy id
 * @return 200 if deployment policy is successfully removed
 * @throws RestAPIException the rest api exception
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response removeDeploymentPolicy(@PathParam("String_Node_Str") String deploymentPolicyID) throws RestAPIException {
  try {
    StratosApiV41Utils.removeDeploymentPolicy(deploymentPolicyID);
  }
 catch (  AutoscalerServiceDeploymentPolicyNotExistsExceptionException e) {
    return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(deploymentPolicyID).build();
  return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str" + "String_Node_Str",deploymentPolicyID))).build();
}

Fixed version (ground truth):
/** 
 * Updates the Deployment Policy Definition.
 * @param deploymentPolicyId the deployment policy id
 * @return 200 if deployment policy is successfully removed
 * @throws RestAPIException the rest api exception
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response removeDeploymentPolicy(@PathParam("String_Node_Str") String deploymentPolicyId) throws RestAPIException {
  try {
    StratosApiV41Utils.removeDeploymentPolicy(deploymentPolicyId);
  }
 catch (  AutoscalerServiceDeploymentPolicyNotExistsExceptionException e) {
    return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(deploymentPolicyId).build();
  return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str" + "String_Node_Str",deploymentPolicyId))).build();
}
Program: 115688
Project: 115688
Buggy source:
/** 
 * Creates the cartridge group definition.
 * @param serviceGroupDefinition the cartridge group definition
 * @return 201 if group added successfully
 * @throws RestAPIException the rest api exception
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response addServiceGroup(CartridgeGroupBean serviceGroupDefinition) throws RestAPIException {
  try {
    StratosApiV41Utils.addServiceGroup(serviceGroupDefinition);
    URI url=uriInfo.getAbsolutePathBuilder().path(serviceGroupDefinition.getName()).build();
    return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",serviceGroupDefinition.getName()))).build();
  }
 catch (  InvalidCartridgeGroupDefinitionException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
catch (  RestAPIException e) {
    if (e.getCause().getMessage().contains("String_Node_Str")) {
      return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
    }
 else     if (e.getCause().getMessage().contains("String_Node_Str")) {
      return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getCause().getMessage())).build();
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates the cartridge group definition.
 * @param serviceGroupDefinition the cartridge group definition
 * @return 201 if group added successfully
 * @throws RestAPIException the rest api exception
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response addServiceGroup(CartridgeGroupBean serviceGroupDefinition) throws RestAPIException {
  try {
    StratosApiV41Utils.addServiceGroup(serviceGroupDefinition);
    URI url=uriInfo.getAbsolutePathBuilder().path(serviceGroupDefinition.getName()).build();
    return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",serviceGroupDefinition.getName()))).build();
  }
 catch (  InvalidCartridgeGroupDefinitionException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
catch (  RestAPIException e) {
    if (e.getCause().getMessage().contains("String_Node_Str")) {
      return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,"String_Node_Str")).build();
    }
 else     if (e.getCause().getMessage().contains("String_Node_Str") || e.getCause().getMessage().contains("String_Node_Str")) {
      return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getCause().getMessage())).build();
    }
 else {
      throw e;
    }
  }
}
Program: 115690
Project: 115690
Buggy source:
/** 
 * Add network partition
 * @param networkPartition
 * @throws NetworkPartitionAlreadyExistsException
 */
public boolean addNetworkPartition(NetworkPartition networkPartition) throws NetworkPartitionAlreadyExistsException ;

Fixed version (ground truth):
/** 
 * Add network partition
 * @param networkPartition
 * @throws NetworkPartitionAlreadyExistsException
 */
public boolean addNetworkPartition(NetworkPartition networkPartition) throws NetworkPartitionAlreadyExistsException, InvalidNetworkPartitionException ;
Program: 115691
Project: 115691
Buggy source:
public void addNetworkPartition(NetworkPartition networkPartition) throws RemoteException, CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException {
  stub.addNetworkPartition(networkPartition);
}

Fixed version (ground truth):
public void addNetworkPartition(NetworkPartition networkPartition) throws RemoteException, CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException, CloudControllerServiceInvalidNetworkPartitionExceptionException {
  stub.addNetworkPartition(networkPartition);
}
Program: 115692
Project: 115692
Buggy source:
/** 
 * Add network partition
 * @param networkPartitionBean Network Partition
 * @return 201 if network partition successfully added, 409 if network partition already exists
 * @throws RestAPIException
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException {
  String networkPartitionId=networkPartitionBean.getId();
  try {
    StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
  }
 catch (  CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
    return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
  return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",networkPartitionId))).build();
}

Fixed version (ground truth):
/** 
 * Add network partition
 * @param networkPartitionBean Network Partition
 * @return 201 if network partition successfully added, 409 if network partition already exists
 * @throws RestAPIException
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Response addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException {
  String networkPartitionId=networkPartitionBean.getId();
  try {
    StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
  }
 catch (  CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
    return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
catch (  CloudControllerServiceInvalidNetworkPartitionExceptionException e) {
    return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(ResponseMessageBean.ERROR,e.getMessage())).build();
  }
  URI url=uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
  return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,String.format("String_Node_Str",networkPartitionId))).build();
}
Program: 115693
Project: 115693
Buggy source:
/** 
 * Add a Network Partition
 * @param networkPartitionBean NetworkPartitionBean
 */
public static void addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException, CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException {
  try {
    CloudControllerServiceClient serviceClient=CloudControllerServiceClient.getInstance();
    serviceClient.addNetworkPartition(ObjectConverter.convertNetworkPartitionToCCStubNetworkPartition(networkPartitionBean));
  }
 catch (  RemoteException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
}

Fixed version (ground truth):
/** 
 * Add a Network Partition
 * @param networkPartitionBean NetworkPartitionBean
 */
public static void addNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException, CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException, CloudControllerServiceInvalidNetworkPartitionExceptionException {
  try {
    CloudControllerServiceClient serviceClient=CloudControllerServiceClient.getInstance();
    serviceClient.addNetworkPartition(ObjectConverter.convertNetworkPartitionToCCStubNetworkPartition(networkPartitionBean));
  }
 catch (  RemoteException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
}
Program: 115696
Project: 115696
Buggy source:
/** 
 * Stop statistics updater task of a service/cartridge type, factor.
 * @param serviceName service name/cartridge type
 * @param scalingFactor scaling factor
 */
public void stopStatisticsUpdaterTask(String serviceName,String scalingFactor){
  Map<String,ScheduledFuture> autoscalingFactorToTaskMap=serviceNameToTaskListMap.get(serviceName);
  if (autoscalingFactorToTaskMap != null) {
    ScheduledFuture task=autoscalingFactorToTaskMap.get(scalingFactor);
    if (task != null) {
      task.cancel(true);
      autoscalingFactorToTaskMap.remove(scalingFactor);
      if (log.isInfoEnabled()) {
        log.info(String.format("String_Node_Str" + "String_Node_Str",serviceName,scalingFactor));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Stop statistics updater task of a service/cartridge type, factor.
 * @param serviceName   service name/cartridge type
 * @param scalingFactor scaling factor
 */
public void stopStatisticsUpdaterTask(String serviceName,String scalingFactor){
  Map<String,ScheduledFuture> autoscalingFactorToTaskMap=serviceNameToTaskListMap.get(serviceName);
  if (autoscalingFactorToTaskMap != null) {
    ScheduledFuture task=autoscalingFactorToTaskMap.get(scalingFactor);
    if (task != null) {
      task.cancel(true);
      autoscalingFactorToTaskMap.remove(scalingFactor);
      if (log.isInfoEnabled()) {
        log.info(String.format("String_Node_Str" + "String_Node_Str",serviceName,scalingFactor));
      }
    }
  }
}
Program: 115697
Project: 115697
Buggy source:
/** 
 * Start application signup event receiver thread.
 * @param executorService executor service instance
 * @param topologyProvider topology provider instance
 */
private void startApplicationSignUpEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  applicationSignUpEventReceiver=new LoadBalancerCommonApplicationSignUpEventReceiver(topologyProvider);
  applicationSignUpEventReceiver.setExecutorService(executorService);
  applicationSignUpEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Start application signup event receiver thread.
 * @param executorService  executor service instance
 * @param topologyProvider topology provider instance
 */
private void startApplicationSignUpEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  applicationSignUpEventReceiver=new LoadBalancerCommonApplicationSignUpEventReceiver(topologyProvider);
  applicationSignUpEventReceiver.setExecutorService(executorService);
  applicationSignUpEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}
Program: 115698
Project: 115698
Buggy source:
/** 
 * Start topology event receiver thread.
 * @param executorService executor service instance
 * @param topologyProvider topology provider instance
 */
private void startTopologyEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  topologyEventReceiver=new LoadBalancerCommonTopologyEventReceiver(topologyProvider);
  addTopologyEventListeners(topologyEventReceiver);
  topologyEventReceiver.setExecutorService(executorService);
  topologyEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  if (log.isInfoEnabled()) {
    if (TopologyServiceFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyServiceFilter.getInstance().toString()));
    }
    if (TopologyClusterFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyClusterFilter.getInstance().toString()));
    }
    if (TopologyMemberFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyMemberFilter.getInstance().toString()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Start topology event receiver thread.
 * @param executorService  executor service instance
 * @param topologyProvider topology provider instance
 */
private void startTopologyEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  topologyEventReceiver=new LoadBalancerCommonTopologyEventReceiver(topologyProvider);
  addTopologyEventListeners(topologyEventReceiver);
  topologyEventReceiver.setExecutorService(executorService);
  topologyEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  if (log.isInfoEnabled()) {
    if (TopologyServiceFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyServiceFilter.getInstance().toString()));
    }
    if (TopologyClusterFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyClusterFilter.getInstance().toString()));
    }
    if (TopologyMemberFilter.getInstance().isActive()) {
      log.info(String.format("String_Node_Str",TopologyMemberFilter.getInstance().toString()));
    }
  }
}
Program: 115699
Project: 115699
Buggy source:
/** 
 * Start domain mapping event receiver thread.
 * @param executorService executor service instance
 * @param topologyProvider topology receiver instance
 */
private void startDomainMappingEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  domainMappingEventReceiver=new LoadBalancerCommonDomainMappingEventReceiver(topologyProvider);
  domainMappingEventReceiver.setExecutorService(executorService);
  domainMappingEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Start domain mapping event receiver thread.
 * @param executorService  executor service instance
 * @param topologyProvider topology receiver instance
 */
private void startDomainMappingEventReceiver(ExecutorService executorService,TopologyProvider topologyProvider){
  domainMappingEventReceiver=new LoadBalancerCommonDomainMappingEventReceiver(topologyProvider);
  domainMappingEventReceiver.setExecutorService(executorService);
  domainMappingEventReceiver.execute();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}