Library (@NotNull String name) { Map<String, Library> cache = myLibraryByNameCache; if (cache == null) { cache = new HashMap<>(); for (Library library : myLibraries) { cache.put(library.getName(), library); } myLibraryByNameCache = cache; } Library library = cache.get(name); if (library != null) { return library; } @NonNls final String libraryPrefix = "library."; final String libPath = System.getProperty(libraryPrefix + name); if (libPath != null) { final LibraryImpl libraryFromProperty = new LibraryImpl(name, null, LibraryTableBase.this, null, null); libraryFromProperty.addRoot(libPath, OrderRootType.CLASSES); return libraryFromProperty; } return null; }