#vulnerable code 
                             public static void write(String content, File output) throws IOException {
		FileOutputStream out = new FileOutputStream(output);
		OutputStreamWriter w = new OutputStreamWriter(out);

		try {
			w.write(content);
			w.flush();
		} finally {
			out.close();
		}
	} 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public static void write(String content, File output) throws IOException {
		try (final FileOutputStream out = new FileOutputStream(output);
			 final OutputStreamWriter w = new OutputStreamWriter(out)) {
			w.write(content);
			w.flush();
		}
	}