Program: 160566
Project: 160566
Buggy source:
@Override public IfcModelInterface execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
  User user=getUserByUoid(getAuthorization().getUoid());
  Project project=null;
  String projectName="String_Node_Str";
  IfcModelSet ifcModelSet=new IfcModelSet();
  long incrSize=0;
  for (  long roid : roids) {
    Revision revision=getRevisionByRoid(roid);
    for (    ConcreteRevision subRevision : revision.getConcreteRevisions()) {
      incrSize+=subRevision.getSize();
    }
  }
  final long totalSize=incrSize;
  final AtomicLong total=new AtomicLong();
  SerializerPluginConfiguration serializerPluginConfiguration=getDatabaseSession().get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(),serializerOid,Query.getDefault());
  for (  long roid : roids) {
    Revision revision=getRevisionByRoid(roid);
    project=revision.getProject();
    if (getAuthorization().hasRightsOnProjectOrSuperProjectsOrSubProjects(user,project)) {
      for (      ConcreteRevision concreteRevision : revision.getConcreteRevisions()) {
        IfcModel subModel=new IfcModel();
        int highestStopId=findHighestStopRid(project,concreteRevision);
        Query query=new Query(concreteRevision.getProject().getId(),concreteRevision.getId(),objectIDM,Deep.YES,highestStopId);
        subModel.addChangeListener(new IfcModelChangeListener(){
          @Override public void objectAdded(){
            total.incrementAndGet();
            if (totalSize == 0) {
              setProgress("String_Node_Str",0);
            }
 else {
              setProgress("String_Node_Str",Math.round(100L * total.get() / totalSize));
            }
          }
        }
);
        getDatabaseSession().getMap(subModel,query);
        projectName+=concreteRevision.getProject().getName() + "String_Node_Str";
        subModel.getModelMetaData().setDate(concreteRevision.getDate());
        try {
          checkGeometry(serializerPluginConfiguration,bimServer.getPluginManager(),subModel,project,concreteRevision,revision);
        }
 catch (        GeometryGeneratingException e) {
          throw new UserException(e);
        }
        ifcModelSet.add(subModel);
      }
    }
 else {
      throw new UserException("String_Node_Str" + project.getOid());
    }
  }
  IfcModelInterface ifcModel=new IfcModel();
  try {
    ifcModel=bimServer.getMergerFactory().createMerger(getDatabaseSession(),getAuthorization().getUoid()).merge(project,ifcModelSet,new ModelHelper(ifcModel));
  }
 catch (  MergeException e) {
    throw new UserException(e);
  }
  if (projectName.endsWith("String_Node_Str")) {
    projectName=projectName.substring(0,projectName.length() - 1);
  }
  ifcModel.getModelMetaData().setName(projectName);
  return ifcModel;
}

Fixed version (ground truth):
@Override public IfcModelInterface execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
  User user=getUserByUoid(getAuthorization().getUoid());
  Project project=null;
  String projectName="String_Node_Str";
  IfcModelSet ifcModelSet=new IfcModelSet();
  long incrSize=0;
  for (  long roid : roids) {
    Revision revision=getRevisionByRoid(roid);
    for (    ConcreteRevision subRevision : revision.getConcreteRevisions()) {
      incrSize+=subRevision.getSize();
    }
  }
  final long totalSize=incrSize;
  final AtomicLong total=new AtomicLong();
  SerializerPluginConfiguration serializerPluginConfiguration=getDatabaseSession().get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(),serializerOid,Query.getDefault());
  for (  long roid : roids) {
    Revision revision=getRevisionByRoid(roid);
    project=revision.getProject();
    if (getAuthorization().hasRightsOnProjectOrSuperProjectsOrSubProjects(user,project)) {
      for (      ConcreteRevision concreteRevision : revision.getConcreteRevisions()) {
        IfcModel subModel=new IfcModel();
        int highestStopId=findHighestStopRid(project,concreteRevision);
        Query query=new Query(concreteRevision.getProject().getId(),concreteRevision.getId(),objectIDM,Deep.YES,highestStopId);
        subModel.addChangeListener(new IfcModelChangeListener(){
          @Override public void objectAdded(){
            total.incrementAndGet();
            if (totalSize == 0) {
              setProgress("String_Node_Str",0);
            }
 else {
              setProgress("String_Node_Str",(int)Math.round(100.0 * total.get() / totalSize));
            }
          }
        }
);
        getDatabaseSession().getMap(subModel,query);
        projectName+=concreteRevision.getProject().getName() + "String_Node_Str";
        subModel.getModelMetaData().setDate(concreteRevision.getDate());
        try {
          checkGeometry(serializerPluginConfiguration,bimServer.getPluginManager(),subModel,project,concreteRevision,revision);
        }
 catch (        GeometryGeneratingException e) {
          throw new UserException(e);
        }
        ifcModelSet.add(subModel);
      }
    }
 else {
      throw new UserException("String_Node_Str" + project.getOid());
    }
  }
  IfcModelInterface ifcModel=new IfcModel();
  try {
    ifcModel=bimServer.getMergerFactory().createMerger(getDatabaseSession(),getAuthorization().getUoid()).merge(project,ifcModelSet,new ModelHelper(ifcModel));
  }
 catch (  MergeException e) {
    throw new UserException(e);
  }
  if (projectName.endsWith("String_Node_Str")) {
    projectName=projectName.substring(0,projectName.length() - 1);
  }
  ifcModel.getModelMetaData().setName(projectName);
  return ifcModel;
}