Program: 20691
Project: 20691
Buggy source:
@Override public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  String passCode=null;
  checkErrors(link,false,passCode,false);
  if (br.containsHTML("String_Node_Str")) {
    logger.info("String_Node_Str");
    Form freeform=null;
    Form[] allForms=br.getForms();
    if (allForms == null || allForms.length == 0)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    for (    Form ff : allForms) {
      if (ff.containsHTML("String_Node_Str")) {
        freeform=ff;
        break;
      }
    }
    if (freeform == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    freeform.remove("String_Node_Str");
    wait(link);
    br.submitForm(freeform);
  }
  String linkurl=br.getRegex("String_Node_Str").getMatch(0);
  if (linkurl == null) {
    checkErrors(link,false,passCode,false);
    br.setFollowRedirects(false);
    boolean password=false;
    if (br.containsHTML(PASSWORDTEXT0) || br.containsHTML(PASSWORDTEXT1)) {
      password=true;
      logger.info("String_Node_Str");
    }
    Form dlform=null;
    Form[] forms=br.getForms();
    if (forms == null || forms.length == 0)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    for (    Form singleForm : forms)     if (singleForm.containsHTML(link.getName())) {
      dlform=singleForm;
      break;
    }
    if (dlform == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    dlform.setAction(link.getDownloadURL());
    dlform.remove("String_Node_Str");
    String cryptedScript=br.getRegex("String_Node_Str").getMatch(0);
    if (cryptedScript == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    String date=unpackJS(cryptedScript);
    if (date == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    date=execJS(date);
    if (date == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    dlform.put("String_Node_Str",date);
    if (password) {
      logger.info("String_Node_Str");
      passCode=handlePassword(passCode,dlform,link);
      dlform.put("String_Node_Str",passCode);
      logger.info("String_Node_Str" + passCode + "String_Node_Str");
    }
    wait(link);
    br.submitForm(dlform);
    Form finalForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
    if (finalForm != null) {
      if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str")) {
        logger.info("String_Node_Str");
        PluginForHost recplug=JDUtilities.getPluginForHost("String_Node_Str");
        jd.plugins.hoster.DirectHTTP.Recaptcha rc=((DirectHTTP)recplug).getReCaptcha(br);
        rc.setForm(finalForm);
        rc.findID();
        rc.load();
        File cf=rc.downloadCaptcha(getLocalCaptchaFile());
        String c=getCaptchaCode(cf,link);
        if (password) {
          passCode=handlePassword(passCode,rc.getForm(),link);
        }
        rc.prepareForm(c);
        finalForm=rc.getForm();
        logger.info("String_Node_Str" + c + "String_Node_Str");
      }
      logger.info("String_Node_Str");
      finalForm.setAction(link.getDownloadURL());
      finalForm.put("String_Node_Str",Integer.toString(new Random().nextInt(100)));
      finalForm.put("String_Node_Str",Integer.toString(new Random().nextInt(100)));
      br.submitForm(finalForm);
    }
    checkErrors(link,true,passCode,false);
    linkurl=br.getRedirectLocation();
    if (linkurl == null)     linkurl=getDllink();
    if (passCode != null) {
      link.setProperty("String_Node_Str",passCode);
    }
    if (linkurl == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,linkurl,true,1);
  if (dl.getConnection().getContentType().contains("String_Node_Str")) {
    logger.warning("String_Node_Str");
    br.followConnection();
    checkServerErrors();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  String passCode=null;
  checkErrors(link,false,passCode,false);
  if (br.containsHTML("String_Node_Str")) {
    logger.info("String_Node_Str");
    Form freeform=null;
    Form[] allForms=br.getForms();
    if (allForms == null || allForms.length == 0)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    for (    Form ff : allForms) {
      if (ff.containsHTML("String_Node_Str")) {
        freeform=ff;
        break;
      }
    }
    if (freeform == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    freeform.remove("String_Node_Str");
    wait(link);
    br.submitForm(freeform);
  }
  String linkurl=br.getRegex("String_Node_Str").getMatch(0);
  if (linkurl == null) {
    checkErrors(link,false,passCode,false);
    br.setFollowRedirects(false);
    boolean password=false;
    if (br.containsHTML(PASSWORDTEXT0) || br.containsHTML(PASSWORDTEXT1)) {
      password=true;
      logger.info("String_Node_Str");
    }
    Form dlform=null;
    Form[] forms=br.getForms();
    if (forms == null || forms.length == 0)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    for (    Form singleForm : forms)     if (singleForm.containsHTML(link.getName())) {
      dlform=singleForm;
      break;
    }
    if (dlform == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    dlform.setAction(link.getDownloadURL());
    dlform.remove("String_Node_Str");
    String cryptedScript=br.getRegex("String_Node_Str").getMatch(0);
    if (cryptedScript == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    String date=unpackJS(cryptedScript);
    if (date == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    date=execJS(date);
    if (date == null) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    dlform.put("String_Node_Str",date);
    if (password) {
      logger.info("String_Node_Str");
      passCode=handlePassword(passCode,dlform,link);
      dlform.put("String_Node_Str",passCode);
      logger.info("String_Node_Str" + passCode + "String_Node_Str");
    }
    wait(link);
    br.submitForm(dlform);
    Form finalForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
    if (finalForm != null) {
      if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str")) {
        logger.info("String_Node_Str");
        PluginForHost recplug=JDUtilities.getPluginForHost("String_Node_Str");
        jd.plugins.hoster.DirectHTTP.Recaptcha rc=((DirectHTTP)recplug).getReCaptcha(br);
        rc.setForm(finalForm);
        String id=this.br.getRegex("String_Node_Str").getMatch(0);
        rc.setId(id);
        rc.load();
        File cf=rc.downloadCaptcha(getLocalCaptchaFile());
        String c=getCaptchaCode(cf,link);
        if (password) {
          passCode=handlePassword(passCode,rc.getForm(),link);
        }
        rc.prepareForm(c);
        finalForm=rc.getForm();
        logger.info("String_Node_Str" + c + "String_Node_Str");
      }
      logger.info("String_Node_Str");
      finalForm.setAction(link.getDownloadURL());
      finalForm.put("String_Node_Str",Integer.toString(new Random().nextInt(100)));
      finalForm.put("String_Node_Str",Integer.toString(new Random().nextInt(100)));
      br.submitForm(finalForm);
    }
    checkErrors(link,true,passCode,false);
    linkurl=br.getRedirectLocation();
    if (linkurl == null)     linkurl=getDllink();
    if (passCode != null) {
      link.setProperty("String_Node_Str",passCode);
    }
    if (linkurl == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,linkurl,true,1);
  if (dl.getConnection().getContentType().contains("String_Node_Str")) {
    logger.warning("String_Node_Str");
    br.followConnection();
    checkServerErrors();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}