Program: 116779
Project: 116779
Buggy source:
public Service deployService(String type,String autoscalingPolicyName,String deploymentPolicyName,int tenantId) throws ADCException, UnregisteredCartridgeException {
  CartridgeInfo cartridgeInfo;
  try {
    cartridgeInfo=CloudControllerServiceClient.getServiceClient().getCartridgeInfo(type);
  }
 catch (  UnregisteredCartridgeException e) {
    String message=type + "String_Node_Str";
    log.error(message);
    throw e;
  }
catch (  Exception e) {
    String message="String_Node_Str" + type;
    log.error(message,e);
    throw new ADCException(message,e);
  }
  if (!cartridgeInfo.getMultiTenant()) {
    String errorMsg="String_Node_Str" + type + "String_Node_Str";
    log.error(errorMsg);
    throw new ADCException(errorMsg);
  }
  Service service=new MultiTenantService(type,autoscalingPolicyName,deploymentPolicyName,tenantId,cartridgeInfo);
  service.setClusterId(type + "String_Node_Str" + cartridgeInfo.getHostName()+ "String_Node_Str");
  service.setHostName(cartridgeInfo.getHostName());
  BasicPayloadData basicPayloadData=CartridgeSubscriptionUtils.createBasicPayload(service);
  PayloadData payloadData=PayloadFactory.getPayloadDataInstance(cartridgeInfo.getProvider(),cartridgeInfo.getType(),basicPayloadData);
  if (cartridgeInfo.getProperties() != null && cartridgeInfo.getProperties().length != 0) {
    for (    Property property : cartridgeInfo.getProperties()) {
      if (property.getName().startsWith(CartridgeConstants.CUSTOM_PAYLOAD_PARAM_NAME_PREFIX)) {
        String payloadParamName=property.getName();
        payloadData.add(payloadParamName.substring(payloadParamName.indexOf("String_Node_Str") + 1),property.getValue());
      }
    }
  }
  service.setPayloadData(payloadData);
  service.deploy();
  return service;
}

Fixed version (ground truth):
public Service deployService(String type,String autoscalingPolicyName,String deploymentPolicyName,int tenantId) throws ADCException, UnregisteredCartridgeException {
  CartridgeInfo cartridgeInfo;
  try {
    cartridgeInfo=CloudControllerServiceClient.getServiceClient().getCartridgeInfo(type);
  }
 catch (  UnregisteredCartridgeException e) {
    String message=type + "String_Node_Str";
    log.error(message);
    throw e;
  }
catch (  Exception e) {
    String message="String_Node_Str" + type;
    log.error(message,e);
    throw new ADCException(message,e);
  }
  if (!cartridgeInfo.getMultiTenant()) {
    String errorMsg="String_Node_Str" + type + "String_Node_Str";
    log.error(errorMsg);
    throw new ADCException(errorMsg);
  }
  Service service=new MultiTenantService(type,autoscalingPolicyName,deploymentPolicyName,tenantId,cartridgeInfo);
  service.setClusterId(type + "String_Node_Str" + cartridgeInfo.getHostName()+ "String_Node_Str");
  service.setHostName(cartridgeInfo.getHostName());
  BasicPayloadData basicPayloadData=CartridgeSubscriptionUtils.createBasicPayload(service);
  basicPayloadData.populatePayload();
  PayloadData payloadData=PayloadFactory.getPayloadDataInstance(cartridgeInfo.getProvider(),cartridgeInfo.getType(),basicPayloadData);
  if (cartridgeInfo.getProperties() != null && cartridgeInfo.getProperties().length != 0) {
    for (    Property property : cartridgeInfo.getProperties()) {
      if (property.getName().startsWith(CartridgeConstants.CUSTOM_PAYLOAD_PARAM_NAME_PREFIX)) {
        String payloadParamName=property.getName();
        payloadData.add(payloadParamName.substring(payloadParamName.indexOf("String_Node_Str") + 1),property.getValue());
      }
    }
  }
  service.setPayloadData(payloadData);
  service.deploy();
  return service;
}