#vulnerable code 
                                public static void save(File target, Properties p) throws IOException {
        File parent = target.getParentFile();
        parent.mkdirs();
        if (isWindows()) {
            store(new FileOutputStream(target), p);
        } else {
            File tempFile = createTempFile(target.getName(), ".temp", parent);
            store(new FileOutputStream(tempFile), p);
            rename(tempFile, target);
        }
    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static void save(File target, Properties p) throws IOException {
        File parent = target.getParentFile();
        parent.mkdirs();
        if (isWindows()) {
            store(target, p);
        } else {
            File tempFile = createTempFile(target.getName(), ".temp", parent);
            store(tempFile, p);
            rename(tempFile, target);
        }
    }