<BUG>final Map<String, Object> result = (Map<String, Object>) loadedObject;ByteArrayOutputStream nifiPropertiesOutputStream = new ByteArrayOutputStream();writeNiFiProperties(result, nifiPropertiesOutputStream);DOMSource flowXml = createFlowXml(result);</BUG><CONTEXT>public static void transformConfigFile(InputStream sourceStream, String destPath) throws Exception {try {Yaml yaml = new Yaml();final Object loadedObject = yaml.load(sourceStream);if (loadedObject instanceof Map) {<extra_id_0>writeNiFiPropertiesFile(nifiPropertiesOutputStream, destPath);</CONTEXT>
final Map<String, Object> loadedMap = (Map<String, Object>) loadedObject;ConfigSchema configSchema = new ConfigSchema(loadedMap);if (!configSchema.isValid()) {throw new InvalidConfigurationException("Failed to transform config file due to:" + configSchema.getValidationIssuesAsString());}writeNiFiProperties(configSchema, nifiPropertiesOutputStream);DOMSource flowXml = createFlowXml(configSchema);