#vulnerable code 
                                public static NSObject parse(final byte[] bytes) throws Exception {

        InputStream is = new InputStream() {

            private int pos = 0;

            @Override
            public int read() throws IOException {
                if (pos >= bytes.length) {
                    return -1;
                }
                return bytes[pos++];
            }
        };

        return parse(is);
    } 
                            #location 16 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static NSObject parse(final byte[] bytes) throws Exception {
        ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
        return parse(bis);
    }