Program: 160670
Project: 160670
Buggy source:
@Override public Integer execute() throws UserException, BimDeadlockException, BimDatabaseException {
  Revision oldRevision=getDatabaseSession().get(StorePackage.eINSTANCE.getRevision(),roid,false,null);
  Project oldProject=oldRevision.getProject();
  final User user=getDatabaseSession().get(StorePackage.eINSTANCE.getUser(),currentUoid,false,null);
  if (!RightsManager.hasRightsOnProjectOrSuperProjectsOrSubProjects(user,oldProject)) {
    throw new UserException("String_Node_Str");
  }
  IfcModelSet ifcModelSet=new IfcModelSet();
  for (  ConcreteRevision subRevision : oldRevision.getConcreteRevisions()) {
    IfcModel subModel=new IfcModel();
    getDatabaseSession().getMap(subModel,subRevision.getProject().getId(),subRevision.getId(),true,null);
    subModel.setDate(subRevision.getDate());
    ifcModelSet.add(subModel);
  }
  final IfcModelInterface model=bimServer.getMergerFactory().createMerger().merge(oldRevision.getProject(),ifcModelSet,bimServer.getSettingsManager().getSettings().isIntelligentMerging());
  model.resetOids();
  final Project newProject=new AddProjectDatabaseAction(bimServer,getDatabaseSession(),getAccessMethod(),projectName,currentUoid).execute();
  BimDatabaseAction<ConcreteRevision> action=new CheckinPart1DatabaseAction(getDatabaseSession(),getAccessMethod(),newProject.getOid(),currentUoid,model,comment);
  ConcreteRevision revision=action.execute();
  CheckinPart2DatabaseAction createCheckinAction=new CheckinPart2DatabaseAction(bimServer,bimServer.getDatabase().createSession(true),getAccessMethod(),model,currentUoid,revision.getOid(),false);
  SCheckinResult result=new SCheckinResult();
  result.setProjectId(revision.getProject().getOid());
  LongCheckinAction longAction=new LongCheckinAction(bimServer,user,createCheckinAction);
  try {
    bimServer.getLongActionManager().start(longAction);
  }
 catch (  CannotBeScheduledException e) {
    e.printStackTrace();
  }
  return longAction.getId();
}

Fixed version (ground truth):
@Override public Integer execute() throws UserException, BimDeadlockException, BimDatabaseException {
  Revision oldRevision=getDatabaseSession().get(StorePackage.eINSTANCE.getRevision(),roid,false,null);
  Project oldProject=oldRevision.getProject();
  final User user=getDatabaseSession().get(StorePackage.eINSTANCE.getUser(),currentUoid,false,null);
  if (!RightsManager.hasRightsOnProjectOrSuperProjectsOrSubProjects(user,oldProject)) {
    throw new UserException("String_Node_Str");
  }
  IfcModelSet ifcModelSet=new IfcModelSet();
  for (  ConcreteRevision subRevision : oldRevision.getConcreteRevisions()) {
    IfcModel subModel=new IfcModel();
    getDatabaseSession().getMap(subModel,subRevision.getProject().getId(),subRevision.getId(),true,null);
    subModel.setDate(subRevision.getDate());
    ifcModelSet.add(subModel);
  }
  final IfcModelInterface model=bimServer.getMergerFactory().createMerger().merge(oldRevision.getProject(),ifcModelSet,bimServer.getSettingsManager().getSettings().isIntelligentMerging());
  model.resetOids();
  final Project newProject=new AddProjectDatabaseAction(bimServer,getDatabaseSession(),getAccessMethod(),projectName,currentUoid).execute();
  BimDatabaseAction<ConcreteRevision> action=new CheckinPart1DatabaseAction(getDatabaseSession(),getAccessMethod(),newProject.getOid(),currentUoid,model,comment);
  ConcreteRevision revision=action.execute();
  CheckinPart2DatabaseAction createCheckinAction=new CheckinPart2DatabaseAction(bimServer,bimServer.getDatabase().createSession(true),getAccessMethod(),model,currentUoid,revision.getOid(),false,true);
  SCheckinResult result=new SCheckinResult();
  result.setProjectId(revision.getProject().getOid());
  LongCheckinAction longAction=new LongCheckinAction(bimServer,user,createCheckinAction);
  try {
    bimServer.getLongActionManager().start(longAction);
  }
 catch (  CannotBeScheduledException e) {
    e.printStackTrace();
  }
  return longAction.getId();
}