Program: 115204
Project: 115204
Buggy source:
protected void setOCSubjectDataAuditLogs(StudyBean study,OdmClinicalDataBean data,String studySubjectOids,HashMap<String,String> subOidPoses){
  this.setOCSubjectDataAuditsTypesExpected();
  logger.debug("String_Node_Str");
  logger.error("String_Node_Str" + this.getOCSubjectDataAuditsSql(studySubjectOids));
  ArrayList rows=select(this.getOCSubjectDataAuditsSql(studySubjectOids));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    String studySubjectLabel=(String)row.get("String_Node_Str");
    Integer auditId=(Integer)row.get("String_Node_Str");
    String type=(String)row.get("String_Node_Str");
    Integer userId=(Integer)row.get("String_Node_Str");
    Date auditDate=(Date)row.get("String_Node_Str");
    String auditReason=(String)row.get("String_Node_Str");
    String oldValue=(String)row.get("String_Node_Str");
    String newValue=(String)row.get("String_Node_Str");
    Integer typeId=(Integer)row.get("String_Node_Str");
    if (subOidPoses.containsKey(studySubjectLabel)) {
      ExportSubjectDataBean sub=data.getExportSubjectData().get(Integer.parseInt(subOidPoses.get(studySubjectLabel)));
      AuditLogBean auditLog=new AuditLogBean();
      auditLog.setOid("String_Node_Str" + auditId);
      auditLog.setUserId("String_Node_Str" + userId);
      System.out.println("String_Node_Str" + auditDate + "String_Node_Str"+ new SimpleDateFormat("String_Node_Str").format(auditDate));
      auditLog.setDatetimeStamp(auditDate);
      auditLog.setType(type);
      auditLog.setReasonForChange(auditReason);
      if (typeId == 3 || typeId == 6) {
        if ("String_Node_Str".equals(newValue)) {
          auditLog.setOldValue(Status.INVALID.getName());
        }
 else {
          auditLog.setNewValue(Status.getFromMap(Integer.parseInt(newValue)).getName());
        }
        if ("String_Node_Str".equals(oldValue)) {
          auditLog.setOldValue(Status.INVALID.getName());
        }
 else {
          auditLog.setOldValue(Status.getFromMap(Integer.parseInt(oldValue)).getName());
        }
      }
 else {
        auditLog.setNewValue(newValue);
        auditLog.setOldValue(oldValue);
      }
      AuditLogsBean logs=sub.getAuditLogs();
      if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {
        logs.setEntityID(sub.getSubjectOID());
      }
      logs.getAuditLogs().add(auditLog);
      sub.setAuditLogs(logs);
    }
  }
}

Fixed version (ground truth):
protected void setOCSubjectDataAuditLogs(StudyBean study,OdmClinicalDataBean data,String studySubjectOids,HashMap<String,String> subOidPoses){
  this.setOCSubjectDataAuditsTypesExpected();
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str" + this.getOCSubjectDataAuditsSql(studySubjectOids));
  ArrayList rows=select(this.getOCSubjectDataAuditsSql(studySubjectOids));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    String studySubjectLabel=(String)row.get("String_Node_Str");
    Integer auditId=(Integer)row.get("String_Node_Str");
    String type=(String)row.get("String_Node_Str");
    Integer userId=(Integer)row.get("String_Node_Str");
    Date auditDate=(Date)row.get("String_Node_Str");
    String auditReason=(String)row.get("String_Node_Str");
    String oldValue=(String)row.get("String_Node_Str");
    String newValue=(String)row.get("String_Node_Str");
    Integer typeId=(Integer)row.get("String_Node_Str");
    if (subOidPoses.containsKey(studySubjectLabel)) {
      ExportSubjectDataBean sub=data.getExportSubjectData().get(Integer.parseInt(subOidPoses.get(studySubjectLabel)));
      AuditLogBean auditLog=new AuditLogBean();
      auditLog.setOid("String_Node_Str" + auditId);
      auditLog.setUserId("String_Node_Str" + userId);
      logger.debug("String_Node_Str" + auditDate + "String_Node_Str"+ new SimpleDateFormat("String_Node_Str").format(auditDate));
      auditLog.setDatetimeStamp(auditDate);
      auditLog.setType(type);
      auditLog.setReasonForChange(auditReason);
      if (typeId == 3 || typeId == 6) {
        if ("String_Node_Str".equals(newValue)) {
          auditLog.setOldValue(Status.INVALID.getName());
        }
 else {
          auditLog.setNewValue(Status.getFromMap(Integer.parseInt(newValue)).getName());
        }
        if ("String_Node_Str".equals(oldValue)) {
          auditLog.setOldValue(Status.INVALID.getName());
        }
 else {
          auditLog.setOldValue(Status.getFromMap(Integer.parseInt(oldValue)).getName());
        }
      }
 else {
        auditLog.setNewValue(newValue);
        auditLog.setOldValue(oldValue);
      }
      AuditLogsBean logs=sub.getAuditLogs();
      if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {
        logs.setEntityID(sub.getSubjectOID());
      }
      logs.getAuditLogs().add(auditLog);
      sub.setAuditLogs(logs);
    }
  }
}