Program: 125489
Project: 125489
Buggy source:
private void downLoad(final IProgressMonitor monitor){
  SubMonitor subMonitor=SubMonitor.convert(monitor,Messages.getString("String_Node_Str") + "String_Node_Str" + toDownload.size()+ "String_Node_Str",toDownload.size());
  boolean connectionTimeOut=false;
  for (  final ModuleToInstall module : toDownload) {
    if (!monitor.isCanceled() && !connectionTimeOut) {
      monitor.subTask(module.getName());
      boolean accepted;
      try {
        boolean isLicenseAccepted=module.isFromCustomNexus() || LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType());
        accepted=isLicenseAccepted;
        if (!accepted) {
          subMonitor.worked(1);
          continue;
        }
        NexusDownloadHelperWithProgress downloader=new NexusDownloadHelperWithProgress(module);
        if (!module.getMavenUris().isEmpty()) {
          for (          String mvnUri : module.getMavenUris()) {
            downloader.download(new URL(null,mvnUri,new Handler()),null,subMonitor.newChild(1));
            final Map<String,ELibraryInstallStatus> statusMap=ModuleStatusProvider.getStatusMap();
            statusMap.put(mvnUri,ELibraryInstallStatus.INSTALLED);
            ModuleStatusProvider.getDeployStatusMap().put(mvnUri,ELibraryInstallStatus.DEPLOYED);
          }
        }
 else {
          downloader.download(new URL(null,module.getMavenUri(),new Handler()),null,subMonitor.newChild(1));
          final Map<String,ELibraryInstallStatus> statusMap=ModuleStatusProvider.getStatusMap();
          statusMap.put(module.getMavenUri(),ELibraryInstallStatus.INSTALLED);
          ModuleStatusProvider.getDeployStatusMap().put(module.getMavenUri(),ELibraryInstallStatus.DEPLOYED);
        }
        installedModules.add(module.getName());
      }
 catch (      Exception e) {
        downloadFailed.add(module.getName());
        connectionTimeOut=true;
        MessageBoxExceptionHandler.process(new Exception("String_Node_Str" + module.getName() + "String_Node_Str"));
        continue;
      }
      accepted=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
  }
  if (!installedModules.isEmpty()) {
    ILibraryManagerService libraryManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
    libraryManagerService.forceListUpdate();
  }
}

Fixed version (ground truth):
private void downLoad(final IProgressMonitor monitor){
  SubMonitor subMonitor=SubMonitor.convert(monitor,Messages.getString("String_Node_Str") + "String_Node_Str" + toDownload.size()+ "String_Node_Str",toDownload.size());
  boolean connectionTimeOut=false;
  for (  final ModuleToInstall module : toDownload) {
    if (!monitor.isCanceled() && !connectionTimeOut) {
      monitor.subTask(module.getName());
      boolean accepted;
      try {
        boolean isLicenseAccepted=module.isFromCustomNexus() || LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType());
        accepted=isLicenseAccepted;
        if (!accepted) {
          subMonitor.worked(1);
          continue;
        }
        NexusDownloadHelperWithProgress downloader=new NexusDownloadHelperWithProgress(module);
        if (!module.getMavenUris().isEmpty()) {
          for (          String mvnUri : module.getMavenUris()) {
            if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatusMap().get(mvnUri)) {
              continue;
            }
            downloader.download(new URL(null,mvnUri,new Handler()),null,subMonitor.newChild(1));
          }
        }
 else {
          if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatusMap().get(module.getMavenUri())) {
            continue;
          }
          downloader.download(new URL(null,module.getMavenUri(),new Handler()),null,subMonitor.newChild(1));
        }
        installedModules.add(module.getName());
      }
 catch (      Exception e) {
        downloadFailed.add(module.getName());
        connectionTimeOut=true;
        MessageBoxExceptionHandler.process(new Exception("String_Node_Str" + module.getName() + "String_Node_Str",e));
        continue;
      }
      accepted=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
  }
  if (!installedModules.isEmpty()) {
    ILibraryManagerService libraryManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
    libraryManagerService.forceListUpdate();
  }
}