Program: 20753
Project: 20753
Buggy source:
@Override public void handlePremium(DownloadLink link,Account account) throws Exception {
  String passCode=null;
  requestFileInformation(link);
  login(account);
  String dllink=link.getStringProperty("String_Node_Str");
  URLConnectionAdapter con=null;
  boolean generateLink=true;
  if (dllink != null) {
    con=br.openGetConnection(dllink);
    if (!con.getContentType().contains("String_Node_Str")) {
      logger.info("String_Node_Str");
      generateLink=false;
    }
 else {
      logger.info("String_Node_Str");
    }
  }
  if (con != null)   con.disconnect();
  if (generateLink) {
    br.setFollowRedirects(false);
    br.getPage(link.getDownloadURL());
    if (nopremium) {
      doFree(link);
    }
 else {
      dllink=br.getRedirectLocation();
      if (dllink == null) {
        if (br.containsHTML("String_Node_Str")) {
          String errormessage="String_Node_Str";
          errormessage=br.getRegex("String_Node_Str").getMatch(0);
          if (errormessage != null)           logger.warning(errormessage);
          link.getLinkStatus().setStatusText(errormessage);
          throw new PluginException(LinkStatus.ERROR_PREMIUM,errormessage,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
        }
        Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
        if (DLForm == null)         throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
        if (br.containsHTML("String_Node_Str")) {
          if (link.getStringProperty("String_Node_Str",null) == null) {
            passCode=Plugin.getUserInput("String_Node_Str",link);
          }
 else {
            passCode=link.getStringProperty("String_Node_Str",null);
          }
          DLForm.put("String_Node_Str",passCode);
          logger.info("String_Node_Str" + passCode + "String_Node_Str");
        }
        br.submitForm(DLForm);
        if (br.containsHTML("String_Node_Str")) {
          String tmphrs=br.getRegex("String_Node_Str").getMatch(0);
          String tmpmin=br.getRegex("String_Node_Str").getMatch(0);
          String tmpsec=br.getRegex("String_Node_Str").getMatch(0);
          String tmpdays=br.getRegex("String_Node_Str").getMatch(0);
          if (tmphrs == null && tmpmin == null && tmpsec == null && tmpdays == null) {
            throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,60 * 60 * 1000l);
          }
 else {
            int minutes=0, seconds=0, hours=0, days=0;
            if (tmphrs != null)             hours=Integer.parseInt(tmphrs);
            if (tmpmin != null)             minutes=Integer.parseInt(tmpmin);
            if (tmpsec != null)             seconds=Integer.parseInt(tmpsec);
            if (tmpdays != null)             days=Integer.parseInt(tmpdays);
            int waittime=((days * 24 * 3600) + (3600 * hours) + (60 * minutes)+ seconds+ 1) * 1000;
            logger.info("String_Node_Str" + waittime + "String_Node_Str");
            throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,waittime);
          }
        }
        dllink=br.getRedirectLocation();
        if (dllink == null) {
          if (br.containsHTML("String_Node_Str")) {
            logger.warning("String_Node_Str" + passCode + "String_Node_Str");
            link.setProperty("String_Node_Str",null);
            throw new PluginException(LinkStatus.ERROR_RETRY);
          }
          if (dllink == null) {
            dllink=br.getRegex("String_Node_Str").getMatch(0);
            if (dllink == null) {
              dllink=br.getRegex("String_Node_Str").getMatch(0);
            }
          }
        }
      }
      if (dllink == null) {
        if (br.containsHTML("String_Node_Str"))         throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
        logger.warning("String_Node_Str");
        throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
      }
      link.setProperty("String_Node_Str",dllink);
    }
  }
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,-15);
  if (passCode != null) {
    link.setProperty("String_Node_Str",passCode);
  }
  if (!(dl.getConnection().isContentDisposition())) {
    logger.warning("String_Node_Str");
    br.followConnection();
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handlePremium(DownloadLink link,Account account) throws Exception {
  String passCode=null;
  requestFileInformation(link);
  login(account);
  String dllink=link.getStringProperty("String_Node_Str");
  URLConnectionAdapter con=null;
  boolean generateLink=true;
  if (dllink != null) {
    con=br.openGetConnection(dllink);
    if (!con.getContentType().contains("String_Node_Str")) {
      logger.info("String_Node_Str");
      generateLink=false;
    }
 else {
      logger.info("String_Node_Str");
    }
  }
  if (con != null)   con.disconnect();
  if (generateLink) {
    br.setFollowRedirects(false);
    br.getPage(link.getDownloadURL());
    if (nopremium) {
      doFree(link);
    }
 else {
      dllink=br.getRedirectLocation();
      if (dllink == null) {
        if (br.containsHTML("String_Node_Str")) {
          String errormessage="String_Node_Str";
          errormessage=br.getRegex("String_Node_Str").getMatch(0);
          if (errormessage != null)           logger.warning(errormessage);
          link.getLinkStatus().setStatusText(errormessage);
          throw new PluginException(LinkStatus.ERROR_PREMIUM,errormessage,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
        }
        Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
        if (DLForm == null)         throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
        if (br.containsHTML("String_Node_Str")) {
          if (link.getStringProperty("String_Node_Str",null) == null) {
            passCode=Plugin.getUserInput("String_Node_Str",link);
          }
 else {
            passCode=link.getStringProperty("String_Node_Str",null);
          }
          DLForm.put("String_Node_Str",passCode);
          logger.info("String_Node_Str" + passCode + "String_Node_Str");
        }
        br.submitForm(DLForm);
        if (br.containsHTML("String_Node_Str")) {
          String tmphrs=br.getRegex("String_Node_Str").getMatch(0);
          String tmpmin=br.getRegex("String_Node_Str").getMatch(0);
          String tmpsec=br.getRegex("String_Node_Str").getMatch(0);
          String tmpdays=br.getRegex("String_Node_Str").getMatch(0);
          if (tmphrs == null && tmpmin == null && tmpsec == null && tmpdays == null) {
            throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,60 * 60 * 1000l);
          }
 else {
            int minutes=0, seconds=0, hours=0, days=0;
            if (tmphrs != null)             hours=Integer.parseInt(tmphrs);
            if (tmpmin != null)             minutes=Integer.parseInt(tmpmin);
            if (tmpsec != null)             seconds=Integer.parseInt(tmpsec);
            if (tmpdays != null)             days=Integer.parseInt(tmpdays);
            int waittime=((days * 24 * 3600) + (3600 * hours) + (60 * minutes)+ seconds+ 1) * 1000;
            logger.info("String_Node_Str" + waittime + "String_Node_Str");
            throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,waittime);
          }
        }
        dllink=br.getRedirectLocation();
        if (dllink == null) {
          if (br.containsHTML("String_Node_Str")) {
            logger.warning("String_Node_Str" + passCode + "String_Node_Str");
            link.setProperty("String_Node_Str",null);
            throw new PluginException(LinkStatus.ERROR_RETRY);
          }
          if (dllink == null) {
            dllink=br.getRegex("String_Node_Str").getMatch(0);
            if (dllink == null) {
              dllink=br.getRegex("String_Node_Str").getMatch(0);
            }
          }
        }
      }
      if (dllink == null) {
        if (br.containsHTML("String_Node_Str"))         throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
        logger.warning("String_Node_Str");
        throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
      }
      link.setProperty("String_Node_Str",dllink);
    }
  }
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,-15);
  if (passCode != null) {
    link.setProperty("String_Node_Str",passCode);
  }
  if (!(dl.getConnection().isContentDisposition()) && dl.getConnection().getContentType() != null && !dl.getConnection().getContentType().contains("String_Node_Str")) {
    logger.warning("String_Node_Str");
    br.followConnection();
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}