#fixed code
                                protected File createTempFile(final byte src[]) throws IOException {
        final File file = createTempFile("raw_", ".bin");

        // write test bytes to file.
        try (FileOutputStream fos = new FileOutputStream(file);
                OutputStream os = new BufferedOutputStream(fos)) {
            os.write(src);
        }

        // test that all bytes written to file.
        assertTrue(src.length == file.length());

        return file;
    }
#vulnerable code 
                                protected File createTempFile(final byte src[]) throws IOException {
        final File file = createTempFile("raw_", ".bin");

        // write test bytes to file.
        OutputStream os = null;
        boolean canThrow = false;
        try {
            os = new FileOutputStream(file);
            os = new BufferedOutputStream(os);
            os.write(src);
            canThrow = true;
        } finally {
            IoUtils.closeQuietly(canThrow, os);
        }

        // test that all bytes written to file.
        assertTrue(src.length == file.length());

        return file;
    } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK