#vulnerable code 
                             private void displayJSON (HttpServletRequest request, HttpServletResponse response)
	{
		response.setContentType("text/plain");
		
		try
		{
			BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(response.getOutputStream()));
			JSONArray out = new JSONArray();
			
			for (JSONObject district : districts)
			{
				out.put(district);
			}
			
			writer.write(out.toString());
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	} 
                            #location 15 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             private void displayJSON (HttpServletRequest request, HttpServletResponse response)
	{
		response.setContentType("text/plain");
		
		try
		{
		    ServletOutputStream out = response.getOutputStream();
			
		    out.println("[");
		    
			for (JSONObject district : districts)
			{
				out.println(district.toString());
			}
			
			out.println("]");
		    out.flush();
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}