private static RepositorySystemSession cloneSessionAndClearData(RepositorySystemSession session) {
      DefaultRepositorySystemSession newSession = new DefaultRepositorySystemSession(session);
      newSession.setData(new DefaultSessionData());
      return newSession;
    }
private static RepositorySystemSession cloneSessionAndClearData(RepositorySystemSession session)