Program: 20863
Project: 20863
Buggy source:
/** 
 * try to force a downloadstart, will ignore maxperhost and maxdownloads limits
 */
public void forceDownload(final ArrayList<DownloadLink> links){
synchronized (DownloadLOCK) {
    for (    final DownloadLink link : links) {
      if (!link.getPlugin().isAGBChecked()) {
        try {
          SingleDownloadController.onErrorAGBNotSigned(link,link.getPlugin());
        }
 catch (        InterruptedException e) {
          return;
        }
      }
    }
synchronized (StartStopSync) {
      if (downloadStatus == STATE.NOT_RUNNING || downloadStatus == STATE.RUNNING) {
        startDownloads();
      }
 else {
        return;
      }
    }
    for (    final DownloadLink link : links) {
      if (!link.getLinkStatus().hasStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE)) {
        if (link.getPlugin().isPremiumDownload() || (getRemainingIPBlockWaittime(link.getHost()) <= 0 && getRemainingTempUnavailWaittime(link.getHost()) <= 0)) {
          if (!isDownloadLinkActive(link)) {
            if (!link.getLinkStatus().isPluginActive()) {
              if (link.getLinkStatus().isStatus(LinkStatus.TODO)) {
                int activePerHost=activeDownloadsbyHosts(link.getPlugin());
                if (activePerHost < (link.getPlugin()).getMaxSimultanDownloadNum() && link.getPlugin().getWrapper().isEnabled()) {
                  if (!link.isEnabled())                   link.setEnabled(true);
                  startDownloadThread(link);
                }
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * try to force a downloadstart, will ignore maxperhost and maxdownloads limits
 */
public void forceDownload(final ArrayList<DownloadLink> linksForce){
synchronized (DownloadLOCK) {
    ArrayList<DownloadLink> links=new ArrayList<DownloadLink>();
    for (    final DownloadLink link : linksForce) {
      if (link.getPlugin() != null)       links.add(link);
    }
    for (    final DownloadLink link : links) {
      if (!link.getPlugin().isAGBChecked()) {
        try {
          SingleDownloadController.onErrorAGBNotSigned(link,link.getPlugin());
        }
 catch (        InterruptedException e) {
          return;
        }
      }
    }
synchronized (StartStopSync) {
      if (downloadStatus == STATE.NOT_RUNNING || downloadStatus == STATE.RUNNING) {
        startDownloads();
      }
 else {
        return;
      }
    }
    for (    final DownloadLink link : links) {
      if (!link.getLinkStatus().hasStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE)) {
        if (link.getPlugin().isPremiumDownload() || (getRemainingIPBlockWaittime(link.getHost()) <= 0 && getRemainingTempUnavailWaittime(link.getHost()) <= 0)) {
          if (!isDownloadLinkActive(link)) {
            if (!link.getLinkStatus().isPluginActive()) {
              if (link.getLinkStatus().isStatus(LinkStatus.TODO)) {
                int activePerHost=activeDownloadsbyHosts(link.getPlugin());
                if (activePerHost < (link.getPlugin()).getMaxSimultanDownloadNum() && link.getPlugin().getWrapper().isEnabled()) {
                  if (!link.isEnabled())                   link.setEnabled(true);
                  startDownloadThread(link);
                }
              }
            }
          }
        }
      }
    }
  }
}