Program: 189372
Project: 189372
Buggy source:
private void processWorkbookRow(XSSFRow header,XSSFRow row,Submission sub,List<SearchOrder> SearchOrderList){
  int j=0;
  for (  SearchOrder column : SearchOrderList) {
switch (column) {
case ID:
      header.createCell(j).setCellValue("String_Node_Str");
    if (null != sub.getId())     row.createCell(j).setCellValue(sub.getId());
  j++;
break;
case STUDENT_EMAIL:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getSubmitter() && null != sub.getSubmitter().getEmail()) row.createCell(j).setCellValue(sub.getSubmitter().getEmail());
j++;
break;
case STUDENT_NAME:
header.createCell(j).setCellValue("String_Node_Str");
row.createCell(j).setCellValue(sub.getStudentFormattedName(org.tdl.vireo.model.NameFormat.LAST_FIRST_MIDDLE_BIRTH));
j++;
break;
case STUDENT_ID:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getSubmitter() != null && sub.getSubmitter().getInstitutionalIdentifier() != null) row.createCell(j).setCellValue(sub.getSubmitter().getInstitutionalIdentifier());
j++;
break;
case STATE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getState()) row.createCell(j).setCellValue(sub.getState().getDisplayName());
j++;
break;
case ASSIGNEE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getAssignee()) row.createCell(j).setCellValue(sub.getAssignee().getFormattedName(org.tdl.vireo.model.NameFormat.FIRST_LAST));
j++;
break;
case DOCUMENT_TITLE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentTitle()) row.createCell(j).setCellValue(sub.getDocumentTitle());
j++;
break;
case DOCUMENT_ABSTRACT:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentAbstract()) row.createCell(j).setCellValue(sub.getDocumentAbstract());
j++;
break;
case DOCUMENT_SUBJECTS:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentSubjects()) row.createCell(j).setCellValue(StringUtils.join(sub.getDocumentSubjects(),"String_Node_Str"));
j++;
break;
case DOCUMENT_LANGUAGE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentLanguage()) row.createCell(j).setCellValue(sub.getDocumentLanguage());
j++;
break;
case PUBLISHED_MATERIAL:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getPublishedMaterial()) row.createCell(j).setCellValue("String_Node_Str" + sub.getPublishedMaterial());
j++;
break;
case PRIMARY_DOCUMENT:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getPrimaryDocument()) row.createCell(j).setCellValue(sub.getPrimaryDocument().getName());
j++;
break;
case GRADUATION_DATE:
header.createCell(j).setCellValue("String_Node_Str");
StringBuilder sb=new StringBuilder();
String monthName=null;
if (sub.getGraduationMonth() != null && sub.getGraduationMonth() >= 0 && sub.getGraduationMonth() <= 11) monthName=new java.text.DateFormatSymbols().getMonths()[sub.getGraduationMonth()];
if (sub.getGraduationYear() != null) sb.append(sub.getGraduationYear());
if (monthName != null) sb.append("String_Node_Str").append(monthName);
row.createCell(j).setCellValue(sb.toString());
j++;
break;
case DEFENSE_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDefenseDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getDefenseDate()));
j++;
break;
case SUBMISSION_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getSubmissionDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getSubmissionDate()));
j++;
break;
case LICENSE_AGREEMENT_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getLicenseAgreementDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getLicenseAgreementDate()));
j++;
break;
case APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getApprovalDate()));
j++;
break;
case COMMITTEE_APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getCommitteeApprovalDate()));
j++;
break;
case COMMITTEE_EMBARGO_APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeEmbargoApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getCommitteeEmbargoApprovalDate()));
j++;
break;
case COMMITTEE_MEMBERS:
header.createCell(j).setCellValue("String_Node_Str");
StringBuilder cm=new StringBuilder();
int i=0;
for (i=0; i < sub.getCommitteeMembers().size(); i++) {
CommitteeMember member=sub.getCommitteeMembers().get(i);
cm.append(member.getFormattedName(NameFormat.LAST_FIRST));
if (member.getRoles().size() > 0) {
cm.append("String_Node_Str").append(member.getFormattedRoles()).append("String_Node_Str");
}
if ((i + 1) < sub.getCommitteeMembers().size()) {
cm.append("String_Node_Str");
}
}
row.createCell(j).setCellValue(cm.toString());
j++;
break;
case COMMITTEE_CONTACT_EMAIL:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeContactEmail() != null) row.createCell(j).setCellValue(sub.getCommitteeContactEmail());
j++;
break;
case DEGREE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDegree() != null) row.createCell(j).setCellValue(sub.getDegree());
j++;
break;
case DEGREE_LEVEL:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDegreeLevel() != null) row.createCell(j).setCellValue(sub.getDegreeLevel().name());
j++;
break;
case PROGRAM:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getProgram() != null) row.createCell(j).setCellValue(sub.getProgram());
j++;
break;
case COLLEGE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCollege() != null) row.createCell(j).setCellValue(sub.getCollege());
j++;
break;
case DEPARTMENT:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDepartment() != null) row.createCell(j).setCellValue(sub.getDepartment());
j++;
break;
case MAJOR:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getMajor() != null) row.createCell(j).setCellValue(sub.getMajor());
j++;
break;
case EMBARGO_TYPE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getEmbargoType() != null) row.createCell(j).setCellValue(sub.getEmbargoType().getName());
j++;
break;
case DOCUMENT_TYPE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDocumentType() != null) row.createCell(j).setCellValue(sub.getDocumentType());
j++;
break;
case UMI_RELEASE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getUMIRelease() != null) {
if (sub.getUMIRelease()) {
row.createCell(j).setCellValue("String_Node_Str");
}
 else {
row.createCell(j).setCellValue("String_Node_Str");
}
}
j++;
break;
case CUSTOM_ACTIONS:
header.createCell(j).setCellValue("String_Node_Str");
int actions=0;
for (org.tdl.vireo.model.CustomActionValue action : sub.getCustomActions()) {
if (action.getValue()) {
actions++;
}
}
if (actions > 0) row.createCell(j).setCellValue(Integer.toString(actions));
j++;
break;
case DEPOSIT_ID:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDepositId() != null) row.createCell(j).setCellValue(sub.getDepositId());
j++;
break;
case REVIEWER_NOTES:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getReviewerNotes() != null) row.createCell(j).setCellValue(sub.getReviewerNotes());
j++;
break;
case DOCUMENT_KEYWORDS:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getReviewerNotes() != null) row.createCell(j).setCellValue(sub.getDocumentKeywords());
j++;
break;
case LAST_EVENT_ENTRY:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getReviewerNotes() != null) row.createCell(j).setCellValue(sub.getLastLogEntry());
j++;
break;
case LAST_EVENT_TIME:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getReviewerNotes() != null) row.createCell(j).setCellValue(sub.getLastLogDate());
j++;
break;
}
}
}

Fixed version (ground truth):
private void processWorkbookRow(XSSFRow header,XSSFRow row,Submission sub,List<SearchOrder> SearchOrderList){
  int j=0;
  for (  SearchOrder column : SearchOrderList) {
switch (column) {
case ID:
      header.createCell(j).setCellValue("String_Node_Str");
    if (null != sub.getId())     row.createCell(j).setCellValue(sub.getId());
  j++;
break;
case STUDENT_EMAIL:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getSubmitter() && null != sub.getSubmitter().getEmail()) row.createCell(j).setCellValue(sub.getSubmitter().getEmail());
j++;
break;
case STUDENT_NAME:
header.createCell(j).setCellValue("String_Node_Str");
row.createCell(j).setCellValue(sub.getStudentFormattedName(org.tdl.vireo.model.NameFormat.LAST_FIRST_MIDDLE_BIRTH));
j++;
break;
case STUDENT_ID:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getSubmitter() != null && sub.getSubmitter().getInstitutionalIdentifier() != null) row.createCell(j).setCellValue(sub.getSubmitter().getInstitutionalIdentifier());
j++;
break;
case STATE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getState()) row.createCell(j).setCellValue(sub.getState().getDisplayName());
j++;
break;
case ASSIGNEE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getAssignee()) row.createCell(j).setCellValue(sub.getAssignee().getFormattedName(org.tdl.vireo.model.NameFormat.FIRST_LAST));
j++;
break;
case DOCUMENT_TITLE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentTitle()) row.createCell(j).setCellValue(sub.getDocumentTitle());
j++;
break;
case DOCUMENT_ABSTRACT:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentAbstract()) row.createCell(j).setCellValue(sub.getDocumentAbstract());
j++;
break;
case DOCUMENT_SUBJECTS:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentSubjects()) row.createCell(j).setCellValue(StringUtils.join(sub.getDocumentSubjects(),"String_Node_Str"));
j++;
break;
case DOCUMENT_LANGUAGE:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getDocumentLanguage()) row.createCell(j).setCellValue(sub.getDocumentLanguage());
j++;
break;
case PUBLISHED_MATERIAL:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getPublishedMaterial()) row.createCell(j).setCellValue("String_Node_Str" + sub.getPublishedMaterial());
j++;
break;
case PRIMARY_DOCUMENT:
header.createCell(j).setCellValue("String_Node_Str");
if (null != sub.getPrimaryDocument()) row.createCell(j).setCellValue(sub.getPrimaryDocument().getName());
j++;
break;
case GRADUATION_DATE:
header.createCell(j).setCellValue("String_Node_Str");
StringBuilder sb=new StringBuilder();
String monthName=null;
if (sub.getGraduationMonth() != null && sub.getGraduationMonth() >= 0 && sub.getGraduationMonth() <= 11) monthName=new java.text.DateFormatSymbols().getMonths()[sub.getGraduationMonth()];
if (sub.getGraduationYear() != null) sb.append(sub.getGraduationYear());
if (monthName != null) sb.append("String_Node_Str").append(monthName);
row.createCell(j).setCellValue(sb.toString());
j++;
break;
case DEFENSE_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDefenseDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getDefenseDate()));
j++;
break;
case SUBMISSION_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getSubmissionDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getSubmissionDate()));
j++;
break;
case LICENSE_AGREEMENT_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getLicenseAgreementDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getLicenseAgreementDate()));
j++;
break;
case APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getApprovalDate()));
j++;
break;
case COMMITTEE_APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getCommitteeApprovalDate()));
j++;
break;
case COMMITTEE_EMBARGO_APPROVAL_DATE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeEmbargoApprovalDate() != null) row.createCell(j).setCellValue(sdf.format(sub.getCommitteeEmbargoApprovalDate()));
j++;
break;
case COMMITTEE_MEMBERS:
header.createCell(j).setCellValue("String_Node_Str");
StringBuilder cm=new StringBuilder();
int i=0;
for (i=0; i < sub.getCommitteeMembers().size(); i++) {
CommitteeMember member=sub.getCommitteeMembers().get(i);
cm.append(member.getFormattedName(NameFormat.LAST_FIRST));
if (member.getRoles().size() > 0) {
cm.append("String_Node_Str").append(member.getFormattedRoles()).append("String_Node_Str");
}
if ((i + 1) < sub.getCommitteeMembers().size()) {
cm.append("String_Node_Str");
}
}
row.createCell(j).setCellValue(cm.toString());
j++;
break;
case COMMITTEE_CONTACT_EMAIL:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCommitteeContactEmail() != null) row.createCell(j).setCellValue(sub.getCommitteeContactEmail());
j++;
break;
case DEGREE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDegree() != null) row.createCell(j).setCellValue(sub.getDegree());
j++;
break;
case DEGREE_LEVEL:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDegreeLevel() != null) row.createCell(j).setCellValue(sub.getDegreeLevel().name());
j++;
break;
case PROGRAM:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getProgram() != null) row.createCell(j).setCellValue(sub.getProgram());
j++;
break;
case COLLEGE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getCollege() != null) row.createCell(j).setCellValue(sub.getCollege());
j++;
break;
case DEPARTMENT:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDepartment() != null) row.createCell(j).setCellValue(sub.getDepartment());
j++;
break;
case MAJOR:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getMajor() != null) row.createCell(j).setCellValue(sub.getMajor());
j++;
break;
case EMBARGO_TYPE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getEmbargoType() != null) row.createCell(j).setCellValue(sub.getEmbargoType().getName());
j++;
break;
case DOCUMENT_TYPE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDocumentType() != null) row.createCell(j).setCellValue(sub.getDocumentType());
j++;
break;
case UMI_RELEASE:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getUMIRelease() != null) {
if (sub.getUMIRelease()) {
row.createCell(j).setCellValue("String_Node_Str");
}
 else {
row.createCell(j).setCellValue("String_Node_Str");
}
}
j++;
break;
case CUSTOM_ACTIONS:
header.createCell(j).setCellValue("String_Node_Str");
int actions=0;
for (CustomActionValue action : sub.getCustomActions()) {
if (action.getValue()) {
actions++;
}
}
if (actions > 0) row.createCell(j).setCellValue(Integer.toString(actions));
j++;
break;
case DEPOSIT_ID:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDepositId() != null) row.createCell(j).setCellValue(sub.getDepositId());
j++;
break;
case REVIEWER_NOTES:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getReviewerNotes() != null) row.createCell(j).setCellValue(sub.getReviewerNotes());
j++;
break;
case DOCUMENT_KEYWORDS:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getDocumentKeywords() != null) row.createCell(j).setCellValue(sub.getDocumentKeywords());
j++;
break;
case LAST_EVENT_ENTRY:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getLastLogEntry() != null) row.createCell(j).setCellValue(sub.getLastLogEntry());
j++;
break;
case LAST_EVENT_TIME:
header.createCell(j).setCellValue("String_Node_Str");
if (sub.getLastLogDate() != null) row.createCell(j).setCellValue(sub.getLastLogDate());
j++;
break;
}
}
}