Source:
<code>public static Map<IPluginModelBase, String> getWorkspaceBundleMap(ILaunchConfiguration configuration, Set<String> set, String attribute) throws CoreException { List<String> selected = configuration.getAttribute(attribute, new ArrayList<>()); <START> Map<IPluginModelBase, String> map = new LinkedHashMap<>(); <END> for (String token : selected) { int index = token.indexOf('@'); if (index < 0) { token = token.concat("@default:default"); index = token.indexOf('@'); } String idVersion = token.substring(0, index); int versionIndex = idVersion.indexOf(VERSION_SEPARATOR); String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion; String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null; if (set != null) set.add(id); ModelEntry entry = PluginRegistry.findEntry(id); if (entry != null) { IPluginModelBase[] models = entry.getWorkspaceModels(); Set<String> versions = new HashSet<>(); for (IPluginModelBase model : models) { IPluginBase base = model.getPluginBase(); String v = base.getVersion(); if (versions.add(v)) { if (base.getVersion().equals(version) || version == null || models.length == 1) addBundleToMap(map, model, token.substring(index + 1)); } } } } if (configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true)) { Set<IPluginModelBase> deselectedPlugins = LaunchPluginValidator.parsePlugins(configuration, IPDELauncherConstants.DESELECTED_WORKSPACE_BUNDLES); IPluginModelBase[] models = PluginRegistry.getWorkspaceModels(); for (int i = 0; i < models.length; i++) { String id = models[i].getPluginBase().getId(); if (id == null) continue; if (!deselectedPlugins.contains(models[i])) { if (set != null) set.add(id); if (!map.containsKey(models[i])) addBundleToMap(map, models[i], "default:default"); } } } return map; }</code><technical_language>needs Set, default emptySet()</technical_language>

Target:
public static Map<IPluginModelBase, String> getWorkspaceBundleMap(ILaunchConfiguration configuration, Set<String> set, String attribute) throws CoreException { Set<String> selected = configuration.getAttribute(attribute, Collections.emptySet()); Map<IPluginModelBase, String> map = new LinkedHashMap<>(); for (String token : selected) { int index = token.indexOf('@'); if (index < 0) { token = token.concat("@default:default"); index = token.indexOf('@'); } String idVersion = token.substring(0, index); int versionIndex = idVersion.indexOf(VERSION_SEPARATOR); String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion; String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null; if (set != null) set.add(id); ModelEntry entry = PluginRegistry.findEntry(id); if (entry != null) { IPluginModelBase[] models = entry.getWorkspaceModels(); Set<String> versions = new HashSet<>(); for (IPluginModelBase model : models) { IPluginBase base = model.getPluginBase(); String v = base.getVersion(); if (versions.add(v)) { if (base.getVersion().equals(version) || version == null || models.length == 1) addBundleToMap(map, model, token.substring(index + 1)); } } } } if (configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true)) { Set<IPluginModelBase> deselectedPlugins = LaunchPluginValidator.parsePlugins(configuration, IPDELauncherConstants.DESELECTED_WORKSPACE_BUNDLES); IPluginModelBase[] models = PluginRegistry.getWorkspaceModels(); for (int i = 0; i < models.length; i++) { String id = models[i].getPluginBase().getId(); if (id == null) continue; if (!deselectedPlugins.contains(models[i])) { if (set != null) set.add(id); if (!map.containsKey(models[i])) addBundleToMap(map, models[i], "default:default"); } } } return map; }