Program: 125279
Project: 125279
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 canDownload;
      try {
        boolean isLicenseAccepted=module.isFromCustomNexus() || (LibManagerUiPlugin.getDefault().getPreferenceStore().contains(module.getLicenseType()) && LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType()));
        boolean hasRepositoryUrl=false;
        String moduleMvnUri=module.getMavenUri();
        MavenArtifact mavenArtifact=MavenUrlHelper.parseMvnUrl(moduleMvnUri,false);
        if (mavenArtifact != null) {
          String repositoryUrl=mavenArtifact.getRepositoryUrl();
          hasRepositoryUrl=StringUtils.isNotEmpty(repositoryUrl);
        }
        canDownload=isLicenseAccepted | hasRepositoryUrl;
        if (!canDownload) {
          subMonitor.worked(1);
          continue;
        }
        NexusDownloadHelperWithProgress downloader=new NexusDownloadHelperWithProgress(module);
        if (!module.getMavenUris().isEmpty()) {
          for (          String mvnUri : module.getMavenUris()) {
            if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatus(mvnUri)) {
              continue;
            }
            downloader.download(new URL(null,mvnUri,new Handler()),null,subMonitor.newChild(1));
          }
        }
 else {
          if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatus(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;
      }
      canDownload=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
    ILibrariesService librariesService=(ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
    librariesService.checkLibraries();
  }
}

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 canDownload;
      try {
        boolean isLicenseAccepted=module.isFromCustomNexus() || (LibManagerUiPlugin.getDefault().getPreferenceStore().contains(module.getLicenseType()) && LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType()));
        boolean hasRepositoryUrl=false;
        String moduleMvnUri=module.getMavenUri();
        MavenArtifact mavenArtifact=MavenUrlHelper.parseMvnUrl(moduleMvnUri,false);
        if (mavenArtifact != null) {
          String repositoryUrl=mavenArtifact.getRepositoryUrl();
          hasRepositoryUrl=StringUtils.isNotEmpty(repositoryUrl);
        }
        canDownload=isLicenseAccepted | hasRepositoryUrl;
        if (!canDownload) {
          subMonitor.worked(1);
          continue;
        }
        NexusDownloadHelperWithProgress downloader=new NexusDownloadHelperWithProgress(module);
        if (!module.getMavenUris().isEmpty()) {
          for (          String mvnUri : module.getMavenUris()) {
            if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatus(mvnUri)) {
              continue;
            }
            downloader.download(new URL(null,mvnUri,new Handler()),null,subMonitor.newChild(1));
          }
        }
 else {
          if (ELibraryInstallStatus.INSTALLED == ModuleStatusProvider.getStatus(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;
      }
      canDownload=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
  }
  if (checkLibraries) {
    ILibrariesService librariesService=(ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
    librariesService.checkLibraries();
  }
}