Program: 125701
Project: 125701
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);
          }
        }
 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);
        }
        installedModules.add(module.getName());
      }
 catch (      SocketTimeoutException e) {
        downloadFailed.add(module.getName());
        connectionTimeOut=true;
        MessageBoxExceptionHandler.process(e);
        continue;
      }
catch (      Exception e) {
        downloadFailed.add(module.getName());
        MessageBoxExceptionHandler.process(e);
        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()) {
            downloader.download(new URL(null,mvnUri,new Handler()),null,subMonitor.newChild(1));
            final Map<String,ELibraryInstallStatus> statusMap=ModuleStatusProvider.getStatusMap();
            statusMap.put(mvnUri,ELibraryInstallStatus.INSTALLED);
          }
        }
 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);
        }
        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();
  }
}