Program: 189350
Project: 189350
Buggy source:
/** 
 * The method to add a file to the submission being viewed. This checks the type of file being uploaded (note, primary, supplement) and calls the appropriate private method.
 * @param subId (The submission id)
 */
@Security(RoleType.REVIEWER) private static void addFile(Submission sub){
  String uploadType=params.get("String_Node_Str");
  if ("String_Node_Str".equals(uploadType)) {
    uploadPrimary(sub);
  }
 else   if ("String_Node_Str".equals(uploadType)) {
    uploadAdditional(sub);
  }
 else {
    validation.addError("String_Node_Str","String_Node_Str");
  }
  VireoEmail email=null;
  if (params.get("String_Node_Str") != null) {
    List<String> primary_recipients=params.get("String_Node_Str") == null ? new ArrayList<String>() : Utilities.processEmailDesigneeArray(params.get("String_Node_Str").split("String_Node_Str"),sub);
    List<String> cc_recipients=params.get("String_Node_Str") == null ? new ArrayList<String>() : Utilities.processEmailDesigneeArray(params.get("String_Node_Str").split("String_Node_Str"),sub);
    String subject=params.get("String_Node_Str");
    String comment=params.get("String_Node_Str");
    if (subject == null || subject.isEmpty())     validation.addError("String_Node_Str","String_Node_Str");
    if (comment == null || comment.isEmpty())     validation.addError("String_Node_Str","String_Node_Str");
    if (!validation.hasErrors()) {
      email=emailService.createEmail();
      email.addParameters(sub);
      for (      String email_address : primary_recipients) {
        email.addTo(email_address);
      }
      for (      String email_address : cc_recipients) {
        email.addCc(email_address);
      }
      email.addTo(sub.getSubmitter());
      email.setReplyTo(context.getPerson());
      if (params.get("String_Node_Str") != null && sub.getCommitteeContactEmail() != null) {
        email.addCc(sub.getCommitteeContactEmail());
      }
      email.setSubject(subject);
      email.setMessage(comment);
      email.setLogOnCompletion(context.getPerson(),sub);
    }
  }
  if (!validation.hasErrors() && email != null)   emailService.sendEmail(email,true);
}

Fixed version (ground truth):
/** 
 * The method to add a file to the submission being viewed. This checks the type of file being uploaded (note, primary, supplement) and calls the appropriate private method.
 * @param subId (The submission id)
 */
@Security(RoleType.REVIEWER) private static void addFile(Submission sub){
  String uploadType=params.get("String_Node_Str");
  if ("String_Node_Str".equals(uploadType)) {
    uploadPrimary(sub);
  }
 else   if ("String_Node_Str".equals(uploadType)) {
    uploadAdditional(sub);
  }
  VireoEmail email=null;
  if (params.get("String_Node_Str") != null) {
    List<String> primary_recipients=params.get("String_Node_Str") == null ? new ArrayList<String>() : Utilities.processEmailDesigneeArray(params.get("String_Node_Str").split("String_Node_Str"),sub);
    List<String> cc_recipients=params.get("String_Node_Str") == null ? new ArrayList<String>() : Utilities.processEmailDesigneeArray(params.get("String_Node_Str").split("String_Node_Str"),sub);
    String subject=params.get("String_Node_Str");
    String comment=params.get("String_Node_Str");
    if (subject == null || subject.isEmpty())     validation.addError("String_Node_Str","String_Node_Str");
    if (comment == null || comment.isEmpty())     validation.addError("String_Node_Str","String_Node_Str");
    if (!validation.hasErrors()) {
      email=emailService.createEmail();
      email.addParameters(sub);
      for (      String email_address : primary_recipients) {
        email.addTo(email_address);
      }
      for (      String email_address : cc_recipients) {
        email.addCc(email_address);
      }
      email.addTo(sub.getSubmitter());
      email.setReplyTo(context.getPerson());
      if (params.get("String_Node_Str") != null && sub.getCommitteeContactEmail() != null) {
        email.addCc(sub.getCommitteeContactEmail());
      }
      email.setSubject(subject);
      email.setMessage(comment);
      email.setLogOnCompletion(context.getPerson(),sub);
    }
  }
  if (!validation.hasErrors() && email != null)   emailService.sendEmail(email,true);
}