Source:
<code>private PluginDescriptor getPluginDescriptor(JSONObject p, String pluginName) { String pluginDescription = p.get("pluginDescription").isString().stringValue(); JSONObject jsonSectionDescriptions = p.get("sectionDescriptions").isObject(); <START> Map<Integer, String> sectionDescriptions = new HashMap<>(); <END> for (String key : jsonSectionDescriptions.keySet()) { int sectionSelector = Integer.parseInt(key); String sectionDescription = jsonSectionDescriptions.get(key).isString().stringValue(); sectionDescriptions.put(sectionSelector, sectionDescription); } PluginDescriptor desc = new PluginDescriptor(pluginName, pluginDescription, sectionDescriptions); JSONArray fields = p.get("configurableFields").isArray(); for (int j = 0; j < fields.size(); j++) { JSONObject field = fields.get(j).isObject(); String name = field.get("name").isString().stringValue(); String value = field.get("value").isString().stringValue(); JSONObject meta = field.get("meta").isObject(); String metaType = meta.get("type").isString().stringValue(); String descr = meta.get("description").isString().stringValue(); boolean dynamic = meta.get("dynamic").isBoolean().booleanValue(); int sectionSelector = (int) meta.get("sectionSelector").isNumber().doubleValue(); boolean password = false; boolean credentials = false; boolean file = false; boolean textArea = false; if (metaType.equalsIgnoreCase("password")) { password = true; } else if (metaType.equalsIgnoreCase("fileBrowser")) { file = true; } else if (metaType.equalsIgnoreCase("credential")) { credentials = true; } else if (metaType.equalsIgnoreCase("textArea")) { textArea = true; } PluginDescriptor.Field f = new PluginDescriptor.Field(name, value, descr, password, credentials, file, textArea, dynamic, sectionSelector); desc.getConfigurableFields().add(f); } return desc; }</code><technical_language>Replace Map<Integer, String> sectionDescriptions = new HashMap<>(jsonSectionDescriptions.size());</technical_language>

Target:
private PluginDescriptor getPluginDescriptor(JSONObject p, String pluginName) { String pluginDescription = p.get("pluginDescription").isString().stringValue(); JSONObject jsonSectionDescriptions = p.get("sectionDescriptions").isObject(); Map<Integer, String> sectionDescriptions = new HashMap<>(jsonSectionDescriptions.size()); for (String key : jsonSectionDescriptions.keySet()) { int sectionSelector = Integer.parseInt(key); String sectionDescription = jsonSectionDescriptions.get(key).isString().stringValue(); sectionDescriptions.put(sectionSelector, sectionDescription); } PluginDescriptor desc = new PluginDescriptor(pluginName, pluginDescription, sectionDescriptions); JSONArray fields = p.get("configurableFields").isArray(); for (int j = 0; j < fields.size(); j++) { JSONObject field = fields.get(j).isObject(); String name = field.get("name").isString().stringValue(); String value = field.get("value").isString().stringValue(); JSONObject meta = field.get("meta").isObject(); String metaType = meta.get("type").isString().stringValue(); String descr = meta.get("description").isString().stringValue(); boolean dynamic = meta.get("dynamic").isBoolean().booleanValue(); int sectionSelector = (int) meta.get("sectionSelector").isNumber().doubleValue(); boolean password = false; boolean credentials = false; boolean file = false; boolean textArea = false; if (metaType.equalsIgnoreCase("password")) { password = true; } else if (metaType.equalsIgnoreCase("fileBrowser")) { file = true; } else if (metaType.equalsIgnoreCase("credential")) { credentials = true; } else if (metaType.equalsIgnoreCase("textArea")) { textArea = true; } PluginDescriptor.Field f = new PluginDescriptor.Field(name, value, descr, password, credentials, file, textArea, dynamic, sectionSelector); desc.getConfigurableFields().add(f); } return desc; }