Program: 160603
Project: 160603
Buggy source:
private void start(File destDir,String address,String port,String heapsize,String stacksize,String permsize,String jvmPath,String homedir){
  try {
    String command="String_Node_Str";
    if (jvmPath.equalsIgnoreCase("String_Node_Str")) {
      command="String_Node_Str";
    }
 else {
      File jvm=new File(jvmPath);
      if (jvm.exists()) {
        File jre=new File(jvm,"String_Node_Str");
        if (!jre.exists()) {
          jre=jvm;
        }
        command=new File(jre,"String_Node_Str" + File.separator + "String_Node_Str").getAbsolutePath();
        File jreLib=new File(jre,"String_Node_Str");
        command+="String_Node_Str";
        for (        File file : jreLib.listFiles()) {
          if (file.getName().endsWith("String_Node_Str")) {
            if (file.getAbsolutePath().contains("String_Node_Str")) {
              command+="String_Node_Str" + file.getAbsolutePath() + "String_Node_Str"+ File.pathSeparator;
            }
 else {
              command+=file.getAbsolutePath() + File.pathSeparator;
            }
          }
        }
        if (jre != jvm) {
          command+=new File(jvm,"String_Node_Str" + File.separator + "String_Node_Str");
        }
        command+="String_Node_Str";
      }
    }
    command+="String_Node_Str" + heapsize;
    command+="String_Node_Str" + stacksize;
    command+="String_Node_Str" + permsize;
    command+="String_Node_Str";
    command+="String_Node_Str" + File.pathSeparator;
    File dir=new File(destDir + File.separator + "String_Node_Str");
    for (    File lib : dir.listFiles()) {
      if (lib.isFile()) {
        if (lib.getName().contains("String_Node_Str")) {
          command+="String_Node_Str" + File.separator + lib.getName()+ "String_Node_Str"+ File.pathSeparator;
        }
 else {
          command+="String_Node_Str" + File.separator + lib.getName()+ File.pathSeparator;
        }
      }
    }
    if (command.endsWith(File.pathSeparator)) {
      command=command.substring(0,command.length() - 1);
    }
    Enumeration<URL> resources=getClass().getClassLoader().getResources("String_Node_Str");
    String realMainClass="String_Node_Str";
    while (resources.hasMoreElements()) {
      URL url=resources.nextElement();
      Manifest manifest=new Manifest(url.openStream());
      Attributes mainAttributes=manifest.getMainAttributes();
      for (      Object key : mainAttributes.keySet()) {
        if (key.toString().equals("String_Node_Str")) {
          realMainClass=mainAttributes.get(key).toString();
          break;
        }
      }
    }
    System.out.println("String_Node_Str" + realMainClass);
    command+="String_Node_Str" + realMainClass;
    command+="String_Node_Str" + address;
    command+="String_Node_Str" + port;
    command+="String_Node_Str" + homedir + "String_Node_Str";
    System.out.println("String_Node_Str" + command);
    exec=Runtime.getRuntime().exec(command,null,destDir);
    new Thread(new Runnable(){
      @Override public void run(){
        BufferedInputStream inputStream=new BufferedInputStream(exec.getInputStream());
        byte[] buffer=new byte[1024];
        int red;
        try {
          red=inputStream.read(buffer);
          while (red != -1) {
            String s=new String(buffer,0,red);
            System.out.print(s);
            red=inputStream.read(buffer);
          }
        }
 catch (        IOException e) {
        }
      }
    }
).start();
    new Thread(new Runnable(){
      @Override public void run(){
        BufferedInputStream errorStream=new BufferedInputStream(exec.getErrorStream());
        byte[] buffer=new byte[1024];
        int red;
        try {
          red=errorStream.read(buffer);
          while (red != -1) {
            String s=new String(buffer,0,red);
            System.out.print(s);
            red=errorStream.read(buffer);
          }
        }
 catch (        IOException e) {
        }
      }
    }
).start();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void start(File destDir,String address,String port,String heapsize,String stacksize,String permsize,String jvmPath,String homedir){
  try {
    String command="String_Node_Str";
    if (jvmPath.equalsIgnoreCase("String_Node_Str")) {
      command="String_Node_Str";
    }
 else {
      File jvm=new File(jvmPath);
      if (jvm.exists()) {
        File jre=new File(jvm,"String_Node_Str");
        if (!jre.exists()) {
          jre=jvm;
        }
        command=new File(jre,"String_Node_Str" + File.separator + "String_Node_Str").getAbsolutePath();
        File jreLib=new File(jre,"String_Node_Str");
        command+="String_Node_Str";
        for (        File file : jreLib.listFiles()) {
          if (file.getName().endsWith("String_Node_Str")) {
            if (file.getAbsolutePath().contains("String_Node_Str")) {
              command+="String_Node_Str" + file.getAbsolutePath() + "String_Node_Str"+ File.pathSeparator;
            }
 else {
              command+=file.getAbsolutePath() + File.pathSeparator;
            }
          }
        }
        if (jre != jvm) {
          command+=new File(jvm,"String_Node_Str" + File.separator + "String_Node_Str");
        }
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
    command+="String_Node_Str" + heapsize;
    command+="String_Node_Str" + stacksize;
    command+="String_Node_Str" + permsize;
    command+="String_Node_Str";
    command+="String_Node_Str" + File.pathSeparator;
    File dir=new File(destDir + File.separator + "String_Node_Str");
    for (    File lib : dir.listFiles()) {
      if (lib.isFile()) {
        if (lib.getName().contains("String_Node_Str")) {
          command+="String_Node_Str" + File.separator + lib.getName()+ "String_Node_Str"+ File.pathSeparator;
        }
 else {
          command+="String_Node_Str" + File.separator + lib.getName()+ File.pathSeparator;
        }
      }
    }
    if (command.endsWith(File.pathSeparator)) {
      command=command.substring(0,command.length() - 1);
    }
    Enumeration<URL> resources=getClass().getClassLoader().getResources("String_Node_Str");
    String realMainClass="String_Node_Str";
    while (resources.hasMoreElements()) {
      URL url=resources.nextElement();
      Manifest manifest=new Manifest(url.openStream());
      Attributes mainAttributes=manifest.getMainAttributes();
      for (      Object key : mainAttributes.keySet()) {
        if (key.toString().equals("String_Node_Str")) {
          realMainClass=mainAttributes.get(key).toString();
          break;
        }
      }
    }
    System.out.println("String_Node_Str" + realMainClass);
    command+="String_Node_Str" + realMainClass;
    command+="String_Node_Str" + address;
    command+="String_Node_Str" + port;
    command+="String_Node_Str" + homedir + "String_Node_Str";
    System.out.println("String_Node_Str" + command);
    exec=Runtime.getRuntime().exec(command,null,destDir);
    new Thread(new Runnable(){
      @Override public void run(){
        BufferedInputStream inputStream=new BufferedInputStream(exec.getInputStream());
        byte[] buffer=new byte[1024];
        int red;
        try {
          red=inputStream.read(buffer);
          while (red != -1) {
            String s=new String(buffer,0,red);
            System.out.print(s);
            red=inputStream.read(buffer);
          }
        }
 catch (        IOException e) {
        }
      }
    }
).start();
    new Thread(new Runnable(){
      @Override public void run(){
        BufferedInputStream errorStream=new BufferedInputStream(exec.getErrorStream());
        byte[] buffer=new byte[1024];
        int red;
        try {
          red=errorStream.read(buffer);
          while (red != -1) {
            String s=new String(buffer,0,red);
            System.out.print(s);
            red=errorStream.read(buffer);
          }
        }
 catch (        IOException e) {
        }
      }
    }
).start();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}