#fixed code
                             public static final File extract(File compressedFile, String export)
			throws IOException {
		log.trace("Compressed file {}", compressedFile);

		File file = null;
		if (compressedFile.getName().toLowerCase().endsWith("tar.bz2")) {
			file = unBZip2(compressedFile, export);
		} else if (compressedFile.getName().toLowerCase().endsWith("gz")) {
			file = unGzip(compressedFile);
		} else {

			ZipFile zipFolder = new ZipFile(compressedFile);
			Enumeration<?> enu = zipFolder.entries();

			while (enu.hasMoreElements()) {
				ZipEntry zipEntry = (ZipEntry) enu.nextElement();

				String name = zipEntry.getName();
				long size = zipEntry.getSize();
				long compressedSize = zipEntry.getCompressedSize();
				log.trace("Unzipping {} (size: {} KB, compressed size: {} KB)",
						name, size, compressedSize);

				file = new File(
						compressedFile.getParentFile() + File.separator + name);
				if (!file.exists() || WdmConfig.getBoolean("wdm.override")) {
					if (name.endsWith("/")) {
						file.mkdirs();
						continue;
					}

					File parent = file.getParentFile();
					if (parent != null) {
						parent.mkdirs();
					}

					InputStream is = zipFolder.getInputStream(zipEntry);
					FileOutputStream fos = new FileOutputStream(file);
					byte[] bytes = new byte[1024];
					int length;
					while ((length = is.read(bytes)) >= 0) {
						fos.write(bytes, 0, length);
					}
					is.close();
					fos.close();
					file.setExecutable(true);
				} else {
					log.debug(file + " already exists");
				}

			}
			zipFolder.close();
		}

		file = checkPhantom(compressedFile, export);

		log.trace("Resulting binary file {}", file.getAbsoluteFile());
		return file.getAbsoluteFile();
	}
#vulnerable code 
                             public static final File extract(File compressedFile, String export)
			throws IOException {
		log.trace("Compressed file {}", compressedFile);

		File file = null;
		if (compressedFile.getName().toLowerCase().endsWith("tar.bz2")) {
			file = unBZip2(compressedFile, export);
		} else if (compressedFile.getName().toLowerCase().endsWith("gz")) {
			file = unGzip(compressedFile);
		} else {

			ZipFile zipFolder = new ZipFile(compressedFile);
			Enumeration<?> enu = zipFolder.entries();

			while (enu.hasMoreElements()) {
				ZipEntry zipEntry = (ZipEntry) enu.nextElement();

				String name = zipEntry.getName();
				long size = zipEntry.getSize();
				long compressedSize = zipEntry.getCompressedSize();
				log.trace("Unzipping {} (size: {} KB, compressed size: {} KB)",
						name, size, compressedSize);

				file = new File(
						compressedFile.getParentFile() + File.separator + name);
				if (!file.exists() || WdmConfig.getBoolean("wdm.override")) {
					if (name.endsWith("/")) {
						file.mkdirs();
						continue;
					}

					File parent = file.getParentFile();
					if (parent != null) {
						parent.mkdirs();
					}

					InputStream is = zipFolder.getInputStream(zipEntry);
					FileOutputStream fos = new FileOutputStream(file);
					byte[] bytes = new byte[1024];
					int length;
					while ((length = is.read(bytes)) >= 0) {
						fos.write(bytes, 0, length);
					}
					is.close();
					fos.close();
					file.setExecutable(true);
				} else {
					log.debug(file + " already exists");
				}

			}
			zipFolder.close();
		}

		log.trace("Resulting binary file {}", file.getAbsoluteFile());
		return file.getAbsoluteFile();
	} 
                            #location 55 
                            #vulnerability type NULL_DEREFERENCE