Program: 113481
Project: 113481
Buggy source:
public static void main(String[] args){
  Map<String,CliOption> options=null;
  try {
    options=utils.getDefaultAdminToolOptions(true);
    List<String> arguments=new ArrayList<String>(1);
    CliOption oDir=new CliOption(CliOption.OPTIONTYPE.URL,"String_Node_Str","String_Node_Str");
    oDir.urlDefaultPort=PORTS.DIR_PBRPC_PORT_DEFAULT.getNumber();
    oDir.urlDefaultProtocol=Schemes.SCHEME_PBRPC;
    options.put("String_Node_Str",oDir);
    options.put("String_Node_Str",new CliOption(CliOption.OPTIONTYPE.SWITCH,"String_Node_Str","String_Node_Str"));
    options.put("String_Node_Str",new CliOption(CliOption.OPTIONTYPE.SWITCH,"String_Node_Str","String_Node_Str"));
    CLIParser.parseCLI(args,options,arguments);
    if (options.get("String_Node_Str").switchValue) {
      Logging.start(Logging.LEVEL_DEBUG);
    }
 else {
      Logging.start(Logging.LEVEL_ERROR);
    }
    if (options.get(utils.OPTION_HELP).switchValue || options.get(utils.OPTION_HELP_LONG).switchValue) {
      usage(options);
      return;
    }
    if (arguments.size() != 1) {
      error("String_Node_Str",options,false);
    }
    ONCRPCServiceURL dirURL=options.get("String_Node_Str").urlValue;
    boolean shutdown=options.get("String_Node_Str").switchValue;
    String password=(options.get(utils.OPTION_ADMIN_PASS).stringValue != null) ? options.get(utils.OPTION_ADMIN_PASS).stringValue : "String_Node_Str";
    boolean useSSL=false;
    boolean gridSSL=false;
    String serviceCredsFile=null;
    String serviceCredsPass=null;
    String trustedCAsFile=null;
    String trustedCAsPass=null;
    InetSocketAddress dirAddr=null;
    String osdUUID=null;
    if (arguments.get(0).startsWith("String_Node_Str")) {
      osdUUID=arguments.get(0).substring("String_Node_Str".length());
    }
 else {
      error("String_Node_Str",options);
    }
    if (dirURL != null && (Schemes.SCHEME_PBRPCS.equals(dirURL.getProtocol()) || Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol()))) {
      useSSL=true;
      serviceCredsFile=options.get(utils.OPTION_USER_CREDS_FILE).stringValue;
      serviceCredsPass=options.get(utils.OPTION_USER_CREDS_PASS).stringValue;
      trustedCAsFile=options.get(utils.OPTION_TRUSTSTORE_FILE).stringValue;
      trustedCAsPass=options.get(utils.OPTION_TRUSTSTORE_PASS).stringValue;
      if (Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol())) {
        gridSSL=true;
      }
      if (serviceCredsFile == null) {
        System.out.println("String_Node_Str" + utils.OPTION_USER_CREDS_FILE + "String_Node_Str");
        usage(options);
        System.exit(1);
      }
 else       if (trustedCAsFile == null) {
        System.out.println("String_Node_Str" + utils.OPTION_TRUSTSTORE_FILE + "String_Node_Str");
        usage(options);
        System.exit(1);
      }
    }
    if (dirURL == null) {
      try {
        DefaultDirConfig cfg=new DefaultDirConfig(DEFAULT_DIR_CONFIG);
        cfg.read();
        dirAddr=cfg.getDirectoryService();
        useSSL=cfg.isSslEnabled();
        serviceCredsFile=cfg.getServiceCredsFile();
        serviceCredsPass=cfg.getServiceCredsPassphrase();
        trustedCAsFile=cfg.getTrustedCertsFile();
        trustedCAsPass=cfg.getTrustedCertsPassphrase();
      }
 catch (      IOException e) {
        error("String_Node_Str",options);
      }
    }
 else {
      dirAddr=new InetSocketAddress(dirURL.getHost(),dirURL.getPort());
    }
    SSLOptions sslOptions=useSSL ? new SSLOptions(new FileInputStream(serviceCredsFile),serviceCredsPass,SSLOptions.PKCS12_CONTAINER,new FileInputStream(trustedCAsFile),trustedCAsPass,SSLOptions.JKS_CONTAINER,false,gridSSL,null) : null;
    xtfs_remove_osd removeOsd=new xtfs_remove_osd(dirAddr,osdUUID,sslOptions,password);
    removeOsd.initialize();
    removeOsd.drainOSD(shutdown);
    removeOsd.shutdown();
    System.exit(0);
  }
 catch (  Exception e) {
    error(e.getMessage(),options);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Map<String,CliOption> options=null;
  try {
    options=utils.getDefaultAdminToolOptions(true);
    List<String> arguments=new ArrayList<String>(1);
    CliOption oDir=new CliOption(CliOption.OPTIONTYPE.URL,"String_Node_Str","String_Node_Str");
    oDir.urlDefaultPort=PORTS.DIR_PBRPC_PORT_DEFAULT.getNumber();
    oDir.urlDefaultProtocol=Schemes.SCHEME_PBRPC;
    options.put("String_Node_Str",oDir);
    options.put("String_Node_Str",new CliOption(CliOption.OPTIONTYPE.SWITCH,"String_Node_Str","String_Node_Str"));
    options.put("String_Node_Str",new CliOption(CliOption.OPTIONTYPE.SWITCH,"String_Node_Str","String_Node_Str"));
    CLIParser.parseCLI(args,options,arguments);
    if (options.get("String_Node_Str").switchValue) {
      Logging.start(Logging.LEVEL_DEBUG);
    }
 else {
      Logging.start(Logging.LEVEL_ERROR);
    }
    if (options.get(utils.OPTION_HELP).switchValue || options.get(utils.OPTION_HELP_LONG).switchValue || arguments.size() == 0) {
      usage(options);
      return;
    }
    if (arguments.size() > 1) {
      error("String_Node_Str",options,true);
    }
    ONCRPCServiceURL dirURL=options.get("String_Node_Str").urlValue;
    boolean shutdown=options.get("String_Node_Str").switchValue;
    String password=(options.get(utils.OPTION_ADMIN_PASS).stringValue != null) ? options.get(utils.OPTION_ADMIN_PASS).stringValue : "String_Node_Str";
    boolean useSSL=false;
    boolean gridSSL=false;
    String serviceCredsFile=null;
    String serviceCredsPass=null;
    String trustedCAsFile=null;
    String trustedCAsPass=null;
    InetSocketAddress dirAddr=null;
    String osdUUID=null;
    if (arguments.get(0).startsWith("String_Node_Str")) {
      osdUUID=arguments.get(0).substring("String_Node_Str".length());
    }
 else {
      error("String_Node_Str",options);
    }
    if (dirURL != null && (Schemes.SCHEME_PBRPCS.equals(dirURL.getProtocol()) || Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol()))) {
      useSSL=true;
      serviceCredsFile=options.get(utils.OPTION_USER_CREDS_FILE).stringValue;
      serviceCredsPass=options.get(utils.OPTION_USER_CREDS_PASS).stringValue;
      trustedCAsFile=options.get(utils.OPTION_TRUSTSTORE_FILE).stringValue;
      trustedCAsPass=options.get(utils.OPTION_TRUSTSTORE_PASS).stringValue;
      if (Schemes.SCHEME_PBRPCG.equals(dirURL.getProtocol())) {
        gridSSL=true;
      }
      if (serviceCredsFile == null) {
        System.out.println("String_Node_Str" + utils.OPTION_USER_CREDS_FILE + "String_Node_Str");
        usage(options);
        System.exit(1);
      }
 else       if (trustedCAsFile == null) {
        System.out.println("String_Node_Str" + utils.OPTION_TRUSTSTORE_FILE + "String_Node_Str");
        usage(options);
        System.exit(1);
      }
    }
    if (dirURL == null) {
      try {
        DefaultDirConfig cfg=new DefaultDirConfig(DEFAULT_DIR_CONFIG);
        cfg.read();
        dirAddr=cfg.getDirectoryService();
        useSSL=cfg.isSslEnabled();
        serviceCredsFile=cfg.getServiceCredsFile();
        serviceCredsPass=cfg.getServiceCredsPassphrase();
        trustedCAsFile=cfg.getTrustedCertsFile();
        trustedCAsPass=cfg.getTrustedCertsPassphrase();
      }
 catch (      IOException e) {
        error("String_Node_Str",options);
      }
    }
 else {
      dirAddr=new InetSocketAddress(dirURL.getHost(),dirURL.getPort());
    }
    SSLOptions sslOptions=useSSL ? new SSLOptions(new FileInputStream(serviceCredsFile),serviceCredsPass,SSLOptions.PKCS12_CONTAINER,new FileInputStream(trustedCAsFile),trustedCAsPass,SSLOptions.JKS_CONTAINER,false,gridSSL,null) : null;
    xtfs_remove_osd removeOsd=new xtfs_remove_osd(dirAddr,osdUUID,sslOptions,password);
    removeOsd.initialize();
    removeOsd.drainOSD(shutdown);
    removeOsd.shutdown();
    System.exit(0);
  }
 catch (  Exception e) {
    error(e.getMessage(),options);
  }
}