Program: 12331
Project: 12331
Buggy source:
public static void doLaunch(ServerList selected,List<ModuleCheckbox> list,Profile user) throws Exception {
  String playerName;
  String sessionKey;
{
    playerName=user.getName();
    sessionKey=user.getSessionKey();
  }
  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" + handleWhitespace(mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").toString()));
  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.addAll(Arrays.asList(settings.getJvmOpts().split("String_Node_Str")));
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    args.add("String_Node_Str" + mcu.getArchiveFolder().resolve("String_Node_Str").resolve("String_Node_Str").resolve("String_Node_Str").toString());
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str").toString());
  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());
      }
      if (!entry.getModule().getJreArgs().isEmpty()) {
        args.addAll(Arrays.asList(entry.getModule().getJreArgs().split("String_Node_Str")));
      }
      if (entry.getModule().hasSubmodules()) {
        for (        Module sm : entry.getModule().getSubmodules()) {
          if (sm.getIsLibrary()) {
            libs.add(sm.getId() + "String_Node_Str");
          }
          if (!sm.getLaunchArgs().isEmpty()) {
            clArgs.append("String_Node_Str" + sm.getLaunchArgs());
          }
          if (!sm.getJreArgs().isEmpty()) {
            args.addAll(Arrays.asList(sm.getJreArgs().split("String_Node_Str")));
          }
        }
      }
    }
  }
  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",playerName);
  fields.put("String_Node_Str",sessionKey);
  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());
  String[] fieldArr=tmpclArgs.split("String_Node_Str");
  for (int i=0; i < fieldArr.length; i++) {
    fieldArr[i]=fieldReplacer.replace(fieldArr[i]);
  }
  args.addAll(Arrays.asList(fieldArr));
  for (  String entry : args) {
    System.out.println(entry);
  }
  final ProcessBuilder pb=new ProcessBuilder(args);
  pb.directory(mcu.getInstanceRoot().resolve(selected.getServerId()).toFile());
  pb.redirectErrorStream(true);
  Thread gameThread=new Thread(new Runnable(){
    @Override public void run(){
      try {
        Process task=pb.start();
        BufferedReader buffRead=new BufferedReader(new InputStreamReader(task.getInputStream()));
        String line;
        while ((line=buffRead.readLine()) != null) {
          if (line.length() > 0) {
            MainShell.getInstance().consoleWrite(line);
          }
        }
      }
 catch (      Exception e) {
        MainShell.getInstance().consoleWrite(e.getMessage());
      }
 finally {
        MainShell.getInstance().setPlaying(false);
      }
    }
  }
);
  gameThread.start();
  MainShell.getInstance().setPlaying(true);
}

Fixed version (ground truth):
public static void doLaunch(ServerList selected,List<ModuleCheckbox> list,Profile user) throws Exception {
  String playerName;
  String sessionKey;
{
    playerName=user.getName();
    sessionKey=user.getSessionKey();
  }
  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");
  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.addAll(Arrays.asList(settings.getJvmOpts().split("String_Node_Str")));
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    args.add("String_Node_Str" + mcu.getArchiveFolder().resolve("String_Node_Str").resolve("String_Node_Str").resolve("String_Node_Str").toString());
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str" + mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").resolve("String_Node_Str").toString());
  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());
      }
      if (!entry.getModule().getJreArgs().isEmpty()) {
        args.addAll(Arrays.asList(entry.getModule().getJreArgs().split("String_Node_Str")));
      }
      if (entry.getModule().hasSubmodules()) {
        for (        Module sm : entry.getModule().getSubmodules()) {
          if (sm.getIsLibrary()) {
            libs.add(sm.getId() + "String_Node_Str");
          }
          if (!sm.getLaunchArgs().isEmpty()) {
            clArgs.append("String_Node_Str" + sm.getLaunchArgs());
          }
          if (!sm.getJreArgs().isEmpty()) {
            args.addAll(Arrays.asList(sm.getJreArgs().split("String_Node_Str")));
          }
        }
      }
    }
  }
  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",playerName);
  fields.put("String_Node_Str",sessionKey);
  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());
  fields.put("String_Node_Str",mcu.getInstanceRoot().resolve(selected.getServerId()).resolve("String_Node_Str").toString());
  String[] fieldArr=tmpclArgs.split("String_Node_Str");
  for (int i=0; i < fieldArr.length; i++) {
    fieldArr[i]=fieldReplacer.replace(fieldArr[i]);
  }
  args.addAll(Arrays.asList(fieldArr));
  for (  String entry : args) {
    System.out.println(entry);
  }
  final ProcessBuilder pb=new ProcessBuilder(args);
  pb.directory(mcu.getInstanceRoot().resolve(selected.getServerId()).toFile());
  pb.redirectErrorStream(true);
  Thread gameThread=new Thread(new Runnable(){
    @Override public void run(){
      try {
        Process task=pb.start();
        BufferedReader buffRead=new BufferedReader(new InputStreamReader(task.getInputStream()));
        String line;
        while ((line=buffRead.readLine()) != null) {
          if (line.length() > 0) {
            MainShell.getInstance().consoleWrite(line);
          }
        }
      }
 catch (      Exception e) {
        MainShell.getInstance().consoleWrite(e.getMessage());
      }
 finally {
        MainShell.getInstance().setPlaying(false);
      }
    }
  }
);
  gameThread.start();
  MainShell.getInstance().setPlaying(true);
}