Program: 44234
Project: 44234
Buggy source:
public static CmdResult run(String cmd,File dir) throws CommandLineException, AbnormalProcessTerminationException {
  logger.trace_function();
  logger.debug("String_Node_Str" + cmd);
  String[] cmds=new String[3];
  cmds[0]="String_Node_Str";
  cmds[1]="String_Node_Str";
  cmds[2]=cmd;
  try {
    ProcessBuilder pb=new ProcessBuilder(cmd);
    if (dir != null) {
      logger.debug("String_Node_Str" + dir);
      pb.directory(dir);
    }
    CmdResult result=new CmdResult();
    Process p=pb.start();
    StreamGobbler output=new StreamGobbler(p.getInputStream());
    StreamGobbler errors=new StreamGobbler(p.getErrorStream());
    output.run();
    errors.run();
    int exitValue=p.waitFor();
    if (exitValue != 0) {
      logger.error("String_Node_Str" + errors.sres.toString());
      throw new AbnormalProcessTerminationException(errors.sres.toString());
    }
    p.getErrorStream().close();
    p.getOutputStream().close();
    p.getInputStream().close();
    result.stdoutBuffer=output.sres;
    result.stdoutList=output.lres;
    result.errorBuffer=errors.sres;
    result.errorList=errors.lres;
    return result;
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
catch (  InterruptedException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
public static CmdResult run(String cmd,File dir) throws CommandLineException, AbnormalProcessTerminationException {
  logger.trace_function();
  logger.debug("String_Node_Str" + cmd);
  String[] cmds=new String[3];
  cmds[0]="String_Node_Str";
  cmds[1]="String_Node_Str";
  cmds[2]=cmd;
  try {
    ProcessBuilder pb=new ProcessBuilder(cmds);
    if (dir != null) {
      logger.debug("String_Node_Str" + dir);
      pb.directory(dir);
    }
    CmdResult result=new CmdResult();
    Process p=pb.start();
    StreamGobbler output=new StreamGobbler(p.getInputStream());
    StreamGobbler errors=new StreamGobbler(p.getErrorStream());
    output.run();
    errors.run();
    int exitValue=p.waitFor();
    if (exitValue != 0) {
      logger.error("String_Node_Str" + errors.sres.toString());
      throw new AbnormalProcessTerminationException(errors.sres.toString());
    }
    p.getErrorStream().close();
    p.getOutputStream().close();
    p.getInputStream().close();
    result.stdoutBuffer=output.sres;
    result.stdoutList=output.lres;
    result.errorBuffer=errors.sres;
    result.errorList=errors.lres;
    return result;
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
catch (  InterruptedException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
}