#vulnerable code 
                                @Test
    public void test() throws Exception {
        for (int i = 0; i < 5; i++) {
            SpecCaptcha specCaptcha = new SpecCaptcha();
            //specCaptcha.setCharType(Captcha.TYPE_ONLY_NUMBER);
            System.out.println(specCaptcha.text());
            specCaptcha.out(new FileOutputStream(new File("D:/Java/aa" + i + ".png")));
        }
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void test() throws Exception {
        for (int i = 0; i < 5; i++) {
            SpecCaptcha specCaptcha = new SpecCaptcha();
            //specCaptcha.setCharType(Captcha.TYPE_ONLY_NUMBER);
            System.out.println(specCaptcha.text());
            //specCaptcha.out(new FileOutputStream(new File("D:/Java/aa" + i + ".png")));
        }
    }