#vulnerable code 
                                public static byte[] read(File source) throws IOException {
        byte[] buffer = new byte[(int) source.length()];
        InputStream fis = new FileInputStream(source);
        int p = 0;
        int c;
	while ((c = fis.read(buffer, p, buffer.length - p)) > 0) p += c;
	fis.close();
        return buffer;
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static byte[] read(File source) throws IOException {
		byte[] buffer = new byte[(int) source.length()];
		InputStream fis = null;
        try {
	        fis = new FileInputStream(source);
			int p = 0, c;
			while ((c = fis.read(buffer, p, buffer.length - p)) > 0) p += c;
        } finally {
            if (fis != null) try { fis.close(); } catch (Exception e) {}
        }
		return buffer;
    }