Program: 127143
Project: 127143
Buggy source:
private void downLoad(final IProgressMonitor monitor){
  SubMonitor subMonitor=SubMonitor.convert(monitor,Messages.getString("String_Node_Str"),toDownload.size() + 1);
  final List<URL> downloadOk=new ArrayList<URL>();
  for (  final ModuleToInstall module : toDownload) {
    if (!monitor.isCanceled()) {
      monitor.subTask(module.getName());
      String librariesPath=LibrariesManagerUtils.getLibrariesPath(ECodeLanguage.JAVA);
      File target=new File(librariesPath);
      boolean accepted;
      if (module.getUrl_download() != null && !"String_Node_Str".equals(module.getUrl_download())) {
        try {
          boolean isLicenseAccepted=LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType());
          accepted=isLicenseAccepted;
          if (!accepted) {
            subMonitor.worked(1);
            continue;
          }
          if (monitor.isCanceled()) {
            return;
          }
          File destination=new File(target.toString() + File.separator + module.getName());
          DownloadHelperWithProgress downloader=new DownloadHelperWithProgress();
          downloader.download(new URL(module.getUrl_download()),destination,subMonitor.newChild(1));
          downloadOk.add(destination.toURI().toURL());
          installedModules.add(module.getName());
        }
 catch (        Exception e) {
          downloadFailed.add(module.getName());
          ExceptionHandler.process(e);
          continue;
        }
      }
      accepted=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
  }
  if (!downloadOk.isEmpty()) {
    try {
      LibManagerUiPlugin.getDefault().getLibrariesService().deployLibrarys(downloadOk.toArray(new URL[downloadOk.size()]));
    }
 catch (    IOException e) {
      ExceptionHandler.process(e);
    }
  }
  subMonitor.worked(1);
}

Fixed version (ground truth):
private void downLoad(final IProgressMonitor monitor){
  SubMonitor subMonitor=SubMonitor.convert(monitor,Messages.getString("String_Node_Str"),toDownload.size() + 1);
  final List<URL> downloadOk=new ArrayList<URL>();
  for (  final ModuleToInstall module : toDownload) {
    if (!monitor.isCanceled()) {
      monitor.subTask(module.getName());
      String librariesPath=LibrariesManagerUtils.getLibrariesPath(ECodeLanguage.JAVA);
      File target=new File(librariesPath);
      boolean accepted;
      if (module.getUrl_download() != null && !"String_Node_Str".equals(module.getUrl_download())) {
        try {
          boolean isLicenseAccepted=LibManagerUiPlugin.getDefault().getPreferenceStore().getBoolean(module.getLicenseType());
          accepted=isLicenseAccepted;
          if (!accepted) {
            subMonitor.worked(1);
            continue;
          }
          if (monitor.isCanceled()) {
            return;
          }
          File destination=new File(target.toString() + File.separator + module.getName());
          File destinationTemp=target.createTempFile(destination.getName(),"String_Node_Str");
          DownloadHelperWithProgress downloader=new DownloadHelperWithProgress();
          downloader.download(new URL(module.getUrl_download()),destinationTemp,subMonitor.newChild(1));
          if (!monitor.isCanceled()) {
            FilesUtils.copyFile(destinationTemp,destination);
            downloadOk.add(destination.toURI().toURL());
            installedModules.add(module.getName());
          }
          if (destinationTemp.exists()) {
            destinationTemp.delete();
          }
        }
 catch (        Exception e) {
          downloadFailed.add(module.getName());
          ExceptionHandler.process(e);
          continue;
        }
      }
      accepted=false;
    }
 else {
      downloadFailed.add(module.getName());
    }
  }
  if (!downloadOk.isEmpty()) {
    try {
      LibManagerUiPlugin.getDefault().getLibrariesService().deployLibrarys(downloadOk.toArray(new URL[downloadOk.size()]));
    }
 catch (    IOException e) {
      ExceptionHandler.process(e);
    }
  }
  subMonitor.worked(1);
}