#fixed code
                                public static void saveJar(File target, String entryName, Properties props) throws IOException {
        File parent = target.getParentFile();
        parent.mkdirs();
        storeJar(target, entryName, props);
    }
#vulnerable code 
                                public static void saveJar(File target, String entryName, Properties props) throws IOException {
        byte[] bytes = toBytes(props);
        InputStream input = new ByteArrayInputStream(bytes);
        FileOutputStream fos = new FileOutputStream(target);
        JarOutputStream output = new JarOutputStream(fos);
        try {
            ZipEntry entry = new ZipEntry(entryName);
            output.putNextEntry(entry);
            byte[] buffer = new byte[4096];
            int size;
            while ((size = input.read(buffer)) != -1)
                output.write(buffer, 0, size);
            output.flush();
        } finally {
            input.close();
            output.close();
            fos.close();
        }
    } 
                            #location 18 
                            #vulnerability type RESOURCE_LEAK