#vulnerable code 
                                private CharBuffer getFileAsBufferFromPath(Path p) throws IOException {
	FileInputStream input = new FileInputStream(p.toString());
	FileChannel channel = input.getChannel();
	ByteBuffer bbuf = channel.map(FileChannel.MapMode.READ_ONLY, 0, (int) channel.size());
	return Charset.forName("utf8").newDecoder().decode(bbuf);
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private CharBuffer getFileAsBufferFromPath(Path p) {
	try (FileInputStream input = new FileInputStream(p.toString())) {
	    FileChannel channel = input.getChannel();
	    ByteBuffer bbuf = channel.map(FileChannel.MapMode.READ_ONLY, 0, (int) channel.size());
	    return Charset.forName("utf8").newDecoder().decode(bbuf);
	} catch (FileNotFoundException e) {
	    LOGGER.warn("IO Exception caught -", e);
	} catch (IOException e) {
	    LOGGER.warn("IO Exception caught -", e);
	}
	return null;
    }