Program: 12336
Project: 12336
Buggy source:
public static void doLaunch(ServerList selected,List<ModuleCheckbox> list,Profile user) throws Exception {
  MinecraftVersion mcVersion=MinecraftVersion.loadVersion(selected.getVersion());
  String mainClass;
  List<String> args=new ArrayList<String>();
  StringBuilder clArgs=new StringBuilder(mcVersion.getMinecraftArguments());
  List<String> libs=new ArrayList<String>();
  MCUpdater mcu=MCUpdater.getInstance();
  Settings settings=MainShell.getInstance().getSettingsManager().getSettings();
  if (settings.isFullScreen()) {
    clArgs.append("String_Node_Str");
  }
 else {
    clArgs.append("String_Node_Str" + settings.getResWidth() + "String_Node_Str"+ settings.getResHeight());
  }
  if (settings.isAutoConnect() && selected.isAutoConnect()) {
    URI address;
    try {
      address=new URI("String_Node_Str" + selected.getAddress());
      clArgs.append("String_Node_Str" + address.getHost());
      if (address.getPort() != -1) {
        clArgs.append("String_Node_Str" + address.getPort());
      }
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
  clArgs.append("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str"));
  args.add((new Path(settings.getJrePath()).resolve("String_Node_Str").resolve("String_Node_Str").toString()));
  args.add("String_Node_Str" + settings.getMinMemory());
  args.add("String_Node_Str" + settings.getMaxMemory());
  args.add("String_Node_Str" + settings.getPermGen());
  args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str"));
  if (!Version.requestedFeatureLevel(selected.getVersion(),"String_Node_Str")) {
    args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).toString());
  }
  if (!selected.getMainClass().isEmpty()) {
    mainClass=selected.getMainClass();
  }
 else {
    mainClass=mcVersion.getMainClass();
  }
  for (  ModuleCheckbox entry : list) {
    if (entry.isSelected()) {
      if (entry.getModule().getIsLibrary()) {
        libs.add(entry.getModule().getId() + "String_Node_Str");
      }
      if (!entry.getModule().getLaunchArgs().isEmpty()) {
        clArgs.append("String_Node_Str" + entry.getModule().getLaunchArgs());
      }
    }
  }
  for (  Library lib : mcVersion.getLibraries()) {
    if (lib.validForOS() && !lib.hasNatives()) {
      libs.add(lib.getFilename());
    }
  }
  args.add("String_Node_Str");
  StringBuilder classpath=new StringBuilder();
  for (  String entry : libs) {
    classpath.append(mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve(entry).toString()).append(MCUpdater.cpDelimiter());
  }
  classpath.append(mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str").toString());
  args.add(classpath.toString());
  args.add(mainClass);
  String tmpclArgs=clArgs.toString();
  System.out.println(tmpclArgs);
  Map<String,String> fields=new HashMap<String,String>();
  StrSubstitutor fieldReplacer=new StrSubstitutor(fields);
  fields.put("String_Node_Str",user.getName());
  fields.put("String_Node_Str",user.getSessionKey());
  fields.put("String_Node_Str",selected.getVersion());
  fields.put("String_Node_Str",mcu.getInstanceRoot().resolve(selected.getServerId()).toString());
  fields.put("String_Node_Str",mcu.getArchiveFolder().resolve("String_Node_Str").toString());
  args.addAll(Arrays.asList(fieldReplacer.replace(tmpclArgs).split("String_Node_Str")));
  for (  String entry : args) {
    System.out.println(entry);
  }
  ProcessBuilder pb=new ProcessBuilder(args);
  pb.directory(mcu.getInstanceRoot().resolve(selected.getServerId()).toFile());
  pb.redirectErrorStream(true);
  try {
    Process task=pb.start();
    BufferedReader buffRead=new BufferedReader(new InputStreamReader(task.getInputStream()));
    String line;
    while ((line=buffRead.readLine()) != null) {
      if (line.length() > 0) {
        System.out.println(line);
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void doLaunch(ServerList selected,List<ModuleCheckbox> list,Profile user) throws Exception {
  MinecraftVersion mcVersion=MinecraftVersion.loadVersion(selected.getVersion());
  String mainClass;
  List<String> args=new ArrayList<String>();
  StringBuilder clArgs=new StringBuilder(mcVersion.getMinecraftArguments());
  List<String> libs=new ArrayList<String>();
  MCUpdater mcu=MCUpdater.getInstance();
  Settings settings=SettingsManager.getInstance().getSettings();
  if (settings.isFullScreen()) {
    clArgs.append("String_Node_Str");
  }
 else {
    clArgs.append("String_Node_Str" + settings.getResWidth() + "String_Node_Str"+ settings.getResHeight());
  }
  if (settings.isAutoConnect() && selected.isAutoConnect()) {
    URI address;
    try {
      address=new URI("String_Node_Str" + selected.getAddress());
      clArgs.append("String_Node_Str" + address.getHost());
      if (address.getPort() != -1) {
        clArgs.append("String_Node_Str" + address.getPort());
      }
    }
 catch (    URISyntaxException e) {
      e.printStackTrace();
    }
  }
  clArgs.append("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str"));
  args.add((new Path(settings.getJrePath()).resolve("String_Node_Str").resolve("String_Node_Str").toString()));
  args.add("String_Node_Str" + settings.getMinMemory());
  args.add("String_Node_Str" + settings.getMaxMemory());
  args.add("String_Node_Str" + settings.getPermGen());
  args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str"));
  if (!Version.requestedFeatureLevel(selected.getVersion(),"String_Node_Str")) {
    args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).toString());
  }
  if (!selected.getMainClass().isEmpty()) {
    mainClass=selected.getMainClass();
  }
 else {
    mainClass=mcVersion.getMainClass();
  }
  for (  ModuleCheckbox entry : list) {
    if (entry.isSelected()) {
      if (entry.getModule().getIsLibrary()) {
        libs.add(entry.getModule().getId() + "String_Node_Str");
      }
      if (!entry.getModule().getLaunchArgs().isEmpty()) {
        clArgs.append("String_Node_Str" + entry.getModule().getLaunchArgs());
      }
    }
  }
  for (  Library lib : mcVersion.getLibraries()) {
    if (lib.validForOS() && !lib.hasNatives()) {
      libs.add(lib.getFilename());
    }
  }
  args.add("String_Node_Str");
  StringBuilder classpath=new StringBuilder();
  for (  String entry : libs) {
    classpath.append(mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve(entry).toString()).append(MCUpdater.cpDelimiter());
  }
  classpath.append(mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str").toString());
  args.add(classpath.toString());
  args.add(mainClass);
  String tmpclArgs=clArgs.toString();
  System.out.println(tmpclArgs);
  Map<String,String> fields=new HashMap<String,String>();
  StrSubstitutor fieldReplacer=new StrSubstitutor(fields);
  fields.put("String_Node_Str",user.getName());
  fields.put("String_Node_Str",user.getSessionKey());
  fields.put("String_Node_Str",selected.getVersion());
  fields.put("String_Node_Str",mcu.getInstanceRoot().resolve(selected.getServerId()).toString());
  fields.put("String_Node_Str",mcu.getArchiveFolder().resolve("String_Node_Str").toString());
  args.addAll(Arrays.asList(fieldReplacer.replace(tmpclArgs).split("String_Node_Str")));
  for (  String entry : args) {
    System.out.println(entry);
  }
  ProcessBuilder pb=new ProcessBuilder(args);
  pb.directory(mcu.getInstanceRoot().resolve(selected.getServerId()).toFile());
  pb.redirectErrorStream(true);
  try {
    Process task=pb.start();
    BufferedReader buffRead=new BufferedReader(new InputStreamReader(task.getInputStream()));
    String line;
    while ((line=buffRead.readLine()) != null) {
      if (line.length() > 0) {
        System.out.println(line);
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}