public static String getOrGenerateId(@Nullable DeviceIdToken token, @NotNull String recorderId) throws InvalidDeviceIdTokenException {
    assertAllowed(token, recorderId);

    ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
    Preferences prefs = getPreferences(appInfo);

    String preferenceKey = getPreferenceKey(recorderId);
    String deviceId = prefs.get(preferenceKey, null);
    if (StringUtil.isEmptyOrSpaces(deviceId)) {
      deviceId = generateId(Calendar.getInstance(Locale.ENGLISH), getOSChar());
      prefs.put(preferenceKey, deviceId);
      LOG.info("Generating new Device ID for '" + recorderId + "'");
    }

    if (appInfo.isVendorJetBrains() && SystemInfo.isWindows) {
      if (isBaseRecorder(recorderId)) {
        deviceId = syncWithSharedFile(DEVICE_ID_SHARED_FILE, deviceId, prefs, preferenceKey);
      }
      else {
        deleteLegacySharedFile(recorderId + "_" + DEVICE_ID_SHARED_FILE);
      }
    }
    return deviceId;
  }
public static String getOrGenerateId(@Nullable DeviceIdToken token, @NotNull String recorderId)