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