#vulnerable code 
                             public boolean reparse() {
		File temp = FileManager.createTempFile("py");
		Element e = this.getDocument().getDefaultRootElement();
		if (e.getEndOffset() - e.getStartOffset() == 1) {
			return true;
		}
		try {
			writeFile(temp.getAbsolutePath());
			this.read(new BufferedReader(new InputStreamReader(new FileInputStream(temp), "UTF8")), null);
			updateDocumentListeners();
			return true;
		} catch (IOException ex) {
		}
		return false;
	} 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public boolean reparse() {
		File temp = null;
		Element e = this.getDocument().getDefaultRootElement();
		if (e.getEndOffset() - e.getStartOffset() == 1) {
			return true;
		}
		if ((temp = reparseBefore()) != null) {
			if (reparseAfter(temp)) {
			updateDocumentListeners();
			return true;
			}
		}
		return false;
	}