Program: 21173
Project: 21173
Buggy source:
public void handleFree(DownloadLink downloadLink) 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();
  }
  LinkStatus linkStatus=downloadLink.getLinkStatus();
  Rapidshare.correctURL(downloadLink);
  String freeOrPremiumSelectPostURL=null;
  br.setAcceptLanguage(ACCEPT_LANGUAGE);
  br.setFollowRedirects(false);
  String link=downloadLink.getDownloadURL();
  br.getPage(link);
  if (br.getRedirectLocation() != null) {
    logger.info("String_Node_Str");
    this.handlePremium(downloadLink,new Account("String_Node_Str","String_Node_Str"));
    return;
  }
  freeOrPremiumSelectPostURL=new Regex(br,PATTERN_FIND_MIRROR_URL).getMatch(0);
  if (freeOrPremiumSelectPostURL == null) {
    String error=null;
    if ((error=findError(br + "String_Node_Str")) != null) {
      throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
    }
    reportUnknownError(br,1);
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  Form[] forms=br.getForms();
  br.submitForm(forms[0]);
  String error=null;
  if ((error=findError(br + "String_Node_Str")) != null) {
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120000l);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120 * 1000l);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,JDLocale.LF("String_Node_Str","String_Node_Str",error.substring(11,error.indexOf("String_Node_Str"))),3600 * 1000l);
    }
    if (new Regex(error,"String_Node_Str").matches()) {
      String waitfor=new Regex(br,"String_Node_Str").getMatch(0);
      if (waitfor == null) {
        waitfor=new Regex(br,"String_Node_Str").getMatch(0);
      }
      long waitTime=60 * 60 * 1000l;
      try {
        waitTime=new Long(waitfor.trim()) * 60 * 1000l;
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waitTime);
    }
    throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
  }
  if (new Regex(br,PATTERM_MATCHER_ALREADY_LOADING).matches()) {
    logger.severe("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,120 * 1000l);
  }
 else   if ((error=findError(br + "String_Node_Str")) != null) {
    reportUnknownError(br,2);
    throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
  }
  String ticketTime=new Regex(br,PATTERN_FIND_TICKET_WAITTIME).getMatch(0);
  if (ticketTime != null && ticketTime.equals("String_Node_Str")) {
    ticketTime=null;
  }
  String ticketCode=br + "String_Node_Str";
  String tt=new Regex(ticketCode,"String_Node_Str").getMatch(0);
  String fun="String_Node_Str" + tt + "String_Node_Str";
  Context cx=Context.enter();
  Scriptable scope=cx.initStandardObjects();
  Object result=cx.evaluateString(scope,fun,"String_Node_Str",1,null);
  String code=Context.toString(result);
  if (tt != null)   ticketCode=code;
  Context.exit();
  if (ticketCode.contains("String_Node_Str")) {
    downloadLink.getLinkStatus().setStatusText("String_Node_Str");
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120000);
  }
  if (new Regex(ticketCode,"String_Node_Str").matches()) {
    String waitfor=new Regex(ticketCode,"String_Node_Str").getMatch(0);
    long waitTime=60 * 60 * 1000l;
    try {
      waitTime=new Long(waitfor.trim()) * 60 * 1000l;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waitTime);
  }
  long pendingTime=0;
  if (ticketTime != null) {
    pendingTime=Long.parseLong(ticketTime);
    if (getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) > 0) {
      logger.warning("String_Node_Str" + pendingTime + "String_Node_Str"+ (pendingTime + getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) * pendingTime / 100));
      pendingTime=pendingTime + getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) * pendingTime / 100;
    }
    pendingTime*=1000;
  }
  waitTicketTime(downloadLink,pendingTime);
  String postTarget=getDownloadTarget(downloadLink,ticketCode);
  System.out.println(postTarget);
  if (linkStatus.isFailed())   return;
  Request request=br.createPostRequest(postTarget,"String_Node_Str" + Math.random() * 40 + "String_Node_Str" + Math.random() * 40);
  dl=new RAFDownload(this,downloadLink,request);
  long startTime=System.currentTimeMillis();
  HTTPConnection con=dl.connect();
  if (!con.isContentDisposition() && con.getHeaderField("String_Node_Str") != null) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  downloadLink.setProperty("String_Node_Str",(System.currentTimeMillis() - startTime));
  dl.startDownload();
  downloadLink.setProperty("String_Node_Str",(System.currentTimeMillis() - startTime));
  int dif=(int)((System.currentTimeMillis() - startTime) / 1000);
  if (dif > 0)   downloadLink.setProperty("String_Node_Str",(downloadLink.getDownloadSize() / dif) / 1024);
  if (downloadLink.getStringProperty("String_Node_Str") != null) {
    new File(downloadLink.getFileOutput()).delete();
    downloadLink.getLinkStatus().setStatusText("String_Node_Str" + downloadLink.getStringProperty("String_Node_Str") + "String_Node_Str"+ downloadLink.getProperty("String_Node_Str")+ "String_Node_Str");
    ArrayList<DownloadLink> ret=new ArrayList<DownloadLink>();
    String msg="String_Node_Str";
    for (    DownloadLink dLink : downloadLink.getFilePackage().getDownloadLinks()) {
      if (dLink.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
        ret.add(dLink);
        msg+="String_Node_Str" + dLink.getStringProperty("String_Node_Str") + "String_Node_Str"+ dLink.getProperty("String_Node_Str")+ "String_Node_Str";
      }
 else       if (dLink.getLinkStatus().isFailed()) {
        ret.add(dLink);
        msg+="String_Node_Str" + dLink.getStringProperty("String_Node_Str") + "String_Node_Str";
      }
 else {
        return;
      }
    }
    TextAreaDialog.showDialog(SimpleGUI.CURRENTGUI.getFrame(),"String_Node_Str","String_Node_Str",msg);
  }
}

Fixed version (ground truth):
public void handleFree(DownloadLink downloadLink) 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();
  }
  LinkStatus linkStatus=downloadLink.getLinkStatus();
  Rapidshare.correctURL(downloadLink);
  String freeOrPremiumSelectPostURL=null;
  br.setAcceptLanguage(ACCEPT_LANGUAGE);
  br.setFollowRedirects(false);
  String link=downloadLink.getDownloadURL();
  br.getPage(link);
  if (br.getRedirectLocation() != null) {
    logger.info("String_Node_Str");
    this.handlePremium(downloadLink,new Account("String_Node_Str","String_Node_Str"));
    return;
  }
  if (br.toString().contains("String_Node_Str")) {
    throw new PluginException(LinkStatus.ERROR_FATAL,JDLocale.L("String_Node_Str","String_Node_Str"));
  }
  freeOrPremiumSelectPostURL=new Regex(br,PATTERN_FIND_MIRROR_URL).getMatch(0);
  if (freeOrPremiumSelectPostURL == null) {
    String error=null;
    if ((error=findError(br + "String_Node_Str")) != null) {
      throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
    }
    reportUnknownError(br,1);
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  Form[] forms=br.getForms();
  br.submitForm(forms[0]);
  String error=null;
  if ((error=findError(br + "String_Node_Str")) != null) {
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120000l);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120 * 1000l);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    if (Regex.matches(error,Pattern.compile("String_Node_Str"))) {
      throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,JDLocale.LF("String_Node_Str","String_Node_Str",error.substring(11,error.indexOf("String_Node_Str"))),3600 * 1000l);
    }
    if (new Regex(error,"String_Node_Str").matches()) {
      String waitfor=new Regex(br,"String_Node_Str").getMatch(0);
      if (waitfor == null) {
        waitfor=new Regex(br,"String_Node_Str").getMatch(0);
      }
      long waitTime=60 * 60 * 1000l;
      try {
        waitTime=new Long(waitfor.trim()) * 60 * 1000l;
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waitTime);
    }
    throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
  }
  if (new Regex(br,PATTERM_MATCHER_ALREADY_LOADING).matches()) {
    logger.severe("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,120 * 1000l);
  }
 else   if ((error=findError(br + "String_Node_Str")) != null) {
    reportUnknownError(br,2);
    throw new PluginException(LinkStatus.ERROR_FATAL,dynTranslate(error));
  }
  String ticketTime=new Regex(br,PATTERN_FIND_TICKET_WAITTIME).getMatch(0);
  if (ticketTime != null && ticketTime.equals("String_Node_Str")) {
    ticketTime=null;
  }
  String ticketCode=br + "String_Node_Str";
  String tt=new Regex(ticketCode,"String_Node_Str").getMatch(0);
  String fun="String_Node_Str" + tt + "String_Node_Str";
  Context cx=Context.enter();
  Scriptable scope=cx.initStandardObjects();
  Object result=cx.evaluateString(scope,fun,"String_Node_Str",1,null);
  String code=Context.toString(result);
  if (tt != null)   ticketCode=code;
  Context.exit();
  if (ticketCode.contains("String_Node_Str")) {
    downloadLink.getLinkStatus().setStatusText("String_Node_Str");
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",120000);
  }
  if (new Regex(ticketCode,"String_Node_Str").matches()) {
    String waitfor=new Regex(ticketCode,"String_Node_Str").getMatch(0);
    long waitTime=60 * 60 * 1000l;
    try {
      waitTime=new Long(waitfor.trim()) * 60 * 1000l;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,waitTime);
  }
  long pendingTime=0;
  if (ticketTime != null) {
    pendingTime=Long.parseLong(ticketTime);
    if (getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) > 0) {
      logger.warning("String_Node_Str" + pendingTime + "String_Node_Str"+ (pendingTime + getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) * pendingTime / 100));
      pendingTime=pendingTime + getPluginConfig().getIntegerProperty(PROPERTY_INCREASE_TICKET,0) * pendingTime / 100;
    }
    pendingTime*=1000;
  }
  waitTicketTime(downloadLink,pendingTime);
  String postTarget=getDownloadTarget(downloadLink,ticketCode);
  System.out.println(postTarget);
  if (linkStatus.isFailed())   return;
  Request request=br.createPostRequest(postTarget,"String_Node_Str" + Math.random() * 40 + "String_Node_Str" + Math.random() * 40);
  dl=new RAFDownload(this,downloadLink,request);
  long startTime=System.currentTimeMillis();
  HTTPConnection con=dl.connect();
  if (!con.isContentDisposition() && con.getHeaderField("String_Node_Str") != null) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  downloadLink.setProperty("String_Node_Str",(System.currentTimeMillis() - startTime));
  dl.startDownload();
  downloadLink.setProperty("String_Node_Str",(System.currentTimeMillis() - startTime));
  int dif=(int)((System.currentTimeMillis() - startTime) / 1000);
  if (dif > 0)   downloadLink.setProperty("String_Node_Str",(downloadLink.getDownloadSize() / dif) / 1024);
  if (downloadLink.getStringProperty("String_Node_Str") != null) {
    new File(downloadLink.getFileOutput()).delete();
    downloadLink.getLinkStatus().setStatusText("String_Node_Str" + downloadLink.getStringProperty("String_Node_Str") + "String_Node_Str"+ downloadLink.getProperty("String_Node_Str")+ "String_Node_Str");
    ArrayList<DownloadLink> ret=new ArrayList<DownloadLink>();
    String msg="String_Node_Str";
    for (    DownloadLink dLink : downloadLink.getFilePackage().getDownloadLinks()) {
      if (dLink.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
        ret.add(dLink);
        msg+="String_Node_Str" + dLink.getStringProperty("String_Node_Str") + "String_Node_Str"+ dLink.getProperty("String_Node_Str")+ "String_Node_Str";
      }
 else       if (dLink.getLinkStatus().isFailed()) {
        ret.add(dLink);
        msg+="String_Node_Str" + dLink.getStringProperty("String_Node_Str") + "String_Node_Str";
      }
 else {
        return;
      }
    }
    TextAreaDialog.showDialog(SimpleGUI.CURRENTGUI.getFrame(),"String_Node_Str","String_Node_Str",msg);
  }
}