Program: 115207
Project: 115207
Buggy source:
protected void setOCItemDataAuditLogs(StudyBean study,OdmClinicalDataBean data,String idataIds,HashMap<Integer,String> idataOidPoses){
  this.setOCItemDataAuditsTypesExpected();
  logger.debug("String_Node_Str");
  logger.error("String_Node_Str" + this.getOCItemDataAuditsSql(idataIds));
  ArrayList rows=select(this.getOCItemDataAuditsSql(idataIds));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer idataId=(Integer)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 (idataOidPoses.containsKey(idataId)) {
      String[] poses=idataOidPoses.get(idataId).split("String_Node_Str");
      ImportItemDataBean idata=data.getExportSubjectData().get(Integer.parseInt(poses[0])).getExportStudyEventData().get(Integer.parseInt(poses[1])).getExportFormData().get(Integer.parseInt(poses[2])).getItemGroupData().get(Integer.parseInt(poses[3])).getItemData().get(Integer.parseInt(poses[4]));
      AuditLogBean auditLog=new AuditLogBean();
      auditLog.setOid("String_Node_Str" + auditId);
      auditLog.setUserId("String_Node_Str" + userId);
      auditLog.setDatetimeStamp(auditDate);
      auditLog.setType(type);
      auditLog.setReasonForChange(auditReason);
      if (typeId == 12) {
        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=idata.getAuditLogs();
      if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {
        logs.setEntityID(idata.getItemOID());
      }
      logs.getAuditLogs().add(auditLog);
      idata.setAuditLogs(logs);
    }
  }
}

Fixed version (ground truth):
protected void setOCItemDataAuditLogs(StudyBean study,OdmClinicalDataBean data,String idataIds,HashMap<Integer,String> idataOidPoses){
  this.setOCItemDataAuditsTypesExpected();
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str" + this.getOCItemDataAuditsSql(idataIds));
  ArrayList rows=select(this.getOCItemDataAuditsSql(idataIds));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer idataId=(Integer)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 (idataOidPoses.containsKey(idataId)) {
      String[] poses=idataOidPoses.get(idataId).split("String_Node_Str");
      ImportItemDataBean idata=data.getExportSubjectData().get(Integer.parseInt(poses[0])).getExportStudyEventData().get(Integer.parseInt(poses[1])).getExportFormData().get(Integer.parseInt(poses[2])).getItemGroupData().get(Integer.parseInt(poses[3])).getItemData().get(Integer.parseInt(poses[4]));
      AuditLogBean auditLog=new AuditLogBean();
      auditLog.setOid("String_Node_Str" + auditId);
      auditLog.setUserId("String_Node_Str" + userId);
      auditLog.setDatetimeStamp(auditDate);
      auditLog.setType(type);
      auditLog.setReasonForChange(auditReason);
      if (typeId == 12) {
        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=idata.getAuditLogs();
      if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {
        logs.setEntityID(idata.getItemOID());
      }
      logs.getAuditLogs().add(auditLog);
      idata.setAuditLogs(logs);
    }
  }
}