Program: 20999
Project: 20999
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  try {
    br.getPage(parameter);
    if (br.getRedirectLocation() != null)     br.getPage(br.getRedirectLocation());
    File captchaFile=null;
    String capTxt="String_Node_Str";
    String host=br.getHost();
    if (!host.startsWith("String_Node_Str")) {
      host="String_Node_Str" + host;
    }
    String pass=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
    if (pass == null)     pass=br.getRegex("String_Node_Str").getMatch(0);
    if (pass == null)     pass=br.getRegex("String_Node_Str").getMatch(0);
    if (pass != null) {
      if (pass.equals("String_Node_Str") || pass.equals("String_Node_Str") || pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")) {
        pass=null;
      }
    }
    String forms[][]=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatches();
    if (forms.length != 0) {
      for (      String[] element : forms) {
        for (int retry=0; retry < 5; retry++) {
          Matcher matcher=PAT_CAPTCHA.matcher(element[2]);
          if (matcher.find()) {
            logger.finest("String_Node_Str");
            String captchaAdress=host + new Regex(element[2],Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            capTxt=getCaptchaCode("String_Node_Str",captchaAdress,param);
            String posthelp=HTMLParser.getFormInputHidden(element[2]);
            if (element[0].startsWith("String_Node_Str")) {
              br.postPage(element[0],posthelp + "String_Node_Str" + capTxt);
            }
 else {
              br.postPage(host + element[0],posthelp + "String_Node_Str" + capTxt);
            }
          }
 else {
            Matcher matcher_no=PAT_NO_CAPTCHA.matcher(element[2]);
            if (matcher_no.find()) {
              logger.finest("String_Node_Str");
              String posthelp=HTMLParser.getFormInputHidden(element[2]);
              if (element[0].startsWith("String_Node_Str")) {
                br.postPage(element[0],posthelp);
              }
 else {
                br.postPage(host + element[0],posthelp);
              }
              break;
            }
          }
          if (br.containsHTML("String_Node_Str")) {
            logger.warning("String_Node_Str");
            br.getPage(parameter);
          }
 else {
            break;
          }
          if (br.getHttpConnection().getURL().toString().equals(host + element[0])) {
            break;
          }
        }
        if (br.containsHTML("String_Node_Str")) {
          Form forms2[]=br.getForms();
          for (          Form form : forms2) {
            if (form.containsHTML("String_Node_Str")) {
              File container=JDUtilities.getResourceFile("String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
              Browser.download(container,br.openFormConnection(form));
              decryptedLinks.addAll(JDUtilities.getController().getContainerLinks(container));
              break;
            }
          }
        }
 else {
          String links[]=null;
          if (br.containsHTML("String_Node_Str")) {
            String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            String temp2=Encoding.htmlDecode(Encoding.htmlDecode(Encoding.htmlDecode(temp)));
            links=new Regex(temp2,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
 else           if (br.containsHTML("String_Node_Str")) {
            String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            String temp2=Encoding.htmlDecode(Encoding.htmlDecode(temp));
            links=new Regex(temp2,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
 else {
            links=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
          for (          String element2 : links) {
            DownloadLink link=createDownloadlink(Encoding.htmlDecode(element2));
            link.addSourcePluginPassword(pass);
            decryptedLinks.add(link);
          }
        }
      }
    }
 else {
      String[] forms2=br.getRegex("String_Node_Str").getColumn(0);
      ArrayList<Form> forms3=new ArrayList<Form>();
      for (      String form : forms2) {
        String temp=form.replaceAll("String_Node_Str","String_Node_Str");
        Form tform=new Form(temp);
        tform.setAction(param.getCryptedUrl());
        tform.remove(null);
        tform.remove(null);
        forms3.add(tform);
      }
      boolean cont=false;
      Browser brc=null;
      for (      Form tform : forms3) {
        for (int retry=0; retry < 5; retry++) {
          brc=br.cloneBrowser();
          cont=false;
          if (tform.containsHTML("String_Node_Str")) {
            logger.finest("String_Node_Str");
            String captchaAdress=host + tform.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            captchaFile=getLocalCaptchaFile();
            Browser.download(captchaFile,captchaAdress);
            capTxt=getCaptchaCode("String_Node_Str",captchaFile,UserIO.NO_JAC,param,null,null);
            tform.put("String_Node_Str",capTxt);
            brc.submitForm(tform);
          }
 else {
            logger.finest("String_Node_Str");
            brc.submitForm(tform);
          }
          if (brc.containsHTML("String_Node_Str")) {
            cont=true;
            break;
          }
        }
        if (cont) {
          String[] links2=brc.getRegex("String_Node_Str").getColumn(0);
          for (          String dl : links2) {
            dl=dl.replaceAll("String_Node_Str","String_Node_Str");
            if (!dl.startsWith("String_Node_Str")) {
              Browser br2=br.cloneBrowser();
              br2.getPage(dl);
              String flink=br2.getRegex("String_Node_Str").getMatch(0);
              if (flink == null && br2.getRedirectLocation() != null) {
                dl=br2.getRedirectLocation();
              }
 else {
                dl=flink;
              }
            }
            DownloadLink link=createDownloadlink(dl);
            link.addSourcePluginPassword(pass);
            decryptedLinks.add(link);
          }
        }
      }
    }
  }
 catch (  PluginException e2) {
    throw e2;
  }
catch (  IOException e) {
    logger.log(java.util.logging.Level.SEVERE,"String_Node_Str",e);
    return null;
  }
  return decryptedLinks;
}

Fixed version (ground truth):
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  try {
    br.getPage(parameter);
    if (br.getRedirectLocation() != null)     br.getPage(br.getRedirectLocation());
    File captchaFile=null;
    String capTxt="String_Node_Str";
    String host=br.getHost();
    if (!host.startsWith("String_Node_Str")) {
      host="String_Node_Str" + host;
    }
    String pass=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
    if (pass == null)     pass=br.getRegex("String_Node_Str").getMatch(0);
    if (pass == null)     pass=br.getRegex("String_Node_Str").getMatch(0);
    if (pass == null)     pass=br.getRegex("String_Node_Str").getMatch(0);
    if (pass != null) {
      if (pass.equals("String_Node_Str") || pass.equals("String_Node_Str") || pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")|| pass.equals("String_Node_Str")) {
        pass=null;
      }
    }
    String forms[][]=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatches();
    if (forms.length != 0) {
      for (      String[] element : forms) {
        for (int retry=0; retry < 5; retry++) {
          Matcher matcher=PAT_CAPTCHA.matcher(element[2]);
          if (matcher.find()) {
            logger.finest("String_Node_Str");
            String captchaAdress=host + new Regex(element[2],Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            capTxt=getCaptchaCode("String_Node_Str",captchaAdress,param);
            String posthelp=HTMLParser.getFormInputHidden(element[2]);
            if (element[0].startsWith("String_Node_Str")) {
              br.postPage(element[0],posthelp + "String_Node_Str" + capTxt);
            }
 else {
              br.postPage(host + element[0],posthelp + "String_Node_Str" + capTxt);
            }
          }
 else {
            Matcher matcher_no=PAT_NO_CAPTCHA.matcher(element[2]);
            if (matcher_no.find()) {
              logger.finest("String_Node_Str");
              String posthelp=HTMLParser.getFormInputHidden(element[2]);
              if (element[0].startsWith("String_Node_Str")) {
                br.postPage(element[0],posthelp);
              }
 else {
                br.postPage(host + element[0],posthelp);
              }
              break;
            }
          }
          if (br.containsHTML("String_Node_Str")) {
            logger.warning("String_Node_Str");
            br.getPage(parameter);
          }
 else {
            break;
          }
          if (br.getHttpConnection().getURL().toString().equals(host + element[0])) {
            break;
          }
        }
        if (br.containsHTML("String_Node_Str")) {
          Form forms2[]=br.getForms();
          for (          Form form : forms2) {
            if (form.containsHTML("String_Node_Str")) {
              File container=JDUtilities.getResourceFile("String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
              Browser.download(container,br.openFormConnection(form));
              decryptedLinks.addAll(JDUtilities.getController().getContainerLinks(container));
              break;
            }
          }
        }
 else {
          String links[]=null;
          if (br.containsHTML("String_Node_Str")) {
            String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            String temp2=Encoding.htmlDecode(Encoding.htmlDecode(Encoding.htmlDecode(temp)));
            links=new Regex(temp2,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
 else           if (br.containsHTML("String_Node_Str")) {
            String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            String temp2=Encoding.htmlDecode(Encoding.htmlDecode(temp));
            links=new Regex(temp2,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
 else {
            links=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
          }
          for (          String element2 : links) {
            DownloadLink link=createDownloadlink(Encoding.htmlDecode(element2));
            link.addSourcePluginPassword(pass);
            decryptedLinks.add(link);
          }
        }
      }
    }
 else {
      String[] forms2=br.getRegex("String_Node_Str").getColumn(0);
      ArrayList<Form> forms3=new ArrayList<Form>();
      for (      String form : forms2) {
        String temp=form.replaceAll("String_Node_Str","String_Node_Str");
        Form tform=new Form(temp);
        tform.setAction(param.getCryptedUrl());
        tform.remove(null);
        tform.remove(null);
        forms3.add(tform);
      }
      boolean cont=false;
      Browser brc=null;
      for (      Form tform : forms3) {
        for (int retry=0; retry < 5; retry++) {
          brc=br.cloneBrowser();
          cont=false;
          if (tform.containsHTML("String_Node_Str")) {
            logger.finest("String_Node_Str");
            String captchaAdress=host + tform.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
            captchaFile=getLocalCaptchaFile();
            Browser.download(captchaFile,captchaAdress);
            capTxt=getCaptchaCode("String_Node_Str",captchaFile,UserIO.NO_JAC,param,null,null);
            tform.put("String_Node_Str",capTxt);
            brc.submitForm(tform);
          }
 else {
            logger.finest("String_Node_Str");
            brc.submitForm(tform);
          }
          if (brc.containsHTML("String_Node_Str")) {
            cont=true;
            break;
          }
        }
        if (cont) {
          String[] links2=brc.getRegex("String_Node_Str").getColumn(0);
          for (          String dl : links2) {
            dl=dl.replaceAll("String_Node_Str","String_Node_Str");
            if (!dl.startsWith("String_Node_Str")) {
              Browser br2=br.cloneBrowser();
              br2.getPage(dl);
              String flink=br2.getRegex("String_Node_Str").getMatch(0);
              if (flink == null && br2.getRedirectLocation() != null) {
                dl=br2.getRedirectLocation();
              }
 else {
                dl=flink;
              }
            }
            DownloadLink link=createDownloadlink(dl);
            link.addSourcePluginPassword(pass);
            decryptedLinks.add(link);
          }
        }
      }
    }
    if (decryptedLinks.size() == 0) {
      String[] links2=br.getRegex("String_Node_Str").getColumn(0);
      for (      String dl : links2) {
        DownloadLink link=createDownloadlink(dl);
        link.addSourcePluginPassword(pass);
        decryptedLinks.add(link);
      }
    }
  }
 catch (  PluginException e2) {
    throw e2;
  }
catch (  IOException e) {
    logger.log(java.util.logging.Level.SEVERE,"String_Node_Str",e);
    return null;
  }
  return decryptedLinks;
}