Program: 145495
Project: 145495
Buggy source:
public static Client getInstance(String aApplicationUrl,String aDefaultDatasourceName) throws Exception {
  if (aApplicationUrl != null) {
    if (aApplicationUrl.endsWith(H2DB_FILE_SUFFIX) && (new File(aApplicationUrl)).exists()) {
      aDefaultDatasourceName="String_Node_Str" + Math.abs(aApplicationUrl.hashCode());
      String jndiUrl="String_Node_Str" + aDefaultDatasourceName;
      GeneralResourceProvider.getInstance().registerDatasource(aDefaultDatasourceName,new DbConnectionSettings("String_Node_Str" + aApplicationUrl.substring(0,aApplicationUrl.length() - H2DB_FILE_SUFFIX.length()),"String_Node_Str","String_Node_Str","String_Node_Str",null));
      AppCache appCache=obtainTwoTierAppCache(jndiUrl);
      return new ScriptedDatabasesClient(appCache,aDefaultDatasourceName,true);
    }
 else {
      if (aApplicationUrl.toLowerCase().startsWith(PlatypusHttpConstants.PROTOCOL_HTTP)) {
        return new PlatypusHttpsClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith(PlatypusHttpConstants.PROTOCOL_HTTPS)) {
        return new PlatypusHttpClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith("String_Node_Str")) {
        return new PlatypusNativeClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith("String_Node_Str") || aApplicationUrl.toLowerCase().startsWith("String_Node_Str")) {
        AppCache appCache=obtainTwoTierAppCache(aApplicationUrl);
        return new ScriptedDatabasesClient(appCache,aDefaultDatasourceName,true);
      }
 else {
        throw new Exception("String_Node_Str" + aApplicationUrl);
      }
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
public static Client getInstance(String aApplicationUrl,String aDefaultDatasourceName) throws Exception {
  if (aApplicationUrl != null) {
    if (aApplicationUrl.endsWith(H2DB_FILE_SUFFIX) && (new File(aApplicationUrl)).exists()) {
      aDefaultDatasourceName="String_Node_Str" + Math.abs(aApplicationUrl.hashCode());
      String jndiUrl="String_Node_Str" + aDefaultDatasourceName;
      GeneralResourceProvider.getInstance().registerDatasource(aDefaultDatasourceName,new DbConnectionSettings("String_Node_Str" + aApplicationUrl.substring(0,aApplicationUrl.length() - H2DB_FILE_SUFFIX.length()),"String_Node_Str","String_Node_Str","String_Node_Str",null));
      AppCache appCache=obtainTwoTierAppCache(jndiUrl,null);
      return new ScriptedDatabasesClient(appCache,aDefaultDatasourceName,true);
    }
 else {
      if (aApplicationUrl.toLowerCase().startsWith(PlatypusHttpConstants.PROTOCOL_HTTP)) {
        return new PlatypusHttpsClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith(PlatypusHttpConstants.PROTOCOL_HTTPS)) {
        return new PlatypusHttpClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith("String_Node_Str")) {
        return new PlatypusNativeClient(aApplicationUrl);
      }
 else       if (aApplicationUrl.toLowerCase().startsWith("String_Node_Str") || aApplicationUrl.toLowerCase().startsWith("String_Node_Str")) {
        AppCache appCache=obtainTwoTierAppCache(aApplicationUrl,null);
        return new ScriptedDatabasesClient(appCache,aDefaultDatasourceName,true);
      }
 else {
        throw new Exception("String_Node_Str" + aApplicationUrl);
      }
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}