Program: 160516
Project: 160516
Buggy source:
@Override public void register(SInternalServicePluginConfiguration internalServicePluginConfiguration,PluginConfiguration pluginConfiguration){
  ServiceDescriptor serviceDescriptor=StoreFactory.eINSTANCE.createServiceDescriptor();
  serviceDescriptor.setProviderName("String_Node_Str");
  serviceDescriptor.setIdentifier(getClass().getName());
  serviceDescriptor.setName("String_Node_Str");
  serviceDescriptor.setDescription("String_Node_Str");
  serviceDescriptor.setWriteRevision(true);
  serviceDescriptor.setReadRevision(true);
  serviceDescriptor.setNotificationProtocol(AccessMethod.INTERNAL);
  serviceDescriptor.setTrigger(Trigger.NEW_REVISION);
  registerNewRevisionHandler(serviceDescriptor,new NewRevisionHandler(){
    @Override public void newRevision(    BimServerClientInterface bimServerClientInterface,    long poid,    long roid,    String userToken,    long soid,    SObjectType settings) throws ServerException, UserException {
      try {
        Date startDate=new Date();
        Long topicId=bimServerClientInterface.getRegistry().registerProgressOnRevisionTopic(SProgressTopicType.RUNNING_SERVICE,poid,roid,"String_Node_Str");
        SLongActionState state=new SLongActionState();
        state.setTitle("String_Node_Str");
        state.setState(SActionState.STARTED);
        state.setProgress(-1);
        state.setStart(startDate);
        bimServerClientInterface.getRegistry().updateProgressTopic(topicId,state);
        IfcModelInterface model=bimServerClientInterface.getModel(poid,roid,true);
        DeserializerPlugin deserializerPlugin=getPluginManager().getFirstDeserializer("String_Node_Str",true);
        Deserializer deserializer=deserializerPlugin.createDeserializer(null);
        deserializer.init(getPluginManager().requireSchemaDefinition());
        deserializer=deserializerPlugin.createDeserializer(null);
        deserializer.init(getPluginManager().requireSchemaDefinition());
        InputStream resourceAsInputStream=getPluginManager().getPluginContext(FurniturePlacerServicePlugin.this).getResourceAsInputStream("String_Node_Str");
        ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
        IOUtils.copy(resourceAsInputStream,byteArrayOutputStream);
        IfcModelInterface furnishingModel=deserializer.read(new ByteArrayInputStream(byteArrayOutputStream.toByteArray()),"String_Node_Str",byteArrayOutputStream.size());
        IfcFurnishingElement picknick=(IfcFurnishingElement)furnishingModel.getByName(Ifc2x3tc1Package.eINSTANCE.getIfcFurnishingElement(),"String_Node_Str");
        ModelHelper modelHelper=new ModelHelper(new HideAllInversesObjectIDM(CollectionUtils.singleSet(Ifc2x3tc1Package.eINSTANCE),getPluginManager().requireSchemaDefinition()),model);
        modelHelper.setTargetModel(model);
        modelHelper.setObjectFactory(model);
        IfcProductDefinitionShape representation=(IfcProductDefinitionShape)picknick.getRepresentation();
        IfcRepresentation surfaceModel=null;
        IfcRepresentation boundingBox=null;
        for (        IfcRepresentation ifcRepresentation : representation.getRepresentations()) {
          IfcShapeRepresentation ifcShapeRepresentation=(IfcShapeRepresentation)ifcRepresentation;
          if (ifcShapeRepresentation.getRepresentationType().equals("String_Node_Str")) {
            surfaceModel=(IfcRepresentation)modelHelper.copy(ifcShapeRepresentation);
          }
 else           if (ifcShapeRepresentation.getRepresentationType().equals("String_Node_Str")) {
            boundingBox=(IfcRepresentation)modelHelper.copy(ifcShapeRepresentation);
          }
        }
        IfcOwnerHistory ownerHistory=null;
        List<IfcOwnerHistory> all=model.getAll(IfcOwnerHistory.class);
        if (all.size() > 0) {
          ownerHistory=all.get(0);
        }
        for (        IfcBuildingStorey ifcBuildingStorey : model.getAll(IfcBuildingStorey.class)) {
          for (          IfcRelDecomposes ifcRelDecomposes : ifcBuildingStorey.getIsDecomposedBy()) {
            for (            IfcObjectDefinition ifcObjectDefinition : ifcRelDecomposes.getRelatedObjects()) {
              if (ifcObjectDefinition instanceof IfcSpace) {
                IfcSpace ifcSpace=(IfcSpace)ifcObjectDefinition;
                IfcFurnishingElement newFurnishing=model.create(IfcFurnishingElement.class);
                IfcRelContainedInSpatialStructure containedInSpatialStructure2=model.create(IfcRelContainedInSpatialStructure.class);
                containedInSpatialStructure2.setRelatingStructure(ifcBuildingStorey);
                containedInSpatialStructure2.getRelatedElements().add(newFurnishing);
                newFurnishing.setName("String_Node_Str");
                newFurnishing.setGlobalId("String_Node_Str");
                newFurnishing.setOwnerHistory(ownerHistory);
                IfcProductDefinitionShape definitionShape=model.create(IfcProductDefinitionShape.class);
                newFurnishing.setRepresentation(definitionShape);
                definitionShape.getRepresentations().add(boundingBox);
                definitionShape.getRepresentations().add(surfaceModel);
                IfcLocalPlacement localPlacement=model.create(IfcLocalPlacement.class);
                localPlacement.setPlacementRelTo(ifcSpace.getObjectPlacement());
                IfcAxis2Placement3D axis2Placement3D=model.create(IfcAxis2Placement3D.class);
                localPlacement.setRelativePlacement(axis2Placement3D);
                IfcCartesianPoint pos=model.create(IfcCartesianPoint.class);
                pos.getCoordinates().add(-3d);
                pos.getCoordinates().add(+0.5d);
                pos.getCoordinates().add(0d);
                axis2Placement3D.setLocation(pos);
                newFurnishing.setObjectPlacement(localPlacement);
              }
            }
          }
        }
        model.commit("String_Node_Str");
        state=new SLongActionState();
        state.setProgress(100);
        state.setTitle("String_Node_Str");
        state.setState(SActionState.FINISHED);
        state.setStart(startDate);
        state.setEnd(new Date());
        bimServerClientInterface.getRegistry().updateProgressTopic(topicId,state);
        bimServerClientInterface.getRegistry().unregisterProgressTopic(topicId);
      }
 catch (      Exception e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void register(SInternalServicePluginConfiguration internalServicePluginConfiguration,PluginConfiguration pluginConfiguration){
  ServiceDescriptor serviceDescriptor=StoreFactory.eINSTANCE.createServiceDescriptor();
  serviceDescriptor.setProviderName("String_Node_Str");
  serviceDescriptor.setIdentifier("String_Node_Str" + internalServicePluginConfiguration.getOid());
  serviceDescriptor.setName("String_Node_Str");
  serviceDescriptor.setDescription("String_Node_Str");
  serviceDescriptor.setWriteRevision(true);
  serviceDescriptor.setReadRevision(true);
  serviceDescriptor.setNotificationProtocol(AccessMethod.INTERNAL);
  serviceDescriptor.setTrigger(Trigger.NEW_REVISION);
  registerNewRevisionHandler(serviceDescriptor,new NewRevisionHandler(){
    @Override public void newRevision(    BimServerClientInterface bimServerClientInterface,    long poid,    long roid,    String userToken,    long soid,    SObjectType settings) throws ServerException, UserException {
      try {
        Date startDate=new Date();
        Long topicId=bimServerClientInterface.getRegistry().registerProgressOnRevisionTopic(SProgressTopicType.RUNNING_SERVICE,poid,roid,"String_Node_Str");
        SLongActionState state=new SLongActionState();
        state.setTitle("String_Node_Str");
        state.setState(SActionState.STARTED);
        state.setProgress(-1);
        state.setStart(startDate);
        bimServerClientInterface.getRegistry().updateProgressTopic(topicId,state);
        IfcModelInterface model=bimServerClientInterface.getModel(poid,roid,true);
        DeserializerPlugin deserializerPlugin=getPluginManager().getFirstDeserializer("String_Node_Str",true);
        Deserializer deserializer=deserializerPlugin.createDeserializer(null);
        deserializer.init(getPluginManager().requireSchemaDefinition());
        deserializer=deserializerPlugin.createDeserializer(null);
        deserializer.init(getPluginManager().requireSchemaDefinition());
        InputStream resourceAsInputStream=getPluginManager().getPluginContext(FurniturePlacerServicePlugin.this).getResourceAsInputStream("String_Node_Str");
        ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
        IOUtils.copy(resourceAsInputStream,byteArrayOutputStream);
        IfcModelInterface furnishingModel=deserializer.read(new ByteArrayInputStream(byteArrayOutputStream.toByteArray()),"String_Node_Str",byteArrayOutputStream.size());
        IfcFurnishingElement picknick=(IfcFurnishingElement)furnishingModel.getByName(Ifc2x3tc1Package.eINSTANCE.getIfcFurnishingElement(),"String_Node_Str");
        ModelHelper modelHelper=new ModelHelper(new HideAllInversesObjectIDM(CollectionUtils.singleSet(Ifc2x3tc1Package.eINSTANCE),getPluginManager().requireSchemaDefinition()),model);
        modelHelper.setTargetModel(model);
        modelHelper.setObjectFactory(model);
        IfcProductDefinitionShape representation=(IfcProductDefinitionShape)picknick.getRepresentation();
        IfcRepresentation surfaceModel=null;
        IfcRepresentation boundingBox=null;
        for (        IfcRepresentation ifcRepresentation : representation.getRepresentations()) {
          IfcShapeRepresentation ifcShapeRepresentation=(IfcShapeRepresentation)ifcRepresentation;
          if (ifcShapeRepresentation.getRepresentationType().equals("String_Node_Str")) {
            surfaceModel=(IfcRepresentation)modelHelper.copy(ifcShapeRepresentation);
          }
 else           if (ifcShapeRepresentation.getRepresentationType().equals("String_Node_Str")) {
            boundingBox=(IfcRepresentation)modelHelper.copy(ifcShapeRepresentation);
          }
        }
        IfcOwnerHistory ownerHistory=null;
        List<IfcOwnerHistory> all=model.getAll(IfcOwnerHistory.class);
        if (all.size() > 0) {
          ownerHistory=all.get(0);
        }
        for (        IfcBuildingStorey ifcBuildingStorey : model.getAll(IfcBuildingStorey.class)) {
          for (          IfcRelDecomposes ifcRelDecomposes : ifcBuildingStorey.getIsDecomposedBy()) {
            for (            IfcObjectDefinition ifcObjectDefinition : ifcRelDecomposes.getRelatedObjects()) {
              if (ifcObjectDefinition instanceof IfcSpace) {
                IfcSpace ifcSpace=(IfcSpace)ifcObjectDefinition;
                IfcFurnishingElement newFurnishing=model.create(IfcFurnishingElement.class);
                IfcRelContainedInSpatialStructure containedInSpatialStructure2=model.create(IfcRelContainedInSpatialStructure.class);
                containedInSpatialStructure2.setRelatingStructure(ifcBuildingStorey);
                containedInSpatialStructure2.getRelatedElements().add(newFurnishing);
                newFurnishing.setName("String_Node_Str");
                newFurnishing.setGlobalId("String_Node_Str");
                newFurnishing.setOwnerHistory(ownerHistory);
                IfcProductDefinitionShape definitionShape=model.create(IfcProductDefinitionShape.class);
                newFurnishing.setRepresentation(definitionShape);
                definitionShape.getRepresentations().add(boundingBox);
                definitionShape.getRepresentations().add(surfaceModel);
                IfcLocalPlacement localPlacement=model.create(IfcLocalPlacement.class);
                localPlacement.setPlacementRelTo(ifcSpace.getObjectPlacement());
                IfcAxis2Placement3D axis2Placement3D=model.create(IfcAxis2Placement3D.class);
                localPlacement.setRelativePlacement(axis2Placement3D);
                IfcCartesianPoint pos=model.create(IfcCartesianPoint.class);
                pos.getCoordinates().add(-3d);
                pos.getCoordinates().add(+0.5d);
                pos.getCoordinates().add(0d);
                axis2Placement3D.setLocation(pos);
                newFurnishing.setObjectPlacement(localPlacement);
              }
            }
          }
        }
        model.commit("String_Node_Str");
        state=new SLongActionState();
        state.setProgress(100);
        state.setTitle("String_Node_Str");
        state.setState(SActionState.FINISHED);
        state.setStart(startDate);
        state.setEnd(new Date());
        bimServerClientInterface.getRegistry().updateProgressTopic(topicId,state);
        bimServerClientInterface.getRegistry().unregisterProgressTopic(topicId);
      }
 catch (      Exception e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
);
}