nus-yam/ex-repair huggingface dataset:
Program: 20897
Project: 20897
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getHeaders().put("String_Node_Str",downloadLink.getDownloadURL());
  br.getPage("String_Node_Str");
  if (!br.getURL().equals(downloadLink.getDownloadURL()))   br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileName=br.getRegex("String_Node_Str").getMatch(0);
  if (fileName == null) {
    fileName=br.getRegex("String_Node_Str").getMatch(0);
  }
  String fileSize=br.getRegex("String_Node_Str").getMatch(1);
  if (fileName == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  if (!fileSize.endsWith("String_Node_Str"))   fileSize=fileSize + "String_Node_Str";
  downloadLink.setName(fileName.trim());
  if (fileSize != null)   downloadLink.setDownloadSize(Regex.getSize(fileSize.replace("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getHeaders().put("String_Node_Str",downloadLink.getDownloadURL());
  br.getPage("String_Node_Str");
  if (!br.getURL().equals(downloadLink.getDownloadURL()))   br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileName=br.getRegex("String_Node_Str").getMatch(0);
  if (fileName == null) {
    fileName=br.getRegex("String_Node_Str").getMatch(0);
  }
  String fileSize=br.getRegex("String_Node_Str").getMatch(1);
  if (fileName == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replace("String_Node_Str","String_Node_Str");
  if (!fileSize.endsWith("String_Node_Str"))   fileSize=fileSize + "String_Node_Str";
  downloadLink.setName(fileName.trim());
  if (fileSize != null)   downloadLink.setDownloadSize(Regex.getSize(fileSize.replace("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}
Program: 20899
Project: 20899
Buggy source:
/** 
 * Sets special Properties for MAC
 */
private static void initMACProperties(){
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  try {
    new MacOSController();
  }
 catch (  Exception e) {
    LOG.info("String_Node_Str" + e);
    e.printStackTrace();
  }
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    File info15=JDUtilities.getResourceFile("String_Node_Str");
    File info=JDUtilities.getResourceFile("String_Node_Str");
    if (info15.exists()) {
      if (info.delete()) {
        info15.renameTo(JDUtilities.getResourceFile("String_Node_Str"));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets special Properties for MAC
 */
private static void initMACProperties(){
  System.setProperty("String_Node_Str","String_Node_Str");
  if (LookAndFeelController.getPlaf().getName().equals("String_Node_Str")) {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
  }
  try {
    new MacOSController();
  }
 catch (  Exception e) {
    LOG.info("String_Node_Str" + e);
    e.printStackTrace();
  }
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    File info15=JDUtilities.getResourceFile("String_Node_Str");
    File info=JDUtilities.getResourceFile("String_Node_Str");
    if (info15.exists()) {
      if (info.delete()) {
        info15.renameTo(JDUtilities.getResourceFile("String_Node_Str"));
      }
    }
  }
}
Program: 20905
Project: 20905
Buggy source:
public void handleFree(DownloadLink link) throws Exception {
  if (!link.getDownloadURL().contains("String_Node_Str"))   requestFileInformation(link);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,link.getDownloadURL(),true,0);
  if (dl.getConnection().getContentType().contains("String_Node_Str")) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink link) throws Exception {
  if (!link.getDownloadURL().contains("String_Node_Str"))   requestFileInformation(link);
 else {
    String fileid=new Regex(link.getDownloadURL(),"String_Node_Str").getMatch(0);
    if (fileid != null)     br.getPage("String_Node_Str" + fileid);
  }
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,link.getDownloadURL(),true,0);
  if (dl.getConnection().getContentType().contains("String_Node_Str")) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20906
Project: 20906
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink parameter) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.openGetConnection(parameter.getDownloadURL());
  if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  parameter.setName(Plugin.getFileNameFromHeader(br.getHttpConnection()));
  parameter.setDownloadSize(br.getHttpConnection().getLongContentLength());
  br.getHttpConnection().disconnect();
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink parameter) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  URLConnectionAdapter con=br.openGetConnection(parameter.getDownloadURL());
  if (con.getContentType().contains("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  parameter.setName(Plugin.getFileNameFromHeader(con));
  parameter.setDownloadSize(con.getLongContentLength());
  con.disconnect();
  return AvailableStatus.TRUE;
}
Program: 20907
Project: 20907
Buggy source:
/** 
 * Sets special Properties for MAC
 */
private static void initMACProperties(){
  if (OSDetector.isMac()) {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    try {
      new MacOSController();
    }
 catch (    Exception e) {
      LOG.info("String_Node_Str" + e);
      e.printStackTrace();
    }
    if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
      File info15=JDUtilities.getResourceFile("String_Node_Str");
      File info=JDUtilities.getResourceFile("String_Node_Str");
      if (info15.exists()) {
        if (info.delete()) {
          info15.renameTo(JDUtilities.getResourceFile("String_Node_Str"));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets special Properties for MAC
 */
private static void initMACProperties(){
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  try {
    new MacOSController();
  }
 catch (  Exception e) {
    LOG.info("String_Node_Str" + e);
    e.printStackTrace();
  }
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    File info15=JDUtilities.getResourceFile("String_Node_Str");
    File info=JDUtilities.getResourceFile("String_Node_Str");
    if (info15.exists()) {
      if (info.delete()) {
        info15.renameTo(JDUtilities.getResourceFile("String_Node_Str"));
      }
    }
  }
}
Program: 20911
Project: 20911
Buggy source:
private void login(Account account) throws Exception {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage("String_Node_Str");
  br.setDebug(true);
  br.postPage("String_Node_Str","String_Node_Str" + Encoding.urlEncode(account.getUser()) + "String_Node_Str"+ Encoding.urlEncode(account.getPass())+ "String_Node_Str");
  if (br.getCookie("String_Node_Str","String_Node_Str") == null)   throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
}

Fixed version (ground truth):
private void login(Account account) throws Exception {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage("String_Node_Str");
  br.setDebug(true);
  br.postPage("String_Node_Str","String_Node_Str" + Encoding.urlEncode(account.getUser()) + "String_Node_Str"+ Encoding.urlEncode(account.getPass())+ "String_Node_Str");
  String acc=br.getCookie("String_Node_Str","String_Node_Str");
  String prem=br.getCookie("String_Node_Str","String_Node_Str");
  if (acc == null && prem == null)   throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
  if (acc != null && prem == null) {
    br.setCookie("String_Node_Str","String_Node_Str",acc);
  }
}
Program: 20912
Project: 20912
Buggy source:
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.setFollowRedirects(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,downloadLink.getDownloadURL(),true,0);
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.getPage("String_Node_Str");
  br.setFollowRedirects(false);
  br.getPage(downloadLink.getDownloadURL());
  String url=null;
  if (br.getRedirectLocation() == null) {
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
 else {
    url=br.getRedirectLocation();
  }
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,url,true,0);
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20914
Project: 20914
Buggy source:
/** 
 * MTH File wird geladen und verarbeitet
 */
private void loadMTHFile(){
  File f=getResourceFile("String_Node_Str");
  String str=null;
  if (f.exists()) {
    str=JDIO.readFileToString(f);
  }
 else {
    str="String_Node_Str";
  }
  Document mth=JDUtilities.parseXmlString(str,false);
  logger.info("String_Node_Str" + f);
  if (mth == null) {
    if (Utilities.isLoggerActive()) {
      logger.severe("String_Node_Str");
    }
  }
  createLetterDBFormMTH(mth);
}

Fixed version (ground truth):
/** 
 * MTH File wird geladen und verarbeitet
 */
public void loadMTHFile(){
  File f=getResourceFile("String_Node_Str");
  loadMTHFile(f);
}
Program: 20917
Project: 20917
Buggy source:
public int getXDistanceTo(int x,int y){
  int mindist=Integer.MAX_VALUE;
  for (  int[] akt : object) {
    int xd=Math.abs(x - akt[0]);
    mindist=Math.min(mindist,xd);
  }
  return mindist;
}

Fixed version (ground truth):
public int getXDistanceTo(int x){
  int mindist=Integer.MAX_VALUE;
  for (  int[] akt : object) {
    int xd=Math.abs(x - akt[0]);
    mindist=Math.min(mindist,xd);
  }
  return mindist;
}
Program: 20919
Project: 20919
Buggy source:
public void checkErrors(DownloadLink theLink) throws NumberFormatException, PluginException {
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,"String_Node_Str",10 * 60 * 1000l);
}

Fixed version (ground truth):
public void checkErrors(DownloadLink theLink) throws NumberFormatException, PluginException {
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",10 * 60 * 1000l);
}
Program: 20921
Project: 20921
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException, IOException {
  String downloadURL=downloadLink.getDownloadURL();
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.getPage(downloadURL);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileSize=br.getRegex("String_Node_Str").getMatch(0);
  if (fileSize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileName=br.getRegex("String_Node_Str").getMatch(0);
  downloadLink.setDownloadSize(Regex.getSize(fileSize));
  downloadLink.setName(fileName);
  String link=Encoding.htmlDecode(br.getRegex(Pattern.compile(freelinkregex,Pattern.CASE_INSENSITIVE)).getMatch(0));
  if (link == null) {
    downloadLink.getLinkStatus().setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
    return AvailableStatus.TRUE;
  }
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException, IOException {
  String downloadURL=downloadLink.getDownloadURL();
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.getPage(downloadURL);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileSize=br.getRegex("String_Node_Str").getMatch(1);
  if (fileSize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fileName=br.getRegex("String_Node_Str").getMatch(0);
  downloadLink.setDownloadSize(Regex.getSize(fileSize));
  downloadLink.setName(fileName);
  String link=Encoding.htmlDecode(br.getRegex(Pattern.compile(freelinkregex,Pattern.CASE_INSENSITIVE)).getMatch(0));
  if (link == null) {
    downloadLink.getLinkStatus().setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
    return AvailableStatus.TRUE;
  }
  return AvailableStatus.TRUE;
}
Program: 20924
Project: 20924
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getPage(link.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null)   filename=br.getRegex("String_Node_Str").getMatch(1);
  if (filename == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  link.setName(filename.trim());
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filesize != null) {
    filesize=filesize.trim();
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replace("String_Node_Str","String_Node_Str");
    filesize=filesize + "String_Node_Str";
    link.setDownloadSize(Regex.getSize(filesize));
  }
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.setCustomCharset("String_Node_Str");
  br.getPage(link.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null)   filename=br.getRegex("String_Node_Str").getMatch(1);
  if (filename == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  link.setName(filename.trim());
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filesize != null) {
    filesize=filesize.trim();
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replaceAll("String_Node_Str","String_Node_Str");
    filesize=filesize.replace("String_Node_Str","String_Node_Str");
    filesize=filesize + "String_Node_Str";
    link.setDownloadSize(Regex.getSize(filesize));
  }
  return AvailableStatus.TRUE;
}
Program: 20925
Project: 20925
Buggy source:
@Override public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo();
  this.setBrowserExclusive();
  br.getPage("String_Node_Str");
  br.forceDebug(true);
  Form login=br.getForm(0);
  login.put("String_Node_Str",account.getUser());
  login.put("String_Node_Str",account.getPass());
  br.submitForm(login);
  if (br.getRedirectLocation() == null) {
    account.setValid(false);
  }
 else {
    account.setValid(true);
    br.getPage("String_Node_Str");
    String validUntil=br.getRegex("String_Node_Str").getMatch(0);
    ai.setValidUntil(Regex.getMilliSeconds("String_Node_Str" + validUntil.trim(),"String_Node_Str",null));
    String trafficLeft=br.getRegex("String_Node_Str").getMatch(0);
    ai.setTrafficLeft(Regex.getSize(trafficLeft));
  }
  return ai;
}

Fixed version (ground truth):
@Override public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo();
  this.setBrowserExclusive();
  br.getPage("String_Node_Str");
  br.forceDebug(true);
  Form login=br.getForm(0);
  login.put("String_Node_Str",account.getUser());
  login.put("String_Node_Str",account.getPass());
  br.submitForm(login);
  if (br.getRedirectLocation() == null || br.getCookie("String_Node_Str","String_Node_Str") == null) {
    account.setValid(false);
  }
 else {
    account.setValid(true);
    br.getPage("String_Node_Str");
    String validUntil=br.getRegex("String_Node_Str").getMatch(0);
    if (validUntil != null)     ai.setValidUntil(Regex.getMilliSeconds("String_Node_Str" + validUntil.trim(),"String_Node_Str",null));
    String trafficLeft=br.getRegex("String_Node_Str").getMatch(0);
    if (trafficLeft != null)     ai.setTrafficLeft(Regex.getSize(trafficLeft));
  }
  return ai;
}
Program: 20931
Project: 20931
Buggy source:
public static String urlDecode(String urlcoded,boolean isUrl){
  if (urlcoded == null)   return null;
  if (isUrl) {
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
  }
 else {
    try {
      urlcoded=URLDecoder.decode(urlcoded,"String_Node_Str");
    }
 catch (    Exception e) {
      JDLogger.exception(e);
    }
  }
  return urlcoded;
}

Fixed version (ground truth):
public static String urlDecode(String urlcoded,boolean isUrl){
  if (urlcoded == null)   return null;
  if (isUrl) {
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
    urlcoded=urlcoded.replaceAll("String_Node_Str","String_Node_Str");
  }
 else {
    try {
      urlcoded=URLDecoder.decode(urlcoded,"String_Node_Str");
    }
 catch (    Exception e) {
      JDLogger.exception(e);
    }
  }
  return urlcoded;
}
Program: 20933
Project: 20933
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink parameter) throws Exception {
  this.setBrowserExclusive();
  br.getPage(parameter.getDownloadURL());
  if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  parameter.setName(filename.trim());
  parameter.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink parameter) throws Exception {
  this.setBrowserExclusive();
  br.getPage(parameter.getDownloadURL());
  if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null) {
    filename=br.getRegex("String_Node_Str").getMatch(0);
    if (filename == null) {
      filename=br.getRegex("String_Node_Str").getMatch(0);
    }
  }
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  parameter.setName(filename.trim());
  parameter.setDownloadSize(Regex.getSize(filesize));
  return AvailableStatus.TRUE;
}
Program: 20934
Project: 20934
Buggy source:
/** 
 * läd das Bild direkt in den vorgegebenen Ordner
 * @param destination
 */
public boolean directCaptchaLoad(String destination){
  file=new File(destination,System.currentTimeMillis() + getFileType());
  try {
    br.cloneBrowser().getDownload(file,imageUrl);
    return renameCaptcha(file,destination);
  }
 catch (  Exception e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * läd das Bild direkt in den vorgegebenen Ordner
 * @param destination
 */
public boolean directCaptchaLoad(String destination){
  file=new File(destination,System.currentTimeMillis() + getFileType());
  try {
    URLConnectionAdapter urlc=br.cloneBrowser().openGetConnection(imageUrl);
    Browser.download(file,urlc);
    return renameCaptcha(file,destination);
  }
 catch (  Exception e) {
  }
  return false;
}
Program: 20937
Project: 20937
Buggy source:
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.setDebug(true);
  br.getPage(downloadLink.getDownloadURL());
  Form premform=br.getForm(1);
  if (premform == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  premform.setPreferredSubmit("String_Node_Str");
  br.submitForm(premform);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  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)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=BrowserAdapter.openDownload(br,downloadLink,dllink,true,0);
  if (!(dl.getConnection().isContentDisposition()) && !dl.getConnection().getContentType().contains("String_Node_Str")) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.setDebug(true);
  br.getPage(downloadLink.getDownloadURL());
  Form premform=br.getForm(1);
  if (premform == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  premform.setPreferredSubmit("String_Node_Str");
  br.submitForm(premform);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  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)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=BrowserAdapter.openDownload(br,downloadLink,dllink,true,0);
  if (!(dl.getConnection().isContentDisposition()) && !dl.getConnection().getContentType().contains("String_Node_Str")) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",60 * 60 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20938
Project: 20938
Buggy source:
@Override public void handleFree(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.getPage(link.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1001l);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,1);
  URLConnectionAdapter con=dl.getConnection();
  if (con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
synchronized (LOCK) {
      if (counter > 10) {
        counter=0;
        throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,30 * 60 * 1001l);
      }
 else {
        counter++;
        throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,30 * 60 * 1001l);
      }
    }
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.getPage(link.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1001l);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,1);
  URLConnectionAdapter con=dl.getConnection();
  if (con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
synchronized (LOCK) {
      if (counter > 10) {
        counter=0;
        throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,30 * 60 * 1000l);
      }
 else {
        counter++;
        throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,30 * 60 * 1000l);
      }
    }
  }
  dl.startDownload();
}
Program: 20942
Project: 20942
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  br.getPage(parameter);
  for (int i=0; i <= 3; i++) {
    Recaptcha rc=new Recaptcha(br);
    rc.parse();
    rc.load();
    File cf=rc.downloadCaptcha(getLocalCaptchaFile());
    String c=getCaptchaCode(cf,param);
    rc.setCode(c);
    if (br.containsHTML("String_Node_Str"))     continue;
    break;
  }
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  String[] links=HTMLParser.getHttpLinks(br.toString(),"String_Node_Str");
  if (links.length == 0)   return null;
  for (  String finallink : links) {
    if (!finallink.contains("String_Node_Str"))     decryptedLinks.add(createDownloadlink(finallink));
  }
  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();
  br.getPage(parameter);
  for (int i=0; i <= 3; i++) {
    Recaptcha rc=new Recaptcha(br);
    rc.parse();
    rc.load();
    File cf=rc.downloadCaptcha(getLocalCaptchaFile());
    String c=getCaptchaCode(cf,param);
    rc.setCode(c);
    if (br.containsHTML("String_Node_Str"))     continue;
    break;
  }
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  String[] links=HTMLParser.getHttpLinks(br.toString(),"String_Node_Str");
  if (links.length == 0)   return null;
  for (  String finallink : links) {
    if (!finallink.contains("String_Node_Str") && !finallink.contains("String_Node_Str"))     decryptedLinks.add(createDownloadlink(finallink));
  }
  return decryptedLinks;
}
Program: 20943
Project: 20943
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  requestFileInformation(downloadLink);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1001);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",15 * 60 * 1000l);
  Form form=br.getForm(1);
  if (form == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  int tt=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  sleep(tt * 1001l,downloadLink);
  br.submitForm(form);
  form=br.getForm(0);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,form,false,1);
  URLConnectionAdapter con=dl.getConnection();
  if (!con.isContentDisposition()) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",15 * 60 * 1000l);
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1001);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  requestFileInformation(downloadLink);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1001);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1001);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",15 * 60 * 1000l);
  Form form=br.getForm(1);
  if (form == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  int tt=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  sleep(tt * 1001l,downloadLink);
  br.submitForm(form);
  form=br.getForm(0);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,form,false,1);
  URLConnectionAdapter con=dl.getConnection();
  if (!con.isContentDisposition()) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,60 * 60 * 1001);
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",15 * 60 * 1000l);
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1001);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20946
Project: 20946
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, InterruptedException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(false);
  br.getPage(downloadLink.getDownloadURL());
  if (br.getRedirectLocation() != null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  br.setFollowRedirects(true);
  String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(filename.trim() + "String_Node_Str");
  downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, InterruptedException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(false);
  br.getPage(downloadLink.getDownloadURL());
  if (br.getRedirectLocation() != null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String fsk18=br.getRegex("String_Node_Str").getMatch(0);
  if (fsk18 != null)   br.getPage(fsk18);
  br.setFollowRedirects(true);
  String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(filename.trim() + "String_Node_Str");
  downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}
Program: 20947
Project: 20947
Buggy source:
@Override public int getMaxSimultanFreeDownloadNum(){
  return 1;
}

Fixed version (ground truth):
@Override public int getMaxSimultanFreeDownloadNum(){
  return 5;
}
Program: 20948
Project: 20948
Buggy source:
public String getDownloadUrl(Browser br,DownloadLink downloadLink) throws PluginException, IOException {
  String varLink=br.getRegex("String_Node_Str").getMatch(0);
  if (varLink != null) {
    sleep(2000,downloadLink);
    return varLink;
  }
  br.setFollowRedirects(false);
  String fileID=br.getRegex("String_Node_Str").getMatch(0);
  if (fileID == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  String starttimer=br.getRegex("String_Node_Str").getMatch(0);
  String redirect=null;
  if (starttimer != null) {
    sleep((Long.parseLong(starttimer) + 2) * 1000l,downloadLink);
  }
  br.postPage("String_Node_Str" + System.currentTimeMillis() + "String_Node_Str","String_Node_Str" + fileID + "String_Node_Str");
  redirect=br.getRegex("String_Node_Str").getMatch(0);
  if (redirect != null) {
    redirect=redirect.replaceAll("String_Node_Str","String_Node_Str");
  }
 else {
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  if (redirect == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  return redirect;
}

Fixed version (ground truth):
public String getDownloadUrl(Browser br,DownloadLink downloadLink) throws PluginException, IOException {
  String varLink=br.getRegex("String_Node_Str").getMatch(0);
  if (varLink != null) {
    sleep(2000,downloadLink);
    return varLink;
  }
  br.setFollowRedirects(false);
  String fileID=br.getRegex("String_Node_Str").getMatch(0);
  if (fileID == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  String starttimer=br.getRegex("String_Node_Str").getMatch(0);
  String redirect=null;
  if (starttimer != null) {
    sleep((Long.parseLong(starttimer) + 2) * 1000l,downloadLink);
  }
  br.postPage("String_Node_Str" + System.currentTimeMillis() + "String_Node_Str","String_Node_Str" + fileID + "String_Node_Str");
  redirect=br.getRegex("String_Node_Str").getMatch(0);
  if (redirect != null) {
    redirect=redirect.replaceAll("String_Node_Str","String_Node_Str");
  }
 else {
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 1000l);
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",15 * 60 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  if (redirect == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  return redirect;
}
Program: 20950
Project: 20950
Buggy source:
private Browser requestXML(Browser br,String url,String post,boolean clonebrowser) throws IOException {
  Browser brc=br;
  if (clonebrowser)   brc=br.cloneBrowser();
  brc.getHeaders().put("String_Node_Str","String_Node_Str");
  brc.postPage(url,post != null ? post : "String_Node_Str");
  brc.getHeaders().remove("String_Node_Str");
  return brc;
}

Fixed version (ground truth):
private Browser requestXML(Browser br,String url,String post,boolean clonebrowser) throws IOException {
  Browser brc=br;
  if (clonebrowser)   brc=br.cloneBrowser();
  brc.setDebug(true);
  brc.getHeaders().put("String_Node_Str","String_Node_Str");
  brc.postPage(url,post != null ? post : "String_Node_Str");
  brc.getHeaders().remove("String_Node_Str");
  return brc;
}
Program: 20951
Project: 20951
Buggy source:
private void prepareHibernateOrStandby(){
  logger.info("String_Node_Str");
  DownloadWatchDog.getInstance().stopDownloads();
  JDController.getInstance().syncDatabase();
}

Fixed version (ground truth):
private void prepareHibernateOrStandby(){
  logger.info("String_Node_Str");
  DownloadWatchDog.getInstance().stopDownloads();
  JDController.getInstance().syncDatabase();
  menuAction.setSelected(false);
}
Program: 20952
Project: 20952
Buggy source:
@Override public void resetDownloadlink(DownloadLink link){
}

Fixed version (ground truth):
@Override public void resetDownloadlink(DownloadLink link){
  link.setProperty("String_Node_Str","String_Node_Str");
}
Program: 20959
Project: 20959
Buggy source:
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.setFollowRedirects(false);
  br.getPage(downloadLink.getDownloadURL());
  if (br.getRedirectLocation() != null) {
    br.setFollowRedirects(true);
    dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,br.getRedirectLocation(),true,-4);
  }
 else {
    Form form=br.getFormbyProperty("String_Node_Str","String_Node_Str");
    br.setFollowRedirects(true);
    dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,form,true,0);
  }
  URLConnectionAdapter con=dl.getConnection();
  if (con.getContentType() != null && con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    if ((br.containsHTML("String_Node_Str") && br.containsHTML("String_Node_Str")))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",30 * 60 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.setFollowRedirects(false);
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage(downloadLink.getDownloadURL());
  if (br.getRedirectLocation() != null) {
    br.setFollowRedirects(true);
    dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,br.getRedirectLocation(),true,-4);
  }
 else {
    Form form=br.getFormbyProperty("String_Node_Str","String_Node_Str");
    br.setFollowRedirects(true);
    dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,form,true,0);
  }
  URLConnectionAdapter con=dl.getConnection();
  if (con.getContentType() != null && con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    if ((br.containsHTML("String_Node_Str") && br.containsHTML("String_Node_Str")))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",30 * 60 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20960
Project: 20960
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  br.setFollowRedirects(false);
  br.getPage(parameter);
  String dlsite0=new Regex(param,"String_Node_Str").getMatch(0);
  String dlsite1="String_Node_Str" + dlsite0;
  br.getPage(dlsite1);
  String[] links=br.getRegex("String_Node_Str").getColumn(0);
  if (links == null || links.length == 0)   return null;
  progress.setRange(links.length);
  for (  String link : links) {
    String link1="String_Node_Str" + link;
    br.getPage(link1);
    String finallink=br.getRegex("String_Node_Str").getMatch(0);
    if (finallink == null)     return decryptedLinks;
    DownloadLink dl=createDownloadlink(finallink);
    decryptedLinks.add(dl);
    progress.increase(1);
  }
  return decryptedLinks;
}

Fixed version (ground truth):
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String dlsite0=new Regex(param,"String_Node_Str").getMatch(0);
  String dlsite1="String_Node_Str" + dlsite0;
  br.getPage(dlsite1);
  if (!br.containsHTML("String_Node_Str"))   throw new DecrypterException(JDL.L("String_Node_Str","String_Node_Str"));
  String[] links=br.getRegex("String_Node_Str").getColumn(0);
  if (links == null || links.length == 0)   return null;
  progress.setRange(links.length);
  for (  String link : links) {
    String link1="String_Node_Str" + link;
    br.getPage(link1);
    String finallink=br.getRegex("String_Node_Str").getMatch(0);
    if (finallink == null)     return null;
    DownloadLink dl=createDownloadlink(finallink);
    decryptedLinks.add(dl);
    progress.increase(1);
  }
  return decryptedLinks;
}
Program: 20962
Project: 20962
Buggy source:
@Override public void handleFree(DownloadLink link) throws Exception {
  this.requestFileInformation(link);
  br.setDebug(true);
  Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
  if (DLForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  int tt=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  sleep(tt * 1001l,link);
  br.submitForm(DLForm);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=BrowserAdapter.openDownload(br,link,dllink,true,0);
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink link) throws Exception {
  this.requestFileInformation(link);
  br.setDebug(true);
  Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
  if (DLForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  String ttt="String_Node_Str";
  ttt=br.getRegex("String_Node_Str").getMatch(0);
  int tt=Integer.parseInt(ttt);
  sleep(tt * 1001,link);
  br.submitForm(DLForm);
  String server=br.getRegex("String_Node_Str").getMatch(0);
  String hash=br.getRegex("String_Node_Str").getMatch(0);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  if (server == null || hash == null || filename == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  String dllink="String_Node_Str" + server + "String_Node_Str"+ hash+ "String_Node_Str"+ filename;
  dl=BrowserAdapter.openDownload(br,link,dllink,true,0);
  String contenttypecheck=dl.getConnection().getContentType().toString();
  if ((contenttypecheck.contains("String_Node_Str"))) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20963
Project: 20963
Buggy source:
public JAntiCaptcha(String methodName){
  methodDirName=JACMethod.forServiceName(methodName);
  getJACInfo();
  jas=new JACScript(this,methodDirName);
  loadMTHFile();
  if (Utilities.isLoggerActive()) {
    logger.fine("String_Node_Str" + letterDB.size());
  }
}

Fixed version (ground truth):
public JAntiCaptcha(String methodName){
  methodDirName=JACMethod.forServiceName(methodName);
  getJACInfo();
  jas=new JACScript(this,methodDirName);
  long time=System.currentTimeMillis();
  loadMTHFile();
  time=System.currentTimeMillis() - time;
  System.out.println(time);
  if (Utilities.isLoggerActive()) {
    logger.fine("String_Node_Str" + letterDB.size());
  }
}
Program: 20964
Project: 20964
Buggy source:
private int getLevenshteinDistance(boolean[] l1,boolean[] l2){
  if (l1 == null || l2 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int n=l1.length;
  int m=l2.length;
  if (n == 0) {
    return m;
  }
 else   if (m == 0) {
    return n;
  }
  int p[], d[], c[];
{
    int n1=n + 1;
    p=new int[n1];
    d=new int[n1];
    c=new int[n1];
  }
  int i;
  int j;
  int j1, j2, i1, i2;
  boolean t_j;
  int cost=0;
  for (i=1; i <= n; i++) {
    p[i]=i;
    c[i]=i;
  }
  for (j=1; j <= m; j++) {
    j1=j;
    j2=--j1;
    j2--;
    t_j=l2[j1];
    d[0]=j;
    for (i=1; i <= n; i++) {
      i1=i - 1;
      cost=(l1[i1] == t_j) ? 0 : 1;
      d[i]=Math.min(d[i1] + costs,Math.min(p[i] + costs,p[i1] + cost * costs));
      if ((i > 1) && (j > 1) && (l1[i1] == l2[j2])&& (l1[i2=i1 - 1] == l2[j1])) {
        d[i]=Math.min(d[i],c[i2] + cost);
      }
    }
    for (i=1; i <= n; i++) {
      c[i]=p[i];
    }
    int[] _d=p;
    p=d;
    d=_d;
  }
  return p[n];
}

Fixed version (ground truth):
private int getLevenshteinDistance(boolean[] l1,boolean[] l2){
  if (l1 == null || l2 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int n=l1.length;
  int m=l2.length;
  if (n == 0) {
    return m;
  }
 else   if (m == 0) {
    return n;
  }
  int p[], d[], c[];
{
    int n1=n + 1;
    p=new int[n1];
    d=new int[n1];
    c=new int[n1];
  }
  int i;
  int j;
  int j1, j2, i1, i2;
  boolean t_j;
  int cost=0;
  for (i=1; i <= n; i++) {
    p[i]=i;
  }
  for (j=1; j <= m; j++) {
    j1=j;
    j2=--j1;
    j2--;
    t_j=l2[j1];
    d[0]=j;
    for (i=1; i <= n; i++) {
      i1=i - 1;
      cost=(l1[i1] == t_j) ? 0 : costs;
      d[i]=Math.min(d[i1] + costs,Math.min(p[i] + costs,p[i1] + cost));
      if (i > 1 && j > 1 && l1[i1] == l2[j2] && l1[i2=i1 - 1] == l2[j1]) {
        d[i]=Math.min(d[i],c[i2] + (cost > 0 ? 1 : cost));
      }
    }
    for (i=0; i <= n; i++) {
      c[i]=p[i];
    }
    int[] _d=p;
    p=d;
    d=_d;
  }
  return p[n];
}
Program: 20965
Project: 20965
Buggy source:
public LevenShteinLetterComperator(JAntiCaptcha jac){
  letterDB=new boolean[jac.letterDB.size()][][][];
  this.jac=jac;
  for (int i=0; i < letterDB.length; i++) {
    letterDB[i]=getBooleanArrays(jac.letterDB.get(i));
  }
}

Fixed version (ground truth):
public LevenShteinLetterComperator(JAntiCaptcha jac){
  File letterDBBin=jac.getResourceFile("String_Node_Str");
  if (letterDBBin.exists()) {
    try {
      letterDB=new BinLetters(letterDBBin).readAll().toArray(new LevenshteinLetter[]{});
    }
 catch (    IOException e) {
    }
  }
  if (letterDB == null) {
    letterDB=new LevenshteinLetter[jac.letterDB.size()];
    for (int i=0; i < letterDB.length; i++) {
      letterDB[i]=new LevenshteinLetter(jac.letterDB.get(i));
    }
  }
}