Library (@NotNull final String libraryName, @NotNull LibrariesModifiableModel model) { for (Library library : model.getLibraries()) { final Library libraryModel = findLibraryModel(library, model); if (libraryModel != null && libraryName.equals(libraryModel.getName())) { return libraryModel; } } return null; }