Program: 160458
Project: 160458
Buggy source:
@Override public Long checkinInitiated(Long topicId,final Long poid,final String comment,Long deserializerOid,Long fileSize,String fileName,DataHandler dataHandler,Boolean merge,Boolean sync) throws ServerException, UserException {
  requireAuthenticationAndRunningServer();
  final DatabaseSession session=getBimServer().getDatabase().createSession();
  String username="String_Node_Str";
  String userUsername="String_Node_Str";
  try {
    User user=(User)session.get(StorePackage.eINSTANCE.getUser(),getAuthorization().getUoid(),Query.getDefault());
    Project project=session.get(poid,Query.getDefault());
    if (project == null) {
      throw new UserException("String_Node_Str" + poid);
    }
    username=user.getName();
    userUsername=user.getUsername();
    Path homeDirIncoming=getBimServer().getHomeDir().resolve("String_Node_Str");
    if (!Files.isDirectory(homeDirIncoming)) {
      Files.createDirectory(homeDirIncoming);
    }
    Path userDirIncoming=homeDirIncoming.resolve(userUsername);
    if (!Files.exists(userDirIncoming)) {
      Files.createDirectories(userDirIncoming);
    }
    if (fileName.contains("String_Node_Str")) {
      fileName=fileName.substring(fileName.lastIndexOf("String_Node_Str") + 1);
    }
    if (fileName.contains("String_Node_Str")) {
      fileName=fileName.substring(fileName.lastIndexOf("String_Node_Str") + 1);
    }
    DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
    String cacheFileName=dateFormat.format(new Date()) + "String_Node_Str" + fileName;
    Path file=userDirIncoming.resolve(cacheFileName);
    DeserializerPluginConfiguration deserializerPluginConfiguration=session.get(StorePackage.eINSTANCE.getDeserializerPluginConfiguration(),deserializerOid,Query.getDefault());
    if (deserializerPluginConfiguration == null) {
      throw new UserException("String_Node_Str" + deserializerOid + "String_Node_Str");
    }
 else {
      Plugin plugin=getBimServer().getPluginManager().getPlugin(deserializerPluginConfiguration.getPluginDescriptor().getPluginClassName(),true);
      if (plugin != null) {
        if (plugin instanceof DeserializerPlugin) {
          DeserializerPlugin deserializerPlugin=(DeserializerPlugin)plugin;
          ObjectType settings=deserializerPluginConfiguration.getSettings();
          Deserializer deserializer=deserializerPlugin.createDeserializer(new PluginConfiguration(settings));
          OutputStream outputStream=Files.newOutputStream(file);
          InputStream inputStream=new MultiplexingInputStream(dataHandler.getInputStream(),outputStream);
          deserializer.init(getBimServer().getDatabase().getMetaDataManager().getPackageMetaData(project.getSchema()));
          IfcModelInterface model=deserializer.read(inputStream,fileName,fileSize,null);
          CheckinDatabaseAction checkinDatabaseAction=new CheckinDatabaseAction(getBimServer(),null,getInternalAccessMethod(),poid,getAuthorization(),model,comment,fileName,merge);
          LongCheckinAction longAction=new LongCheckinAction(getBimServer(),username,userUsername,getAuthorization(),checkinDatabaseAction);
          getBimServer().getLongActionManager().start(longAction);
          if (sync) {
            longAction.waitForCompletion();
          }
          return longAction.getProgressTopic().getKey().getId();
        }
 else         if (plugin instanceof StreamingDeserializerPlugin) {
          StreamingDeserializerPlugin streaminDeserializerPlugin=(StreamingDeserializerPlugin)plugin;
          ObjectType settings=deserializerPluginConfiguration.getSettings();
          StreamingDeserializer streamingDeserializer=streaminDeserializerPlugin.createDeserializer(new PluginConfiguration(settings));
          streamingDeserializer.init(getBimServer().getMetaDataManager().getPackageMetaData("String_Node_Str"));
          OutputStream outputStream=Files.newOutputStream(file);
          InputStream inputStream=new MultiplexingInputStream(dataHandler.getInputStream(),outputStream);
          StreamingCheckinDatabaseAction checkinDatabaseAction=new StreamingCheckinDatabaseAction(getBimServer(),null,getInternalAccessMethod(),poid,getAuthorization(),comment,fileName,inputStream,streamingDeserializer);
          LongStreamingCheckinAction longAction=new LongStreamingCheckinAction(topicId,getBimServer(),username,userUsername,getAuthorization(),checkinDatabaseAction);
          getBimServer().getLongActionManager().start(longAction);
          if (sync) {
            longAction.waitForCompletion();
          }
          return longAction.getProgressTopic().getKey().getId();
        }
 else {
          throw new UserException("String_Node_Str" + deserializerOid);
        }
      }
 else {
        throw new UserException("String_Node_Str" + deserializerOid);
      }
    }
  }
 catch (  UserException e) {
    throw e;
  }
catch (  Throwable e) {
    LOGGER.error("String_Node_Str",e);
    throw new ServerException(e);
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@Override public Long checkinInitiated(Long topicId,final Long poid,final String comment,Long deserializerOid,Long fileSize,String fileName,DataHandler dataHandler,Boolean merge,Boolean sync) throws ServerException, UserException {
  requireAuthenticationAndRunningServer();
  final DatabaseSession session=getBimServer().getDatabase().createSession();
  String username="String_Node_Str";
  String userUsername="String_Node_Str";
  try {
    User user=(User)session.get(StorePackage.eINSTANCE.getUser(),getAuthorization().getUoid(),Query.getDefault());
    Project project=session.get(poid,Query.getDefault());
    if (project == null) {
      throw new UserException("String_Node_Str" + poid);
    }
    username=user.getName();
    userUsername=user.getUsername();
    Path homeDirIncoming=getBimServer().getHomeDir().resolve("String_Node_Str");
    if (!Files.isDirectory(homeDirIncoming)) {
      Files.createDirectory(homeDirIncoming);
    }
    Path userDirIncoming=homeDirIncoming.resolve(userUsername);
    if (!Files.exists(userDirIncoming)) {
      Files.createDirectories(userDirIncoming);
    }
    if (fileName.contains("String_Node_Str")) {
      fileName=fileName.substring(fileName.lastIndexOf("String_Node_Str") + 1);
    }
    if (fileName.contains("String_Node_Str")) {
      fileName=fileName.substring(fileName.lastIndexOf("String_Node_Str") + 1);
    }
    DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
    String cacheFileName=dateFormat.format(new Date()) + "String_Node_Str" + fileName;
    Path file=userDirIncoming.resolve(cacheFileName);
    DeserializerPluginConfiguration deserializerPluginConfiguration=session.get(StorePackage.eINSTANCE.getDeserializerPluginConfiguration(),deserializerOid,Query.getDefault());
    if (deserializerPluginConfiguration == null) {
      throw new UserException("String_Node_Str" + deserializerOid + "String_Node_Str");
    }
 else {
      Plugin plugin=getBimServer().getPluginManager().getPlugin(deserializerPluginConfiguration.getPluginDescriptor().getPluginClassName(),true);
      if (plugin != null) {
        if (plugin instanceof DeserializerPlugin) {
          DeserializerPlugin deserializerPlugin=(DeserializerPlugin)plugin;
          ObjectType settings=deserializerPluginConfiguration.getSettings();
          Deserializer deserializer=deserializerPlugin.createDeserializer(new PluginConfiguration(settings));
          OutputStream outputStream=Files.newOutputStream(file);
          InputStream inputStream=new MultiplexingInputStream(dataHandler.getInputStream(),outputStream);
          deserializer.init(getBimServer().getDatabase().getMetaDataManager().getPackageMetaData(project.getSchema()));
          IfcModelInterface model=deserializer.read(inputStream,fileName,fileSize,null);
          CheckinDatabaseAction checkinDatabaseAction=new CheckinDatabaseAction(getBimServer(),null,getInternalAccessMethod(),poid,getAuthorization(),model,comment,fileName,merge);
          LongCheckinAction longAction=new LongCheckinAction(topicId,getBimServer(),username,userUsername,getAuthorization(),checkinDatabaseAction);
          getBimServer().getLongActionManager().start(longAction);
          if (sync) {
            longAction.waitForCompletion();
          }
          return longAction.getProgressTopic().getKey().getId();
        }
 else         if (plugin instanceof StreamingDeserializerPlugin) {
          StreamingDeserializerPlugin streaminDeserializerPlugin=(StreamingDeserializerPlugin)plugin;
          ObjectType settings=deserializerPluginConfiguration.getSettings();
          StreamingDeserializer streamingDeserializer=streaminDeserializerPlugin.createDeserializer(new PluginConfiguration(settings));
          streamingDeserializer.init(getBimServer().getMetaDataManager().getPackageMetaData("String_Node_Str"));
          OutputStream outputStream=Files.newOutputStream(file);
          InputStream inputStream=new MultiplexingInputStream(dataHandler.getInputStream(),outputStream);
          StreamingCheckinDatabaseAction checkinDatabaseAction=new StreamingCheckinDatabaseAction(getBimServer(),null,getInternalAccessMethod(),poid,getAuthorization(),comment,fileName,inputStream,streamingDeserializer);
          LongStreamingCheckinAction longAction=new LongStreamingCheckinAction(topicId,getBimServer(),username,userUsername,getAuthorization(),checkinDatabaseAction);
          getBimServer().getLongActionManager().start(longAction);
          if (sync) {
            longAction.waitForCompletion();
          }
          return longAction.getProgressTopic().getKey().getId();
        }
 else {
          throw new UserException("String_Node_Str" + deserializerOid);
        }
      }
 else {
        throw new UserException("String_Node_Str" + deserializerOid);
      }
    }
  }
 catch (  UserException e) {
    throw e;
  }
catch (  Throwable e) {
    LOGGER.error("String_Node_Str",e);
    throw new ServerException(e);
  }
 finally {
    session.close();
  }
}