#fixed code
                             private void resolveDependencies() throws PluginException {
		DependencyResolver dependencyResolver = new DependencyResolver(unresolvedPlugins);
		resolvedPlugins = dependencyResolver.getSortedPlugins();
        for (PluginWrapper pluginWrapper : resolvedPlugins) {
        	unresolvedPlugins.remove(pluginWrapper);
        	uberClassLoader.addLoader(pluginWrapper.getPluginClassLoader());
        	LOG.info("Plugin '" + pluginWrapper.getDescriptor().getPluginId() + "' resolved");
        }
	}
#vulnerable code 
                             private void resolveDependencies() {
		DependencyResolver dependencyResolver = new DependencyResolver(unresolvedPlugins);
        resolvedPlugins = dependencyResolver.getSortedDependencies();
        for (Plugin plugin : resolvedPlugins) {
        	unresolvedPlugins.remove(plugin);
        	uberClassLoader.addLoader(plugin.getWrapper().getPluginClassLoader());
        }
	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE