Program: 18915
Project: 18915
Buggy source:
public static ChefService findOrCreateChefService(String api,String name,String clientName,String clientCredential,String clientKeyFile,String validatorName,String validatorCredential,String validatorKeyFile,String endpoint,List<ChefService> chefServices){
  if ((name == null && api == null) && (chefServices != null && chefServices.size() == 1)) {
    return chefServices.get(0);
  }
  ChefService chefService=null;
  String apiValue=ChefHelper.getChefApi(api);
  String clientNameValue=ChefHelper.getClientName(clientName);
  String clientCredentialValue=ChefHelper.getClientCredential(clientCredential);
  String clientKeyFileValue=ChefHelper.getClientName(clientKeyFile);
  String validatorNameValue=ChefHelper.getClientName(validatorName);
  String validatorCredentialValue=ChefHelper.getValidatorCredential(validatorCredential);
  String validatorKeyFileValue=ChefHelper.getClientName(validatorKeyFile);
  String endpointValue=ChefHelper.getChefEndpoint(endpoint);
  boolean contextNameProvided=!Strings.isNullOrEmpty(name);
  boolean canCreateService=(!Strings.isNullOrEmpty(clientNameValue) || !Strings.isNullOrEmpty(clientKeyFileValue)) && !Strings.isNullOrEmpty(validatorNameValue) && !Strings.isNullOrEmpty(validatorKeyFileValue);
  apiValue=!Strings.isNullOrEmpty(apiValue) ? apiValue : "String_Node_Str";
  try {
    chefService=ChefHelper.getChefService(name,apiValue,chefServices);
  }
 catch (  Throwable t) {
    if (contextNameProvided) {
      throw new RuntimeException("String_Node_Str" + name);
    }
 else     if (!canCreateService) {
      StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str").append("String_Node_Str");
      if (apiValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (clientNameValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (clientKeyFileValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (validatorName == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (validatorKeyFile == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      throw new RuntimeException(sb.toString());
    }
  }
  if (chefService == null && canCreateService) {
    try {
      chefService=ChefHelper.createChefService(Apis.withId(apiValue),name,clientNameValue,clientCredentialValue,clientKeyFile,validatorNameValue,validatorCredentialValue,validatorKeyFileValue,endpointValue);
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str" + ex.getMessage());
    }
  }
  return chefService;
}

Fixed version (ground truth):
public static ChefService findOrCreateChefService(String api,String name,String clientName,String clientCredential,String clientKeyFile,String validatorName,String validatorCredential,String validatorKeyFile,String endpoint,List<ChefService> chefServices){
  if ((name == null && api == null) && (chefServices != null && chefServices.size() == 1)) {
    return chefServices.get(0);
  }
  ChefService chefService=null;
  String apiValue=ChefHelper.getChefApi(api);
  String clientNameValue=ChefHelper.getClientName(clientName);
  String clientCredentialValue=ChefHelper.getClientCredential(clientCredential);
  String clientKeyFileValue=ChefHelper.getClientKeyFile(clientKeyFile);
  String validatorNameValue=ChefHelper.getValidatorName(validatorName);
  String validatorCredentialValue=ChefHelper.getValidatorCredential(validatorCredential);
  String validatorKeyFileValue=ChefHelper.getValidatorKeyFile(validatorKeyFile);
  String endpointValue=ChefHelper.getChefEndpoint(endpoint);
  boolean contextNameProvided=!Strings.isNullOrEmpty(name);
  boolean canCreateService=(!Strings.isNullOrEmpty(clientNameValue) || !Strings.isNullOrEmpty(clientKeyFileValue)) && !Strings.isNullOrEmpty(validatorNameValue) && !Strings.isNullOrEmpty(validatorKeyFileValue);
  apiValue=!Strings.isNullOrEmpty(apiValue) ? apiValue : "String_Node_Str";
  name=!Strings.isNullOrEmpty(name) ? name : apiValue;
  try {
    chefService=ChefHelper.getChefService(name,apiValue,chefServices);
  }
 catch (  Throwable t) {
    if (contextNameProvided) {
      throw new RuntimeException("String_Node_Str" + name);
    }
 else     if (!canCreateService) {
      StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str").append("String_Node_Str");
      if (apiValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (clientNameValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (clientKeyFileValue == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (validatorName == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      if (validatorKeyFile == null) {
        sb.append("String_Node_Str").append("String_Node_Str");
      }
      throw new RuntimeException(sb.toString());
    }
  }
  if (chefService == null && canCreateService) {
    try {
      chefService=ChefHelper.createChefService(Apis.withId(apiValue),name,clientNameValue,clientCredentialValue,clientKeyFileValue,validatorNameValue,validatorCredentialValue,validatorKeyFileValue,endpointValue);
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str" + ex.getMessage());
    }
  }
  return chefService;
}