#vulnerable code 
                                public static byte[] tryDecompress(byte[] raw) throws Exception {
        if (!isGzipStream(raw)) {
            return raw;
        }

        GZIPInputStream gis
            = new GZIPInputStream(new ByteArrayInputStream(raw));
        ByteArrayOutputStream out
            = new ByteArrayOutputStream();

        IoUtils.copy(gis, out);

        return out.toByteArray();
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static byte[] tryDecompress(byte[] raw) throws Exception {
        if (!isGzipStream(raw)) {
            return raw;
        }
        GZIPInputStream gis = null;
        ByteArrayOutputStream out = null;

        try {
            gis = new GZIPInputStream(new ByteArrayInputStream(raw));
            out = new ByteArrayOutputStream();
            IoUtils.copy(gis, out);
            return out.toByteArray();
        } finally {
            if (out != null) {
                out.close();
            }
            if (gis != null) {
                gis.close();
            }
        }
    }