Program: 79493
Project: 79493
Buggy source:
public static ComputeService findComputeService(ConfigBag conf,boolean allowReuse){
  String provider=checkNotNull(conf.get(CLOUD_PROVIDER),"String_Node_Str");
  String identity=checkNotNull(conf.get(ACCESS_IDENTITY),"String_Node_Str");
  String credential=checkNotNull(conf.get(ACCESS_CREDENTIAL),"String_Node_Str");
  Properties properties=new Properties();
  properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS,Boolean.toString(true));
  properties.setProperty(Constants.PROPERTY_RELAX_HOSTNAME,Boolean.toString(true));
  properties.setProperty("String_Node_Str",conf.getStringKey("String_Node_Str") != null ? conf.getStringKey("String_Node_Str").toString() : "String_Node_Str");
  if ("String_Node_Str".equals(provider)) {
    if (truth(conf.get(IMAGE_ID))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str");
      properties.setProperty(PROPERTY_EC2_CC_AMI_QUERY,"String_Node_Str");
    }
 else     if (truth(conf.getStringKey("String_Node_Str"))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str" + conf.getStringKey("String_Node_Str") + "String_Node_Str");
    }
 else     if (truth(conf.getStringKey("String_Node_Str"))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str");
    }
  }
  Map<String,Object> extra=Maps.filterKeys(conf.getAllConfig(),Predicates.containsPattern("String_Node_Str"));
  if (extra.size() > 0) {
    LOG.warn("String_Node_Str" + Entities.sanitize(extra));
  }
  properties.putAll(extra);
  String endpoint=conf.get(CLOUD_ENDPOINT);
  if (!truth(endpoint))   endpoint=getDeprecatedProperty(conf,Constants.PROPERTY_ENDPOINT);
  if (truth(endpoint))   properties.setProperty(Constants.PROPERTY_ENDPOINT,endpoint);
  Map<?,?> cacheKey=MutableMap.builder().putAll(properties).put("String_Node_Str",provider).put("String_Node_Str",identity).put("String_Node_Str",credential).putIfNotNull("String_Node_Str",endpoint).build().toImmutable();
  if (allowReuse) {
    ComputeService result=cachedComputeServices.get(cacheKey);
    if (result != null) {
      LOG.debug("String_Node_Str" + Entities.sanitize(properties));
      return result;
    }
    LOG.debug("String_Node_Str" + Entities.sanitize(properties));
  }
  Iterable<Module> modules=ImmutableSet.<Module>of(new SshjSshClientModule(),new SLF4JLoggingModule(),new BouncyCastleCryptoModule(),new BrooklynStandardJcloudsGuiceModule());
  ComputeServiceContext computeServiceContext;
synchronized (createComputeServicesMutex) {
    computeServiceContext=ContextBuilder.newBuilder(provider).modules(modules).credentials(identity,credential).overrides(properties).build(ComputeServiceContext.class);
  }
  final ComputeService computeService=computeServiceContext.getComputeService();
  if (allowReuse) {
synchronized (cachedComputeServices) {
      ComputeService result=cachedComputeServices.get(cacheKey);
      if (result != null) {
        LOG.debug("String_Node_Str" + Entities.sanitize(cacheKey));
        computeService.getContext().close();
        return result;
      }
      LOG.debug("String_Node_Str" + computeService + "String_Node_Str"+ Entities.sanitize(properties));
      cachedComputeServices.put(cacheKey,computeService);
    }
  }
  return computeService;
}

Fixed version (ground truth):
public static ComputeService findComputeService(ConfigBag conf,boolean allowReuse){
  String provider=checkNotNull(conf.get(CLOUD_PROVIDER),"String_Node_Str");
  String identity=checkNotNull(conf.get(ACCESS_IDENTITY),"String_Node_Str");
  String credential=checkNotNull(conf.get(ACCESS_CREDENTIAL),"String_Node_Str");
  Properties properties=new Properties();
  properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS,Boolean.toString(true));
  properties.setProperty(Constants.PROPERTY_RELAX_HOSTNAME,Boolean.toString(true));
  properties.setProperty("String_Node_Str",conf.getStringKey("String_Node_Str") != null ? conf.getStringKey("String_Node_Str").toString() : "String_Node_Str");
  if ("String_Node_Str".equals(provider)) {
    if (truth(conf.get(IMAGE_ID))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str");
      properties.setProperty(PROPERTY_EC2_CC_AMI_QUERY,"String_Node_Str");
    }
 else     if (truth(conf.getStringKey("String_Node_Str"))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str" + conf.getStringKey("String_Node_Str") + "String_Node_Str");
    }
 else     if (truth(conf.getStringKey("String_Node_Str"))) {
      properties.setProperty(PROPERTY_EC2_AMI_QUERY,"String_Node_Str");
    }
  }
  Map<String,Object> extra=Maps.filterKeys(conf.getAllConfig(),Predicates.containsPattern("String_Node_Str"));
  if (extra.size() > 0) {
    LOG.warn("String_Node_Str" + Entities.sanitize(extra));
  }
  properties.putAll(extra);
  String endpoint=conf.get(CLOUD_ENDPOINT);
  if (!truth(endpoint))   endpoint=getDeprecatedProperty(conf,Constants.PROPERTY_ENDPOINT);
  if (truth(endpoint))   properties.setProperty(Constants.PROPERTY_ENDPOINT,endpoint);
  Map<?,?> cacheKey=MutableMap.builder().putAll(properties).put("String_Node_Str",provider).put("String_Node_Str",identity).put("String_Node_Str",credential).putIfNotNull("String_Node_Str",endpoint).build().toImmutable();
  if (allowReuse) {
    ComputeService result=cachedComputeServices.get(cacheKey);
    if (result != null) {
      LOG.debug("String_Node_Str" + Entities.sanitize(properties));
      return result;
    }
    LOG.debug("String_Node_Str" + Entities.sanitize(properties));
  }
  Iterable<Module> modules=getCommonModules();
  ComputeServiceContext computeServiceContext;
synchronized (createComputeServicesMutex) {
    computeServiceContext=ContextBuilder.newBuilder(provider).modules(modules).credentials(identity,credential).overrides(properties).build(ComputeServiceContext.class);
  }
  final ComputeService computeService=computeServiceContext.getComputeService();
  if (allowReuse) {
synchronized (cachedComputeServices) {
      ComputeService result=cachedComputeServices.get(cacheKey);
      if (result != null) {
        LOG.debug("String_Node_Str" + Entities.sanitize(cacheKey));
        computeService.getContext().close();
        return result;
      }
      LOG.debug("String_Node_Str" + computeService + "String_Node_Str"+ Entities.sanitize(properties));
      cachedComputeServices.put(cacheKey,computeService);
    }
  }
  return computeService;
}