nus-yam/ex-repair huggingface dataset:
Program: 115891
Project: 115891
Buggy source:
/** 
 * Update user
 * @throws CommandException
 */
public void updateUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Update user
 * @throws CommandException
 */
public void updateUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115892
Project: 115892
Buggy source:
/** 
 * Deactivate 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 + "String_Node_Str");
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Deactivate 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();
  }
}
Program: 115893
Project: 115893
Buggy source:
public void undeployEntity(String serviceEndpoint,String entityName,String entityId){
  try {
    int responseCode=executeDelete(serviceEndpoint,entityId);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
  }
}

Fixed version (ground truth):
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 >= 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);
    logger.error(message,e);
  }
}
Program: 115894
Project: 115894
Buggy source:
private int executeDelete(String serviceEndpoint,String identifier) throws IOException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    System.out.println(getBaseURL() + serviceEndpoint.replace("String_Node_Str",identifier));
    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 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();
  }
}
Program: 115895
Project: 115895
Buggy source:
public Object getEntity(String serviceEndpoint,Type responseType,String identifierPlaceHolder,String identifier,String entityName){
  try {
    return executeGet(serviceEndpoint.replace(identifierPlaceHolder,identifier),responseType);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
    return null;
  }
}

Fixed version (ground truth):
public Object getEntity(String serviceEndpoint,Type responseType,String identifierPlaceHolder,String identifier,String entityName){
  try {
    return executeGet(serviceEndpoint.replace(identifierPlaceHolder,identifier),responseType);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName,identifier);
    System.out.println(message);
    logger.error(message,e);
    return null;
  }
}
Program: 115896
Project: 115896
Buggy source:
public void deleteEntity(String serviceEndpoint,String identifier,String entityName){
  try {
    int responseCode=executeDelete(serviceEndpoint,identifier);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
  }
}

Fixed version (ground truth):
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 >= 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);
    logger.error(message,e);
  }
}
Program: 115897
Project: 115897
Buggy source:
/** 
 * Add user
 * @throws CommandException
 */
public void addUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Add user
 * @throws CommandException
 */
public void addUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115898
Project: 115898
Buggy source:
/** 
 * Update an existing tenant
 * @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);
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Update an existing tenant
 * @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();
  }
}
Program: 115899
Project: 115899
Buggy source:
/** 
 * Delete tenant
 * @throws CommandException
 */
public void deleteTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT + "String_Node_Str"+ tenantDomain);
    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 + "String_Node_Str");
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Delete tenant
 * @throws CommandException
 */
public void deleteTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT + "String_Node_Str"+ tenantDomain);
    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();
  }
}
Program: 115900
Project: 115900
Buggy source:
/** 
 * Undeploy application
 * @throws CommandException
 */
public void undeployApplication(String applicationId) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_UNDEPLOY_APPLICATION.replace("String_Node_Str",applicationId),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
      System.out.println("String_Node_Str" + applicationId);
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Undeploy application
 * @throws CommandException
 */
public void undeployApplication(String applicationId) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_UNDEPLOY_APPLICATION.replace("String_Node_Str",applicationId),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
      System.out.println("String_Node_Str" + applicationId);
    }
 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" + applicationId;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115901
Project: 115901
Buggy source:
/** 
 * Delete user
 * @throws CommandException
 */
public void deleteUser(String userName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER + "String_Node_Str"+ userName);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_NO_CONTENT) || responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + userName + "String_Node_Str");
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Delete user
 * @throws CommandException
 */
public void deleteUser(String userName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER + "String_Node_Str"+ userName);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_NO_CONTENT) || responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + userName);
    }
 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" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115902
Project: 115902
Buggy source:
/** 
 * Activate 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 + "String_Node_Str");
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Activate 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();
  }
}
Program: 115903
Project: 115903
Buggy source:
/** 
 * Synchronize artifacts
 * @throws CommandException
 */
public void synchronizeArtifacts(String cartridgeAlias) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_SYNCHRONIZE_ARTIFACTS.replace("String_Node_Str",cartridgeAlias),cartridgeAlias);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println(String.format("String_Node_Str",cartridgeAlias));
      return;
    }
 else {
      GsonBuilder gsonBuilder=new GsonBuilder();
      Gson gson=gsonBuilder.create();
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + cartridgeAlias;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Synchronize artifacts
 * @throws CommandException
 */
public void synchronizeArtifacts(String cartridgeAlias) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_SYNCHRONIZE_ARTIFACTS.replace("String_Node_Str",cartridgeAlias),cartridgeAlias);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println(String.format("String_Node_Str",cartridgeAlias));
    }
 else {
      GsonBuilder gsonBuilder=new GsonBuilder();
      Gson gson=gsonBuilder.create();
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + cartridgeAlias;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115904
Project: 115904
Buggy source:
/** 
 * Add new tenant
 * @throws CommandException
 */
public void addTenant(String admin,String firstName,String lastaName,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(lastaName);
    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");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Add new tenant
 * @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();
  }
}
Program: 115905
Project: 115905
Buggy source:
/** 
 * List Kubernetes Clusters
 * @throws CommandException
 */
public void listKubernetesClusters(){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesClusterBean>>(){
    }
.getType();
    List<KubernetesClusterBean> list=(List<KubernetesClusterBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS,listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesClusterBean> partitionMapper=new RowMapper<KubernetesClusterBean>(){
        public String[] getData(        KubernetesClusterBean kubernetesCluster){
          String[] data=new String[2];
          data[0]=kubernetesCluster.getClusterId();
          data[1]=kubernetesCluster.getDescription();
          return data;
        }
      }
;
      KubernetesClusterBean[] array=new KubernetesClusterBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}

Fixed version (ground truth):
/** 
 * List Kubernetes Clusters
 * @throws CommandException
 */
public void listKubernetesClusters(){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesClusterBean>>(){
    }
.getType();
    List<KubernetesClusterBean> list=(List<KubernetesClusterBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS,listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesClusterBean> partitionMapper=new RowMapper<KubernetesClusterBean>(){
        public String[] getData(        KubernetesClusterBean kubernetesCluster){
          String[] data=new String[2];
          data[0]=kubernetesCluster.getClusterId();
          data[1]=kubernetesCluster.getDescription();
          return data;
        }
      }
;
      KubernetesClusterBean[] array=new KubernetesClusterBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}
Program: 115906
Project: 115906
Buggy source:
/** 
 * Update user
 * @throws CommandException
 */
public void updateUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Update user
 * @throws CommandException
 */
public void updateUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115907
Project: 115907
Buggy source:
/** 
 * Deactivate 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 + "String_Node_Str");
      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";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Deactivate 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();
  }
}
Program: 115910
Project: 115910
Buggy source:
public void addMember(Member member){
  memberMap.put(member.getMemberId(),member);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str",clusterId,member.getMemberId(),member.getHostName(),member.getPorts()));
  }
}

Fixed version (ground truth):
public void addMember(Member member){
  memberMap.put(member.getMemberId(),member);
}
Program: 115911
Project: 115911
Buggy source:
public void removeMember(String memberId){
  Member member=memberMap.get(memberId);
  if (member == null) {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",memberId));
    }
  }
  memberMap.remove(memberId);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str",clusterId,member.getMemberId(),member.getHostName()));
  }
}

Fixed version (ground truth):
public void removeMember(String memberId){
  Member member=memberMap.get(memberId);
  if (member == null) {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",memberId));
    }
    return;
  }
  memberMap.remove(memberId);
}
Program: 115912
Project: 115912
Buggy source:
@Override protected void onEvent(Event event){
  ApplicationSignUpRemovedEvent applicationSignUpRemovedEvent=(ApplicationSignUpRemovedEvent)event;
  String applicationId=applicationSignUpRemovedEvent.getApplicationId();
  Application application=ApplicationManager.getApplications().getApplication(applicationId);
  if (application != null) {
    for (    ClusterDataHolder clusterDataHolder : application.getClusterDataMap().values())     topologyProvider.removeTenantSignUp(clusterDataHolder.getClusterId(),applicationSignUpRemovedEvent.getTenantId());
  }
}

Fixed version (ground truth):
@Override protected void onEvent(Event event){
  try {
    ApplicationSignUpRemovedEvent applicationSignUpRemovedEvent=(ApplicationSignUpRemovedEvent)event;
    String applicationId=applicationSignUpRemovedEvent.getApplicationId();
    Application application=ApplicationManager.getApplications().getApplication(applicationId);
    if (application != null) {
      for (      ClusterDataHolder clusterDataHolder : application.getClusterDataMap().values())       topologyProvider.removeTenantSignUp(clusterDataHolder.getClusterId(),applicationSignUpRemovedEvent.getTenantId());
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
}
Program: 115914
Project: 115914
Buggy source:
private org.apache.stratos.load.balancer.common.domain.Member transformMember(Member messagingMember){
  boolean useMemberPublicIP=Boolean.getBoolean("String_Node_Str");
  String hostName=(useMemberPublicIP) ? messagingMember.getDefaultPublicIP() : messagingMember.getDefaultPrivateIP();
  org.apache.stratos.load.balancer.common.domain.Member member=new org.apache.stratos.load.balancer.common.domain.Member(messagingMember.getServiceName(),messagingMember.getClusterId(),messagingMember.getMemberId(),hostName);
  return member;
}

Fixed version (ground truth):
private org.apache.stratos.load.balancer.common.domain.Member transformMember(Member messagingMember){
  boolean useMemberPublicIP=Boolean.getBoolean("String_Node_Str");
  String hostName=(useMemberPublicIP) ? messagingMember.getDefaultPublicIP() : messagingMember.getDefaultPrivateIP();
  org.apache.stratos.load.balancer.common.domain.Member member=new org.apache.stratos.load.balancer.common.domain.Member(messagingMember.getServiceName(),messagingMember.getClusterId(),messagingMember.getMemberId(),hostName);
  if (messagingMember.getPorts() != null) {
    for (    Port port : messagingMember.getPorts()) {
      member.addPort(transformPort(port));
    }
  }
  return member;
}
Program: 115916
Project: 115916
Buggy source:
public boolean isTargetHostValid(String hostName){
  if (hostName == null)   return false;
  boolean valid=topologyProvider.clusterExistsByHostName(hostName);
  return valid;
}

Fixed version (ground truth):
public boolean isTargetHostValid(String hostName){
  if (hostName == null)   return false;
  TopologyProvider topologyProvider=LoadBalancerConfiguration.getInstance().getTopologyProvider();
  boolean valid=topologyProvider.clusterExistsByHostName(hostName);
  return valid;
}
Program: 115917
Project: 115917
Buggy source:
/** 
 * Find the next member in a cluster by applying a load balancing algorithm by the given host name and tenant id.
 * @param hostName host name of the cluster
 * @param tenantId tenant id of the incoming request
 * @return
 */
public Member findNextMemberFromTenantId(String hostName,int tenantId){
  long startTime=System.currentTimeMillis();
  Cluster cluster=topologyProvider.getClusterByHostName(hostName,tenantId);
  if (cluster != null) {
    Member member=findNextMemberInCluster(cluster);
    if (member != null) {
      if (log.isDebugEnabled()) {
        long endTime=System.currentTimeMillis();
        log.debug(String.format("String_Node_Str",(endTime - startTime),member.getServiceName(),member.getClusterId(),tenantId,member.getMemberId()));
      }
    }
    return member;
  }
 else {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",hostName,tenantId));
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the next member in a cluster by applying a load balancing algorithm by the given host name and tenant id.
 * @param hostName host name of the cluster
 * @param tenantId tenant id of the incoming request
 * @return
 */
public Member findNextMemberFromTenantId(String hostName,int tenantId){
  long startTime=System.currentTimeMillis();
  TopologyProvider topologyProvider=LoadBalancerConfiguration.getInstance().getTopologyProvider();
  Cluster cluster=topologyProvider.getClusterByHostName(hostName,tenantId);
  if (cluster != null) {
    Member member=findNextMemberInCluster(cluster);
    if (member != null) {
      if (log.isDebugEnabled()) {
        long endTime=System.currentTimeMillis();
        log.debug(String.format("String_Node_Str",(endTime - startTime),member.getServiceName(),member.getClusterId(),tenantId,member.getMemberId()));
      }
    }
    return member;
  }
 else {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",hostName,tenantId));
    }
  }
  return null;
}
Program: 115918
Project: 115918
Buggy source:
/** 
 * Find the next member in a cluster by applying a load balancing algorithm by the given host name.
 * @param hostName host name of the cluster
 * @param messageId synapse message id to be included in debugging logs
 * @return
 */
public Member findNextMemberFromHostName(String hostName,String messageId){
  if (hostName == null)   return null;
  long startTime=System.currentTimeMillis();
  Cluster cluster=topologyProvider.getClusterByHostName(hostName);
  if (cluster != null) {
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cluster.getClusterId(),messageId));
    }
    Member member=findNextMemberInCluster(cluster);
    if (member != null) {
      if (log.isDebugEnabled()) {
        long endTime=System.currentTimeMillis();
        log.debug(String.format("String_Node_Str",(endTime - startTime),member.getServiceName(),member.getClusterId(),member.getMemberId(),messageId));
      }
    }
    return member;
  }
 else {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",hostName));
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the next member in a cluster by applying a load balancing algorithm by the given host name.
 * @param hostName host name of the cluster
 * @param messageId synapse message id to be included in debugging logs
 * @return
 */
public Member findNextMemberFromHostName(String hostName,String messageId){
  if (hostName == null)   return null;
  long startTime=System.currentTimeMillis();
  TopologyProvider topologyProvider=LoadBalancerConfiguration.getInstance().getTopologyProvider();
  Cluster cluster=topologyProvider.getClusterByHostName(hostName);
  if (cluster != null) {
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cluster.getClusterId(),messageId));
    }
    Member member=findNextMemberInCluster(cluster);
    if (member != null) {
      if (log.isDebugEnabled()) {
        long endTime=System.currentTimeMillis();
        log.debug(String.format("String_Node_Str",(endTime - startTime),member.getServiceName(),member.getClusterId(),member.getMemberId(),messageId));
      }
    }
    return member;
  }
 else {
    if (log.isWarnEnabled()) {
      log.warn(String.format("String_Node_Str",hostName));
    }
  }
  return null;
}
Program: 115919
Project: 115919
Buggy source:
public RequestDelegator(LoadBalanceAlgorithm algorithm,TopologyProvider topologyProvider){
  this.algorithm=algorithm;
  this.topologyProvider=topologyProvider;
}

Fixed version (ground truth):
public RequestDelegator(LoadBalanceAlgorithm algorithm){
  this.algorithm=algorithm;
}
Program: 115920
Project: 115920
Buggy source:
public Cluster getCluster(String hostName){
  return topologyProvider.getClusterByHostName(hostName);
}

Fixed version (ground truth):
public Cluster getCluster(String hostName){
  TopologyProvider topologyProvider=LoadBalancerConfiguration.getInstance().getTopologyProvider();
  return topologyProvider.getClusterByHostName(hostName);
}
Program: 115921
Project: 115921
Buggy source:
@Override public void init(SynapseEnvironment synapseEnvironment){
  super.init(synapseEnvironment);
  LoadBalanceAlgorithm algorithm=LoadBalanceAlgorithmFactory.createAlgorithm(algorithmClassName);
  TopologyProvider topologyProvider=LoadBalancerConfiguration.getInstance().getTopologyProvider();
  requestDelegator=new RequestDelegator(algorithm,topologyProvider);
  synapseEnvironment.getSynapseConfiguration().setProperty(SynapseConstants.PROP_SAL_ENDPOINT_DEFAULT_SESSION_TIMEOUT,String.valueOf(sessionTimeout));
  setDispatcher(new HttpSessionDispatcher());
}

Fixed version (ground truth):
@Override public void init(SynapseEnvironment synapseEnvironment){
  super.init(synapseEnvironment);
  LoadBalanceAlgorithm algorithm=LoadBalanceAlgorithmFactory.createAlgorithm(algorithmClassName);
  requestDelegator=new RequestDelegator(algorithm);
  synapseEnvironment.getSynapseConfiguration().setProperty(SynapseConstants.PROP_SAL_ENDPOINT_DEFAULT_SESSION_TIMEOUT,String.valueOf(sessionTimeout));
  setDispatcher(new HttpSessionDispatcher());
}
Program: 115922
Project: 115922
Buggy source:
/** 
 * Add application signup.
 * @param applicationSignUp
 * @throws ApplicationSignUpException
 */
public void addApplicationSignUp(ApplicationSignUp applicationSignUp) throws ApplicationSignUpException {
  if (applicationSignUp == null) {
    throw new ApplicationSignUpException("String_Node_Str");
  }
  String applicationId=applicationSignUp.getApplicationId();
  int tenantId=applicationSignUp.getTenantId();
  List<String> clusterIds=applicationSignUp.getClusterIds();
  try {
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",applicationId,tenantId));
    }
    if (applicationSignUpExist(applicationId,tenantId)) {
      throw new RuntimeException(String.format("String_Node_Str" + "String_Node_Str",applicationId,tenantId));
    }
    String resourcePath=prepareApplicationSignupResourcePath(applicationId,tenantId);
    RegistryManager.getInstance().persist(resourcePath,applicationSignUp);
    ApplicationSignUpEventPublisher.publishApplicationSignUpAddedEvent(applicationId,tenantId,clusterIds);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",applicationId,tenantId));
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    log.error(message,e);
    throw new ApplicationSignUpException(message,e);
  }
}

Fixed version (ground truth):
/** 
 * Add application signup.
 * @param applicationSignUp
 * @throws ApplicationSignUpException
 */
public void addApplicationSignUp(ApplicationSignUp applicationSignUp) throws ApplicationSignUpException {
  if (applicationSignUp == null) {
    throw new ApplicationSignUpException("String_Node_Str");
  }
  String applicationId=applicationSignUp.getApplicationId();
  int tenantId=applicationSignUp.getTenantId();
  String[] clusterIdArray=applicationSignUp.getClusterIds();
  List<String> clusterIdList=new ArrayList<String>();
  if (clusterIdArray != null) {
    for (    String clusterId : clusterIdArray) {
      clusterIdList.add(clusterId);
    }
  }
  try {
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",applicationId,tenantId));
    }
    if (applicationSignUpExist(applicationId,tenantId)) {
      throw new RuntimeException(String.format("String_Node_Str" + "String_Node_Str",applicationId,tenantId));
    }
    String resourcePath=prepareApplicationSignupResourcePath(applicationId,tenantId);
    RegistryManager.getInstance().persist(resourcePath,applicationSignUp);
    ApplicationSignUpEventPublisher.publishApplicationSignUpAddedEvent(applicationId,tenantId,clusterIdList);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",applicationId,tenantId));
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    log.error(message,e);
    throw new ApplicationSignUpException(message,e);
  }
}