#fixed code
                                public BaseConfig originalConfig() throws IOException {
        String applicationYmlContent;
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(BaseConfig.class.getResource("/config/baseConfig.yml").openStream()))) {
            applicationYmlContent = reader.lines().collect(Collectors.joining("\n"));
        }
        return objectMapper.readValue(applicationYmlContent, BaseConfig.class);
    }
#vulnerable code 
                                public BaseConfig originalConfig() throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(BaseConfig.class.getResource("/config/baseConfig.yml").openStream()));
        String applicationYmlContent = reader.lines().collect(Collectors.joining("\n"));
        return objectMapper.readValue(applicationYmlContent, BaseConfig.class);
    } 
                            #location 3 
                            #vulnerability type RESOURCE_LEAK