void (@NotNull List<? extends Configuration> configurations) { if (configurations.isEmpty()) { return; } outer: for (Configuration configuration : configurations) { Configuration existing = myIdeState.get(configuration.getRefName()); while (existing != null) { if (configuration.equals(existing)) { continue outer; } configuration.setName(configuration.getName() + '~'); existing = myIdeState.get(configuration.getRefName()); } myIdeState.add(configuration); } configurations.clear(); }