Program: 21261
Project: 21261
Buggy source:
/** 
 * Startet den Download. Nach dem Aufruf dieser Funktion können keine Downlaodparameter mehr gesetzt werden bzw bleiben wirkungslos.
 * @return
 * @throws Exception
 */
public boolean startDownload() throws Exception {
  if (!connected)   connect();
  DownloadLink block=JDUtilities.getController().getLinkThatBlocks(downloadLink);
  downloadLink.getLinkStatus().setStatusText(null);
  if (connection.getHeaderField("String_Node_Str") != null) {
    error(LinkStatus.ERROR_PLUGIN_DEFEKT,"String_Node_Str");
    return false;
  }
  if (block != null) {
    logger.severe("String_Node_Str" + downloadLink.getFileOutput());
    error(LinkStatus.ERROR_LINK_IN_PROGRESS,String.format(JDLocale.L("String_Node_Str","String_Node_Str"),block.getPlugin().getHost()));
    if (!handleErrors()) {
      return false;
    }
  }
  File fileOutput=new File(downloadLink.getFileOutput());
  if (fileOutput.getParentFile() == null) {
    error(LinkStatus.ERROR_FATAL,JDLocale.L("String_Node_Str","String_Node_Str"));
    if (!handleErrors()) {
      return false;
    }
  }
  if (!fileOutput.getParentFile().exists()) {
    fileOutput.getParentFile().mkdirs();
  }
  loop:   if (fileOutput.exists()) {
    logger.severe("String_Node_Str" + fileOutput);
    if (this.downloadLink.getLinkType() == DownloadLink.LINKTYPE_JDU) {
      if (new File(downloadLink.getFileOutput()).delete()) {
        logger.severe("String_Node_Str");
        break loop;
      }
 else {
        error(LinkStatus.ERROR_FATAL,JDLocale.L("String_Node_Str","String_Node_Str"));
        if (!handleErrors()) {
          return false;
        }
      }
    }
    if (JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_FILE_EXISTS) == 0) {
      if (new File(downloadLink.getFileOutput()).delete()) {
        logger.severe("String_Node_Str");
      }
 else {
        error(LinkStatus.ERROR_ALREADYEXISTS,JDLocale.L("String_Node_Str","String_Node_Str"));
        if (!handleErrors()) {
          return false;
        }
      }
    }
 else {
      error(LinkStatus.ERROR_ALREADYEXISTS,null);
      if (!handleErrors()) {
        return false;
      }
    }
  }
  try {
    linkStatus.addStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    setupChunks();
    waitForChunks();
    onChunksReady();
    linkStatus.removeStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    if (!handleErrors()) {
      return false;
    }
 else {
      return true;
    }
  }
 catch (  Exception e) {
    handleErrors();
    linkStatus.removeStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Startet den Download. Nach dem Aufruf dieser Funktion können keine Downlaodparameter mehr gesetzt werden bzw bleiben wirkungslos.
 * @return
 * @throws Exception
 */
public boolean startDownload() throws Exception {
  if (!connected)   connect();
  DownloadLink block=JDUtilities.getController().getLinkThatBlocks(downloadLink);
  downloadLink.getLinkStatus().setStatusText(null);
  if (connection == null || !connection.isOK()) {
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  if (connection.getHeaderField("String_Node_Str") != null) {
    error(LinkStatus.ERROR_PLUGIN_DEFEKT,"String_Node_Str");
    return false;
  }
  if (block != null) {
    logger.severe("String_Node_Str" + downloadLink.getFileOutput());
    error(LinkStatus.ERROR_LINK_IN_PROGRESS,String.format(JDLocale.L("String_Node_Str","String_Node_Str"),block.getPlugin().getHost()));
    if (!handleErrors()) {
      return false;
    }
  }
  File fileOutput=new File(downloadLink.getFileOutput());
  if (fileOutput.getParentFile() == null) {
    error(LinkStatus.ERROR_FATAL,JDLocale.L("String_Node_Str","String_Node_Str"));
    if (!handleErrors()) {
      return false;
    }
  }
  if (!fileOutput.getParentFile().exists()) {
    fileOutput.getParentFile().mkdirs();
  }
  loop:   if (fileOutput.exists()) {
    logger.severe("String_Node_Str" + fileOutput);
    if (this.downloadLink.getLinkType() == DownloadLink.LINKTYPE_JDU) {
      if (new File(downloadLink.getFileOutput()).delete()) {
        logger.severe("String_Node_Str");
        break loop;
      }
 else {
        error(LinkStatus.ERROR_FATAL,JDLocale.L("String_Node_Str","String_Node_Str"));
        if (!handleErrors()) {
          return false;
        }
      }
    }
    if (JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_FILE_EXISTS) == 0) {
      if (new File(downloadLink.getFileOutput()).delete()) {
        logger.severe("String_Node_Str");
      }
 else {
        error(LinkStatus.ERROR_ALREADYEXISTS,JDLocale.L("String_Node_Str","String_Node_Str"));
        if (!handleErrors()) {
          return false;
        }
      }
    }
 else {
      error(LinkStatus.ERROR_ALREADYEXISTS,null);
      if (!handleErrors()) {
        return false;
      }
    }
  }
  try {
    linkStatus.addStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    setupChunks();
    waitForChunks();
    onChunksReady();
    linkStatus.removeStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    if (!handleErrors()) {
      return false;
    }
 else {
      return true;
    }
  }
 catch (  Exception e) {
    handleErrors();
    linkStatus.removeStatus(LinkStatus.DOWNLOADINTERFACE_IN_PROGRESS);
    return false;
  }
}