Program: 144246
Project: 144246
Buggy source:
public Section buildCodedVitalSignsSection(){
  Section section=CDAFactory.eINSTANCE.createSection();
  VitalSignsSection vss=new VitalSignsSection();
  CodedVitalSignsSection ccs=new CodedVitalSignsSection();
  section.getTemplateIds().add(buildTemplateID(vss.getParentTemplateId(),null,null));
  section.getTemplateIds().add(buildTemplateID(ccs.getParentTemplateId(),null,null));
  section.getTemplateIds().add(buildTemplateID(ccs.getTemplateid(),null,null));
  section.setCode(buildCodeCE(ccs.getCode(),ccs.getCodeSystem(),ccs.getSectionName(),ccs.getCodeSystemName()));
  section.setTitle(buildTitle(ccs.getSectionDescription()));
  StrucDocText text=CDAFactory.eINSTANCE.createStrucDocText();
  text.addText("String_Node_Str");
  section.setText(text);
  Entry e=CDAFactory.eINSTANCE.createEntry();
  Organizer organizer=CDAFactory.eINSTANCE.createOrganizer();
  organizer.setClassCode(x_ActClassDocumentEntryOrganizer.CLUSTER);
  organizer.setMoodCode(ActMood.EVN);
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getIds().add(buildID("String_Node_Str",null));
  organizer.setCode(buildCodeCD("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  CS cs=DatatypesFactory.eINSTANCE.createCS();
  cs.setCode("String_Node_Str");
  organizer.setStatusCode(cs);
  IVL_TS effectiveTime=DatatypesFactory.eINSTANCE.createIVL_TS();
  Date d=new Date();
  SimpleDateFormat s=new SimpleDateFormat("String_Node_Str");
  String creationDate=s.format(d);
  effectiveTime.setValue(creationDate);
  effectiveTime.setNullFlavor(NullFlavor.UNK);
  organizer.setEffectiveTime(effectiveTime);
  Author author=CDAFactory.eINSTANCE.createAuthor();
  author.setTime(buildEffectiveTime(new Date()));
  AssignedAuthor assignedAuthor=CDAFactory.eINSTANCE.createAssignedAuthor();
  AD assignedAuthorAddress=DatatypesFactory.eINSTANCE.createAD();
  assignedAuthorAddress.addCountry("String_Node_Str");
  TEL assignedAuthorTelecon=DatatypesFactory.eINSTANCE.createTEL();
  assignedAuthorTelecon.setNullFlavor(NullFlavor.UNK);
  assignedAuthor.getAddrs().add(assignedAuthorAddress);
  assignedAuthor.getTelecoms().add(assignedAuthorTelecon);
  Person assignedPerson=CDAFactory.eINSTANCE.createPerson();
  PN assignedPersonName=DatatypesFactory.eINSTANCE.createPN();
  assignedPerson.getNames().add(assignedPersonName);
  assignedAuthor.setAssignedPerson(assignedPerson);
  author.setAssignedAuthor(assignedAuthor);
  organizer.getAuthors().add(author);
  Component4 component=CDAFactory.eINSTANCE.createComponent4();
  Observation observation=CDAFactory.eINSTANCE.createObservation();
  observation.setClassCode(ActClassObservation.OBS);
  observation.setMoodCode(x_ActMoodDocumentObservation.EVN);
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.setCode(buildCodeCE("String_Node_Str","String_Node_Str",null,"String_Node_Str"));
  observation.setText(buildEDText("String_Node_Str"));
  observation.setStatusCode(cs);
  IVL_TS effectiveTime1=DatatypesFactory.eINSTANCE.createIVL_TS();
  effectiveTime1.setNullFlavor(NullFlavor.UNK);
  observation.setEffectiveTime(effectiveTime1);
  ReferenceRange referenceRange=CDAFactory.eINSTANCE.createReferenceRange();
  ObservationRange observationRange=CDAFactory.eINSTANCE.createObservationRange();
  observationRange.setText(buildEDText("String_Node_Str"));
  referenceRange.setObservationRange(observationRange);
  observation.getReferenceRanges().add(referenceRange);
  component.setObservation(observation);
  organizer.getComponents().add(component);
  e.setOrganizer(organizer);
  section.getEntries().add(e);
  return section;
}

Fixed version (ground truth):
public Section buildCodedVitalSignsSection(){
  Section section=CDAFactory.eINSTANCE.createSection();
  VitalSignsSection vss=new VitalSignsSection();
  CodedVitalSignsSection ccs=new CodedVitalSignsSection();
  section.getTemplateIds().add(buildTemplateID(vss.getParentTemplateId(),null,null));
  section.getTemplateIds().add(buildTemplateID(ccs.getParentTemplateId(),null,null));
  section.getTemplateIds().add(buildTemplateID(ccs.getTemplateid(),null,null));
  section.setCode(buildCodeCE(ccs.getCode(),ccs.getCodeSystem(),ccs.getSectionName(),ccs.getCodeSystemName()));
  section.setTitle(buildTitle(ccs.getSectionDescription()));
  StrucDocText text=CDAFactory.eINSTANCE.createStrucDocText();
  text.addText("String_Node_Str");
  section.setText(text);
  Entry e=CDAFactory.eINSTANCE.createEntry();
  Organizer organizer=CDAFactory.eINSTANCE.createOrganizer();
  organizer.setClassCode(x_ActClassDocumentEntryOrganizer.CLUSTER);
  organizer.setMoodCode(ActMood.EVN);
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  organizer.getIds().add(buildID("String_Node_Str",null));
  organizer.setCode(buildCodeCD("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  CS cs=DatatypesFactory.eINSTANCE.createCS();
  cs.setCode("String_Node_Str");
  organizer.setStatusCode(cs);
  IVL_TS effectiveTime=DatatypesFactory.eINSTANCE.createIVL_TS();
  Date d=new Date();
  SimpleDateFormat s=new SimpleDateFormat("String_Node_Str");
  String creationDate=s.format(d);
  effectiveTime.setValue(creationDate);
  effectiveTime.setNullFlavor(NullFlavor.UNK);
  organizer.setEffectiveTime(effectiveTime);
  Author author=CDAFactory.eINSTANCE.createAuthor();
  author.setTime(buildEffectiveTime(new Date()));
  AssignedAuthor assignedAuthor=CDAFactory.eINSTANCE.createAssignedAuthor();
  II authorId=DatatypesFactory.eINSTANCE.createII();
  authorId.setRoot(Context.getAdministrationService().getImplementationId().getImplementationId());
  assignedAuthor.getIds().add(authorId);
  AD assignedAuthorAddress=DatatypesFactory.eINSTANCE.createAD();
  assignedAuthorAddress.addCountry("String_Node_Str");
  TEL assignedAuthorTelecon=DatatypesFactory.eINSTANCE.createTEL();
  assignedAuthorTelecon.setNullFlavor(NullFlavor.UNK);
  assignedAuthor.getAddrs().add(assignedAuthorAddress);
  assignedAuthor.getTelecoms().add(assignedAuthorTelecon);
  Person assignedPerson=CDAFactory.eINSTANCE.createPerson();
  PN assignedPersonName=DatatypesFactory.eINSTANCE.createPN();
  assignedPerson.getNames().add(assignedPersonName);
  assignedAuthor.setAssignedPerson(assignedPerson);
  author.setAssignedAuthor(assignedAuthor);
  organizer.getAuthors().add(author);
  Component4 component=CDAFactory.eINSTANCE.createComponent4();
  Observation observation=CDAFactory.eINSTANCE.createObservation();
  observation.setClassCode(ActClassObservation.OBS);
  observation.setMoodCode(x_ActMoodDocumentObservation.EVN);
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getTemplateIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.getIds().add(buildTemplateID("String_Node_Str",null,null));
  observation.setCode(buildCodeCE("String_Node_Str","String_Node_Str",null,"String_Node_Str"));
  observation.setText(buildEDText("String_Node_Str"));
  observation.setStatusCode(cs);
  IVL_TS effectiveTime1=DatatypesFactory.eINSTANCE.createIVL_TS();
  effectiveTime1.setNullFlavor(NullFlavor.UNK);
  observation.setEffectiveTime(effectiveTime1);
  ReferenceRange referenceRange=CDAFactory.eINSTANCE.createReferenceRange();
  ObservationRange observationRange=CDAFactory.eINSTANCE.createObservationRange();
  observationRange.setText(buildEDText("String_Node_Str"));
  referenceRange.setObservationRange(observationRange);
  observation.getReferenceRanges().add(referenceRange);
  component.setObservation(observation);
  organizer.getComponents().add(component);
  e.setOrganizer(organizer);
  section.getEntries().add(e);
  return section;
}