#fixed code
                             private UnenclosedJsonRecordReader getReaderFor(String resource, int start, int end) throws Exception {
		Path path = new Path(this.getClass().getResource(resource).getFile());

		FileSplit split = new FileSplit(path, start, end - start, new String[0]);

		UnenclosedJsonRecordReader rr = new UnenclosedJsonRecordReader();
        try {
			TaskAttemptContext tac =
                createTaskAttemptContext(new Configuration(), new TaskAttemptID());
			rr.initialize(split, tac);
		} catch (InterruptedException ie) {
			Thread.currentThread().interrupt();
		}

		return rr;
	}
#vulnerable code 
                             private UnenclosedJsonRecordReader getReaderFor(String resource, int start, int end) throws IOException {
		Path path = new Path(this.getClass().getResource(resource).getFile());
		
		JobConf conf = new JobConf();
		
		FileSplit split = new FileSplit(path, start, end - start, new String[0]);
		
		return new UnenclosedJsonRecordReader(split, conf);
	} 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK