List<PluginNode> (@NotNull List<PluginNode> list, @NotNull BuildNumber build, @Nullable String repositoryUrl) { Map<PluginId, PluginNode> result = new LinkedHashMap<>(list.size()); boolean isPaidPluginsRequireMarketplacePlugin = isPaidPluginsRequireMarketplacePlugin(); for (PluginNode node : list) { PluginId pluginId = node.getPluginId(); if (repositoryUrl != null && node.getDownloadUrl() == null) { LOG.debug("Malformed plugin record (id:" + pluginId + " repository:" + repositoryUrl + ")"); continue; } if (isBrokenPlugin(node) || PluginManagerCore.isIncompatible(node, build)) { LOG.debug("An incompatible plugin (id:" + pluginId + " repository:" + repositoryUrl + ")"); continue; } if (repositoryUrl != null) { node.setRepositoryName(repositoryUrl); } if (node.getName() == null) { String url = node.getDownloadUrl(); node.setName(FileUtilRt.getNameWithoutExtension(url.substring(url.lastIndexOf('/') + 1))); } PluginNode previous = result.get(pluginId); if (previous == null || VersionComparatorUtil.compare(node.getVersion(), previous.getVersion()) > 0) { result.put(pluginId, node); } addMarketplacePluginDependencyIfRequired(node, isPaidPluginsRequireMarketplacePlugin); } return List.copyOf(result.values()); }