Program: 115201
Project: 115201
Buggy source:
public void getStudyEventAndFormMetaOC1_3(int parentStudyId,int studyId,MetaDataVersionBean metadata,String odmVersion,boolean isIncludedSite){
  ArrayList<StudyEventDefBean> seds=(ArrayList<StudyEventDefBean>)metadata.getStudyEventDefs();
  ArrayList<FormDefBean> forms=(ArrayList<FormDefBean>)metadata.getFormDefs();
  HashMap<String,EventDefinitionDetailsBean> sedDetails=new HashMap<String,EventDefinitionDetailsBean>();
  HashMap<String,FormDetailsBean> formDetails=new HashMap<String,FormDetailsBean>();
  this.setStudyEventAndFormMetaOC1_3TypesExpected();
  logger.debug("String_Node_Str");
  logger.error("String_Node_Str" + this.getStudyEventAndFormMetaOC1_3Sql(parentStudyId,studyId,isIncludedSite));
  ArrayList rows=this.select(this.getStudyEventAndFormMetaOC1_3Sql(parentStudyId,studyId,isIncludedSite));
  Iterator iter=rows.iterator();
  String sedOIDs="String_Node_Str";
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer cvId=(Integer)row.get("String_Node_Str");
    String sedOID=(String)row.get("String_Node_Str");
    String cvOID=(String)row.get("String_Node_Str");
    String sedDesc=(String)row.get("String_Node_Str");
    String category=(String)row.get("String_Node_Str");
    String cvDesc=(String)row.get("String_Node_Str");
    String notes=(String)row.get("String_Node_Str");
    String cOID=(String)row.get("String_Node_Str");
    String nullValue=(String)row.get("String_Node_Str");
    Integer dvId=(Integer)row.get("String_Node_Str");
    Boolean pwdRequired=(Boolean)row.get("String_Node_Str");
    Boolean doubleEntry=(Boolean)row.get("String_Node_Str");
    Boolean hideCrf=(Boolean)row.get("String_Node_Str");
    Integer sdvId=(Integer)row.get("String_Node_Str");
    if (sedDetails.containsKey(sedOID)) {
    }
 else {
      EventDefinitionDetailsBean sedDetail=new EventDefinitionDetailsBean();
      sedDetail.setOid(sedOID);
      sedDetail.setCategory(category);
      sedDetail.setDescription(sedDesc);
      sedDetails.put(sedOID,sedDetail);
    }
    if (formDetails.containsKey(cvOID)) {
    }
 else {
      FormDetailsBean formDetail=new FormDetailsBean();
      formDetail.setOid(cvOID);
      formDetail.setRevisionNotes(notes);
      formDetail.setParentFormOid(cOID);
      formDetail.setVersionDescription(cvDesc);
      PresentInEventDefinitionBean p=new PresentInEventDefinitionBean();
      p.setStudyEventOid(sedOID);
      p.setDoubleDataEntry(doubleEntry == false ? "String_Node_Str" : "String_Node_Str");
      p.setHideCrf(hideCrf == false ? "String_Node_Str" : "String_Node_Str");
      p.setIsDefaultVersion(cvId.equals(dvId) ? "String_Node_Str" : "String_Node_Str");
      p.setNullValues(nullValue);
      p.setPasswordRequired(pwdRequired == false ? "String_Node_Str" : "String_Node_Str");
      p.setSourceDataVerification(SourceDataVerification.getByCode(sdvId > 0 ? sdvId : 3).getDescription());
      formDetail.getPresentInEventDefinitions().add(p);
      formDetails.put(cvOID,formDetail);
    }
  }
  for (  StudyEventDefBean sedef : seds) {
    sedef.setEventDefinitionDetais(sedDetails.get(sedef.getOid()));
  }
  for (  FormDefBean formdef : forms) {
    formdef.setFormDetails(formDetails.get(formdef.getOid()));
  }
}

Fixed version (ground truth):
public void getStudyEventAndFormMetaOC1_3(int parentStudyId,int studyId,MetaDataVersionBean metadata,String odmVersion,boolean isIncludedSite){
  ArrayList<StudyEventDefBean> seds=(ArrayList<StudyEventDefBean>)metadata.getStudyEventDefs();
  ArrayList<FormDefBean> forms=(ArrayList<FormDefBean>)metadata.getFormDefs();
  HashMap<String,EventDefinitionDetailsBean> sedDetails=new HashMap<String,EventDefinitionDetailsBean>();
  HashMap<String,FormDetailsBean> formDetails=new HashMap<String,FormDetailsBean>();
  this.setStudyEventAndFormMetaOC1_3TypesExpected();
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str" + this.getStudyEventAndFormMetaOC1_3Sql(parentStudyId,studyId,isIncludedSite));
  ArrayList rows=this.select(this.getStudyEventAndFormMetaOC1_3Sql(parentStudyId,studyId,isIncludedSite));
  Iterator iter=rows.iterator();
  String sedOIDs="String_Node_Str";
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer cvId=(Integer)row.get("String_Node_Str");
    String sedOID=(String)row.get("String_Node_Str");
    String cvOID=(String)row.get("String_Node_Str");
    String sedDesc=(String)row.get("String_Node_Str");
    String category=(String)row.get("String_Node_Str");
    String cvDesc=(String)row.get("String_Node_Str");
    String notes=(String)row.get("String_Node_Str");
    String cOID=(String)row.get("String_Node_Str");
    String nullValue=(String)row.get("String_Node_Str");
    Integer dvId=(Integer)row.get("String_Node_Str");
    Boolean pwdRequired=(Boolean)row.get("String_Node_Str");
    Boolean doubleEntry=(Boolean)row.get("String_Node_Str");
    Boolean hideCrf=(Boolean)row.get("String_Node_Str");
    Integer sdvId=(Integer)row.get("String_Node_Str");
    if (sedDetails.containsKey(sedOID)) {
    }
 else {
      EventDefinitionDetailsBean sedDetail=new EventDefinitionDetailsBean();
      sedDetail.setOid(sedOID);
      sedDetail.setCategory(category);
      sedDetail.setDescription(sedDesc);
      sedDetails.put(sedOID,sedDetail);
    }
    if (formDetails.containsKey(cvOID)) {
    }
 else {
      FormDetailsBean formDetail=new FormDetailsBean();
      formDetail.setOid(cvOID);
      formDetail.setRevisionNotes(notes);
      formDetail.setParentFormOid(cOID);
      formDetail.setVersionDescription(cvDesc);
      PresentInEventDefinitionBean p=new PresentInEventDefinitionBean();
      p.setStudyEventOid(sedOID);
      p.setDoubleDataEntry(doubleEntry == false ? "String_Node_Str" : "String_Node_Str");
      p.setHideCrf(hideCrf == false ? "String_Node_Str" : "String_Node_Str");
      p.setIsDefaultVersion(cvId.equals(dvId) ? "String_Node_Str" : "String_Node_Str");
      p.setNullValues(nullValue);
      p.setPasswordRequired(pwdRequired == false ? "String_Node_Str" : "String_Node_Str");
      p.setSourceDataVerification(SourceDataVerification.getByCode(sdvId > 0 ? sdvId : 3).getDescription());
      formDetail.getPresentInEventDefinitions().add(p);
      formDetails.put(cvOID,formDetail);
    }
  }
  for (  StudyEventDefBean sedef : seds) {
    sedef.setEventDefinitionDetais(sedDetails.get(sedef.getOid()));
  }
  for (  FormDefBean formdef : forms) {
    formdef.setFormDetails(formDetails.get(formdef.getOid()));
  }
}