Program: 94629
Project: 94629
Buggy source:
public void doMain(String[] args){
  CmdLineParser parser=new CmdLineParser(this);
  try {
    parser.parseArgument(args);
  }
 catch (  CmdLineException e) {
    System.err.println(e.getMessage());
    System.err.println("String_Node_Str");
    parser.printUsage(System.err);
    System.err.println();
    System.err.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str"+ parser.printExample(REQUIRED));
    return;
  }
  if (display_version) {
    Configuration config=new Configuration(null,"String_Node_Str","String_Node_Str");
    System.out.println("String_Node_Str" + config.getJarVersion());
    return;
  }
  ComputeType compute_method=ComputeType.CPU_GPU;
  Configuration config=new Configuration(null,login,password);
  config.setPrintLog(print_log);
  if (cache_dir != null) {
    File a_dir=new File(cache_dir);
    if (a_dir.isDirectory() && a_dir.canWrite()) {
      config.setCacheDir(a_dir);
    }
  }
  if (max_upload != -1) {
    if (max_upload <= 0) {
      System.err.println("String_Node_Str");
      return;
    }
    config.setMaxUploadingJob(max_upload);
  }
  if (gpu_device != null) {
    String cuda_str="String_Node_Str";
    if (gpu_device.startsWith(cuda_str) == false) {
      System.err.println("String_Node_Str");
      return;
    }
    try {
      Integer.parseInt(gpu_device.substring(cuda_str.length()));
    }
 catch (    NumberFormatException en) {
      System.err.println("String_Node_Str");
      return;
    }
    GPUDevice gpu=GPU.getGPUDevice(gpu_device);
    if (gpu == null) {
      System.err.println("String_Node_Str");
      System.exit(2);
    }
    config.setUseGPU(gpu);
  }
  if (request_time != null) {
    String[] intervals=request_time.split("String_Node_Str");
    if (intervals != null) {
      config.requestTime=new LinkedList<Pair<Calendar,Calendar>>();
      SimpleDateFormat timeFormat=new SimpleDateFormat("String_Node_Str");
      for (      String interval : intervals) {
        String[] times=interval.split("String_Node_Str");
        if (times != null && times.length == 2) {
          Calendar start=Calendar.getInstance();
          Calendar end=Calendar.getInstance();
          try {
            start.setTime(timeFormat.parse(times[0]));
            end.setTime(timeFormat.parse(times[1]));
          }
 catch (          ParseException e) {
            System.err.println("String_Node_Str");
            System.exit(2);
          }
          if (start.before(end)) {
            config.requestTime.add(new Pair<Calendar,Calendar>(start,end));
          }
 else {
            System.err.println("String_Node_Str" + times[0] + "String_Node_Str"+ times[1]);
            System.exit(2);
          }
        }
      }
    }
  }
  if (nb_cores < -1 || nb_cores == 0) {
    System.err.println("String_Node_Str");
    return;
  }
 else {
    config.setUseNbCores(nb_cores);
  }
  if (method != null) {
    if (method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.CPU_ONLY;
    }
 else     if (method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.GPU_ONLY;
    }
 else     if (method.equalsIgnoreCase("String_Node_Str") || method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.CPU_GPU;
    }
 else {
      System.err.println("String_Node_Str");
      System.exit(2);
    }
  }
  if (proxy != null) {
    try {
      URL url=new URL(proxy);
      String userinfo=url.getUserInfo();
      if (userinfo != null) {
        String[] elements=userinfo.split("String_Node_Str");
        if (elements.length == 2) {
          String proxy_user=elements[0];
          String proxy_password=elements[1];
          if (proxy_user != null && proxy_password != null) {
            Authenticator.setDefault(new ProxyAuthenticator(proxy_user,proxy_password));
          }
        }
      }
      System.setProperty("String_Node_Str",url.getHost());
      System.setProperty("String_Node_Str",Integer.toString(url.getPort()));
      System.setProperty("String_Node_Str",url.getHost());
      System.setProperty("String_Node_Str",Integer.toString(url.getPort()));
    }
 catch (    MalformedURLException e) {
      System.err.println("String_Node_Str");
      System.err.println(e);
      System.exit(2);
    }
  }
  if (extras != null) {
    config.setExtras(extras);
  }
  if (compute_method == ComputeType.CPU_ONLY) {
    compute_method=ComputeType.CPU_GPU;
    config.setComputeMethod(compute_method);
    config.setUseGPU(null);
  }
 else {
    config.setComputeMethod(compute_method);
  }
  Log.getInstance(config).debug("String_Node_Str" + config.getJarVersion());
  Gui gui;
  if (ui_type.equals("String_Node_Str")) {
    if (config.getPrintLog()) {
      System.out.println("String_Node_Str");
      System.exit(2);
    }
    gui=new GuiTextOneLine();
  }
 else {
    gui=new GuiText();
  }
  Client cli=new Client(gui,config,server);
  ShutdownHook hook=new ShutdownHook(cli);
  hook.attachShutDownHook();
  cli.run();
  cli.stop();
}

Fixed version (ground truth):
public void doMain(String[] args){
  CmdLineParser parser=new CmdLineParser(this);
  try {
    parser.parseArgument(args);
  }
 catch (  CmdLineException e) {
    System.err.println(e.getMessage());
    System.err.println("String_Node_Str");
    parser.printUsage(System.err);
    System.err.println();
    System.err.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str"+ parser.printExample(REQUIRED));
    return;
  }
  if (display_version) {
    Configuration config=new Configuration(null,"String_Node_Str","String_Node_Str");
    System.out.println("String_Node_Str" + config.getJarVersion());
    return;
  }
  ComputeType compute_method=ComputeType.CPU_ONLY;
  Configuration config=new Configuration(null,login,password);
  config.setPrintLog(print_log);
  if (cache_dir != null) {
    File a_dir=new File(cache_dir);
    if (a_dir.isDirectory() && a_dir.canWrite()) {
      config.setCacheDir(a_dir);
    }
  }
  if (max_upload != -1) {
    if (max_upload <= 0) {
      System.err.println("String_Node_Str");
      return;
    }
    config.setMaxUploadingJob(max_upload);
  }
  if (gpu_device != null) {
    String cuda_str="String_Node_Str";
    if (gpu_device.startsWith(cuda_str) == false) {
      System.err.println("String_Node_Str");
      return;
    }
    try {
      Integer.parseInt(gpu_device.substring(cuda_str.length()));
    }
 catch (    NumberFormatException en) {
      System.err.println("String_Node_Str");
      return;
    }
    GPUDevice gpu=GPU.getGPUDevice(gpu_device);
    if (gpu == null) {
      System.err.println("String_Node_Str");
      System.exit(2);
    }
    config.setUseGPU(gpu);
  }
  if (request_time != null) {
    String[] intervals=request_time.split("String_Node_Str");
    if (intervals != null) {
      config.requestTime=new LinkedList<Pair<Calendar,Calendar>>();
      SimpleDateFormat timeFormat=new SimpleDateFormat("String_Node_Str");
      for (      String interval : intervals) {
        String[] times=interval.split("String_Node_Str");
        if (times != null && times.length == 2) {
          Calendar start=Calendar.getInstance();
          Calendar end=Calendar.getInstance();
          try {
            start.setTime(timeFormat.parse(times[0]));
            end.setTime(timeFormat.parse(times[1]));
          }
 catch (          ParseException e) {
            System.err.println("String_Node_Str");
            System.exit(2);
          }
          if (start.before(end)) {
            config.requestTime.add(new Pair<Calendar,Calendar>(start,end));
          }
 else {
            System.err.println("String_Node_Str" + times[0] + "String_Node_Str"+ times[1]);
            System.exit(2);
          }
        }
      }
    }
  }
  if (nb_cores < -1 || nb_cores == 0) {
    System.err.println("String_Node_Str");
    return;
  }
 else {
    config.setUseNbCores(nb_cores);
  }
  if (method != null) {
    if (method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.CPU_ONLY;
    }
 else     if (method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.GPU_ONLY;
    }
 else     if (method.equalsIgnoreCase("String_Node_Str") || method.equalsIgnoreCase("String_Node_Str")) {
      compute_method=ComputeType.CPU_GPU;
    }
 else {
      System.err.println("String_Node_Str");
      System.exit(2);
    }
  }
 else {
    if (config.getGPUDevice() == null) {
      compute_method=ComputeType.CPU_ONLY;
    }
 else {
      compute_method=ComputeType.GPU_ONLY;
    }
  }
  if (proxy != null) {
    try {
      URL url=new URL(proxy);
      String userinfo=url.getUserInfo();
      if (userinfo != null) {
        String[] elements=userinfo.split("String_Node_Str");
        if (elements.length == 2) {
          String proxy_user=elements[0];
          String proxy_password=elements[1];
          if (proxy_user != null && proxy_password != null) {
            Authenticator.setDefault(new ProxyAuthenticator(proxy_user,proxy_password));
          }
        }
      }
      System.setProperty("String_Node_Str",url.getHost());
      System.setProperty("String_Node_Str",Integer.toString(url.getPort()));
      System.setProperty("String_Node_Str",url.getHost());
      System.setProperty("String_Node_Str",Integer.toString(url.getPort()));
    }
 catch (    MalformedURLException e) {
      System.err.println("String_Node_Str");
      System.err.println(e);
      System.exit(2);
    }
  }
  if (extras != null) {
    config.setExtras(extras);
  }
  if (compute_method == ComputeType.CPU_ONLY && config.getGPUDevice() != null) {
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    System.exit(2);
  }
 else   if (compute_method == ComputeType.CPU_GPU && config.getGPUDevice() == null) {
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    System.exit(2);
  }
 else   if (compute_method == ComputeType.GPU_ONLY && config.getGPUDevice() == null) {
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    System.exit(2);
  }
 else   if (compute_method == ComputeType.CPU_ONLY) {
    config.setUseGPU(null);
  }
  config.setComputeMethod(compute_method);
  Log.getInstance(config).debug("String_Node_Str" + config.getJarVersion());
  Gui gui;
  if (ui_type.equals("String_Node_Str")) {
    if (config.getPrintLog()) {
      System.out.println("String_Node_Str");
      System.exit(2);
    }
    gui=new GuiTextOneLine();
  }
 else {
    gui=new GuiText();
  }
  Client cli=new Client(gui,config,server);
  ShutdownHook hook=new ShutdownHook(cli);
  hook.attachShutDownHook();
  cli.run();
  cli.stop();
}