#vulnerable code 
                                @Test
    public void testBasics() throws IOException {
        final String correct = "1234567890123456";
        final InputStream in = new ContentLengthInputStream(new SessionInputBufferMock(
            EncodingUtils.getBytes(correct, CONTENT_CHARSET)), 10L);
        final ByteArrayOutputStream out = new ByteArrayOutputStream();

        final byte[] buffer = new byte[50];
        int len = in.read(buffer, 0, 2);
        out.write(buffer, 0, len);
        len = in.read(buffer);
        out.write(buffer, 0, len);

        final String result = EncodingUtils.getString(out.toByteArray(), CONTENT_CHARSET);
        Assert.assertEquals(result, "1234567890");
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testBasics() throws IOException {
        final String correct = "1234567890123456";
        final InputStream in = new ContentLengthInputStream(new SessionInputBufferMock(
            EncodingUtils.getBytes(correct, CONTENT_CHARSET)), 10L);
        final ByteArrayOutputStream out = new ByteArrayOutputStream();

        final byte[] buffer = new byte[50];
        int len = in.read(buffer, 0, 2);
        out.write(buffer, 0, len);
        len = in.read(buffer);
        out.write(buffer, 0, len);

        final String result = EncodingUtils.getString(out.toByteArray(), CONTENT_CHARSET);
        Assert.assertEquals(result, "1234567890");
        in.close();
    }