nus-yam/ex-repair huggingface dataset:
Program: 21016
Project: 21016
Buggy source:
@Override public void setValueAt(Object value,int row,int col){
  if (col == 0) {
    if ((Boolean)value) {
      list.add(actions.get(row).getID());
    }
 else {
      list.remove(actions.get(row).getID());
    }
    GUIUtils.getConfig().setProperty("String_Node_Str",list);
    GUIUtils.getConfig().save();
    Collections.sort(list,new Comparator<String>(){
      public int compare(      String o1,      String o2){
        int ia=WHITELIST.indexOf(o1);
        int ib=WHITELIST.indexOf(o2);
        return ia < ib ? -1 : 1;
      }
    }
);
    while (list.remove("String_Node_Str")) {
    }
    for (int i=1; i < list.size(); i++) {
      int b=WHITELIST.indexOf(list.get(i));
      int a=WHITELIST.indexOf(list.get(i - 1));
      for (int ii=a; ii < b; ii++) {
        if (WHITELIST.get(ii).equals("String_Node_Str")) {
          list.add(i,"String_Node_Str");
          i++;
          break;
        }
      }
    }
    MainToolBar.getInstance().setList(list.toArray(new String[]{}));
  }
}

Fixed version (ground truth):
@Override public void setValueAt(Object value,int row,int col){
  if (col == 0) {
    if ((Boolean)value) {
      list.add(actions.get(row).getID());
    }
 else {
      list.remove(actions.get(row).getID());
    }
    GUIUtils.getConfig().setProperty("String_Node_Str",list);
    GUIUtils.getConfig().save();
    Collections.sort(list,new Comparator<String>(){
      public int compare(      String o1,      String o2){
        int ia=WHITELIST.indexOf(o1);
        int ib=WHITELIST.indexOf(o2);
        return ia < ib ? -1 : 1;
      }
    }
);
    while (list.remove("String_Node_Str")) {
    }
    for (int i=1; i < list.size(); i++) {
      int b=WHITELIST.indexOf(list.get(i));
      int a=WHITELIST.indexOf(list.get(i - 1));
      if (a > 0 && b > 0) {
        for (int ii=a; ii < b; ii++) {
          if (WHITELIST.get(ii).equals("String_Node_Str")) {
            list.add(i,"String_Node_Str");
            i++;
            break;
          }
        }
      }
    }
    MainToolBar.getInstance().setList(list.toArray(new String[]{}));
  }
}
Program: 21017
Project: 21017
Buggy source:
/** 
 * loads branches.lst from a random (0-2) updateserver.
 * @return
 */
private Branch[] getBranches(){
  ArrayList<String> mirrors=new ArrayList<String>();
  for (  String m : UPDATE_MIRROR)   mirrors.add(m);
  for (int i=0; i < UPDATE_MIRROR.length; i++) {
    String serv=mirrors.remove((int)(Math.random() * (UPDATE_MIRROR.length - 1 - i)));
    try {
      br.getPage(serv + "String_Node_Str");
      if (br.getRequest().getHttpConnection().isOK()) {
        String[] bs=Regex.getLines(br.toString());
        ArrayList<Branch> ret=new ArrayList<Branch>();
        this.branches=new Branch[bs.length];
        for (int ii=0; ii < bs.length; ii++) {
          Branch branch=new Branch(bs[i]);
          if (branch.isBeta() && betaBranch == null) {
            betaBranch=branch;
          }
 else           if (!branch.isBeta()) {
            ret.add(branch);
          }
        }
        branches=ret.toArray(new Branch[]{});
        System.out.println("String_Node_Str" + serv + "String_Node_Str"+ br);
        return branches;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
      errorWait();
    }
    System.err.println("String_Node_Str" + serv);
  }
  branches=new Branch[]{};
  return branches;
}

Fixed version (ground truth):
/** 
 * loads branches.lst from a random (0-2) updateserver.
 * @return
 */
private Branch[] getBranches(){
  ArrayList<String> mirrors=new ArrayList<String>();
  for (  String m : UPDATE_MIRROR)   mirrors.add(m);
  for (int i=0; i < UPDATE_MIRROR.length; i++) {
    String serv=mirrors.remove((int)(Math.random() * (UPDATE_MIRROR.length - 1 - i)));
    try {
      br.getPage(serv + "String_Node_Str");
      if (br.getRequest().getHttpConnection().isOK()) {
        String[] bs=Regex.getLines(br.toString());
        ArrayList<Branch> ret=new ArrayList<Branch>();
        this.branches=new Branch[bs.length];
        for (int ii=0; ii < bs.length; ii++) {
          Branch branch=new Branch(bs[ii]);
          if (branch.isBeta() && betaBranch == null) {
            betaBranch=branch;
          }
 else           if (!branch.isBeta()) {
            ret.add(branch);
          }
        }
        branches=ret.toArray(new Branch[]{});
        System.out.println("String_Node_Str" + serv + "String_Node_Str"+ br);
        return branches;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
      errorWait();
    }
    System.err.println("String_Node_Str" + serv);
  }
  branches=new Branch[]{};
  return branches;
}
Program: 21018
Project: 21018
Buggy source:
public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  br.setFollowRedirects(false);
  String uid1=br.getRegex("String_Node_Str").getMatch(0);
  String uid2=br.getRegex("String_Node_Str").getMatch(0);
  String hcode=br.getRegex("String_Node_Str").getMatch(0);
  String ip=br.getRegex("String_Node_Str").getMatch(0);
  Form form=br.getFormbyProperty("String_Node_Str","String_Node_Str");
  if (form == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  form.put("String_Node_Str",uid1);
  form.put("String_Node_Str",uid2);
  form.put("String_Node_Str",hcode);
  form.put("String_Node_Str","String_Node_Str");
  form.put("String_Node_Str",ip);
  form.put("String_Node_Str","String_Node_Str");
  br.submitForm(form);
  String dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,1);
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  br.setFollowRedirects(false);
  String md5crypt=br.getRegex("String_Node_Str").getMatch(0);
  String host=br.getRegex("String_Node_Str").getMatch(0);
  String uid=br.getRegex("String_Node_Str").getMatch(0);
  String name=br.getRegex("String_Node_Str").getMatch(0);
  String realuid=br.getRegex("String_Node_Str").getMatch(0);
  String realname=br.getRegex("String_Node_Str").getMatch(0);
  String optiondir=br.getRegex("String_Node_Str").getMatch(0);
  String pin=br.getRegex("String_Node_Str").getMatch(0);
  String ssserver=br.getRegex("String_Node_Str").getMatch(0);
  String sssize=br.getRegex("String_Node_Str").getMatch(0);
  String free=br.getRegex("String_Node_Str").getMatch(0);
  Form form=new Form();
  form.setMethod(Form.MethodType.POST);
  form.setAction("String_Node_Str");
  form.put("String_Node_Str",md5crypt);
  form.put("String_Node_Str",host);
  form.put("String_Node_Str",uid);
  form.put("String_Node_Str",name);
  form.put("String_Node_Str",realuid);
  form.put("String_Node_Str",realname);
  form.put("String_Node_Str",optiondir);
  form.put("String_Node_Str",pin);
  form.put("String_Node_Str",ssserver);
  form.put("String_Node_Str",sssize);
  form.put("String_Node_Str",free);
  br.submitForm(form);
  String dllink=br.getRedirectLocation();
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,true,-20);
  if (!(dl.getConnection().isContentDisposition())) {
    br.followConnection();
    System.out.print(br.toString());
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    if (br.containsHTML("String_Node_Str")) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,10 * 60 * 1001l);
    }
    throw new PluginException(LinkStatus.ERROR_FATAL);
  }
  dl.startDownload();
}
Program: 21019
Project: 21019
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 1;
}

Fixed version (ground truth):
public int getMaxSimultanFreeDownloadNum(){
  return 20;
}
Program: 21020
Project: 21020
Buggy source:
public void handleFree(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.clearCookies(link.getDownloadURL());
  br.getPage(link.getDownloadURL());
  int sleep=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  if (br.containsHTML("String_Node_Str")) {
    int block=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0)) * 1000 + 1;
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,block);
  }
  String Captcha=getCaptchaCode(br.getRegex("String_Node_Str").getMatch(0),link);
  br.getPage("String_Node_Str" + Captcha);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  sleep(sleep * 1001,link);
  br.getPage("String_Node_Str");
  String dllink=null;
  dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,false,1);
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.clearCookies(link.getDownloadURL());
  br.getPage(link.getDownloadURL());
  int sleep=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  if (br.containsHTML("String_Node_Str")) {
    int block=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0)) * 1000 + 1;
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,block);
  }
  String Captcha=getCaptchaCode("String_Node_Str" + br.getRegex("String_Node_Str").getMatch(0),link);
  br.getPage("String_Node_Str" + Captcha);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  sleep(sleep * 1001,link);
  br.getPage("String_Node_Str");
  String dllink=null;
  dllink=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,link,dllink,false,1);
  dl.startDownload();
}
Program: 21021
Project: 21021
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink parameter) throws Exception {
  this.setBrowserExclusive();
  br.getPage(parameter.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  if (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):
public AvailableStatus requestFileInformation(DownloadLink parameter) throws Exception {
  this.setBrowserExclusive();
  br.getPage(parameter.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  if (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);
  filesize.replace("String_Node_Str","String_Node_Str");
  parameter.setName(filename.trim());
  parameter.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}
Program: 21022
Project: 21022
Buggy source:
public void handleFree(DownloadLink downloadLink) throws Exception {
  String linkurl=null;
  if (isVideo) {
    String urlpart=br.getRegex("String_Node_Str").getMatch(0);
    String key=br.getRegex("String_Node_Str").getMatch(0);
    linkurl=urlpart + "String_Node_Str" + key+ "String_Node_Str";
  }
 else {
    requestFileInformation(downloadLink);
    br.setFollowRedirects(true);
    String id=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
    br.getPage("String_Node_Str" + id);
    String strwait=br.getRegex("String_Node_Str").getMatch(0);
    if (strwait != null && !br.containsHTML("String_Node_Str")) {
      long waittime=Long.parseLong(strwait.trim());
      waittime=(waittime * 1000) + 1;
      this.sleep(waittime,downloadLink);
    }
    br.getPage("String_Node_Str" + id);
    linkurl=br.getRegex("String_Node_Str").getMatch(0);
  }
  if (linkurl == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,linkurl,false,1);
  URLConnectionAdapter con=dl.getConnection();
  if (con.getResponseCode() != 200 && con.getResponseCode() != 206) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,30 * 1000l);
  }
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink downloadLink) throws Exception {
  requestFileInformation(downloadLink);
  String linkurl=null;
  if (isVideo) {
    String urlpart=br.getRegex("String_Node_Str").getMatch(0);
    String key=br.getRegex("String_Node_Str").getMatch(0);
    linkurl=urlpart + "String_Node_Str" + key+ "String_Node_Str";
  }
 else {
    requestFileInformation(downloadLink);
    br.setFollowRedirects(true);
    String id=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
    br.getPage("String_Node_Str" + id);
    String strwait=br.getRegex("String_Node_Str").getMatch(0);
    if (strwait != null && !br.containsHTML("String_Node_Str")) {
      long waittime=Long.parseLong(strwait.trim());
      waittime=(waittime * 1000) + 1;
      this.sleep(waittime,downloadLink);
    }
    br.getPage("String_Node_Str" + id);
    linkurl=br.getRegex("String_Node_Str").getMatch(0);
  }
  if (linkurl == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,linkurl,false,1);
  URLConnectionAdapter con=dl.getConnection();
  if (con.getResponseCode() != 200 && con.getResponseCode() != 206) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,30 * 1000l);
  }
  dl.startDownload();
}
Program: 21023
Project: 21023
Buggy source:
public void correctDownloadLink(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.setCookie(link.getDownloadURL(),"String_Node_Str","String_Node_Str");
  if (!Regex.matches(link.getDownloadURL(),"String_Node_Str")) {
    if (Regex.matches(link.getDownloadURL(),"String_Node_Str")) {
      this.isVideo=true;
    }
 else {
      br.setFollowRedirects(true);
      br.getPage(link.getDownloadURL());
      String urlpart="String_Node_Str";
      String correctUrl=urlpart + br.getRegex("String_Node_Str").getMatch(0);
      link.setUrlDownload(correctUrl);
    }
  }
}

Fixed version (ground truth):
public void correctDownloadLink(DownloadLink link) throws Exception {
  this.setBrowserExclusive();
  br.setCookie(link.getDownloadURL(),"String_Node_Str","String_Node_Str");
  if (!Regex.matches(link.getDownloadURL(),"String_Node_Str")) {
    if (!Regex.matches(link.getDownloadURL(),"String_Node_Str")) {
      br.setFollowRedirects(true);
      br.getPage(link.getDownloadURL());
      String urlpart="String_Node_Str";
      String correctUrl=urlpart + br.getRegex("String_Node_Str").getMatch(0);
      link.setUrlDownload(correctUrl);
    }
  }
}
Program: 21024
Project: 21024
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getPage(downloadLink.getDownloadURL());
  if (isVideo) {
    FilePackage fp=FilePackage.getInstance();
    String packagename=br.getRegex("String_Node_Str").getMatch(0);
    fp.setName(packagename);
    if (packagename != null) {
      downloadLink.setName(packagename + "String_Node_Str");
      fp.add(downloadLink);
      return AvailableStatus.TRUE;
    }
  }
 else {
    String redirect=br.getRegex("String_Node_Str").getMatch(0);
    br.setCookie(redirect,"String_Node_Str","String_Node_Str");
    br.getPage(redirect);
    if (!(br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str"))) {
      String filename=br.getRegex("String_Node_Str").getMatch(0);
      String filesize=br.getRegex("String_Node_Str").getMatch(0);
      if (!(filename == null || filesize == null)) {
        downloadLink.setName(filename);
        downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
        return AvailableStatus.TRUE;
      }
    }
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getPage(downloadLink.getDownloadURL());
  if (Regex.matches(downloadLink.getDownloadURL(),"String_Node_Str")) {
    this.isVideo=true;
    String filename=br.getRegex("String_Node_Str").getMatch(0);
    if (filename != null) {
      downloadLink.setFinalFileName(filename + "String_Node_Str");
      return AvailableStatus.TRUE;
    }
  }
 else {
    String redirect=br.getRegex("String_Node_Str").getMatch(0);
    br.setCookie(redirect,"String_Node_Str","String_Node_Str");
    br.getPage(redirect);
    if (!(br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str"))) {
      String filename=br.getRegex("String_Node_Str").getMatch(0);
      String filesize=br.getRegex("String_Node_Str").getMatch(0);
      if (!(filename == null || filesize == null)) {
        downloadLink.setName(filename);
        downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
        return AvailableStatus.TRUE;
      }
    }
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}
Program: 21025
Project: 21025
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  if (parameter.matches("String_Node_Str")) {
    parameter=parameter.replaceFirst("String_Node_Str","String_Node_Str");
    decryptedLinks.add(createDownloadlink(parameter));
  }
 else {
    br.getPage(parameter);
    String[] links=br.getRegex("String_Node_Str").getColumn(0);
    if (links.length == 0)     return null;
    for (    String dl : links) {
      dl=dl.replaceFirst("String_Node_Str","String_Node_Str");
      decryptedLinks.add(createDownloadlink(dl));
    }
  }
  return decryptedLinks;
}

Fixed version (ground truth):
@Override public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  String parameter=param.toString();
  if (parameter.matches("String_Node_Str")) {
    parameter=parameter.replaceFirst("String_Node_Str","String_Node_Str");
    decryptedLinks.add(createDownloadlink(parameter));
  }
 else {
    br.getPage(parameter);
    String[] links=br.getRegex("String_Node_Str").getColumn(0);
    if (links.length == 0)     return null;
    for (    String dl : links) {
      dl=dl.replaceFirst("String_Node_Str","String_Node_Str");
      decryptedLinks.add(createDownloadlink(dl));
    }
  }
  return decryptedLinks;
}
Program: 21026
Project: 21026
Buggy source:
public void correctDownloadLink(DownloadLink link) throws Exception {
  link.setUrlDownload(link.getDownloadURL().replaceFirst("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Override public void correctDownloadLink(DownloadLink link) throws Exception {
  link.setUrlDownload(link.getDownloadURL().replaceFirst("String_Node_Str","String_Node_Str"));
}
Program: 21027
Project: 21027
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 3;
}

Fixed version (ground truth):
@Override public int getMaxSimultanFreeDownloadNum(){
  return 3;
}
Program: 21030
Project: 21030
Buggy source:
public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  String freepage=downloadLink.getDownloadURL() + "String_Node_Str";
  br.getPage(freepage);
  String captchaid=br.getRegex("String_Node_Str").getMatch(0);
  if (captchaid == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String captchaurl="String_Node_Str" + captchaid;
  String code=getCaptchaCode(captchaurl,downloadLink);
  Form captchaForm=br.getForm(2);
  if (captchaForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  captchaForm.put("String_Node_Str",code);
  br.submitForm(captchaForm);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  Form DLForm0=br.getForm(2);
  if (DLForm0 == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  br.submitForm(DLForm0);
  String dlframe=downloadLink.getDownloadURL() + "String_Node_Str";
  br.getPage(dlframe);
  String dllink0=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink0 == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String dllink1="String_Node_Str" + dllink0;
  br.getPage(dllink1);
  String dllink=br.getRedirectLocation();
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,dllink,true,-20);
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  requestFileInformation(downloadLink);
  String freepage=downloadLink.getDownloadURL() + "String_Node_Str";
  br.getPage(freepage);
  String captchaid=br.getRegex("String_Node_Str").getMatch(0);
  if (captchaid == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String captchaurl="String_Node_Str" + captchaid;
  String code=getCaptchaCode(captchaurl,downloadLink);
  Form captchaForm=br.getForm(2);
  if (captchaForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  captchaForm.put("String_Node_Str",code);
  br.submitForm(captchaForm);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_CAPTCHA);
  Form DLForm0=br.getForm(2);
  if (DLForm0 == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  br.submitForm(DLForm0);
  String dlframe=downloadLink.getDownloadURL() + "String_Node_Str";
  br.getPage(dlframe);
  String dllink0=br.getRegex("String_Node_Str").getMatch(0);
  if (dllink0 == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String dllink1="String_Node_Str" + dllink0;
  br.getPage(dllink1);
  String dllink=br.getRedirectLocation();
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,dllink,true,1);
  dl.startDownload();
}
Program: 21031
Project: 21031
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
  this.setBrowserExclusive();
  String freepage=link.getDownloadURL() + "String_Node_Str";
  br.getPage(freepage);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=Encoding.htmlDecode(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);
  link.setName(filename);
  link.setDownloadSize(Regex.getSize(filesize));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
  this.setBrowserExclusive();
  String freepage=link.getDownloadURL() + "String_Node_Str";
  br.getPage(freepage);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=Encoding.htmlDecode(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);
  link.setFinalFileName(filename);
  link.setDownloadSize(Regex.getSize(filesize));
  return AvailableStatus.TRUE;
}
Program: 21032
Project: 21032
Buggy source:
public static void main(String ss[]) throws Exception {
  String[] list=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  while (true) {
    long time=0;
    long s, e;
    Browser br=new Browser();
    for (    String serv : list) {
      s=System.currentTimeMillis();
      try {
        URLConnectionAdapter con=br.openGetConnection(serv + "String_Node_Str");
        e=System.currentTimeMillis();
        con.disconnect();
      }
 catch (      Exception ee) {
        e=100000;
        ee.printStackTrace();
      }
      System.out.println(serv + "String_Node_Str" + (e - s));
      time+=(e - s);
    }
    time/=list.length;
    System.err.println("String_Node_Str" + time);
    Thread.sleep(10000);
  }
}

Fixed version (ground truth):
/** 
 * pings the updateservers to observe them
 * @param ss
 * @throws Exception
 */
public static void main(String ss[]) throws Exception {
  String[] list=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  while (true) {
    long time=0;
    long s, e;
    Browser br=new Browser();
    File file=File.createTempFile("String_Node_Str" + System.currentTimeMillis(),"String_Node_Str");
    for (    String serv : list) {
      s=System.currentTimeMillis();
      try {
        URLConnectionAdapter con=br.openGetConnection(serv + "String_Node_Str");
        System.out.println("String_Node_Str" + (System.currentTimeMillis() - s) + "String_Node_Str");
        br.downloadConnection(file,con);
        e=System.currentTimeMillis();
        con.disconnect();
      }
 catch (      Exception ee) {
        e=100000;
        ee.printStackTrace();
      }
      System.out.println(serv + "String_Node_Str" + (e - s));
      time+=(e - s);
    }
    time/=(list.length);
    System.err.println("String_Node_Str" + file.length() / time + "String_Node_Str");
    Thread.sleep(10000);
  }
}
Program: 21034
Project: 21034
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);
  String[] redirectLinks=br.getRegex("String_Node_Str").getColumn(0);
  if (redirectLinks.length == 0)   return null;
  FilePackage fp=FilePackage.getInstance();
  String password=br.getRegex("String_Node_Str").getMatch(0);
  String name=br.getRegex("String_Node_Str").getMatch(0);
  fp.setPassword(password);
  fp.setName(name);
  for (  String redlnk : redirectLinks) {
    br.getPage("String_Node_Str" + redlnk);
    handleCaptcha();
    String[] hostLinks=br.getRegex("String_Node_Str").getColumn(0);
    for (    String hstlnk : hostLinks) {
      DownloadLink dl=createDownloadlink(hstlnk);
      dl.setFilePackage(fp);
      decryptedLinks.add(dl);
    }
  }
  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();
  if (parameter.matches("String_Node_Str"))   domain="String_Node_Str";
 else   if (parameter.matches("String_Node_Str"))   domain="String_Node_Str";
  br.getPage(parameter);
  String[] redirectLinks=br.getRegex("String_Node_Str").getColumn(0);
  if (redirectLinks.length == 0)   return null;
  FilePackage fp=FilePackage.getInstance();
  String password=br.getRegex("String_Node_Str").getMatch(0);
  String name=br.getRegex("String_Node_Str").getMatch(0);
  fp.setPassword(password);
  fp.setName(name);
  for (  String redlnk : redirectLinks) {
    br.getPage(this.domain + redlnk);
    handleCaptcha();
    String[] hostLinks=br.getRegex("String_Node_Str").getColumn(0);
    for (    String hstlnk : hostLinks) {
      DownloadLink dl=createDownloadlink(hstlnk);
      dl.setFilePackage(fp);
      decryptedLinks.add(dl);
    }
  }
  return decryptedLinks;
}
Program: 21035
Project: 21035
Buggy source:
public void handleCaptcha() throws Exception {
  boolean valid=true;
  for (int i=0; i < 5; ++i) {
    if (br.containsHTML("String_Node_Str")) {
      Form captcha=br.getForm(1);
      captcha.setAction("String_Node_Str" + captcha.getAction());
      valid=false;
      File file=this.getLocalCaptchaFile();
      String url="String_Node_Str" + captcha.getRegex("String_Node_Str").getMatch(0);
      Browser.download(file,br.cloneBrowser().openGetConnection(url));
      Point p=UserIO.getInstance().requestClickPositionDialog(file,JDL.L("String_Node_Str","String_Node_Str"),JDL.L("String_Node_Str","String_Node_Str"));
      if (p == null)       throw new DecrypterException(DecrypterException.CAPTCHA);
      captcha.put("String_Node_Str","String_Node_Str");
      captcha.put("String_Node_Str",p.x + "String_Node_Str");
      captcha.put("String_Node_Str",p.y + "String_Node_Str");
      br.submitForm(captcha);
    }
 else {
      valid=true;
      break;
    }
  }
  if (valid == false)   throw new DecrypterException(DecrypterException.CAPTCHA);
}

Fixed version (ground truth):
public void handleCaptcha() throws Exception {
  boolean valid=true;
  for (int i=0; i < 5; ++i) {
    if (br.containsHTML("String_Node_Str")) {
      Form captcha=br.getFormbyProperty("String_Node_Str","String_Node_Str");
      captcha.setAction(this.domain + captcha.getAction());
      valid=false;
      File file=this.getLocalCaptchaFile();
      String url=this.domain + captcha.getRegex("String_Node_Str").getMatch(0);
      Browser.download(file,br.cloneBrowser().openGetConnection(url));
      Point p=UserIO.getInstance().requestClickPositionDialog(file,JDL.L("String_Node_Str","String_Node_Str"),JDL.L("String_Node_Str","String_Node_Str"));
      if (p == null)       throw new DecrypterException(DecrypterException.CAPTCHA);
      captcha.put("String_Node_Str","String_Node_Str");
      captcha.put("String_Node_Str",p.x + "String_Node_Str");
      captcha.put("String_Node_Str",p.y + "String_Node_Str");
      br.submitForm(captcha);
    }
 else {
      valid=true;
      break;
    }
  }
  if (valid == false)   throw new DecrypterException(DecrypterException.CAPTCHA);
}
Program: 21036
Project: 21036
Buggy source:
/** 
 * Name des Hintergrundbildes setzen
 * @param backgroundImage
 */
public void setBackgroundImage(String backgroundImage){
  this.backgroundImage=backgroundImage;
}

Fixed version (ground truth):
/** 
 * Name des Hintergrundbildes setzen
 * @param backgroundImage
 */
public void setBackgroundImage(String backgroundImage){
  image=null;
  this.backgroundImage=backgroundImage;
}
Program: 21037
Project: 21037
Buggy source:
private void addActionListeners(){
  btColorChoose.addActionListener(this);
  btPreview.addActionListener(this);
  btFinished.addActionListener(this);
  btLoadBackgroundImage.addActionListener(this);
  btCreateBackgroundFilter.addActionListener(this);
  mode.addActionListener(this);
}

Fixed version (ground truth):
private void addActionListeners(){
  btColorChoose.addActionListener(this);
  btPreview.addActionListener(this);
  btFinished.addActionListener(this);
  btLoadBackgroundImage.addActionListener(this);
  btCreateBackgroundFilter.addActionListener(this);
  colorModeBox.addActionListener(this);
}
Program: 21039
Project: 21039
Buggy source:
private void initCaptchaImages(){
  bgim.getCaptchaImage().reset();
  final Image image=bgim.getScaledCaptchaImage();
  new GuiRunnable<Object>(){
    public Object runSave(){
      images=new JPanel();
      images.setBorder(new TitledBorder(JDL.L("String_Node_Str","String_Node_Str")));
      images.setLayout(new BoxLayout(images,BoxLayout.Y_AXIS));
      images.add(new JLabel(JDL.L("String_Node_Str","String_Node_Str")));
      bg1=new ImageComponent(image);
      images.add(bg1);
      images.add(Box.createRigidArea(new Dimension(0,10)));
      images.add(new JLabel(JDL.L("String_Node_Str","String_Node_Str") + "String_Node_Str"));
      if (dialogImage != null) {
        threshold=dialogImage.getDistance();
        modeByte=dialogImage.getColorDistanceMode();
        bgim.add(dialogImage);
        bgim.clearCaptchaAll();
        bgim.remove(dialogImage);
      }
 else       bgim.clearCaptchaAll();
      bgv=new ImageComponent(bgim.getScaledCaptchaImage());
      images.add(bgv);
      return null;
    }
  }
.waitForEDT();
}

Fixed version (ground truth):
private void initCaptchaImages(){
  bgim.getCaptchaImage().reset();
  final Image image=bgim.getScaledCaptchaImage();
  new GuiRunnable<Object>(){
    public Object runSave(){
      imagePanel=new JPanel();
      imagePanel.setBorder(new TitledBorder(JDL.L("String_Node_Str","String_Node_Str")));
      imagePanel.setLayout(new BoxLayout(imagePanel,BoxLayout.Y_AXIS));
      imagePanel.add(new JLabel(JDL.L("String_Node_Str","String_Node_Str")));
      bg1=new ImageComponent(image);
      imagePanel.add(bg1);
      imagePanel.add(Box.createRigidArea(new Dimension(0,10)));
      imagePanel.add(new JLabel(JDL.L("String_Node_Str","String_Node_Str") + "String_Node_Str"));
      if (dialogImage != null) {
        threshold=dialogImage.getDistance();
        colorMode=dialogImage.getColorDistanceMode();
        bgim.add(dialogImage);
        bgim.clearCaptchaAll();
        bgim.remove(dialogImage);
      }
 else       bgim.clearCaptchaAll();
      bgv=new ImageComponent(bgim.getScaledCaptchaImage());
      imagePanel.add(bgv);
      return null;
    }
  }
.waitForEDT();
}
Program: 21040
Project: 21040
Buggy source:
private void addComponentsToDialog(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      JPanel box=new JPanel();
      box.setLayout(new GridBagLayout());
      GridBagConstraints gbc=Utilities.getGBC(0,0,1,1);
      gbc.anchor=GridBagConstraints.NORTH;
      gbc.fill=GridBagConstraints.BOTH;
      gbc.weighty=1;
      gbc.weightx=1;
      box.add(images,gbc);
      Box menu=new Box(BoxLayout.X_AXIS);
      menu.add(btLoadBackgroundImage);
      menu.add(btCreateBackgroundFilter);
      menu.add(btColorChoose);
      menu.add(btPreview);
      menu.add(thresholdSpinner);
      menu.add(mode);
      menu.add(btFinished);
      gbc.gridy=1;
      box.add(menu,gbc);
      dialog.add(box);
      dialog.pack();
      addActionListeners();
      dialog.setVisible(true);
      return null;
    }
  }
.waitForEDT();
}

Fixed version (ground truth):
private void addComponentsToDialog(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      JPanel box=new JPanel();
      box.setLayout(new GridBagLayout());
      GridBagConstraints gbc=Utilities.getGBC(0,0,1,1);
      gbc.anchor=GridBagConstraints.NORTH;
      gbc.fill=GridBagConstraints.BOTH;
      gbc.weighty=1;
      gbc.weightx=1;
      box.add(imagePanel,gbc);
      Box menu=new Box(BoxLayout.X_AXIS);
      menu.add(btLoadBackgroundImage);
      menu.add(btCreateBackgroundFilter);
      menu.add(btColorChoose);
      menu.add(btPreview);
      menu.add(thresholdSpinner);
      menu.add(colorModeBox);
      menu.add(btFinished);
      gbc.gridy=1;
      box.add(menu,gbc);
      dialog.add(box);
      dialog.pack();
      addActionListeners();
      dialog.setVisible(true);
      return null;
    }
  }
.waitForEDT();
}
Program: 21041
Project: 21041
Buggy source:
private void initComponents(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      thresholdSpinner=new JSpinner(new SpinnerNumberModel(threshold,0,360,1));
      thresholdSpinner.setToolTipText("String_Node_Str");
      btLoadBackgroundImage=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      btCreateBackgroundFilter=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      Color defColor=Color.WHITE;
      if (dialogImage != null)       defColor=new Color(dialogImage.getColor());
      colorChooser=new JColorChooser(defColor);
      btColorChoose=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      btPreview=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      if (dialogImage == null)       btPreview.setEnabled(false);
      mode=new JComboBox(ColorMode.cModes);
      mode.setSelectedItem(new ColorMode(modeByte));
      btFinished=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      return null;
    }
  }
.waitForEDT();
}

Fixed version (ground truth):
private void initComponents(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      thresholdSpinner=new JSpinner(new SpinnerNumberModel(threshold,0,360,1));
      thresholdSpinner.setToolTipText("String_Node_Str");
      btLoadBackgroundImage=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      btCreateBackgroundFilter=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      Color defColor=Color.WHITE;
      if (dialogImage != null)       defColor=new Color(dialogImage.getColor());
      colorChooser=new JColorChooser(defColor);
      btColorChoose=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      btPreview=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      if (dialogImage == null)       btPreview.setEnabled(false);
      colorModeBox=new JComboBox(ColorMode.cModes);
      colorModeBox.setSelectedItem(new ColorMode(colorMode));
      btFinished=new JButton(JDL.L("String_Node_Str","String_Node_Str"));
      return null;
    }
  }
.waitForEDT();
}
Program: 21042
Project: 21042
Buggy source:
public void actionPerformed(ActionEvent e){
  if (e.getSource() == btExit) {
    manager.save();
    new GuiRunnable<Object>(){
      public Object runSave(){
        mainDialog.dispose();
        return null;
      }
    }
.waitForEDT();
  }
 else   if (e.getSource() == btAdd) {
    BackGroundImageDialog bgiaDialog=new BackGroundImageDialog(manager);
    showImage(bgiaDialog.getNewBackGroundImage());
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if (e.getSource() == btExit) {
    manager.save();
    new GuiRunnable<Object>(){
      public Object runSave(){
        mainDialog.dispose();
        return null;
      }
    }
.waitForEDT();
  }
 else   if (e.getSource() == btAdd) {
    BackGroundImageDialog bgiaDialog=new BackGroundImageDialog(manager);
    showImage(bgiaDialog.getNewBackGroundImage());
    mainDialog.pack();
  }
}
Program: 21043
Project: 21043
Buggy source:
public void showImages(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      imageBox=new JPanel();
      imageBox.setLayout(new BoxLayout(imageBox,BoxLayout.Y_AXIS));
      panel.add(imageBox);
      return null;
    }
  }
.waitForEDT();
  for (  BackGroundImage bgi : manager.getBackgroundList()) {
    bgi.getImage(manager.methode);
    showImage(bgi);
  }
}

Fixed version (ground truth):
public void showImages(){
  new GuiRunnable<Object>(){
    public Object runSave(){
      imageBox=new JPanel();
      imageBox.setLayout(new BoxLayout(imageBox,BoxLayout.Y_AXIS));
      panel.add(imageBox);
      return null;
    }
  }
.waitForEDT();
  for (  BackGroundImage bgi : manager.getBackgroundList()) {
    if (bgi != null) {
      bgi.getImage(manager.methode);
      showImage(bgi);
    }
  }
}
Program: 21045
Project: 21045
Buggy source:
public BackGroundImageGUIList(EasyFile methode){
  manager=new BackGroundImageManager(methode);
}

Fixed version (ground truth):
public BackGroundImageGUIList(EasyFile methode){
  this.manager=new BackGroundImageManager(methode);
}
Program: 21047
Project: 21047
Buggy source:
/** 
 * legt ein backup vom aktuellen Captcha an
 */
@SuppressWarnings("String_Node_Str") public void backUP(){
  colorPointListBackUp=(Vector<CPoint>)colorPointList.clone();
  backUpCaptcha=new Captcha(workingCaptcha.getHeight(),workingCaptcha.getWidth());
  backUpCaptcha.grid=new int[workingCaptcha.getWidth()][workingCaptcha.getHeight()];
  for (int a=0; a < workingCaptcha.grid.length; a++) {
    backUpCaptcha.grid[a]=workingCaptcha.grid[a].clone();
  }
}

Fixed version (ground truth):
/** 
 * legt ein backup vom aktuellen Captcha an
 */
@SuppressWarnings("String_Node_Str") public void backUP(){
  if (colorPointList != null)   colorPointListBackUp=(Vector<CPoint>)colorPointList.clone();
 else   colorPointListBackUp=null;
  backUpCaptcha=new Captcha(workingCaptcha.getHeight(),workingCaptcha.getWidth());
  backUpCaptcha.grid=new int[workingCaptcha.getWidth()][workingCaptcha.getHeight()];
  for (int a=0; a < workingCaptcha.grid.length; a++) {
    backUpCaptcha.grid[a]=workingCaptcha.grid[a].clone();
  }
}
Program: 21048
Project: 21048
Buggy source:
public void addPixel(final CPoint p){
  if (!colorTrainer.colorPointList.contains(p)) {
    backUP();
    addPixel(p);
    ic.image=colorTrainer.getScaledWorkingCaptchaImage();
    new GuiRunnable<Object>(){
      public Object runSave(){
        panel.repaint();
        panel.revalidate();
        return null;
      }
    }
.waitForEDT();
  }
}

Fixed version (ground truth):
public void addPixel(final CPoint p){
  if (!colorTrainer.colorPointList.contains(p)) {
    backUP();
    colorTrainer.addCPoint(p);
    ic.image=colorTrainer.getScaledWorkingCaptchaImage();
    new GuiRunnable<Object>(){
      public Object runSave(){
        panel.repaint();
        panel.revalidate();
        return null;
      }
    }
.waitForEDT();
  }
}
Program: 21053
Project: 21053
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.getPage(downloadLink.getDownloadURL());
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  Regex infos=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL));
  String fileName=infos.getMatch(0);
  String fileSize=infos.getMatch(1);
  if (fileName == null || fileSize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  fileSize=fileSize.replaceAll("String_Node_Str","String_Node_Str");
  fileSize=fileSize.replaceAll("String_Node_Str","String_Node_Str");
  fileSize=fileSize + "String_Node_Str";
  downloadLink.setName(fileName.trim());
  downloadLink.setDownloadSize(Regex.getSize(fileSize.trim()));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  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);
  String fileSize=br.getRegex("String_Node_Str").getMatch(0);
  if (fileName == null || fileSize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  fileSize=fileSize.replaceAll("String_Node_Str","String_Node_Str");
  downloadLink.setName(fileName.trim());
  downloadLink.setDownloadSize(Regex.getSize(fileSize.replaceAll("String_Node_Str","String_Node_Str")));
  return AvailableStatus.TRUE;
}
Program: 21055
Project: 21055
Buggy source:
public void update(){
  if (fp == null)   return;
  notifyUpdate=false;
  if (!txtSize.isFocusOwner())   txtSize.setText(Formatter.formatReadable(fp.getTotalEstimatedPackageSize()));
  if (!txtName.isFocusOwner())   txtName.setText(fp.getName());
  if (!txtComment.isFocusOwner())   txtComment.setText(fp.getComment());
  if (!txtPassword.isFocusOwner())   txtPassword.setText(fp.getPassword());
  if (!brwSaveTo.isFocusOwner())   brwSaveTo.setText(fp.getDownloadDirectory());
  if (!chbExtract.isFocusOwner())   chbExtract.setSelected(fp.isExtractAfterDownload());
  revalidate();
  notifyUpdate=true;
}

Fixed version (ground truth):
public void update(){
  if (fp == null || notifyUpdate == false)   return;
  notifyUpdate=false;
  if (!txtSize.isFocusOwner())   txtSize.setText(Formatter.formatReadable(fp.getTotalEstimatedPackageSize()));
  if (!txtName.isFocusOwner())   txtName.setText(fp.getName());
  if (!txtComment.isFocusOwner())   txtComment.setText(fp.getComment());
  if (!txtPassword.isFocusOwner())   txtPassword.setText(fp.getPassword());
  if (!brwSaveTo.isFocusOwner())   brwSaveTo.setText(fp.getDownloadDirectory());
  if (!chbExtract.isFocusOwner())   chbExtract.setSelected(fp.isExtractAfterDownload());
  revalidate();
  notifyUpdate=true;
}
Program: 21056
Project: 21056
Buggy source:
public void update(){
  if (fp == null)   return;
  notifyUpdate=false;
  if (!txtName.isFocusOwner())   txtName.setText(fp.getName());
  if (!txtComment.isFocusOwner())   txtComment.setText(fp.getComment());
  if (!txtPassword.isFocusOwner())   txtPassword.setText(fp.getPassword());
  if (!brwSaveTo.isFocusOwner())   brwSaveTo.setText(fp.getDownloadDirectory());
  if (!chbExtract.isFocusOwner())   chbExtract.setSelected(fp.isExtractAfterDownload());
  if (!chbUseSubdirectory.isFocusOwner())   chbUseSubdirectory.setSelected(fp.useSubDir());
  revalidate();
  notifyUpdate=true;
}

Fixed version (ground truth):
public void update(){
  if (fp == null || notifyUpdate == false)   return;
  notifyUpdate=false;
  if (!txtName.isFocusOwner())   txtName.setText(fp.getName());
  if (!txtComment.isFocusOwner())   txtComment.setText(fp.getComment());
  if (!txtPassword.isFocusOwner())   txtPassword.setText(fp.getPassword());
  if (!brwSaveTo.isFocusOwner())   brwSaveTo.setText(fp.getDownloadDirectory());
  if (!chbExtract.isFocusOwner())   chbExtract.setSelected(fp.isExtractAfterDownload());
  if (!chbUseSubdirectory.isFocusOwner())   chbUseSubdirectory.setSelected(fp.useSubDir());
  revalidate();
  notifyUpdate=true;
}
Program: 21057
Project: 21057
Buggy source:
private JMenu buildpriomenu(ArrayList<DownloadLink> links){
  JMenuItem tmp;
  JMenu prioPopup=new JMenu(JDL.L("String_Node_Str","String_Node_Str") + "String_Node_Str" + links.size()+ "String_Node_Str");
  Integer prio=null;
  if (links.size() == 1)   prio=links.get(0).getPriority();
  prioPopup.setIcon(JDTheme.II("String_Node_Str",16,16));
  HashMap<String,Object> prop=null;
  for (int i=3; i >= 1; i--) {
    prop=new HashMap<String,Object>();
    prop.put("String_Node_Str",links);
    prop.put("String_Node_Str",new Integer(i));
    prioPopup.add(tmp=new JMenuItem(new LinkGrabberTableAction(linkgrabber,JDTheme.II("String_Node_Str" + i,16,16),prioDescs[i + 1],LinkGrabberTableAction.DOWNLOAD_PRIO,new Property("String_Node_Str",prop))));
    if (prio != null && i == prio) {
      tmp.setEnabled(false);
      tmp.setIcon(JDTheme.II("String_Node_Str" + i,16,16));
    }
 else     tmp.setEnabled(true);
  }
  return prioPopup;
}

Fixed version (ground truth):
private JMenu buildpriomenu(ArrayList<DownloadLink> links){
  JMenuItem tmp;
  JMenu prioPopup=new JMenu(JDL.L("String_Node_Str","String_Node_Str") + "String_Node_Str" + links.size()+ "String_Node_Str");
  Integer prio=null;
  if (links.size() == 1)   prio=links.get(0).getPriority();
  prioPopup.setIcon(JDTheme.II("String_Node_Str",16,16));
  HashMap<String,Object> prop=null;
  for (int i=3; i >= -1; i--) {
    prop=new HashMap<String,Object>();
    prop.put("String_Node_Str",links);
    prop.put("String_Node_Str",new Integer(i));
    prioPopup.add(tmp=new JMenuItem(new LinkGrabberTableAction(linkgrabber,JDTheme.II("String_Node_Str" + i,16,16),prioDescs[i + 1],LinkGrabberTableAction.DOWNLOAD_PRIO,new Property("String_Node_Str",prop))));
    if (prio != null && i == prio) {
      tmp.setEnabled(false);
      tmp.setIcon(JDTheme.II("String_Node_Str" + i,16,16));
    }
 else     tmp.setEnabled(true);
  }
  return prioPopup;
}