Program: 21265
Project: 21265
Buggy source:
/** 
 * premiumdownload Methode
 * @param step
 * @param downloadLink
 * @return
 */
public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  if (downloadLink.getDownloadURL().matches("String_Node_Str")) {
    ((PluginForHost)PluginWrapper.getNewInstance("String_Node_Str")).handleFree(downloadLink);
    return;
  }
  if (downloadLink.getLinkType() == DownloadLink.LINKTYPE_CONTAINER) {
    if (Sniffy.hasSniffer())     throw new SnifferException();
  }
  Rapidshare.correctURL(downloadLink);
  checkMirrorsInProgress(downloadLink);
  br.setCookiesExclusive(true);
  br.clearCookies("String_Node_Str");
  br.setAcceptLanguage(ACCEPT_LANGUAGE);
  br.setFollowRedirects(false);
  br.setAuth(null,account.getUser().trim(),account.getPass().trim());
  Request request=br.createGetRequest(downloadLink.getDownloadURL());
  dl=new RAFDownload(this,downloadLink,request);
  dl.setResume(true);
  dl.setChunkNum(JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_DOWNLOAD_MAX_CHUNKS,2));
  HTTPConnection urlConnection;
  try {
    urlConnection=dl.connect();
  }
 catch (  Exception e) {
    br.setRequest(request);
    request=br.createGetRequest(null);
    dl=new RAFDownload(this,downloadLink,request);
    dl.setResume(true);
    dl.setChunkNum(JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_DOWNLOAD_MAX_CHUNKS,2));
    urlConnection=dl.connect();
  }
  if (!urlConnection.isContentDisposition() && urlConnection.getHeaderField("String_Node_Str") != null) {
    br.setRequest(request);
    br.followConnection();
    String error;
    if ((error=findError(br.toString())) != null) {
      logger.warning(error);
      if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_TEMP_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_TEMP_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
      }
 else {
        throw new PluginException(LinkStatus.ERROR_FATAL,error);
      }
    }
 else {
      reportUnknownError(br.toString(),6);
      throw new PluginException(LinkStatus.ERROR_RETRY);
    }
  }
  dl.startDownload();
}

Fixed version (ground truth):
/** 
 * premiumdownload Methode
 * @param step
 * @param downloadLink
 * @return
 */
public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  if (downloadLink.getDownloadURL().matches("String_Node_Str")) {
    ((PluginForHost)PluginWrapper.getNewInstance("String_Node_Str")).handleFree(downloadLink);
    return;
  }
  if (downloadLink.getLinkType() == DownloadLink.LINKTYPE_CONTAINER) {
    if (Sniffy.hasSniffer())     throw new SnifferException();
  }
  Rapidshare.correctURL(downloadLink);
  checkMirrorsInProgress(downloadLink);
  br.setCookiesExclusive(true);
  br.clearCookies("String_Node_Str");
  br.setAcceptLanguage(ACCEPT_LANGUAGE);
  br.setFollowRedirects(false);
  br.setDebug(true);
  br.setAuth(null,account.getUser().trim(),account.getPass().trim());
  Request request=br.createGetRequest(downloadLink.getDownloadURL());
  dl=new RAFDownload(this,downloadLink,request);
  dl.setResume(true);
  dl.setChunkNum(JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_DOWNLOAD_MAX_CHUNKS,2));
  HTTPConnection urlConnection;
  try {
    urlConnection=dl.connect();
  }
 catch (  Exception e) {
    br.setRequest(request);
    request=br.createGetRequest(null);
    dl=new RAFDownload(this,downloadLink,request);
    dl.setResume(true);
    dl.setChunkNum(JDUtilities.getSubConfig("String_Node_Str").getIntegerProperty(Configuration.PARAM_DOWNLOAD_MAX_CHUNKS,2));
    urlConnection=dl.connect();
  }
  if (!urlConnection.isContentDisposition() && urlConnection.getHeaderField("String_Node_Str") != null) {
    br.setRequest(request);
    br.followConnection();
    String error;
    if ((error=findError(br.toString())) != null) {
      logger.warning(error);
      if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_TEMP_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_TEMP_DISABLE);
      }
 else       if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
        throw new PluginException(LinkStatus.ERROR_PREMIUM,error,LinkStatus.VALUE_ID_PREMIUM_DISABLE);
      }
 else {
        throw new PluginException(LinkStatus.ERROR_FATAL,error);
      }
    }
 else {
      reportUnknownError(br.toString(),6);
      throw new PluginException(LinkStatus.ERROR_RETRY);
    }
  }
  dl.startDownload();
}