Program: 160500
Project: 160500
Buggy source:
public RevisionSummary toRevisionSummary(DatabaseSession databaseSession) throws BimserverDatabaseException {
  RevisionSummary revisionSummary=databaseSession.create(RevisionSummary.class);
  RevisionSummaryContainer revisionSummaryContainerEntities=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerEntities.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerEntities);
  RevisionSummaryContainer revisionSummaryContainerRelations=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerRelations.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerRelations);
  RevisionSummaryContainer revisionSummaryContainerPrimitives=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerPrimitives.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerPrimitives);
  RevisionSummaryContainer revisionSummaryContainerOther=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerOther.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerOther);
  for (  EClass eClass : summaryMap.keySet()) {
    RevisionSummaryContainer subMap=null;
    if (Ifc2x3tc1Package.eINSTANCE.getIfcObject().isSuperTypeOf(eClass)) {
      subMap=revisionSummaryContainerEntities;
    }
 else     if (Ifc2x3tc1Package.eINSTANCE.getIfcRelationship().isSuperTypeOf(eClass)) {
      subMap=revisionSummaryContainerRelations;
    }
 else     if (eClass.getEAnnotation("String_Node_Str") != null) {
      subMap=revisionSummaryContainerPrimitives;
    }
 else {
      subMap=revisionSummaryContainerOther;
    }
    RevisionSummaryType createRevisionSummaryType=databaseSession.create(RevisionSummaryType.class);
    createRevisionSummaryType.setCount(summaryMap.get(eClass));
    createRevisionSummaryType.setName(eClass.getName());
    subMap.getTypes().add(createRevisionSummaryType);
  }
  return revisionSummary;
}

Fixed version (ground truth):
public RevisionSummary toRevisionSummary(DatabaseSession databaseSession) throws BimserverDatabaseException {
  RevisionSummary revisionSummary=databaseSession.create(RevisionSummary.class);
  RevisionSummaryContainer revisionSummaryContainerEntities=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerEntities.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerEntities);
  RevisionSummaryContainer revisionSummaryContainerRelations=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerRelations.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerRelations);
  RevisionSummaryContainer revisionSummaryContainerPrimitives=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerPrimitives.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerPrimitives);
  RevisionSummaryContainer revisionSummaryContainerOther=databaseSession.create(RevisionSummaryContainer.class);
  revisionSummaryContainerOther.setName("String_Node_Str");
  revisionSummary.getList().add(revisionSummaryContainerOther);
  for (  EClass eClass : summaryMap.keySet()) {
    RevisionSummaryContainer subMap=null;
    if (((EClass)packageMetaData.getEPackage().getEClassifier("String_Node_Str")).isSuperTypeOf(eClass)) {
      subMap=revisionSummaryContainerEntities;
    }
 else     if (((EClass)packageMetaData.getEPackage().getEClassifier("String_Node_Str")).isSuperTypeOf(eClass)) {
      subMap=revisionSummaryContainerRelations;
    }
 else     if (eClass.getEAnnotation("String_Node_Str") != null) {
      subMap=revisionSummaryContainerPrimitives;
    }
 else {
      subMap=revisionSummaryContainerOther;
    }
    RevisionSummaryType createRevisionSummaryType=databaseSession.create(RevisionSummaryType.class);
    createRevisionSummaryType.setCount(summaryMap.get(eClass));
    createRevisionSummaryType.setName(eClass.getName());
    subMap.getTypes().add(createRevisionSummaryType);
  }
  return revisionSummary;
}