Program: 115210
Project: 115210
Buggy source:
public void getMetadataOC1_3(int parentStudyId,int studyId,MetaDataVersionBean metadata,String odmVersion){
  this.getOCMetadata(parentStudyId,studyId,metadata,odmVersion);
  this.getStudyEventAndFormMetaOC1_3(parentStudyId,studyId,metadata,odmVersion,false);
  String cvIds=metadata.getCvIds();
  ArrayList<ItemGroupDefBean> igs=(ArrayList<ItemGroupDefBean>)metadata.getItemGroupDefs();
  HashMap<String,Integer> igPoses=getItemGroupOIDPos(metadata);
  ArrayList<ItemDefBean> its=(ArrayList<ItemDefBean>)metadata.getItemDefs();
  HashMap<String,Integer> itPoses=getItemOIDPos(metadata);
  HashMap<String,Integer> inPoses=new HashMap<String,Integer>();
  ItemGroupDefBean ig=new ItemGroupDefBean();
  ItemDefBean it=new ItemDefBean();
  String prevCvIg="String_Node_Str";
  HashMap<Integer,String> sectionLabels=this.getSectionLabels(metadata.getSectionIds());
  HashMap<Integer,String> parentItemOIDs=this.getParentItemOIDs(cvIds);
  this.setItemGroupAndItemMetaOC1_3TypesExpected();
  logger.debug("String_Node_Str");
  logger.error("String_Node_Str" + this.getItemGroupAndItemMetaOC1_3Sql(cvIds));
  ArrayList rows=select(this.getItemGroupAndItemMetaOC1_3Sql(cvIds));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer cvId=(Integer)row.get("String_Node_Str");
    Integer igId=(Integer)row.get("String_Node_Str");
    String cvOID=(String)row.get("String_Node_Str");
    String igOID=(String)row.get("String_Node_Str");
    String itOID=(String)row.get("String_Node_Str");
    Integer igRepeatNum=(Integer)row.get("String_Node_Str");
    Integer igRepeatMax=(Integer)row.get("String_Node_Str");
    Boolean showGroup=(Boolean)row.get("String_Node_Str");
    String itHeader=(String)row.get("String_Node_Str");
    String left=(String)row.get("String_Node_Str");
    String right=(String)row.get("String_Node_Str");
    String itSubheader=(String)row.get("String_Node_Str");
    Integer itSecId=(Integer)row.get("String_Node_Str");
    Integer itPId=(Integer)row.get("String_Node_Str");
    Integer itColNum=(Integer)row.get("String_Node_Str");
    String itpgNum=(String)row.get("String_Node_Str");
    String layout=(String)row.get("String_Node_Str");
    Integer rsTypeId=(Integer)row.get("String_Node_Str");
    String dfValue=(String)row.get("String_Node_Str");
    Boolean phi=(Boolean)row.get("String_Node_Str");
    Boolean showItem=(Boolean)row.get("String_Node_Str");
    if ((cvId + "String_Node_Str" + igId).equals(prevCvIg)) {
    }
 else {
      prevCvIg=cvId + "String_Node_Str" + igId;
      ig=igs.get(igPoses.get(igOID));
      ItemGroupDetailsBean igDetail=ig.getItemGroupDetails();
      igDetail.setOid(igOID);
      PresentInFormBean inForm=new PresentInFormBean();
      inForm.setFormOid(cvOID);
      ItemGroupRepeatBean igr=new ItemGroupRepeatBean();
      igr.setRepeatMax(igRepeatMax);
      igr.setRepeatNumber(igRepeatNum);
      inForm.setItemGroupRepeatBean(igr);
      inForm.setShowGroup(showGroup == true ? "String_Node_Str" : "String_Node_Str");
      igDetail.getPresentInForms().add(inForm);
    }
    it=its.get(itPoses.get(itOID));
    ItemDetailsBean itDetail=it.getItemDetails();
    itDetail.setOid(itOID);
    ItemPresentInFormBean itInForm=new ItemPresentInFormBean();
    itInForm.setFormOid(cvOID);
    itInForm.setColumnNumber(itColNum);
    itInForm.setDefaultValue(dfValue);
    itInForm.setItemHeader(itHeader);
    itInForm.setLeftItemText(left);
    itInForm.setRightItemText(right);
    itInForm.setItemSubHeader(itSubheader);
    itInForm.setPageNumber(itpgNum);
    itInForm.setParentItemOid(parentItemOIDs.get(itPId));
    itInForm.setSectionLabel(sectionLabels.get(itSecId));
    itInForm.setPhi(phi == false ? "String_Node_Str" : "String_Node_Str");
    itInForm.setShowItem(showItem == true ? "String_Node_Str" : "String_Node_Str");
    ItemResponseBean itemResponse=new ItemResponseBean();
    itemResponse.setResponseLayout(layout);
    itemResponse.setResponseType(ResponseType.get(rsTypeId).getName());
    itInForm.setItemResponse(itemResponse);
    itDetail.getItemPresentInForm().add(itInForm);
    inPoses.put(itOID + "String_Node_Str" + cvOID,itDetail.getItemPresentInForm().size() - 1);
  }
  this.getSCDs(cvIds,its,itPoses,inPoses);
}

Fixed version (ground truth):
public void getMetadataOC1_3(int parentStudyId,int studyId,MetaDataVersionBean metadata,String odmVersion){
  this.getOCMetadata(parentStudyId,studyId,metadata,odmVersion);
  this.getStudyEventAndFormMetaOC1_3(parentStudyId,studyId,metadata,odmVersion,false);
  String cvIds=metadata.getCvIds();
  ArrayList<ItemGroupDefBean> igs=(ArrayList<ItemGroupDefBean>)metadata.getItemGroupDefs();
  HashMap<String,Integer> igPoses=getItemGroupOIDPos(metadata);
  ArrayList<ItemDefBean> its=(ArrayList<ItemDefBean>)metadata.getItemDefs();
  HashMap<String,Integer> itPoses=getItemOIDPos(metadata);
  HashMap<String,Integer> inPoses=new HashMap<String,Integer>();
  ItemGroupDefBean ig=new ItemGroupDefBean();
  ItemDefBean it=new ItemDefBean();
  String prevCvIg="String_Node_Str";
  HashMap<Integer,String> sectionLabels=this.getSectionLabels(metadata.getSectionIds());
  HashMap<Integer,String> parentItemOIDs=this.getParentItemOIDs(cvIds);
  this.setItemGroupAndItemMetaOC1_3TypesExpected();
  logger.debug("String_Node_Str");
  logger.debug("String_Node_Str" + this.getItemGroupAndItemMetaOC1_3Sql(cvIds));
  ArrayList rows=select(this.getItemGroupAndItemMetaOC1_3Sql(cvIds));
  Iterator iter=rows.iterator();
  while (iter.hasNext()) {
    HashMap row=(HashMap)iter.next();
    Integer cvId=(Integer)row.get("String_Node_Str");
    Integer igId=(Integer)row.get("String_Node_Str");
    String cvOID=(String)row.get("String_Node_Str");
    String igOID=(String)row.get("String_Node_Str");
    String itOID=(String)row.get("String_Node_Str");
    Integer igRepeatNum=(Integer)row.get("String_Node_Str");
    Integer igRepeatMax=(Integer)row.get("String_Node_Str");
    Boolean showGroup=(Boolean)row.get("String_Node_Str");
    String itHeader=(String)row.get("String_Node_Str");
    String left=(String)row.get("String_Node_Str");
    String right=(String)row.get("String_Node_Str");
    String itSubheader=(String)row.get("String_Node_Str");
    Integer itSecId=(Integer)row.get("String_Node_Str");
    Integer itPId=(Integer)row.get("String_Node_Str");
    Integer itColNum=(Integer)row.get("String_Node_Str");
    String itpgNum=(String)row.get("String_Node_Str");
    String layout=(String)row.get("String_Node_Str");
    Integer rsTypeId=(Integer)row.get("String_Node_Str");
    String dfValue=(String)row.get("String_Node_Str");
    Boolean phi=(Boolean)row.get("String_Node_Str");
    Boolean showItem=(Boolean)row.get("String_Node_Str");
    if ((cvId + "String_Node_Str" + igId).equals(prevCvIg)) {
    }
 else {
      prevCvIg=cvId + "String_Node_Str" + igId;
      ig=igs.get(igPoses.get(igOID));
      ItemGroupDetailsBean igDetail=ig.getItemGroupDetails();
      igDetail.setOid(igOID);
      PresentInFormBean inForm=new PresentInFormBean();
      inForm.setFormOid(cvOID);
      ItemGroupRepeatBean igr=new ItemGroupRepeatBean();
      igr.setRepeatMax(igRepeatMax);
      igr.setRepeatNumber(igRepeatNum);
      inForm.setItemGroupRepeatBean(igr);
      inForm.setShowGroup(showGroup == true ? "String_Node_Str" : "String_Node_Str");
      igDetail.getPresentInForms().add(inForm);
    }
    it=its.get(itPoses.get(itOID));
    ItemDetailsBean itDetail=it.getItemDetails();
    itDetail.setOid(itOID);
    ItemPresentInFormBean itInForm=new ItemPresentInFormBean();
    itInForm.setFormOid(cvOID);
    itInForm.setColumnNumber(itColNum);
    itInForm.setDefaultValue(dfValue);
    itInForm.setItemHeader(itHeader);
    itInForm.setLeftItemText(left);
    itInForm.setRightItemText(right);
    itInForm.setItemSubHeader(itSubheader);
    itInForm.setPageNumber(itpgNum);
    itInForm.setParentItemOid(parentItemOIDs.get(itPId));
    itInForm.setSectionLabel(sectionLabels.get(itSecId));
    itInForm.setPhi(phi == false ? "String_Node_Str" : "String_Node_Str");
    itInForm.setShowItem(showItem == true ? "String_Node_Str" : "String_Node_Str");
    ItemResponseBean itemResponse=new ItemResponseBean();
    itemResponse.setResponseLayout(layout);
    itemResponse.setResponseType(ResponseType.get(rsTypeId).getName());
    itInForm.setItemResponse(itemResponse);
    itDetail.getItemPresentInForm().add(itInForm);
    inPoses.put(itOID + "String_Node_Str" + cvOID,itDetail.getItemPresentInForm().size() - 1);
  }
  this.getSCDs(cvIds,its,itPoses,inPoses);
}