#vulnerable code 
                             public static void writeStringToFile(String content, String filePath)
			throws Exception {
		BufferedOutputStream outputStream = null;
		try {
			outputStream = new BufferedOutputStream(new FileOutputStream(getFile(filePath)));
			outputStream.write(content.getBytes());
			outputStream.flush();
		} finally {
			outputStream.close();
		}
	} 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public static void writeStringToFile(String content, String filePath)
			throws Exception {
		BufferedOutputStream bos = null;
		try {
			bos = new BufferedOutputStream(new FileOutputStream(getFile(filePath)));
			bos.write(content.getBytes());
			bos.flush();
		} finally {
			if (bos != null) {
				bos.close();
			}
		}
	}