Program: 46640
Project: 46640
Buggy source:
private HazelcastInstance getOrCreateInstance(ClassLoader classLoader,Properties properties,boolean isDefaultURI) throws URISyntaxException, IOException {
  String location=properties.getProperty(HazelcastCachingProvider.HAZELCAST_CONFIG_LOCATION);
  if (location != null) {
    URI uri=new URI(location);
    String scheme=uri.getScheme();
    if (scheme == null) {
      uri=new URI(System.getProperty(uri.getRawSchemeSpecificPart()));
    }
    ClassLoader theClassLoader=classLoader == null ? getDefaultClassLoader() : classLoader;
    final URL configURL;
    if ("String_Node_Str".equals(scheme)) {
      configURL=theClassLoader.getResource(uri.getRawSchemeSpecificPart());
    }
 else     if ("String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme)) {
      configURL=uri.toURL();
    }
 else {
      throw new URISyntaxException(location,"String_Node_Str");
    }
    try {
      Config config=new XmlConfigBuilder(configURL).build();
      config.setClassLoader(theClassLoader);
      config.setInstanceName(configURL.toString());
      return HazelcastInstanceManager.getOrCreateHazelcastInstance(config);
    }
 catch (    Exception e) {
      throw ExceptionUtil.rethrow(e);
    }
  }
  String instanceName=properties.getProperty(HazelcastCachingProvider.HAZELCAST_INSTANCE_NAME);
  if (instanceName != null) {
    return Hazelcast.getHazelcastInstanceByName(instanceName);
  }
  HazelcastInstance instance=null;
  if (isDefaultURI) {
    if (hazelcastInstance == null) {
      instance=Hazelcast.newHazelcastInstance();
      hazelcastInstance=instance;
    }
 else {
      instance=hazelcastInstance;
    }
  }
  return instance;
}

Fixed version (ground truth):
private HazelcastInstance getOrCreateInstance(ClassLoader classLoader,Properties properties,boolean isDefaultURI) throws URISyntaxException, IOException {
  String location=properties.getProperty(HazelcastCachingProvider.HAZELCAST_CONFIG_LOCATION);
  String instanceName=properties.getProperty(HazelcastCachingProvider.HAZELCAST_INSTANCE_NAME);
  if (location != null) {
    URI uri=new URI(location);
    String scheme=uri.getScheme();
    if (scheme == null) {
      uri=new URI(System.getProperty(uri.getRawSchemeSpecificPart()));
    }
    ClassLoader theClassLoader=classLoader == null ? getDefaultClassLoader() : classLoader;
    final URL configURL;
    if ("String_Node_Str".equals(scheme)) {
      configURL=theClassLoader.getResource(uri.getRawSchemeSpecificPart());
    }
 else     if ("String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme)) {
      configURL=uri.toURL();
    }
 else {
      throw new URISyntaxException(location,"String_Node_Str");
    }
    try {
      Config config=getConfig(configURL,theClassLoader,instanceName);
      return HazelcastInstanceManager.getOrCreateHazelcastInstance(config);
    }
 catch (    Exception e) {
      throw ExceptionUtil.rethrow(e);
    }
  }
  if (instanceName != null) {
    return Hazelcast.getHazelcastInstanceByName(instanceName);
  }
  HazelcastInstance instance=null;
  if (isDefaultURI) {
    if (hazelcastInstance == null) {
      instance=Hazelcast.newHazelcastInstance();
      hazelcastInstance=instance;
    }
 else {
      instance=hazelcastInstance;
    }
  }
  return instance;
}