nus-yam/ex-repair huggingface dataset:
Program: 20966
Project: 20966
Buggy source:
@Override public boolean initAddon(){
  if (menuAction == null)   menuAction=new MenuAction(JDL.L("String_Node_Str","String_Node_Str"),"String_Node_Str"){
    /** 
 */
    private static final long serialVersionUID=-5269457972563036769L;
    public void initDefaults(){
      this.setEnabled(true);
      setType(ToolBarAction.Types.TOGGLE);
      this.setIcon("String_Node_Str");
      this.addPropertyChangeListener(new PropertyChangeListener(){
        public void propertyChange(        PropertyChangeEvent evt){
          if (evt.getPropertyName() == SELECTED_KEY) {
            status=isSelected();
          }
        }
      }
);
    }
  }
;
switch (OSDetector.getOSID()) {
case OSDetector.OS_WINDOWS_2003:
case OSDetector.OS_WINDOWS_VISTA:
case OSDetector.OS_WINDOWS_XP:
case OSDetector.OS_WINDOWS_7:
case OSDetector.OS_WINDOWS_2000:
case OSDetector.OS_WINDOWS_NT:
    thread=new Thread(asthread=new JDAntiStandbyThread(Plugin.logger,this));
  thread.start();
break;
default :
logger.fine("String_Node_Str");
}
return true;
}

Fixed version (ground truth):
@Override public boolean initAddon(){
  if (menuAction == null)   menuAction=new MenuAction("String_Node_Str","String_Node_Str"){
    private static final long serialVersionUID=-5269457972563036769L;
    @Override public void initDefaults(){
      this.setEnabled(true);
      this.setType(ToolBarAction.Types.TOGGLE);
      this.addPropertyChangeListener(new PropertyChangeListener(){
        public void propertyChange(        PropertyChangeEvent evt){
          if (evt.getPropertyName() == SELECTED_KEY) {
            status=isSelected();
          }
        }
      }
);
    }
  }
;
switch (OSDetector.getOSID()) {
case OSDetector.OS_WINDOWS_2003:
case OSDetector.OS_WINDOWS_VISTA:
case OSDetector.OS_WINDOWS_XP:
case OSDetector.OS_WINDOWS_7:
case OSDetector.OS_WINDOWS_2000:
case OSDetector.OS_WINDOWS_NT:
    thread=new Thread(asthread=new JDAntiStandbyThread(this));
  thread.start();
break;
default :
logger.fine("String_Node_Str" + OSDetector.getOSString() + "String_Node_Str");
}
return true;
}
Program: 20967
Project: 20967
Buggy source:
public void initDefaults(){
  this.setEnabled(true);
  setType(ToolBarAction.Types.TOGGLE);
  this.setIcon("String_Node_Str");
  this.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getPropertyName() == SELECTED_KEY) {
        status=isSelected();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void initDefaults(){
  this.setEnabled(true);
  this.setType(ToolBarAction.Types.TOGGLE);
  this.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getPropertyName() == SELECTED_KEY) {
        status=isSelected();
      }
    }
  }
);
}
Program: 20968
Project: 20968
Buggy source:
public void initConfig(){
  SubConfiguration subConfig=getPluginConfig();
  config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX,subConfig,CONFIG_MODE,MODES_AVAIL,JDL.L("String_Node_Str","String_Node_Str")).setDefaultValue(0));
}

Fixed version (ground truth):
private void initConfig(){
  config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX,getPluginConfig(),CONFIG_MODE,MODES_AVAIL,JDL.L("String_Node_Str","String_Node_Str")).setDefaultValue(0));
}
Program: 20969
Project: 20969
Buggy source:
public JDAntiStandbyThread(Logger logger,JDAntiStandby jdAntiStandby){
  super();
  this.logger=logger;
  this.jdAntiStandby=jdAntiStandby;
}

Fixed version (ground truth):
public JDAntiStandbyThread(JDAntiStandby jdAntiStandby){
  super();
  this.logger=JDLogger.getLogger();
  this.jdAntiStandby=jdAntiStandby;
}
Program: 20972
Project: 20972
Buggy source:
/** 
 * Checks if the downloadlink is valid and online. Throws a PluginException if this file is likely invalid, damaged or has any other errors.
 */
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException, IOException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getPage(downloadLink.getDownloadURL());
  String hash=new Regex(downloadLink.getDownloadURL().toLowerCase(),"String_Node_Str").getMatch(0);
  downloadLink.setMD5Hash(hash);
  String name=br.getPage("String_Node_Str" + hash + "String_Node_Str").trim();
  parseError(name);
  String size=br.getPage("String_Node_Str" + hash + "String_Node_Str").trim();
  downloadLink.setFinalFileName(name);
  downloadLink.setDownloadSize(Long.parseLong(size));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
/** 
 * Checks if the downloadlink is valid and online. Throws a PluginException if this file is likely invalid, damaged or has any other errors.
 */
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException, IOException {
  this.setBrowserExclusive();
  br.setFollowRedirects(true);
  br.getPage(downloadLink.getDownloadURL());
  String hash=new Regex(downloadLink.getDownloadURL().toLowerCase(),"String_Node_Str").getMatch(0);
  String name=br.getPage("String_Node_Str" + hash + "String_Node_Str").trim();
  parseError(name);
  String size=br.getPage("String_Node_Str" + hash + "String_Node_Str").trim();
  downloadLink.setFinalFileName(name);
  downloadLink.setDownloadSize(Long.parseLong(size));
  String md5hash=br.getPage("String_Node_Str" + hash + "String_Node_Str").trim();
  downloadLink.setMD5Hash(md5hash);
  return AvailableStatus.TRUE;
}
Program: 20973
Project: 20973
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=p;
  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) ? 1 : 0;
      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;
    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];
}
Program: 20974
Project: 20974
Buggy source:
public void checkErrors() throws NumberFormatException, PluginException {
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,20 * 60 * 1000l);
  if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str")) {
    String wait=br.getRegex("String_Node_Str").getMatch(0);
    if (wait != null)     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,Integer.parseInt(wait.trim()) * 1000l);
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,30 * 60 * 1000l);
  }
  if (br.containsHTML("String_Node_Str")) {
    String wait=br.getRegex("String_Node_Str").getMatch(0);
    if (wait != null)     throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,Integer.parseInt(wait.trim()) * 1000l);
    throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,JDL.L("String_Node_Str","String_Node_Str"),30 * 60 * 1000l);
  }
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,5 * 60 * 1001l);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,5 * 60 * 1001l);
  String wait=br.getRegex("String_Node_Str").getMatch(0);
  if (wait != null)   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,Regex.getMilliSeconds(wait));
  if (br.containsHTML("String_Node_Str")) {
    logger.info("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
  }
}

Fixed version (ground truth):
public void checkErrors() throws NumberFormatException, PluginException {
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,20 * 60 * 1000l);
  if (br.containsHTML("String_Node_Str") || br.containsHTML("String_Node_Str")) {
    String wait=br.getRegex("String_Node_Str").getMatch(0);
    if (wait != null)     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,Integer.parseInt(wait.trim()) * 1000l);
    throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,30 * 60 * 1000l);
  }
  if (br.containsHTML("String_Node_Str")) {
    throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,JDL.L("String_Node_Str","String_Node_Str"),10 * 60 * 1000l);
  }
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,5 * 60 * 1001l);
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,5 * 60 * 1001l);
  String wait=br.getRegex("String_Node_Str").getMatch(0);
  if (wait != null)   throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,Regex.getMilliSeconds(wait));
  if (br.containsHTML("String_Node_Str")) {
    logger.info("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
  }
}
Program: 20977
Project: 20977
Buggy source:
@Override public Component myTableCellRendererComponent(JDTableModel table,Object value,boolean isSelected,boolean hasFocus,int row,int column){
  if (!((Actions)value).isEnabled()) {
    jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
  }
 else {
    nexttime=((Actions)value).getDate().getTime() - System.currentTimeMillis();
    if (nexttime < 0) {
      if (((Actions)value).getRepeat() == 0) {
        jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
      }
 else {
        jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
      }
    }
 else {
      jlr.setText(Formatter.formatSeconds(nexttime / 1000,false));
    }
  }
  return jlr;
}

Fixed version (ground truth):
@Override public Component myTableCellRendererComponent(JDTableModel table,Object value,boolean isSelected,boolean hasFocus,int row,int column){
  if (!((Actions)value).isEnabled()) {
    jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
  }
 else {
    nexttime=((Actions)value).getDate().getTime() - System.currentTimeMillis();
    if (nexttime < 0) {
      if (((Actions)value).getRepeat() == 0) {
        jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
      }
 else {
        jlr.setText(JDL.L("String_Node_Str","String_Node_Str"));
      }
    }
 else {
      if (nexttime < 60000)       nexttime=60000;
      jlr.setText(Formatter.formatSeconds(nexttime / 1000,false));
    }
  }
  return jlr;
}
Program: 20978
Project: 20978
Buggy source:
@Override public ArrayList<DownloadLink> decryptIt(CryptedLink parameter,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  FilePackage fp=FilePackage.getInstance();
  br.getPage(parameter.toString());
  String fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
  if (fpName == null) {
    fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
    if (fpName == null) {
      fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
      if (fpName == null) {
        fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
        if (fpName == null) {
          fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
        }
      }
    }
  }
  fp.setName(fpName);
  String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL)).getMatch(0);
  String[] links=temp.split("String_Node_Str");
  progress.setRange(links.length);
  for (  String data : links) {
    decryptedLinks.add(createDownloadlink(data));
    progress.increase(1);
  }
  fp.addLinks(decryptedLinks);
  return decryptedLinks;
}

Fixed version (ground truth):
@Override public ArrayList<DownloadLink> decryptIt(CryptedLink parameter,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  FilePackage fp=FilePackage.getInstance();
  br.getPage(parameter.toString());
  String fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
  if (fpName == null) {
    fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
    if (fpName == null) {
      fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
      if (fpName == null) {
        fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
        if (fpName == null) {
          fpName=br.getRegex("String_Node_Str").getMatch(0).trim();
        }
      }
    }
  }
  fp.setName(fpName);
  String temp=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL)).getMatch(0);
  if (temp == null)   return null;
  String[] links=temp.split("String_Node_Str");
  if (links == null || links.length == 0)   return null;
  progress.setRange(links.length);
  for (  String data : links) {
    decryptedLinks.add(createDownloadlink(data));
    progress.increase(1);
  }
  fp.addLinks(decryptedLinks);
  return decryptedLinks;
}
Program: 20981
Project: 20981
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  requestFileInformation(downloadLink);
  br.setFollowRedirects(true);
  Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
  if (DLForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String passCode=null;
  if (br.containsHTML("String_Node_Str")) {
    if (downloadLink.getStringProperty("String_Node_Str",null) == null) {
      passCode=Plugin.getUserInput("String_Node_Str",downloadLink);
    }
 else {
      passCode=downloadLink.getStringProperty("String_Node_Str",null);
    }
    DLForm.put("String_Node_Str",passCode);
  }
  int tt=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  sleep(tt * 1001,downloadLink);
  jd.plugins.BrowserAdapter.openDownload(br,downloadLink,DLForm,false,1);
  if (!(dl.getConnection().isContentDisposition())) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      downloadLink.setProperty("String_Node_Str",null);
      throw new PluginException(LinkStatus.ERROR_RETRY);
    }
  }
  if (passCode != null) {
    downloadLink.setProperty("String_Node_Str",passCode);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  requestFileInformation(downloadLink);
  br.setFollowRedirects(true);
  Form DLForm=br.getFormbyProperty("String_Node_Str","String_Node_Str");
  if (DLForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  String passCode=null;
  if (br.containsHTML("String_Node_Str")) {
    if (downloadLink.getStringProperty("String_Node_Str",null) == null) {
      passCode=Plugin.getUserInput("String_Node_Str",downloadLink);
    }
 else {
      passCode=downloadLink.getStringProperty("String_Node_Str",null);
    }
    DLForm.put("String_Node_Str",passCode);
  }
  int tt=Integer.parseInt(br.getRegex("String_Node_Str").getMatch(0));
  sleep(tt * 1001,downloadLink);
  jd.plugins.BrowserAdapter.openDownload(br,downloadLink,DLForm,false,1);
  if (!(dl.getConnection().isContentDisposition())) {
    br.followConnection();
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      downloadLink.setProperty("String_Node_Str",null);
      throw new PluginException(LinkStatus.ERROR_RETRY);
    }
    throw new PluginException(LinkStatus.ERROR_FATAL);
  }
  if (passCode != null) {
    downloadLink.setProperty("String_Node_Str",passCode);
  }
  dl.startDownload();
}
Program: 20982
Project: 20982
Buggy source:
public FileBoxCom(PluginWrapper wrapper){
  super(wrapper);
}

Fixed version (ground truth):
public FileBoxCom(PluginWrapper wrapper){
  super(wrapper);
  enablePremium("String_Node_Str");
}
Program: 20983
Project: 20983
Buggy source:
@Override public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo();
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    account.setValid(false);
    return ai;
  }
  String validUntil=br.getRegex("String_Node_Str").getMatch(0);
  if (validUntil == null) {
    account.setValid(false);
  }
 else {
    ai.setValidUntil(Regex.getMilliSeconds(validUntil,"String_Node_Str",null));
    account.setValid(true);
  }
  br.getPage("String_Node_Str");
  String trafficleft=br.getRegex("String_Node_Str").getMatch(1);
  if (trafficleft != null)   ai.setTrafficLeft(Encoding.htmlDecode(trafficleft));
  String trafficmax=br.getRegex("String_Node_Str").getMatch(1);
  if (trafficmax != null)   ai.setTrafficMax(Regex.getSize(Encoding.htmlDecode(trafficmax)));
  return ai;
}

Fixed version (ground truth):
@Override public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo();
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    account.setValid(false);
    return ai;
  }
  String validUntil=br.getRegex("String_Node_Str").getMatch(0);
  if (validUntil == null)   validUntil=br.getRegex("String_Node_Str").getMatch(0);
  if (validUntil == null) {
    account.setValid(false);
    return ai;
  }
 else {
    ai.setValidUntil(Regex.getMilliSeconds(validUntil,"String_Node_Str",null));
    account.setValid(true);
  }
  br.getPage("String_Node_Str");
  String trafficleft=br.getRegex("String_Node_Str").getMatch(1);
  if (trafficleft != null)   ai.setTrafficLeft(Encoding.htmlDecode(trafficleft));
  String trafficmax=br.getRegex("String_Node_Str").getMatch(1);
  if (trafficmax != null)   ai.setTrafficMax(Regex.getSize(Encoding.htmlDecode(trafficmax)));
  return ai;
}
Program: 20984
Project: 20984
Buggy source:
public void login(Account account) throws Exception {
  this.setBrowserExclusive();
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage("String_Node_Str");
  Form form=br.getForm(0);
  form.put(form.getBestVariable("String_Node_Str"),Encoding.urlEncode(account.getUser()));
  form.put(form.getBestVariable("String_Node_Str"),Encoding.urlEncode(account.getPass()));
  br.submitForm(form);
  br.getPage("String_Node_Str");
  if (!br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
}

Fixed version (ground truth):
public void login(Account account) throws Exception {
  this.setBrowserExclusive();
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage("String_Node_Str");
  Form form=br.getForm(0);
  form.put(form.getBestVariable("String_Node_Str"),Encoding.urlEncode(account.getUser()));
  form.put(form.getBestVariable("String_Node_Str"),Encoding.urlEncode(account.getPass()));
  br.submitForm(form);
  br.getPage("String_Node_Str");
  if (!br.containsHTML("String_Node_Str")) {
    if (!br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
  }
}
Program: 20986
Project: 20986
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 pages[]=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
  progress.setRange(0);
  add(decryptedLinks,progress);
  if (pages.length > 1) {
    for (int i=2; i <= Integer.parseInt(pages[pages.length - 1]); i++) {
      br.getPage(parameter + "String_Node_Str" + i);
      add(decryptedLinks,progress);
    }
  }
  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);
  if (br.containsHTML("String_Node_Str")) {
    logger.warning("String_Node_Str");
    logger.warning(JDL.L("String_Node_Str","String_Node_Str"));
    return new ArrayList<DownloadLink>();
  }
  String pages[]=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getColumn(0);
  progress.setRange(0);
  add(decryptedLinks,progress);
  if (pages.length > 1) {
    for (int i=2; i <= Integer.parseInt(pages[pages.length - 1]); i++) {
      br.getPage(parameter + "String_Node_Str" + i);
      add(decryptedLinks,progress);
    }
  }
  return decryptedLinks;
}
Program: 20989
Project: 20989
Buggy source:
public static void createJacinfoXml(EasyMethodFile destination,String user,int lettersize,boolean showLoadDialog){
  String jacInfoXml=getjacInfoXmlString(destination,user,lettersize,showLoadDialog);
  destination.file=new File(destination.file.getParentFile(),destination.getName().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str"));
  File ji=destination.getJacinfoXml();
  if (ji.exists())   ji.renameTo(new File(destination.file,"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str"));
  JDIO.writeLocalFile(ji,jacInfoXml,false);
}

Fixed version (ground truth):
public static void createJacinfoXml(EasyMethodFile destination,String user,int lettersize,boolean showLoadDialog){
  String jacInfoXml=getjacInfoXmlString(destination,user,lettersize,showLoadDialog);
  destination.file=new File(destination.file.getParentFile(),destination.getName().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str"));
  destination.file.mkdirs();
  File ji=destination.getJacinfoXml();
  if (ji.exists())   ji.renameTo(new File(destination.file,"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str"));
  JDIO.writeLocalFile(ji,jacInfoXml,false);
}
Program: 20990
Project: 20990
Buggy source:
public static void create(EasyMethodFile ParentHost,EasyMethodFile destination,String user,int lettersize){
  destination.file.mkdir();
  createJacinfoXml(destination,user,lettersize,false);
  copyScriptJas(ParentHost,destination);
}

Fixed version (ground truth):
public static void create(EasyMethodFile ParentHost,EasyMethodFile destination,String user,int lettersize){
  createJacinfoXml(destination,user,lettersize,false);
  copyScriptJas(ParentHost,destination);
}
Program: 20991
Project: 20991
Buggy source:
private void onErrorPluginDefect(DownloadLink downloadLink2,PluginForHost currentPlugin2){
  logger.warning("String_Node_Str" + currentPlugin.getHost() + "String_Node_Str"+ downloadLink.getPlugin().getVersion()+ "String_Node_Str");
  logger.warning(downloadLink2.getLinkStatus().getErrorMessage());
  try {
    logger.finest(currentPlugin2.getBrowser().getRequest().getHttpConnection() + "String_Node_Str");
  }
 catch (  Exception e) {
    JDLogger.exception(e);
  }
  try {
    logger.finest(currentPlugin2.getBrowser() + "String_Node_Str");
  }
 catch (  Exception e) {
    JDLogger.exception(e);
  }
  downloadLink2.getLinkStatus().addStatus(LinkStatus.ERROR_FATAL);
  downloadLink2.getLinkStatus().setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
  downloadLink.requestGuiUpdate();
}

Fixed version (ground truth):
private void onErrorPluginDefect(DownloadLink downloadLink2,PluginForHost currentPlugin2){
  logger.warning("String_Node_Str" + currentPlugin.getHost() + "String_Node_Str"+ downloadLink.getPlugin().getVersion()+ "String_Node_Str");
  if (downloadLink2.getLinkStatus().getErrorMessage() != null)   logger.warning(downloadLink2.getLinkStatus().getErrorMessage());
  try {
    logger.finest(currentPlugin2.getBrowser().getRequest().getHttpConnection() + "String_Node_Str");
  }
 catch (  Exception e) {
    JDLogger.exception(e);
  }
  try {
    logger.finest(currentPlugin2.getBrowser() + "String_Node_Str");
  }
 catch (  Exception e) {
    JDLogger.exception(e);
  }
  downloadLink2.getLinkStatus().addStatus(LinkStatus.ERROR_FATAL);
  downloadLink2.getLinkStatus().setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
  downloadLink.requestGuiUpdate();
}
Program: 20992
Project: 20992
Buggy source:
protected boolean runCommands(ProgressController progress){
  int waitForReturn=configuration.getIntegerProperty(PROPERTY_IP_WAIT_FOR_RETURN,0);
  String executeIn=configuration.getStringProperty(PROPERTY_RECONNECT_EXECUTE_FOLDER);
  String command=configuration.getStringProperty(PROPERTY_TERMINAL);
  String[] cmds=command.split("String_Node_Str");
  command=cmds[0];
  for (int i=0; i < cmds.length - 1; i++) {
    cmds[i]=cmds[i + 1];
  }
  String batch=configuration.getStringProperty(PROPERTY_BATCHTEXT,"String_Node_Str");
  String[] lines=Regex.getLines(batch);
  logger.info("String_Node_Str" + command);
  for (  String element : lines) {
    cmds[cmds.length - 1]=element;
    logger.finer("String_Node_Str" + JDUtilities.runCommand(command,cmds,executeIn,waitForReturn));
  }
  return true;
}

Fixed version (ground truth):
protected boolean runCommands(ProgressController progress){
  int waitForReturn=configuration.getIntegerProperty(PROPERTY_IP_WAIT_FOR_RETURN,0);
  String executeIn=configuration.getStringProperty(PROPERTY_RECONNECT_EXECUTE_FOLDER);
  String command=configuration.getStringProperty(PROPERTY_TERMINAL);
  String[] cmds=command.split("String_Node_Str");
  command=cmds[0];
  for (int i=0; i < cmds.length - 1; i++) {
    cmds[i]=cmds[i + 1];
  }
  String batch=configuration.getStringProperty(PROPERTY_BATCHTEXT,"String_Node_Str");
  String[] lines=Regex.getLines(batch);
  logger.info("String_Node_Str" + command + "String_Node_Str");
  for (  String element : lines) {
    cmds[cmds.length - 1]=element;
    logger.finer("String_Node_Str" + JDUtilities.runCommand(command,cmds,executeIn,lines.length >= 2 ? waitForReturn : -1));
  }
  return true;
}
Program: 20994
Project: 20994
Buggy source:
public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  if (this.isFreeAccount()) {
    simultanpremium=1;
    handleFree(downloadLink);
    return;
  }
 else {
    if (simultanpremium + 1 > 20) {
      simultanpremium=20;
    }
 else {
      simultanpremium++;
    }
  }
  String link=downloadLink.getDownloadURL();
  br.getPage(link);
  if (br.getRedirectLocation() != null) {
    link=br.getRedirectLocation().replaceAll("String_Node_Str","String_Node_Str");
    br.getPage(link);
  }
  if (br.containsHTML(DOWNLOAD_NOTALLOWED)) {
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,20 * 60 * 1000l);
  }
  link=br.getRegex(PATTERN_PREMIUM_FINALURL).getMatch(0);
  if (link == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,link,true,0);
  URLConnectionAdapter con=dl.getConnection();
  if (Plugin.getFileNameFromHeader(con) == null || Plugin.getFileNameFromHeader(con).indexOf("String_Node_Str") >= 0) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  if (!con.isContentDisposition()) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  dl.startDownload();
}

Fixed version (ground truth):
public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  if (this.isFreeAccount()) {
    simultanpremium=1;
    handleFree(downloadLink);
    return;
  }
 else {
    if (simultanpremium + 1 > 20) {
      simultanpremium=20;
    }
 else {
      simultanpremium++;
    }
  }
  String link=downloadLink.getDownloadURL();
  br.getPage(link);
  if (br.getRedirectLocation() != null) {
    link=br.getRedirectLocation().replaceAll("String_Node_Str","String_Node_Str");
    br.getPage(link);
  }
  checkErrors();
  link=br.getRegex(PATTERN_PREMIUM_FINALURL).getMatch(0);
  if (link == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  br.setDebug(true);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,link,true,0);
  URLConnectionAdapter con=dl.getConnection();
  if (Plugin.getFileNameFromHeader(con) == null || Plugin.getFileNameFromHeader(con).indexOf("String_Node_Str") >= 0) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_RETRY);
  }
  if (!con.isContentDisposition()) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  dl.startDownload();
}
Program: 21001
Project: 21001
Buggy source:
public void handleFree(DownloadLink downloadLink) throws Exception {
  requestFileInformation(downloadLink);
  br.submitForm(br.getForm(1));
  String link=br.getRegex(Pattern.compile("String_Node_Str")).getMatch(0);
  downloadLink.setFinalFileName(downloadLink.toString());
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,link);
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink downloadLink) throws Exception {
  requestFileInformation(downloadLink);
  Form DLForm=br.getForm(1);
  if (DLForm == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
  br.submitForm(DLForm);
  String link=br.getRegex(Pattern.compile("String_Node_Str")).getMatch(0);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,link,true,0);
  dl.startDownload();
}
Program: 21002
Project: 21002
Buggy source:
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException {
  try {
    setBrowserExclusive();
    br.setFollowRedirects(true);
    br.getPage(downloadLink.getDownloadURL());
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    String name=br.getRegex("String_Node_Str").getMatch(0).trim();
    downloadLink.setName(name);
    return AvailableStatus.TRUE;
  }
 catch (  Exception e) {
    logger.log(java.util.logging.Level.SEVERE,"String_Node_Str",e);
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException {
  try {
    setBrowserExclusive();
    br.setCustomCharset("String_Node_Str");
    br.setFollowRedirects(true);
    br.getPage(downloadLink.getDownloadURL());
    if (br.containsHTML("String_Node_Str")) {
      logger.warning("String_Node_Str");
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    }
    String name=br.getRegex("String_Node_Str").getMatch(0).trim();
    String filesize=br.getRegex("String_Node_Str").getMatch(0).trim();
    if (filesize.contains("String_Node_Str")) {
      filesize=filesize.replace("String_Node_Str","String_Node_Str");
    }
    if (filesize.contains("String_Node_Str")) {
      filesize=filesize.replace("String_Node_Str","String_Node_Str");
    }
    if (filesize.contains("String_Node_Str")) {
      filesize=filesize.replace("String_Node_Str","String_Node_Str");
    }
    if (name == null || filesize == null)     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    downloadLink.setName(name);
    downloadLink.setDownloadSize(Regex.getSize(filesize));
    return AvailableStatus.TRUE;
  }
 catch (  Exception e) {
    logger.log(java.util.logging.Level.SEVERE,"String_Node_Str",e);
  }
  throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}
Program: 21003
Project: 21003
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 1;
}

Fixed version (ground truth):
public int getMaxSimultanFreeDownloadNum(){
  return 20;
}
Program: 21004
Project: 21004
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  requestFileInformation(downloadLink);
  br.setFollowRedirects(true);
  Form captchaForm=br.getForm(0);
  String code="String_Node_Str";
  for (int i=0; i < 5; i++) {
    if (!br.containsHTML("String_Node_Str"))     break;
    String captchaurl0=br.getRegex("String_Node_Str").getMatch(0);
    if (captchaurl0 == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
    String captchaurl="String_Node_Str" + captchaurl0;
    code=getCaptchaCode(captchaurl,downloadLink);
    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);
  String[] countDownInfo=br.getRegex("String_Node_Str").getRow(0);
  Form dlform=br.getForm(0);
  dlform.getInputFields().clear();
  dlform.setAction("String_Node_Str" + countDownInfo[1]);
  dlform.setMethod(Form.MethodType.POST);
  dlform.put("String_Node_Str",code);
  dlform.put("String_Node_Str",countDownInfo[0]);
  br.submitForm(dlform);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,br.toString().trim(),true,20);
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
  requestFileInformation(downloadLink);
  br.setFollowRedirects(true);
  Form captchaForm=br.getForm(0);
  String code="String_Node_Str";
  for (int i=0; i < 5; i++) {
    if (!br.containsHTML("String_Node_Str"))     break;
    String captchaurl0=br.getRegex("String_Node_Str").getMatch(0);
    if (captchaurl0 == null)     throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
    String captchaurl="String_Node_Str" + captchaurl0;
    code=getCaptchaCode(captchaurl,downloadLink);
    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);
  String[] countDownInfo=br.getRegex("String_Node_Str").getRow(0);
  Form dlform=br.getForm(0);
  dlform.getInputFields().clear();
  dlform.setAction("String_Node_Str" + countDownInfo[1]);
  dlform.setMethod(Form.MethodType.POST);
  dlform.put("String_Node_Str",code);
  dlform.put("String_Node_Str",countDownInfo[0]);
  br.submitForm(dlform);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,br.toString().trim(),true,0);
  dl.startDownload();
}
Program: 21005
Project: 21005
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 1;
}

Fixed version (ground truth):
public int getMaxSimultanFreeDownloadNum(){
  return 20;
}
Program: 21006
Project: 21006
Buggy source:
public int getMaxSimultanFreeDownloadNum(){
  return 5;
}

Fixed version (ground truth):
public int getMaxSimultanFreeDownloadNum(){
  return 20;
}
Program: 21007
Project: 21007
Buggy source:
public boolean initAddon(){
  return new GuiRunnable<Boolean>(){
    @Override public Boolean runSave(){
      if (JDUtilities.getJavaVersion() < 1.6) {
        logger.severe("String_Node_Str" + JDUtilities.getJavaVersion());
        return false;
      }
      if (!SystemTray.isSupported()) {
        logger.severe("String_Node_Str");
        return false;
      }
      try {
        JDUtilities.getController().addControlListener(JDLightTray.this);
        if (SwingGui.getInstance() != null && SwingGui.getInstance() != null) {
          guiFrame=SwingGui.getInstance().getMainFrame();
          if (guiFrame != null)           guiFrame.addWindowListener(JDLightTray.this);
        }
        logger.info("String_Node_Str");
        initGUI();
      }
 catch (      Exception e) {
        return false;
      }
      return true;
    }
  }
.getReturnValue();
}

Fixed version (ground truth):
public boolean initAddon(){
  return new GuiRunnable<Boolean>(){
    @Override public Boolean runSave(){
      if (JDUtilities.getJavaVersion() < 1.6) {
        logger.severe("String_Node_Str" + JDUtilities.getJavaVersion());
        return false;
      }
      if (!SystemTray.isSupported()) {
        logger.severe("String_Node_Str");
        return false;
      }
      try {
        JDUtilities.getController().addControlListener(JDLightTray.this);
        if (SwingGui.getInstance() != null && SwingGui.getInstance() != null) {
          guiFrame=SwingGui.getInstance().getMainFrame();
          if (guiFrame != null) {
            guiFrame.addWindowListener(JDLightTray.this);
          }
        }
        logger.info("String_Node_Str");
        initGUI();
      }
 catch (      Exception e) {
        return false;
      }
      return true;
    }
  }
.getReturnValue();
}
Program: 21008
Project: 21008
Buggy source:
public void controlEvent(ControlEvent event){
  if (event.getID() == ControlEvent.CONTROL_INIT_COMPLETE && event.getSource() instanceof Main) {
    logger.info("String_Node_Str");
    guiFrame=SwingGui.getInstance().getMainFrame();
    if (subConfig.getBooleanProperty(PROPERTY_START_MINIMIZED,false)) {
      guiFrame.setExtendedState(JFrame.ICONIFIED);
    }
    guiFrame.addWindowListener(this);
    return;
  }
  super.controlEvent(event);
}

Fixed version (ground truth):
public void controlEvent(ControlEvent event){
  if (event.getID() == ControlEvent.CONTROL_INIT_COMPLETE && event.getSource() instanceof Main) {
    logger.info("String_Node_Str");
    guiFrame=SwingGui.getInstance().getMainFrame();
    if (subConfig.getBooleanProperty(PROPERTY_START_MINIMIZED,false)) {
      guiFrame.setExtendedState(JFrame.ICONIFIED);
    }
    guiFrame.addWindowStateListener(new WindowStateListener(){
      public void windowStateChanged(      WindowEvent evt){
        int oldState=evt.getOldState();
        int newState=evt.getNewState();
        if ((oldState & Frame.ICONIFIED) == 0 && (newState & Frame.ICONIFIED) != 0) {
          System.out.println("String_Node_Str");
        }
 else         if ((oldState & Frame.ICONIFIED) != 0 && (newState & Frame.ICONIFIED) == 0) {
          System.out.println("String_Node_Str");
        }
        if ((oldState & Frame.MAXIMIZED_BOTH) == 0 && (newState & Frame.MAXIMIZED_BOTH) != 0) {
          System.out.println("String_Node_Str");
        }
 else         if ((oldState & Frame.MAXIMIZED_BOTH) != 0 && (newState & Frame.MAXIMIZED_BOTH) == 0) {
          System.out.println("String_Node_Str");
        }
      }
    }
);
    guiFrame.addWindowListener(this);
    return;
  }
  super.controlEvent(event);
}
Program: 21009
Project: 21009
Buggy source:
public void windowIconified(WindowEvent arg0){
  if (subConfig.getBooleanProperty(PROPERTY_MINIMIZE_TO_TRAY,true)) {
    if (System.currentTimeMillis() > this.lastDeIconifiedEvent + 750) {
      this.lastDeIconifiedEvent=System.currentTimeMillis();
      if (guiFrame.isVisible()) {
        guiFrame.setVisible(false);
      }
 else {
        guiFrame.setVisible(true);
        guiFrame.setExtendedState(JFrame.NORMAL);
        guiFrame.toFront();
      }
    }
 else {
      guiFrame.setVisible(true);
      guiFrame.setExtendedState(JFrame.NORMAL);
      miniIt();
    }
  }
}

Fixed version (ground truth):
public void windowIconified(WindowEvent arg0){
  System.out.println(arg0.getOldState() + "String_Node_Str" + arg0.getNewState());
  System.out.println(arg0);
  if (subConfig.getBooleanProperty(PROPERTY_MINIMIZE_TO_TRAY,true)) {
    if (System.currentTimeMillis() > this.lastDeIconifiedEvent + 750) {
      this.lastDeIconifiedEvent=System.currentTimeMillis();
      if (guiFrame.isVisible()) {
        guiFrame.setVisible(false);
      }
 else {
        guiFrame.setVisible(true);
        guiFrame.setExtendedState(JFrame.NORMAL);
        guiFrame.toFront();
      }
    }
 else {
      guiFrame.setVisible(true);
      guiFrame.setExtendedState(JFrame.NORMAL);
      miniIt();
    }
  }
}
Program: 21011
Project: 21011
Buggy source:
/** 
 * returns the annotation pattern array
 * @return
 */
public static String[] getAnnotationUrls(){
  StringBuilder completePattern=new StringBuilder();
  String[] list={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String pattern : list) {
    if (completePattern.length() > 0) {
      completePattern.append("String_Node_Str");
    }
    completePattern.append(pattern);
  }
  logger.finest("String_Node_Str" + list.length + "String_Node_Str");
  return new String[]{completePattern.toString()};
}

Fixed version (ground truth):
/** 
 * returns the annotation pattern array
 * @return
 */
public static String[] getAnnotationUrls(){
  StringBuilder completePattern=new StringBuilder();
  String[] list={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String pattern : list) {
    if (completePattern.length() > 0) {
      completePattern.append("String_Node_Str");
    }
    completePattern.append(pattern);
  }
  logger.finest("String_Node_Str" + list.length + "String_Node_Str");
  return new String[]{completePattern.toString()};
}
Program: 21014
Project: 21014
Buggy source:
public static void main(String[] args) throws Exception {
  String branch=null;
  branch="String_Node_Str";
  Browser.setGlobalConnectTimeout(500000);
  Browser.setGlobalReadTimeout(500000);
  Updater upd=new Updater();
  if (branch != null)   WebUpdater.getConfig("String_Node_Str").setProperty(WebUpdater.PARAM_BRANCH,branch);
  WebUpdater.getConfig("String_Node_Str").save();
  System.out.println("String_Node_Str");
  upd.webupdate();
  upd.removeFileOverhead();
  System.out.println("String_Node_Str");
  upd.movePlugins(getCFG("String_Node_Str"));
  upd.moveJars(getCFG("String_Node_Str"));
  upd.cleanUp();
  if (branch == null)   branch=JOptionPane.showInputDialog(upd.frame,"String_Node_Str");
  upd.createBranch(branch);
  ArrayList<File> list=upd.getFileList();
  upd.upload(list);
  upd.merge();
  upd.checkHashes();
  upd.clone2(upd.branch,"String_Node_Str");
  upd.uploadHashList();
  System.exit(0);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  String branch=null;
  branch="String_Node_Str";
  Browser.setGlobalConnectTimeout(500000);
  Browser.setGlobalReadTimeout(500000);
  Updater upd=new Updater();
  if (branch != null)   WebUpdater.getConfig("String_Node_Str").setProperty(WebUpdater.PARAM_BRANCH,new Branch(branch));
  WebUpdater.getConfig("String_Node_Str").save();
  System.out.println("String_Node_Str");
  upd.webupdate();
  upd.removeFileOverhead();
  System.out.println("String_Node_Str");
  upd.movePlugins(getCFG("String_Node_Str"));
  upd.moveJars(getCFG("String_Node_Str"));
  upd.cleanUp();
  if (branch == null)   branch=JOptionPane.showInputDialog(upd.frame,"String_Node_Str");
  upd.createBranch(branch);
  ArrayList<File> list=upd.getFileList();
  upd.upload(list);
  upd.merge();
  upd.checkHashes();
  upd.clone2(upd.branch,"String_Node_Str");
  upd.uploadHashList();
  System.exit(0);
}
Program: 21015
Project: 21015
Buggy source:
/** 
 * filters the available actions
 * @param actions2
 */
private void setActions(ArrayList<ToolBarAction> actions2){
  Collections.sort(actions2,new Comparator<ToolBarAction>(){
    public int compare(    ToolBarAction o1,    ToolBarAction o2){
      int ia=WHITELIST.indexOf(o1.getID());
      int ib=WHITELIST.indexOf(o2.getID());
      return ia < ib ? -1 : 1;
    }
  }
);
  this.list=new ArrayList<String>();
  list.addAll(GUIUtils.getConfig().getGenericProperty("String_Node_Str",ToolBar.DEFAULT_LIST));
  for (Iterator<ToolBarAction> it=actions2.iterator(); it.hasNext(); ) {
    ToolBarAction a=it.next();
    if (a.getValue(ToolBarAction.IMAGE_KEY) == null) {
      it.remove();
      list.remove(a.getID());
      continue;
    }
    if (!WHITELIST.contains(a.getID())) {
      it.remove();
      list.remove(a.getID());
      System.out.println("String_Node_Str" + a.getID() + "String_Node_Str");
      continue;
    }
  }
  this.actions=actions2;
}

Fixed version (ground truth):
/** 
 * filters the available actions
 * @param actions2
 */
private void setActions(ArrayList<ToolBarAction> actions2){
  Collections.sort(actions2,new Comparator<ToolBarAction>(){
    public int compare(    ToolBarAction o1,    ToolBarAction o2){
      int ia=WHITELIST.indexOf(o1.getID());
      int ib=WHITELIST.indexOf(o2.getID());
      return ia < ib ? -1 : 1;
    }
  }
);
  this.list=new ArrayList<String>();
  list.addAll(GUIUtils.getConfig().getGenericProperty("String_Node_Str",ToolBar.DEFAULT_LIST));
  for (Iterator<ToolBarAction> it=actions2.iterator(); it.hasNext(); ) {
    ToolBarAction a=it.next();
    if (a.getValue(ToolBarAction.IMAGE_KEY) == null) {
      it.remove();
      list.remove(a.getID());
      continue;
    }
    if (!WHITELIST.contains(a.getID())) {
      it.remove();
      list.remove(a.getID());
      System.out.println("String_Node_Str" + a.getID() + "String_Node_Str");
      continue;
    }
  }
  this.actions=actions2;
  new GuiRunnable<Object>(){
    @Override public Object runSave(){
      tableModel.fireTableDataChanged();
      return null;
    }
  }
.start();
}