void (String ownerModuleName, String moduleName, String libraryName, DependencyScope scope) { mySubstitutions.remove(ownerModuleName, moduleName + '_' + scope.getDisplayName()); Collection<String> substitutions = mySubstitutions.values(); for (DependencyScope dependencyScope : DependencyScope.values()) { if (substitutions.contains(moduleName + '_' + dependencyScope.getDisplayName())) { return; } } myNamesMap.remove(moduleName, libraryName); }