#vulnerable code 
                                private void unpackDependencies() throws MojoExecutionException {
        getLog().info("Unpacking kumuluzee-loader dependency.");

        try {
            // get plugin JAR
            String pluginJarPath = getPluginJarPath();
            JarFile pluginJar = new JarFile(new File(pluginJarPath));

            // extract loader JAR from plugin JAR
            JarEntry pluginJarloaderJarEntry = pluginJar.getJarEntry(LOADER_JAR);
            InputStream loaderJarInputStream = pluginJar.getInputStream(pluginJarloaderJarEntry);

            File tmpDirectory = new File(System.getProperty("java.io.tmpdir"), "EeBootLoader");
            if (!tmpDirectory.exists()) {
                tmpDirectory.mkdir();
            }
            chmod777(tmpDirectory);

            File tmpLoaderJarFile = File.createTempFile(TEMP_DIR_NAME_PREFIX, null, tmpDirectory);
            tmpLoaderJarFile.deleteOnExit();
            chmod777(tmpLoaderJarFile);

            FileUtils.copyInputStreamToFile(loaderJarInputStream, tmpLoaderJarFile);

            // extract loader JAR contents
            JarFile loaderJar = new JarFile(tmpLoaderJarFile);
            loaderJar
                    .stream()
                    .parallel()
                    .filter(loaderJarEntry -> loaderJarEntry.getName().toLowerCase().endsWith(CLASS_SUFFIX))
                    .forEach(loaderJarEntry -> {
                        try {
                            File file = new File(outputDirectory, "classes" + File.separator + loaderJarEntry.getName());
                            if (file.getParentFile() != null) {
                                file.getParentFile().mkdirs();
                            }

                            InputStream inputStream = loaderJar.getInputStream(loaderJarEntry);
                            FileUtils.copyInputStreamToFile(inputStream, file);
                        } catch (IOException e) {
                            // ignore
                        }
                    });

            loaderJar.close();
        } catch (IOException e) {
            throw new MojoExecutionException("Failed to unpack kumuluzee-loader dependency: " + e.getMessage() + ".");
        }
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private void unpackDependencies() throws MojoExecutionException {

        getLog().info("Unpacking kumuluzee-loader dependency.");

        try {

            // get plugin JAR
            String pluginJarPath = getPluginJarPath();

            Path pluginJarFile = Paths.get(pluginJarPath);

            FileSystem pluginJarFs = FileSystems.newFileSystem(pluginJarFile, null);

            Path loaderJarFile = pluginJarFs.getPath(LOADER_JAR);
            Path tmpJar = Files.createTempFile(TEMP_DIR_NAME_PREFIX, ".tmp");

            Files.copy(loaderJarFile, tmpJar, StandardCopyOption.REPLACE_EXISTING);

            JarFile loaderJar = new JarFile(tmpJar.toFile());

            loaderJar.stream().parallel()
                    .filter(loaderJarEntry -> loaderJarEntry.getName().toLowerCase().endsWith(CLASS_SUFFIX))
                    .forEach(loaderJarEntry -> {
                        try {

                            Path outputPath = Paths.get(outputDirectory, loaderJarEntry.getName());

                            Path outputPathParent = outputPath.getParent();

                            if (outputPathParent != null) {

                                Files.createDirectories(outputPathParent);
                            }

                            InputStream inputStream = loaderJar.getInputStream(loaderJarEntry);

                            Files.copy(inputStream, outputPath, StandardCopyOption.REPLACE_EXISTING);

                            inputStream.close();
                        } catch (IOException ignored) {
                        }
                    });

            loaderJar.close();

            Files.delete(tmpJar);

        } catch (IOException e) {
            throw new MojoExecutionException("Failed to unpack kumuluzee-loader dependency: " + e.getMessage() + ".");
        }
    }