#vulnerable code 
                                private boolean isZipFile(final File file) throws IOException {
        final DataInputStream in = new DataInputStream(new FileInputStream(file));
        final int n = in.readInt();
        in.close();
        return n == 0x504b0304;
    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private boolean isZipFile(final File file) {
        DataInputStream in = null;
        try {
            in = new DataInputStream(new FileInputStream(file));
            final int n = in.readInt();
            return n == 0x504b0304;
        } catch (IOException ex) {
            // silently ignore read exceptions
            return false;
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException ex) {
                    // ignore
                }
            }
        }
    }