#vulnerable code 
                                private void createEnabledFile() throws IOException {
        File file = testFolder.newFile("enabled.txt");
        file.createNewFile();
        try (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "utf-8"))) {
            writer.write("plugin-1\r\n");
            writer.write("plugin-2\r\n");
        }
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private void createEnabledFile() throws IOException {
        List<String> plugins = new ArrayList<>();
        plugins.add("plugin-1");
        plugins.add("plugin-2");

        writeLines(plugins, "enabled.txt");
    }