#vulnerable code 
                                public String makeRequest(String url, Map<String, String> headers) {

        StringBuffer sb = new StringBuffer();
        try {

            HttpGet getRequest = new HttpGet(url);

            if (headers != null) {
                // add all headers
                for (Entry<String, String> header : headers.entrySet()) {
                    getRequest.addHeader(header.getKey(), header.getValue());
                }
            }

            HttpResponse response;

            response = httpClient.execute(getRequest);

            BufferedReader br = new BufferedReader(new InputStreamReader(
                    response.getEntity().getContent(), "UTF-8"));

            String output;
            while ((output = br.readLine()) != null) {
                sb.append(output);
            }

            getRequest.releaseConnection();

        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        return sb.toString();

    } 
                            #location 29 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public String makeRequest(String url, Map<String, String> headers) {

        StringBuffer sb = new StringBuffer();
        BufferedReader br = null;
        try {

            HttpGet getRequest = new HttpGet(url);

            if (headers != null) {
                // add all headers
                for (Entry<String, String> header : headers.entrySet()) {
                    getRequest.addHeader(header.getKey(), header.getValue());
                }
            }

            HttpResponse response;

            response = httpClient.execute(getRequest);

            br = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8"));

            String output;
            while ((output = br.readLine()) != null) {
                sb.append(output);
            }

            getRequest.releaseConnection();

        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                    LOG.error("Failed to close resource", e);
                }
            }
        }

        return sb.toString();

    }