Program: 115242
Project: 115242
Buggy source:
protected Element invokeInternal(Element requestElement,Document document) throws Exception {
  System.out.println("String_Node_Str");
  NodeList nlist=requestElement.getElementsByTagNameNS(CONNECTOR_NAMESPACE_V1,"String_Node_Str");
  this.logNodeList(nlist);
  try {
    LoadLabsService labService=new LoadLabsService();
    ODMContainer odmContainer=labService.generateLoadLabsObject(requestElement,getStudyDao(),getSubjectDao(),getItemDao(),getStudySubjectDao(),getItemGroupDao(),getCrfVersionDao(),getStudyEventDefinitionDao());
    StudyBean studyBean=getStudyDao().findByOid(odmContainer.getCrfDataPostImportContainer().getStudyOID());
    SubjectBean subjectBean=getSubjectDao().findByUniqueIdentifier(odmContainer.getSubjectUniqueIdentifier());
    StudySubjectBean studySubjectBean=getStudySubjectDao().findBySubjectIdAndStudy(subjectBean.getId(),studyBean);
    StudyEventDefinitionBean studyEventDefBean=getStudyEventDefinitionDao().findByOid(odmContainer.getCrfDataPostImportContainer().getSubjectData().get(0).getStudyEventData().get(0).getStudyEventOID());
    StudyEventBean newStudyEventBean=createNewStudyEventBean(studyEventDefBean,studySubjectBean);
    ArrayList<String> messages=labService.importData(dataSource,coreResources,studyBean,getUserAccount(),odmContainer);
    if ("String_Node_Str".equals(messages.get(0))) {
      return this.mapLoadLabsErrorConfirmation(messages.get(1),new CCBusinessFaultException("String_Node_Str","String_Node_Str"));
    }
 else {
      return this.mapLoadLabsConfirmation();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getClass().getName().startsWith("String_Node_Str")) {
      System.out.println("String_Node_Str" + e.getClass().getName());
      OpenClinicaException ope=(OpenClinicaException)e;
      return mapLoadLabsErrorConfirmation("String_Node_Str",ope);
    }
 else {
      System.out.println("String_Node_Str" + e.getClass().getName());
      return mapLoadLabsErrorConfirmation(e.getMessage(),new CCBusinessFaultException("String_Node_Str","String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
protected Element invokeInternal(Element requestElement,Document document) throws Exception {
  System.out.println("String_Node_Str");
  NodeList nlist=requestElement.getElementsByTagNameNS(CONNECTOR_NAMESPACE_V1,"String_Node_Str");
  this.logNodeList(nlist);
  try {
    LoadLabsService labService=new LoadLabsService();
    ODMContainer odmContainer=labService.generateLoadLabsObject(requestElement,getStudyDao(),getSubjectDao(),getItemDao(),getStudySubjectDao(),getItemGroupDao(),getCrfVersionDao(),getStudyEventDefinitionDao());
    StudyBean studyBean=getStudyDao().findByOid(odmContainer.getCrfDataPostImportContainer().getStudyOID());
    SubjectBean subjectBean=getSubjectDao().findByUniqueIdentifier(odmContainer.getSubjectUniqueIdentifier());
    StudySubjectBean studySubjectBean=getStudySubjectDao().findBySubjectIdAndStudy(subjectBean.getId(),studyBean);
    StudyEventDefinitionBean studyEventDefBean=getStudyEventDefinitionDao().findByOid(odmContainer.getCrfDataPostImportContainer().getSubjectData().get(0).getStudyEventData().get(0).getStudyEventOID());
    StudyEventBean newStudyEventBean=createNewStudyEventBean(studyEventDefBean,studySubjectBean);
    System.out.println("String_Node_Str" + newStudyEventBean.getId() + "String_Node_Str"+ newStudyEventBean.getStudyEventDefinitionId()+ "String_Node_Str"+ newStudyEventBean.getSampleOrdinal());
    ArrayList<String> messages=labService.importData(dataSource,coreResources,studyBean,getUserAccount(),odmContainer,newStudyEventBean);
    if ("String_Node_Str".equals(messages.get(0))) {
      return this.mapLoadLabsErrorConfirmation(messages.get(1),new CCBusinessFaultException("String_Node_Str","String_Node_Str"));
    }
 else {
      return this.mapLoadLabsConfirmation();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getClass().getName().startsWith("String_Node_Str")) {
      System.out.println("String_Node_Str" + e.getClass().getName());
      OpenClinicaException ope=(OpenClinicaException)e;
      return mapLoadLabsErrorConfirmation("String_Node_Str",ope);
    }
 else {
      System.out.println("String_Node_Str" + e.getClass().getName());
      return mapLoadLabsErrorConfirmation(e.getMessage(),new CCBusinessFaultException("String_Node_Str","String_Node_Str"));
    }
  }
}