Program: 145619
Project: 145619
Buggy source:
/** 
 * @param args the command line arguments
 * @throws IOException
 * @throws Exception
 */
public static void main(String[] args) throws IOException, Exception {
  checkUserHome();
  checkLogsDirectory();
  Set<String> tasks=new HashSet<>();
  parseArgs(args,tasks);
  if (url == null) {
    printHelp(NO_URL_SPECIFIED_MSG);
    System.exit(1);
  }
  if (!url.startsWith("String_Node_Str")) {
    throw new Exception(String.format("String_Node_Str",url));
  }
  DbConnectionSettings settings=new DbConnectionSettings();
  settings.setUrl(url);
  settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_SCHEMA_PROP_NAME,schema);
  if (username != null) {
    settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_USER_PROP_NAME,username);
  }
  if (password != null) {
    settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_PASSWORD_PROP_NAME,password);
  }
  setupLoggers(logsLevel,expandLogFileName(logFileNamePattern));
  SSLContext ctx=createSSLContext();
  if (appPath != null) {
    settings.setApplicationPath(appPath);
  }
  DatabasesClient appDbClient=new DatabasesClient(settings);
  Debugger debugger=null;
  if (System.getProperty(ScriptRunner.DEBUG_PROPERTY) != null) {
    debugger=Debugger.initialize(false);
    registerMBean(DebuggerMBean.DEBUGGER_MBEAN_NAME,debugger);
    registerMBean(Breakpoints.BREAKPOINTS_MBEAN_NAME,Breakpoints.getInstance());
    registerMBean(Settings.SETTINGS_MBEAN_NAME,new Settings(appDbClient));
  }
  PlatypusServer server=new PlatypusServer(appDbClient,ctx,getListenAddresses(),getPortsProtocols(),tasks,appElement);
  appDbClient.setContextHost(server);
  appDbClient.setPrincipalHost(server);
  ScriptRunner.PlatypusScriptedResource.init(appDbClient.getAppCache());
  Thread sgc=new Thread(new GarbageSessionsCollector(server));
  sgc.setDaemon(true);
  sgc.start();
  server.start();
}

Fixed version (ground truth):
/** 
 * @param args the command line arguments
 * @throws IOException
 * @throws Exception
 */
public static void main(String[] args) throws IOException, Exception {
  checkUserHome();
  checkLogsDirectory();
  Set<String> tasks=new HashSet<>();
  parseArgs(args,tasks);
  if (url == null) {
    printHelp(NO_URL_SPECIFIED_MSG);
    System.exit(1);
  }
  if (!url.startsWith("String_Node_Str")) {
    throw new Exception(String.format("String_Node_Str",url));
  }
  DbConnectionSettings settings=new DbConnectionSettings();
  settings.setUrl(url);
  settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_SCHEMA_PROP_NAME,schema);
  if (username != null) {
    settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_USER_PROP_NAME,username);
  }
  if (password != null) {
    settings.getInfo().setProperty(ClientConstants.DB_CONNECTION_PASSWORD_PROP_NAME,password);
  }
  setupLoggers(logsLevel,expandLogFileName(logFileNamePattern));
  SSLContext ctx=createSSLContext();
  if (appPath != null) {
    settings.setApplicationPath(appPath);
  }
  DatabasesClient appDbClient=new DatabasesClient(settings);
  Debugger debugger=null;
  if (System.getProperty(ScriptRunner.DEBUG_PROPERTY) != null) {
    debugger=Debugger.initialize(false);
    registerMBean(DebuggerMBean.DEBUGGER_MBEAN_NAME,debugger);
    registerMBean(Breakpoints.BREAKPOINTS_MBEAN_NAME,Breakpoints.getInstance());
    registerMBean(Settings.SETTINGS_MBEAN_NAME,new Settings(appDbClient));
  }
  ScriptRunner.PlatypusScriptedResource.init(appDbClient.getAppCache());
  PlatypusServer server=new PlatypusServer(appDbClient,ctx,getListenAddresses(),getPortsProtocols(),tasks,appElement);
  appDbClient.setContextHost(server);
  appDbClient.setPrincipalHost(server);
  ScriptUtils.getScope().defineProperty(ServerScriptRunner.MODULES_SCRIPT_NAME,server.getScriptsCache(),ScriptableObject.READONLY);
  Thread sgc=new Thread(new GarbageSessionsCollector(server));
  sgc.setDaemon(true);
  sgc.start();
  server.start();
}