Program: 188499
Project: 188499
Buggy source:
private void loadExternalPlugins(){
  try {
    List<URL> sharedJarURLs=getSharedJarURLs(RODA_PLUGINS_SHARED_PATH);
    try (DirectoryStream<Path> stream=Files.newDirectoryStream(RODA_PLUGINS_PATH,"String_Node_Str")){
      Iterator<Path> iterator=stream.iterator();
      if (iterator.hasNext()) {
        LOGGER.error("String_Node_Str",RODA_PLUGINS_PATH,RodaConstants.CORE_PLUGINS_SHARED_FOLDER,RodaConstants.CORE_PLUGINS_DEACTIVATED_FOLDER);
        iterator.forEachRemaining(path -> LOGGER.error("String_Node_Str",path));
      }
    }
     try (DirectoryStream<Path> pluginsFolders=Files.newDirectoryStream(RODA_PLUGINS_PATH,path -> Files.isDirectory(path) && !RodaConstants.CORE_PLUGINS_SHARED_FOLDER.equals(path.getFileName().toString()) && !RodaConstants.CORE_PLUGINS_DEACTIVATED_FOLDER.equals(path.getFileName().toString()))){
      for (      Path pluginFolder : pluginsFolders) {
        LOGGER.debug("String_Node_Str",pluginFolder);
        List<Path> pluginJarFiles=new ArrayList<>();
        List<URL> pluginJarURLs=new ArrayList<>();
        try (DirectoryStream<Path> jarsStream=Files.newDirectoryStream(pluginFolder,"String_Node_Str")){
          for (          Path jarFile : jarsStream) {
            LOGGER.debug("String_Node_Str",jarFile);
            pluginJarFiles.add(jarFile);
            pluginJarURLs.add(jarFile.toUri().toURL());
          }
        }
 catch (        NoSuchFileException e) {
        }
        pluginJarURLs.addAll(sharedJarURLs);
        URL[] jars=pluginJarURLs.toArray(new URL[pluginJarURLs.size()]);
        for (        Path jarFile : pluginJarFiles) {
          processJar(jarFile,jars);
        }
      }
    }
   }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void loadExternalPlugins(){
  try {
    List<URL> sharedJarURLs=getSharedJarURLs(RODA_PLUGINS_SHARED_PATH);
    try (DirectoryStream<Path> stream=Files.newDirectoryStream(RODA_PLUGINS_PATH,"String_Node_Str")){
      Iterator<Path> iterator=stream.iterator();
      if (iterator.hasNext()) {
        LOGGER.error("String_Node_Str",RODA_PLUGINS_PATH,RodaConstants.CORE_PLUGINS_SHARED_FOLDER,RodaConstants.CORE_PLUGINS_DISABLED_FOLDER);
        iterator.forEachRemaining(path -> LOGGER.error("String_Node_Str",path));
      }
    }
     try (DirectoryStream<Path> pluginsFolders=Files.newDirectoryStream(RODA_PLUGINS_PATH,path -> Files.isDirectory(path) && !RodaConstants.CORE_PLUGINS_SHARED_FOLDER.equals(path.getFileName().toString()) && !RodaConstants.CORE_PLUGINS_DISABLED_FOLDER.equals(path.getFileName().toString()))){
      for (      Path pluginFolder : pluginsFolders) {
        LOGGER.debug("String_Node_Str",pluginFolder);
        List<Path> pluginJarFiles=new ArrayList<>();
        List<URL> pluginJarURLs=new ArrayList<>();
        try (DirectoryStream<Path> jarsStream=Files.newDirectoryStream(pluginFolder,"String_Node_Str")){
          for (          Path jarFile : jarsStream) {
            LOGGER.debug("String_Node_Str",jarFile);
            pluginJarFiles.add(jarFile);
            pluginJarURLs.add(jarFile.toUri().toURL());
          }
        }
 catch (        NoSuchFileException e) {
        }
        pluginJarURLs.addAll(sharedJarURLs);
        URL[] jars=pluginJarURLs.toArray(new URL[pluginJarURLs.size()]);
        for (        Path jarFile : pluginJarFiles) {
          processJar(jarFile,jars);
        }
      }
    }
   }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
}