#vulnerable code 
                                @Test
    public void testConstructor() throws Exception {
        final SessionInputBuffer receiver = new SessionInputBufferMock(new byte[] {});
        new IdentityInputStream(receiver);
        try {
            new IdentityInputStream(null);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            //expected
        }
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testConstructor() throws Exception {
        final SessionInputBuffer receiver = new SessionInputBufferMock(new byte[] {});
        final IdentityInputStream in = new IdentityInputStream(receiver);
        in.close();
        try {
            new IdentityInputStream(null);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            //expected
        }
    }