Program: 20795
Project: 20795
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  progress.getBroadcaster().addListener(this);
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  br.getPage(parameter);
  if (br.containsHTML("String_Node_Str") || parameter.matches("String_Node_Str")) {
    if (parameter.matches("String_Node_Str")) {
      getfpName();
      if (fpName != null) {
        DownloadLink dl=createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
        dl.setName(fpName);
        br.getPage(parameter);
        String dllink=br.getRegex("String_Node_Str").getMatch(0);
        if (dllink != null) {
          dllink=dllink.replace("String_Node_Str","String_Node_Str");
          URLConnectionAdapter con=br.openGetConnection(dllink);
          if (!con.getContentType().contains("String_Node_Str")) {
            String ending=LoadImage.getFileType(dllink,con.getContentType());
            if (ending != null)             dl.setFinalFileName(dl.getName() + ending);
            long size=con.getLongContentLength();
            if (size != 0) {
              dl.setDownloadSize(con.getLongContentLength());
              dl.setAvailable(true);
            }
          }
        }
        decryptedLinks.add(dl);
      }
 else {
        decryptedLinks.add(createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
      }
    }
 else {
      getfpName();
      String[] links=br.getRegex("String_Node_Str").getColumn(0);
      if (links == null || links.length == 0)       return null;
      progress.setRange(links.length);
      if (fpName != null) {
        int counter=1;
        for (        String photolink : links) {
          if (abort) {
            progress.setColor(Color.RED);
            progress.setStatusText(progress.getStatusText() + "String_Node_Str" + JDL.L("String_Node_Str","String_Node_Str"));
            progress.doFinalize(5000l);
            return new ArrayList<DownloadLink>();
          }
          DownloadLink dl=createDownloadlink(photolink.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
          dl.setName(fpName + "String_Node_Str" + counter);
          br.getPage(photolink);
          String dllink=br.getRegex("String_Node_Str").getMatch(0);
          if (dllink != null) {
            dllink=dllink.replace("String_Node_Str","String_Node_Str");
            URLConnectionAdapter con=br.openGetConnection(dllink);
            if (!con.getContentType().contains("String_Node_Str")) {
              String ending=LoadImage.getFileType(dllink,con.getContentType());
              if (ending != null)               dl.setFinalFileName(dl.getName() + ending);
              long size=con.getLongContentLength();
              if (size != 0) {
                dl.setDownloadSize(con.getLongContentLength());
                dl.setAvailable(true);
              }
            }
          }
          decryptedLinks.add(dl);
          counter=counter + 1;
          progress.increase(1);
        }
      }
 else {
        for (        String photolink : links) {
          decryptedLinks.add(createDownloadlink(photolink.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
        }
      }
      if (fpName != null) {
        FilePackage fp=FilePackage.getInstance();
        fp.setName(fpName.trim());
        fp.addLinks(decryptedLinks);
      }
    }
  }
 else {
    getfpName();
    if (fpName != null) {
      String dllink=br.getRegex("String_Node_Str").getMatch(0);
      if (dllink == null)       dllink=new Regex(Encoding.htmlDecode(br.toString()),"String_Node_Str").getMatch(0);
      DownloadLink dl=createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
      dl.setFinalFileName(fpName + "String_Node_Str");
      if (dllink != null) {
        dllink=Encoding.htmlDecode(dllink.replace("String_Node_Str","String_Node_Str"));
        URLConnectionAdapter con=br.openGetConnection(dllink);
        if (!con.getContentType().contains("String_Node_Str")) {
          long size=con.getLongContentLength();
          if (size != 0) {
            dl.setDownloadSize(con.getLongContentLength());
            dl.setAvailable(true);
          }
        }
      }
      decryptedLinks.add(dl);
    }
 else {
      decryptedLinks.add(createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
    }
  }
  return decryptedLinks;
}

Fixed version (ground truth):
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  try {
    progress.getBroadcaster().addListener(this);
  }
 catch (  Throwable e) {
  }
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  br.getPage(parameter);
  if (br.containsHTML("String_Node_Str") || parameter.matches("String_Node_Str")) {
    if (parameter.matches("String_Node_Str")) {
      getfpName();
      if (fpName != null) {
        DownloadLink dl=createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
        dl.setName(fpName);
        br.getPage(parameter);
        String dllink=br.getRegex("String_Node_Str").getMatch(0);
        if (dllink != null) {
          dllink=dllink.replace("String_Node_Str","String_Node_Str");
          URLConnectionAdapter con=br.openGetConnection(dllink);
          if (!con.getContentType().contains("String_Node_Str")) {
            String ending=LoadImage.getFileType(dllink,con.getContentType());
            if (ending != null)             dl.setFinalFileName(dl.getName() + ending);
            long size=con.getLongContentLength();
            if (size != 0) {
              dl.setDownloadSize(con.getLongContentLength());
              dl.setAvailable(true);
            }
          }
        }
        decryptedLinks.add(dl);
      }
 else {
        decryptedLinks.add(createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
      }
    }
 else {
      getfpName();
      String[] links=br.getRegex("String_Node_Str").getColumn(0);
      if (links == null || links.length == 0)       return null;
      progress.setRange(links.length);
      if (fpName != null) {
        int counter=1;
        for (        String photolink : links) {
          if (abort) {
            progress.setColor(Color.RED);
            progress.setStatusText(progress.getStatusText() + "String_Node_Str" + JDL.L("String_Node_Str","String_Node_Str"));
            progress.doFinalize(5000l);
            return new ArrayList<DownloadLink>();
          }
          DownloadLink dl=createDownloadlink(photolink.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
          dl.setName(fpName + "String_Node_Str" + counter);
          br.getPage(photolink);
          String dllink=br.getRegex("String_Node_Str").getMatch(0);
          if (dllink != null) {
            dllink=dllink.replace("String_Node_Str","String_Node_Str");
            URLConnectionAdapter con=br.openGetConnection(dllink);
            if (!con.getContentType().contains("String_Node_Str")) {
              String ending=LoadImage.getFileType(dllink,con.getContentType());
              if (ending != null)               dl.setFinalFileName(dl.getName() + ending);
              long size=con.getLongContentLength();
              if (size != 0) {
                dl.setDownloadSize(con.getLongContentLength());
                dl.setAvailable(true);
              }
            }
          }
          decryptedLinks.add(dl);
          counter=counter + 1;
          progress.increase(1);
        }
      }
 else {
        for (        String photolink : links) {
          decryptedLinks.add(createDownloadlink(photolink.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
        }
      }
      if (fpName != null) {
        FilePackage fp=FilePackage.getInstance();
        fp.setName(fpName.trim());
        fp.addLinks(decryptedLinks);
      }
    }
  }
 else {
    getfpName();
    if (fpName != null) {
      String dllink=br.getRegex("String_Node_Str").getMatch(0);
      if (dllink == null)       dllink=new Regex(Encoding.htmlDecode(br.toString()),"String_Node_Str").getMatch(0);
      DownloadLink dl=createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
      dl.setFinalFileName(fpName + "String_Node_Str");
      if (dllink != null) {
        dllink=Encoding.htmlDecode(dllink.replace("String_Node_Str","String_Node_Str"));
        URLConnectionAdapter con=br.openGetConnection(dllink);
        if (!con.getContentType().contains("String_Node_Str")) {
          long size=con.getLongContentLength();
          if (size != 0) {
            dl.setDownloadSize(con.getLongContentLength());
            dl.setAvailable(true);
          }
        }
      }
      decryptedLinks.add(dl);
    }
 else {
      decryptedLinks.add(createDownloadlink(parameter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str"));
    }
  }
  return decryptedLinks;
}