String (@NotNull String fileName, @NotNull String installationId, @NotNull Preferences prefs, @NotNull String prefsKey) { final String appdata = System.getenv("APPDATA"); if (appdata != null) { final File dir = new File(appdata, "JetBrains"); if (dir.exists() || dir.mkdirs()) { final File permanentIdFile = new File(dir, fileName); try { String fromFile = ""; if (permanentIdFile.exists()) { fromFile = loadFromFile(permanentIdFile).trim(); } if (!fromFile.isEmpty()) { if (!fromFile.equals(installationId)) { installationId = fromFile; prefs.put(prefsKey, installationId); } } else { writeToFile(permanentIdFile, installationId); } } catch (IOException ignored) { } } } return installationId; }