void (@NotNull Element state) { List<Element> abbreviations = state.getChildren("abbreviations"); if (abbreviations.size() != 1) { return; } List<Element> actions = abbreviations.get(0).getChildren("action"); for (Element action : actions) { String actionId = action.getAttributeValue("id"); Set<String> values = actionIdToAbbreviations.computeIfAbsent(actionId, k -> new LinkedHashSet<>(1)); for (Element abbr : action.getChildren("abbreviation")) { final String abbrValue = abbr.getAttributeValue("name"); if (abbrValue != null) { values.add(abbrValue); abbreviationToActionId.computeIfAbsent(abbrValue, k -> new ArrayList<>()).add(actionId); } } } }