#fixed code
                                public static void copy(File source, File dest) throws IOException {
        FileInputStream fis = null;
        FileOutputStream fos = null;
        try {
	        fis = new FileInputStream(source);
	        fos = new FileOutputStream(dest);
	        copy(fis, fos);
        } finally {
            if (fis != null) try {fis.close();} catch (Exception e) {}
            if (fos != null) try {fos.close();} catch (Exception e) {}            
        }
    }
#vulnerable code 
                                public static void copy(File source, File dest) throws IOException {
        FileInputStream fis = new FileInputStream(source);
        FileOutputStream fos = new FileOutputStream(dest);
        copy(fis, fos);
        fis.close();
        fos.close();
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK