Program: 125259
Project: 125259
Buggy source:
/** 
 * look for all the required modules for a given bundle, and let the user decide to download it. this method is blocked until the dialog box is closed.
 * @param jarMissingEvent, must never be null
 */
protected void showMissingModuleDialog(final JarMissingEvent jarMissingEvent){
  if (allModulesNeededExtensionsForPlugin == null) {
    this.allModulesNeededExtensionsForPlugin=ModulesNeededProvider.getAllModulesNeededExtensionsForPlugin();
  }
  List<ModuleNeeded> requiredModulesForBundle=ModulesNeededProvider.filterRequiredModulesForBundle(jarMissingEvent.getBundleSymbolicName(),allModulesNeededExtensionsForPlugin);
  final List<ModuleNeeded> filteredRequiredJars=new ArrayList<ModuleNeeded>(requiredModulesForBundle.size());
  for (  ModuleNeeded module : requiredModulesForBundle) {
    String moduleName=module.getModuleName();
    boolean installed=false;
    if (!new File(jarMissingEvent.getExpectedLibFolder(),moduleName).exists()) {
      try {
        if (module.getStatus() == ELibraryInstallStatus.INSTALLED && module.getDeployStatus() == ELibraryInstallStatus.NOT_DEPLOYED) {
          List<ModuleNeeded> allModuleNeeded=ModulesNeededProvider.getModulesNeededForName(moduleName);
          for (          ModuleNeeded sameModule : allModuleNeeded) {
            String moduleLocation=sameModule.getModuleLocaion();
            if (sameModule.getStatus() == ELibraryInstallStatus.INSTALLED && moduleLocation != null && !moduleLocation.isEmpty()) {
              URI uri=new URI(moduleLocation);
              URL url=FileLocator.toFileURL(uri.toURL());
              if ("String_Node_Str".equals(url.getProtocol())) {
                libraryManagerService.deploy(URIUtil.toURI(url),module.getMavenUri());
                installed=true;
              }
              break;
            }
          }
          if (PluginChecker.isSVNProviderPluginLoaded()) {
            ISVNProviderServiceInCoreRuntime svnService=(ISVNProviderServiceInCoreRuntime)GlobalServiceRegister.getDefault().getService(ISVNProviderServiceInCoreRuntime.class);
            if (svnService != null && svnService.isSvnLibSetupOnTAC()) {
              svnService.syncLibs(null);
            }
          }
        }
 else {
          final boolean retrieve=libraryManagerService.retrieve(module,null,false);
          installed=retrieve;
        }
      }
 catch (      URISyntaxException e) {
        log.warn("String_Node_Str" + moduleName,e);
      }
catch (      IOException e) {
        log.warn("String_Node_Str" + moduleName,e);
      }
    }
    if (!installed && !new File(jarMissingEvent.getExpectedLibFolder(),moduleName).exists()) {
      filteredRequiredJars.add(module);
    }
  }
  if (!filteredRequiredJars.isEmpty()) {
    Display.getDefault().syncExec(new Runnable(){
      @Override public void run(){
        ExternalModulesInstallDialogWithProgress dialog=new ExternalModulesInstallDialogWithProgress(DisplayUtils.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.APPLICATION_MODAL);
        dialog.showDialog(true,filteredRequiredJars);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * look for all the required modules for a given bundle, and let the user decide to download it. this method is blocked until the dialog box is closed.
 * @param jarMissingEvent, must never be null
 */
protected void showMissingModuleDialog(final JarMissingEvent jarMissingEvent){
  if (allModulesNeededExtensionsForPlugin == null) {
    this.allModulesNeededExtensionsForPlugin=ModulesNeededProvider.getAllModulesNeededExtensionsForPlugin();
  }
  List<ModuleNeeded> requiredModulesForBundle=ModulesNeededProvider.filterRequiredModulesForBundle(jarMissingEvent.getBundleSymbolicName(),allModulesNeededExtensionsForPlugin);
  final List<ModuleNeeded> filteredRequiredJars=new ArrayList<ModuleNeeded>(requiredModulesForBundle.size());
  for (  ModuleNeeded module : requiredModulesForBundle) {
    String moduleName=module.getModuleName();
    boolean installed=false;
    if (!new File(jarMissingEvent.getExpectedLibFolder(),moduleName).exists()) {
      try {
        if (module.getStatus() == ELibraryInstallStatus.INSTALLED && module.getDeployStatus() == ELibraryInstallStatus.NOT_DEPLOYED) {
          List<ModuleNeeded> allModuleNeeded=ModulesNeededProvider.getModulesNeededForName(moduleName);
          for (          ModuleNeeded sameModule : allModuleNeeded) {
            String moduleLocation=sameModule.getModuleLocaion();
            if (sameModule.getStatus() == ELibraryInstallStatus.INSTALLED && moduleLocation != null && !moduleLocation.isEmpty()) {
              URI uri=new URI(moduleLocation);
              URL url=FileLocator.toFileURL(uri.toURL());
              if ("String_Node_Str".equals(url.getProtocol())) {
                libraryManagerService.deploy(URIUtil.toURI(url),module.getMavenUri());
                installed=true;
              }
              break;
            }
          }
        }
 else {
          final boolean retrieve=libraryManagerService.retrieve(module,null,false);
          installed=retrieve;
        }
      }
 catch (      URISyntaxException e) {
        log.warn("String_Node_Str" + moduleName,e);
      }
catch (      IOException e) {
        log.warn("String_Node_Str" + moduleName,e);
      }
    }
    if (!installed && !new File(jarMissingEvent.getExpectedLibFolder(),moduleName).exists()) {
      filteredRequiredJars.add(module);
    }
  }
  if (!filteredRequiredJars.isEmpty()) {
    Display.getDefault().syncExec(new Runnable(){
      @Override public void run(){
        ExternalModulesInstallDialogWithProgress dialog=new ExternalModulesInstallDialogWithProgress(DisplayUtils.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.APPLICATION_MODAL);
        dialog.showDialog(true,filteredRequiredJars);
      }
    }
);
  }
}