Program: 134651
Project: 134651
Buggy source:
/** 
 * Creates a ConsumerEndpoint that points to a service which configuration information is not in the configuration file. Resource path is used as service id.
 * @param props consumer gateway properties that contain default namespaceand prefix
 * @param resourcePath resource path that was called, used as service id
 * @return ConsumerEndpoint object
 */
public static ConsumerEndpoint createUnconfiguredEndpoint(Properties props,String resourcePath){
  logger.debug("String_Node_Str");
  String resourceId=null;
  String pattern="String_Node_Str";
  Pattern regex=Pattern.compile(pattern);
  Matcher m=regex.matcher(resourcePath);
  if (m.find()) {
    resourcePath=m.group(1);
    resourceId=m.group(2).substring(0,m.group(2).length() - 1);
    logger.info("String_Node_Str",resourcePath,resourceId);
  }
 else {
    resourcePath=resourcePath.replaceAll("String_Node_Str","String_Node_Str");
  }
  String clientId=props.getProperty(Constants.CONSUMER_PROPS_ID_CLIENT);
  ConsumerEndpoint endpoint=new ConsumerEndpoint(resourcePath,clientId,"String_Node_Str");
  endpoint.setResourceId(resourceId);
  if (!ConsumerGatewayUtil.setConsumerMember(endpoint) || !ConsumerGatewayUtil.setProducerMember(endpoint)) {
    endpoint=null;
  }
 else {
    String ns=props.getProperty(Constants.ENDPOINT_PROPS_SERVICE_NAMESPACE_SERIALIZE);
    String prefix=props.getProperty(Constants.ENDPOINT_PROPS_SERVICE_NAMESPACE_PREFIX_SERIALIZE);
    endpoint.getProducer().setNamespaceUrl(ns);
    endpoint.getProducer().setNamespacePrefix(prefix);
  }
  return endpoint;
}

Fixed version (ground truth):
/** 
 * Creates a ConsumerEndpoint that points to a service which configuration information is not in the configuration file. Resource path is used as service id.
 * @param props consumer gateway properties that contain default namespaceand prefix
 * @param pathToResource resource path that was called, used as service id
 * @return ConsumerEndpoint object
 */
public static ConsumerEndpoint createUnconfiguredEndpoint(Properties props,String pathToResource){
  logger.debug("String_Node_Str");
  String resourceId=null;
  String resourcePath;
  String pattern="String_Node_Str";
  Pattern regex=Pattern.compile(pattern);
  Matcher m=regex.matcher(pathToResource);
  if (m.find()) {
    resourcePath=m.group(1);
    resourceId=m.group(2).substring(0,m.group(2).length() - 1);
    logger.info("String_Node_Str",resourcePath,resourceId);
  }
 else {
    resourcePath=pathToResource.replaceAll("String_Node_Str","String_Node_Str");
  }
  String clientId=props.getProperty(Constants.CONSUMER_PROPS_ID_CLIENT);
  ConsumerEndpoint endpoint=new ConsumerEndpoint(resourcePath,clientId,"String_Node_Str");
  endpoint.setResourceId(resourceId);
  if (!ConsumerGatewayUtil.setConsumerMember(endpoint) || !ConsumerGatewayUtil.setProducerMember(endpoint)) {
    endpoint=null;
  }
 else {
    String ns=props.getProperty(Constants.ENDPOINT_PROPS_SERVICE_NAMESPACE_SERIALIZE);
    String prefix=props.getProperty(Constants.ENDPOINT_PROPS_SERVICE_NAMESPACE_PREFIX_SERIALIZE);
    endpoint.getProducer().setNamespaceUrl(ns);
    endpoint.getProducer().setNamespacePrefix(prefix);
  }
  return endpoint;
}