#vulnerable code 
                                public void testParse() throws IOException, Exception {
        URL log_url = getClass().getClassLoader().getResource("LancopeSample.log");

        BufferedReader br;
        try {
            br = new BufferedReader(new FileReader(log_url.getFile()));
            String line = "";
            while ((line = br.readLine()) != null) {
                System.out.println(line);
                assertNotNull(line);
                JSONObject parsed =  lancopeParser.parse(line.getBytes());
                System.out.println(parsed);
                assertEquals(true, validateJsonData(super.getSchemaJsonString(), parsed.toString()));
            }
            br.close();  
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            
        }
    } 
                            #location 16 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void testParse() throws IOException, Exception {
        
        for (String inputString : getInputStrings()) {
            JSONObject parsed = parser.parse(inputString.getBytes());
            assertNotNull(parsed);
        
            System.out.println(parsed);
            JSONParser parser = new JSONParser();

            Map<?, ?> json=null;
            try {
                json = (Map<?, ?>) parser.parse(parsed.toJSONString());
                assertEquals(true, validateJsonData(super.getSchemaJsonString(), json.toString()));
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }
    }