#vulnerable code 
                             protected void verifyCase(String info, String actual, String testCaseName) {
		String s = File.separator;
		String resname = "results" + s + testName() + s + getTestMethodName() + s + testCaseName;
		String filename = "src" + s + "test" + s + "resources" + s + resname;

		if (ADJUST_RESULTS) {
			File testDir = new File(filename).getParentFile();

			if (!testDir.exists()) {
				testDir.mkdirs();
			}

			FileOutputStream out = null;
			try {
				out = new FileOutputStream(filename);
				out.write(actual.getBytes());
				out.close();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		} else {
			byte[] bytes = loadRes(resname);
			String expected = bytes != null ? new String(bytes) : "";
			check(info, actual, expected);
		}
	} 
                            #location 18 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             protected void verifyCase(String info, String actual, String testCaseName) {
		String s = File.separator;
		String resname = "results" + s + testName() + s + getTestMethodName() + s + testCaseName;
		String filename = "src" + s + "test" + s + "resources" + s + resname;

		if (ADJUST_RESULTS) {
			File testDir = new File(filename).getParentFile();

			if (!testDir.exists()) {
				if (!testDir.mkdirs()) {
					throw new RuntimeException("Couldn't create the test result folder: " + testDir.getAbsolutePath());
				}
			}

			FileOutputStream out;
			try {
				out = new FileOutputStream(filename);
				out.write(actual.getBytes());
				out.close();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		} else {
			byte[] bytes = loadRes(resname);
			String expected = bytes != null ? new String(bytes) : "";
			check(info, actual, expected);
		}
	}