void (@NotNull String abbreviation, @NotNull String actionId) { List<String> actions = abbreviationToActionId.get(abbreviation); if (actions != null) { actions.remove(actionId); } Set<String> abbreviations = actionIdToAbbreviations.get(actionId); if (abbreviations != null) { abbreviations.remove(abbreviation); } else { abbreviations = actionIdToAbbreviations.get(actionId); if (abbreviations != null) { Set<String> customValues = new LinkedHashSet<>(abbreviations); customValues.remove(abbreviation); actionIdToAbbreviations.put(actionId, customValues); } } }