Program: 88400
Project: 88400
Buggy source:
/** 
 * Loads the Teamwork project. Complains if it fails.
 * @throws FileNotFoundException        can't find teamwork project or branch
 * @throws UnsupportedEncodingException logMessage failures
 * @throws InterruptedException         cancel triggered and caught by cancel handler
 * @throws IllegalAccessException       access failure with loaded credentials
 * @throws RemoteException              error getting the projectDescriptor back from the twUtil
 */
private void loadTeamworkProject() throws FileNotFoundException, UnsupportedEncodingException, RemoteException, IllegalAccessException, InterruptedException, URISyntaxException {
  String message;
  if (!(parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str")&& parser.hasOption("String_Node_Str"))) {
    illegalStateFailure("String_Node_Str");
  }
  message="String_Node_Str";
  logMessage(message);
  MDKHelper.setMMSLoginCredentials(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"));
  if (!(parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str"))) {
    illegalStateFailure("String_Node_Str");
  }
  message="String_Node_Str";
  logMessage(message);
  String projectTwcId="String_Node_Str", branchTwcId="String_Node_Str", ticketStore;
  ObjectNode projectsNode=JacksonUtils.getObjectMapper().createObjectNode(), refsNode=JacksonUtils.getObjectMapper().createObjectNode();
  try {
    ticketStore=MMSUtils.getCredentialsTicket(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"),null);
    URIBuilder mmsProjectUri=MMSUtils.getServiceProjectsUri(parser.getOptionValue("String_Node_Str"));
    mmsProjectUri.setParameter("String_Node_Str",ticketStore).setPath(mmsProjectUri.getPath() + "String_Node_Str" + parser.getOptionValue("String_Node_Str"));
    MMSUtils.sendMMSRequest(null,MMSUtils.buildRequest(MMSUtils.HttpRequestType.GET,mmsProjectUri),null,projectsNode);
    if (!parser.getOptionValue("String_Node_Str").equals("String_Node_Str")) {
      URIBuilder mmsRefUri=MMSUtils.getServiceProjectsRefsUri(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"));
      mmsRefUri.setParameter("String_Node_Str",ticketStore).setPath(mmsRefUri.getPath() + "String_Node_Str" + parser.getOptionValue("String_Node_Str"));
      MMSUtils.sendMMSRequest(null,MMSUtils.buildRequest(MMSUtils.HttpRequestType.GET,mmsRefUri),null,refsNode);
    }
  }
 catch (  IOException|ServerException e) {
    illegalStateFailure("String_Node_Str");
    e.printStackTrace();
  }
  JsonNode arrayNode, idNode;
  if ((arrayNode=projectsNode.get("String_Node_Str")) != null && arrayNode.isArray()) {
    for (    JsonNode projectNode : arrayNode) {
      if (projectNode.isObject() && (idNode=projectNode.get(MDKConstants.ID_KEY)) != null && idNode.isTextual() && idNode.asText().equals((parser.getOptionValue(("String_Node_Str")))) && (idNode=projectNode.get(MDKConstants.TWC_ID_KEY)) != null && idNode.isTextual()) {
        projectTwcId=idNode.asText();
      }
    }
  }
  if ((arrayNode=refsNode.get("String_Node_Str")) != null && arrayNode.isArray()) {
    for (    JsonNode refNode : arrayNode) {
      if (refNode.isObject() && (idNode=refNode.get(MDKConstants.ID_KEY)) != null && idNode.isTextual() && idNode.asText().equals((parser.getOptionValue(("String_Node_Str")))) && (idNode=refNode.get(MDKConstants.TWC_ID_KEY)) != null && idNode.isTextual()) {
        branchTwcId=idNode.asText();
      }
    }
  }
  if (projectTwcId.isEmpty()) {
    illegalStateFailure("String_Node_Str");
  }
  ProjectDescriptor projectDescriptor=null;
  try {
    Collection<ProjectDescriptor> descriptors=EsiUtils.getRemoteProjectDescriptors();
    for (    ProjectDescriptor descriptor : descriptors) {
      if (descriptor.getURI().getPath().startsWith("String_Node_Str" + projectTwcId)) {
        projectDescriptor=descriptor;
        break;
      }
    }
  }
 catch (  Exception e1) {
    illegalStateFailure("String_Node_Str");
  }
  if (!branchTwcId.isEmpty()) {
    projectDescriptor=EsiUtils.getDescriptorByBranchID(projectDescriptor,java.util.UUID.fromString(branchTwcId));
  }
 else   if (!parser.getOptionValue("String_Node_Str").equals("String_Node_Str")) {
    projectDescriptor=EsiUtils.getDescriptorByBranchID(projectDescriptor,java.util.UUID.fromString(parser.getOptionValue("String_Node_Str")));
  }
 else {
    illegalStateFailure("String_Node_Str");
  }
  message="String_Node_Str";
  logMessage(message);
  Application.getInstance().getProjectsManager().loadProject(projectDescriptor,true);
  if (Application.getInstance().getProject() == null) {
    illegalStateFailure("String_Node_Str" + parser.getOptionValue("String_Node_Str") + "String_Node_Str"+ projectDescriptor.getRepresentationString()+ "String_Node_Str");
  }
  twLoaded=true;
  project=Application.getInstance().getProject();
  while (!messageLog.isEmpty()) {
    Application.getInstance().getGUILog().log(messageLog.remove(0));
  }
  message="String_Node_Str";
  logMessage(message);
  checkCancel();
}

Fixed version (ground truth):
/** 
 * Loads the Teamwork project. Complains if it fails.
 * @throws FileNotFoundException        can't find teamwork project or branch
 * @throws UnsupportedEncodingException logMessage failures
 * @throws InterruptedException         cancel triggered and caught by cancel handler
 * @throws IllegalAccessException       access failure with loaded credentials
 * @throws RemoteException              error getting the projectDescriptor back from the twUtil
 */
private void loadTeamworkProject() throws FileNotFoundException, UnsupportedEncodingException, RemoteException, IllegalAccessException, InterruptedException, URISyntaxException {
  String message;
  if (!(parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str")&& parser.hasOption("String_Node_Str"))) {
    illegalStateFailure("String_Node_Str");
  }
  message="String_Node_Str";
  logMessage(message);
  MDKHelper.setMMSLoginCredentials(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"));
  if (!(parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str") && parser.hasOption("String_Node_Str"))) {
    illegalStateFailure("String_Node_Str");
  }
  message="String_Node_Str";
  logMessage(message);
  String projectTwcId="String_Node_Str", branchTwcId="String_Node_Str", ticketStore;
  ObjectNode projectsNode=JacksonUtils.getObjectMapper().createObjectNode(), refsNode=JacksonUtils.getObjectMapper().createObjectNode();
  try {
    ticketStore=MMSUtils.getCredentialsTicket(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"),null);
    URIBuilder mmsProjectUri=MMSUtils.getServiceProjectsUri(parser.getOptionValue("String_Node_Str"));
    mmsProjectUri.setParameter("String_Node_Str",ticketStore).setPath(mmsProjectUri.getPath() + "String_Node_Str" + parser.getOptionValue("String_Node_Str"));
    MMSUtils.sendMMSRequest(null,MMSUtils.buildRequest(MMSUtils.HttpRequestType.GET,mmsProjectUri),null,projectsNode);
    if (!parser.getOptionValue("String_Node_Str").equals("String_Node_Str")) {
      URIBuilder mmsRefUri=MMSUtils.getServiceProjectsRefsUri(parser.getOptionValue("String_Node_Str"),parser.getOptionValue("String_Node_Str"));
      mmsRefUri.setParameter("String_Node_Str",ticketStore).setPath(mmsRefUri.getPath() + "String_Node_Str" + parser.getOptionValue("String_Node_Str"));
      MMSUtils.sendMMSRequest(null,MMSUtils.buildRequest(MMSUtils.HttpRequestType.GET,mmsRefUri),null,refsNode);
    }
  }
 catch (  IOException|ServerException e) {
    illegalStateFailure("String_Node_Str");
    e.printStackTrace();
  }
  JsonNode arrayNode, idNode;
  if ((arrayNode=projectsNode.get("String_Node_Str")) != null && arrayNode.isArray()) {
    for (    JsonNode projectNode : arrayNode) {
      if (projectNode.isObject() && (idNode=projectNode.get(MDKConstants.ID_KEY)) != null && idNode.isTextual() && idNode.asText().equals((parser.getOptionValue(("String_Node_Str")))) && (idNode=projectNode.get(MDKConstants.TWC_ID_KEY)) != null && idNode.isTextual()) {
        projectTwcId=idNode.asText();
      }
    }
  }
  if ((arrayNode=refsNode.get("String_Node_Str")) != null && arrayNode.isArray()) {
    for (    JsonNode refNode : arrayNode) {
      if (refNode.isObject() && (idNode=refNode.get(MDKConstants.ID_KEY)) != null && idNode.isTextual() && idNode.asText().equals((parser.getOptionValue(("String_Node_Str")))) && (idNode=refNode.get(MDKConstants.TWC_ID_KEY)) != null && idNode.isTextual()) {
        branchTwcId=idNode.asText();
      }
    }
  }
  if (projectTwcId.isEmpty()) {
    illegalStateFailure("String_Node_Str");
  }
  ProjectDescriptor projectDescriptor=null;
  try {
    Collection<ProjectDescriptor> descriptors=EsiUtils.getRemoteProjectDescriptors();
    for (    ProjectDescriptor descriptor : descriptors) {
      if (descriptor.getURI().getPath().startsWith("String_Node_Str" + projectTwcId)) {
        projectDescriptor=descriptor;
        break;
      }
    }
  }
 catch (  Exception e1) {
    illegalStateFailure("String_Node_Str");
  }
  if (!branchTwcId.isEmpty()) {
    projectDescriptor=EsiUtils.getDescriptorByBranchID(projectDescriptor,java.util.UUID.fromString(branchTwcId));
  }
 else   if (!parser.getOptionValue("String_Node_Str").equals("String_Node_Str")) {
    projectDescriptor=EsiUtils.getDescriptorByBranchID(projectDescriptor,java.util.UUID.fromString(parser.getOptionValue("String_Node_Str")));
  }
  message="String_Node_Str";
  logMessage(message);
  Application.getInstance().getProjectsManager().loadProject(projectDescriptor,true);
  if (Application.getInstance().getProject() == null) {
    illegalStateFailure("String_Node_Str" + parser.getOptionValue("String_Node_Str") + "String_Node_Str"+ projectDescriptor.getRepresentationString()+ "String_Node_Str");
  }
  twLoaded=true;
  project=Application.getInstance().getProject();
  while (!messageLog.isEmpty()) {
    Application.getInstance().getGUILog().log(messageLog.remove(0));
  }
  message="String_Node_Str";
  logMessage(message);
  checkCancel();
}