Set<String> (@NotNull Set<String> options, @NotNull SearchableConfigurable configurable) { if (highlightOptionToSynonym.isEmpty()) { return options; } Set<String> result = new HashSet<>(options); initialize(); for (String option : options) { Set<String> synonyms = highlightOptionToSynonym.get(new Pair<>(option, configurable.getId())); if (synonyms != null) { result.addAll(synonyms); } else { result.add(option); } } return result; }