#vulnerable code 
                                private static synchronized List<Menu> loadJson() throws IOException {
        InputStream inStream = MenuJsonUtils.class.getResourceAsStream(config);
        BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, Charset.forName("UTF-8")));

        StringBuilder json = new StringBuilder();
        String tmp;
        while ((tmp = reader.readLine()) != null) {
            json.append(tmp);
        }

        List<Menu> menus = JSONArray.parseArray(json.toString(), Menu.class);
        return menus;
    } 
                            #location 12 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private static synchronized List<Menu> loadJson() throws IOException {
        InputStream inStream = MenuJsonUtils.class.getResourceAsStream(config);
        BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, Charset.forName("UTF-8")));

        StringBuilder json = new StringBuilder();
        String tmp;
        try {
            while ((tmp = reader.readLine()) != null) {
                json.append(tmp);
            }
        } catch (IOException e) {
            throw e;
        } finally {
            reader.close();
            inStream.close();
        }

        List<Menu> menus = JSONArray.parseArray(json.toString(), Menu.class);
        return menus;
    }