#vulnerable code 
                                @Test
    public void testValidateInvalidCertificate() throws IOException, CertificateException {
        BufferedInputStream pem = new BufferedInputStream(new ByteArrayInputStream(invalidPemCert));

        assertFalse(crypto.validateCertificate(invalidPemCert));
    } 
                            #location 3 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testValidateInvalidCertificate() throws IOException, CertificateException {
        assertFalse(crypto.validateCertificate(invalidPemCert));
    }