nus-yam/ex-repair huggingface dataset:
Program: 21119
Project: 21119
Buggy source:
public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  String api="String_Node_Str" + account.getUser() + "String_Node_Str"+ account.getPass()+ "String_Node_Str";
  br.getPage(api);
  String error=br.getRegex("String_Node_Str").getMatch(0);
  if (error != null) {
    ai.setStatus(JDLocale.LF("String_Node_Str","String_Node_Str",error.trim()));
    ai.setValid(false);
    return ai;
  }
  String[][] matches=br.getRegex("String_Node_Str").getMatches();
  HashMap<String,String> data=getMap(matches);
  ai.setTrafficLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setTrafficMax(25 * 1024 * 1024* 1024l);
  ai.setFilesNum(Long.parseLong(data.get("String_Node_Str")));
  ai.setPremiumPoints(Long.parseLong(data.get("String_Node_Str")));
  ai.setNewPremiumPoints(Long.parseLong(data.get("String_Node_Str")));
  ai.setUsedSpace(Long.parseLong(data.get("String_Node_Str")));
  ai.setTrafficShareLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setValidUntil(Long.parseLong(data.get("String_Node_Str")) * 1000);
  if (ai.getValidUntil() < System.currentTimeMillis()) {
    ai.setExpired(true);
  }
  account.setProperty("String_Node_Str",ai);
  return ai;
}

Fixed version (ground truth):
public AccountInfo fetchAccountInfo(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  String api="String_Node_Str" + Encoding.urlEncode(account.getUser()) + "String_Node_Str"+ Encoding.urlEncode(account.getPass())+ "String_Node_Str";
  br.getPage(api);
  String error=br.getRegex("String_Node_Str").getMatch(0);
  if (error != null) {
    ai.setStatus(JDLocale.LF("String_Node_Str","String_Node_Str",error.trim()));
    ai.setValid(false);
    return ai;
  }
  String[][] matches=br.getRegex("String_Node_Str").getMatches();
  HashMap<String,String> data=getMap(matches);
  ai.setTrafficLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setTrafficMax(25 * 1024 * 1024* 1024l);
  ai.setFilesNum(Long.parseLong(data.get("String_Node_Str")));
  ai.setPremiumPoints(Long.parseLong(data.get("String_Node_Str")));
  ai.setNewPremiumPoints(Long.parseLong(data.get("String_Node_Str")));
  ai.setUsedSpace(Long.parseLong(data.get("String_Node_Str")));
  ai.setTrafficShareLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setValidUntil(Long.parseLong(data.get("String_Node_Str")) * 1000);
  if (ai.getValidUntil() < System.currentTimeMillis()) {
    ai.setExpired(true);
  }
  account.setProperty("String_Node_Str",ai);
  return ai;
}
Program: 21122
Project: 21122
Buggy source:
private void initQuickConfig(){
  JLabel config=(new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")));
  config.setIcon(JDTheme.II("String_Node_Str",16,16));
  topOrBottom=new JCheckBox(JDLocale.L("String_Node_Str","String_Node_Str"));
  topOrBottom.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      SimpleGuiConstants.GUI_CONFIG.setProperty(SimpleGuiConstants.PARAM_INSERT_NEW_LINKS_AT,topOrBottom.isSelected());
      SimpleGuiConstants.GUI_CONFIG.save();
    }
  }
);
  if (SimpleGuiConstants.GUI_CONFIG.getBooleanProperty(SimpleGuiConstants.PARAM_INSERT_NEW_LINKS_AT,false)) {
    topOrBottom.setSelected(true);
  }
  startAFteradding=new JCheckBox(JDLocale.L("String_Node_Str","String_Node_Str"));
  startAFteradding.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      SimpleGuiConstants.GUI_CONFIG.setProperty(SimpleGuiConstants.PARAM_START_AFTER_ADDING_LINKS,startAFteradding.isSelected());
      SimpleGuiConstants.GUI_CONFIG.save();
    }
  }
);
  if (SimpleGuiConstants.GUI_CONFIG.getBooleanProperty(SimpleGuiConstants.PARAM_START_AFTER_ADDING_LINKS,true)) {
    startAFteradding.setSelected(true);
  }
  add(config,D1_LABEL_ICON);
  startAFteradding.setToolTipText(JDLocale.L("String_Node_Str","String_Node_Str"));
  add(startAFteradding,TaskPanel.D2_CHECKBOX);
  startAFteradding.setToolTipText(JDLocale.L("String_Node_Str","String_Node_Str"));
  add(topOrBottom,TaskPanel.D2_CHECKBOX);
}

Fixed version (ground truth):
private void initQuickConfig(){
  JLabel config=(new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")));
  config.setIcon(JDTheme.II("String_Node_Str",16,16));
  topOrBottom=new JCheckBox(JDLocale.L("String_Node_Str","String_Node_Str"));
  topOrBottom.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      SimpleGuiConstants.GUI_CONFIG.setProperty(SimpleGuiConstants.PARAM_INSERT_NEW_LINKS_AT,topOrBottom.isSelected());
      SimpleGuiConstants.GUI_CONFIG.save();
    }
  }
);
  if (SimpleGuiConstants.GUI_CONFIG.getBooleanProperty(SimpleGuiConstants.PARAM_INSERT_NEW_LINKS_AT,false)) {
    topOrBottom.setSelected(true);
  }
  startAfterAdding=new JCheckBox(JDLocale.L("String_Node_Str","String_Node_Str"));
  startAfterAdding.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      SimpleGuiConstants.GUI_CONFIG.setProperty(SimpleGuiConstants.PARAM_START_AFTER_ADDING_LINKS,startAfterAdding.isSelected());
      SimpleGuiConstants.GUI_CONFIG.save();
    }
  }
);
  if (SimpleGuiConstants.GUI_CONFIG.getBooleanProperty(SimpleGuiConstants.PARAM_START_AFTER_ADDING_LINKS,true)) {
    startAfterAdding.setSelected(true);
  }
  add(config,D1_LABEL_ICON);
  startAfterAdding.setToolTipText(JDLocale.L("String_Node_Str","String_Node_Str"));
  add(startAfterAdding,TaskPanel.D2_CHECKBOX);
  startAfterAdding.setToolTipText(JDLocale.L("String_Node_Str","String_Node_Str"));
  add(topOrBottom,TaskPanel.D2_CHECKBOX);
}
Program: 21123
Project: 21123
Buggy source:
private void update(){
  if (updateinprogress)   return;
  new Thread(){
    public void run(){
      updateinprogress=true;
      this.setName("String_Node_Str");
      packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",fps.size()));
      long tot=0;
      long links=0;
synchronized (fps) {
        for (        LinkGrabberFilePackage fp : fps) {
          tot+=fp.getDownloadSize(false);
          links+=fp.getDownloadLinks().size();
        }
      }
      downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",links));
      filteredlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",lgi.getFILTERPACKAGE().size()));
      totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(tot)));
      updateinprogress=false;
    }
  }
.start();
}

Fixed version (ground truth):
/** 
 * TODO: soll man über events aktuallisiert werden
 */
private void update(){
  if (updateinprogress)   return;
  new Thread(){
    public void run(){
      updateinprogress=true;
      this.setName("String_Node_Str");
      packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",fps.size()));
      long tot=0;
      long links=0;
synchronized (fps) {
        for (        LinkGrabberFilePackage fp : fps) {
          tot+=fp.getDownloadSize(false);
          links+=fp.getDownloadLinks().size();
        }
      }
      downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",links));
      filteredlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",lgi.getFILTERPACKAGE().size()));
      totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(tot)));
      updateinprogress=false;
    }
  }
.start();
}
Program: 21125
Project: 21125
Buggy source:
public void run(){
  updateinprogress=true;
  this.setName("String_Node_Str");
  DownloadController dlc=JDUtilities.getDownloadController();
  packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getPackages().size()));
  downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getAllDownloadLinks().size()));
  long tot=0;
  long loaded=0;
  for (  DownloadLink l : dlc.getAllDownloadLinks()) {
    if (!l.getLinkStatus().hasStatus(LinkStatus.ERROR_ALREADYEXISTS) && l.isEnabled()) {
      tot+=l.getDownloadSize();
      loaded+=l.getDownloadCurrent();
    }
  }
  totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(tot)));
  final long tot2=tot;
  new GuiRunnable<Object>(){
    public Object runSave(){
      progress.setMaximum(tot2);
      return null;
    }
  }
.waitForEDT();
  progress.setValue(loaded);
  progress.setToolTipText(Math.round((loaded * 10000.0) / tot) / 100.0 + "String_Node_Str");
  long speedm=JDUtilities.getController().getSpeedMeter();
  if (speedm > 1024) {
    speed.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(speedm) + "String_Node_Str"));
    long etanum=(tot - loaded) / speedm;
    eta.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatSeconds(etanum)));
  }
 else {
    eta.setText("String_Node_Str");
    speed.setText("String_Node_Str");
  }
  updateinprogress=false;
}

Fixed version (ground truth):
public void run(){
  updateinprogress=true;
  this.setName("String_Node_Str");
  DownloadController dlc=JDUtilities.getDownloadController();
  packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getPackages().size()));
  downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getAllDownloadLinks().size()));
  long tot=0;
  long loaded=0;
  for (  DownloadLink l : dlc.getAllDownloadLinks()) {
    if (!l.getLinkStatus().hasStatus(LinkStatus.ERROR_ALREADYEXISTS) && l.isEnabled()) {
      tot+=l.getDownloadSize();
      loaded+=l.getDownloadCurrent();
    }
  }
  totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(tot)));
  final long tot2=tot;
  final long loaded2=loaded;
  new GuiRunnable<Object>(){
    public Object runSave(){
      progress.setMaximum(tot2);
      progress.setValue(loaded2);
      progress.setToolTipText(Math.round((loaded2 * 10000.0) / tot2) / 100.0 + "String_Node_Str");
      return null;
    }
  }
.waitForEDT();
  long speedm=JDUtilities.getController().getSpeedMeter();
  if (speedm > 1024) {
    speed.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatReadable(speedm) + "String_Node_Str"));
    long etanum=(tot - loaded) / speedm;
    eta.setText(JDLocale.LF("String_Node_Str","String_Node_Str",Formatter.formatSeconds(etanum)));
  }
 else {
    eta.setText("String_Node_Str");
    speed.setText("String_Node_Str");
  }
  updateinprogress=false;
}
Program: 21126
Project: 21126
Buggy source:
public Object runSave(){
  progress.setMaximum(tot2);
  return null;
}

Fixed version (ground truth):
public Object runSave(){
  progress.setMaximum(tot2);
  progress.setValue(loaded2);
  progress.setToolTipText(Math.round((loaded2 * 10000.0) / tot2) / 100.0 + "String_Node_Str");
  return null;
}
Program: 21127
Project: 21127
Buggy source:
public void handleFree(DownloadLink downloadLink) throws Exception {
  br.setFollowRedirects(true);
  br.getPage(downloadLink.getDownloadURL());
  br.setDebug(true);
  String picture_name=new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (picture_name == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String gallery_name=new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (gallery_name != null) {
    gallery_name=gallery_name.trim();
  }
  String imagelink=DecryptLink(new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0));
  String filename=Plugin.extractFileNameFromURL(imagelink);
  downloadLink.setFinalFileName(filename);
  if (gallery_name != null)   downloadLink.addSubdirectory(gallery_name);
  dl=br.openDownload(downloadLink,imagelink);
  if (dl.getConnection().getResponseCode() == 404) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  }
  dl.startDownload();
}

Fixed version (ground truth):
public void handleFree(DownloadLink downloadLink) throws Exception {
  br.setFollowRedirects(true);
  String pfilename=downloadLink.getName();
  br.getPage(downloadLink.getDownloadURL());
  br.setDebug(true);
  String picture_name=new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (picture_name == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String gallery_name=new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (gallery_name != null) {
    gallery_name=gallery_name.trim();
  }
  String imagelink=DecryptLink(new Regex(br,Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0));
  if (gallery_name != null)   downloadLink.addSubdirectory(gallery_name);
  dl=br.openDownload(downloadLink,imagelink);
  if (dl.getConnection().getResponseCode() == 404) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  }
  downloadLink.setFinalFileName(pfilename);
  dl.startDownload();
}
Program: 21132
Project: 21132
Buggy source:
public void actionPerformed(ActionEvent arg0){
  if (arg0.getSource() == checkTimer) {
    checkTimer.stop();
    checkTimer.removeActionListener(this);
    checkTimer=null;
    if (LinksToCheck.size() > 0) {
      startLinkCheck();
    }
    return;
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent arg0){
  if (arg0.getSource() == checkTimer) {
    checkTimer.stop();
    if (LinksToCheck.size() > 0) {
      startLinkCheck();
    }
    return;
  }
}
Program: 21133
Project: 21133
Buggy source:
public void abortLinkCheck(){
  check_running=false;
  if (checkTimer != null) {
    checkTimer.stop();
    checkTimer.removeActionListener(this);
  }
  if (checkThread != null && checkThread.isAlive()) {
    EventQueue.invokeLater(new Runnable(){
      public void run(){
        pc.setStatusText(pc.getStatusText() + "String_Node_Str");
        pc.finalize(5000l);
      }
    }
);
    checkJobbers.stop();
    checkThread.interrupt();
  }
synchronized (LinksToCheck) {
    LinksToCheck=new Vector<DownloadLink>();
  }
}

Fixed version (ground truth):
public void abortLinkCheck(){
  check_running=false;
  checkTimer.stop();
  if (checkThread != null && checkThread.isAlive()) {
    EventQueue.invokeLater(new Runnable(){
      public void run(){
        pc.setStatusText(pc.getStatusText() + "String_Node_Str");
        pc.finalize(5000l);
      }
    }
);
    checkJobbers.stop();
    checkThread.interrupt();
  }
synchronized (LinksToCheck) {
    LinksToCheck=new Vector<DownloadLink>();
  }
}
Program: 21134
Project: 21134
Buggy source:
public synchronized void checkLinks(Vector<DownloadLink> links){
  if (links == null || links.size() == 0)   return;
  check_running=true;
  for (  DownloadLink element : links) {
synchronized (LinksToCheck) {
      if (!LinksToCheck.contains(element))       LinksToCheck.add(element);
    }
  }
  if (checkTimer != null) {
    checkTimer.stop();
    checkTimer.removeActionListener(this);
    checkTimer=null;
  }
  checkTimer=new Timer(2000,this);
  checkTimer.setInitialDelay(2000);
  checkTimer.setRepeats(false);
  checkTimer.start();
}

Fixed version (ground truth):
public synchronized void checkLinks(Vector<DownloadLink> links){
  if (links == null || links.size() == 0)   return;
  check_running=true;
  for (  DownloadLink element : links) {
synchronized (LinksToCheck) {
      if (!LinksToCheck.contains(element))       LinksToCheck.add(element);
    }
  }
  checkTimer.restart();
}
Program: 21135
Project: 21135
Buggy source:
private LinkCheck(){
}

Fixed version (ground truth):
private LinkCheck(){
  checkTimer=new Timer(2000,this);
  checkTimer.setInitialDelay(2000);
  checkTimer.setRepeats(false);
}
Program: 21136
Project: 21136
Buggy source:
private void addToPackages(LinkGrabberFilePackage fp,DownloadLink link){
synchronized (packages) {
    LinkGrabberFilePackage fptmp=getFPwithLink(link);
    if (!packages.contains(fp))     packages.add(fp);
    fp.add(link);
    if (fptmp != null)     fptmp.remove(link);
  }
}

Fixed version (ground truth):
private void addToPackages(LinkGrabberFilePackage fp,DownloadLink link){
synchronized (packages) {
    LinkGrabberFilePackage fptmp=getFPwithLink(link);
    if (!packages.contains(fp))     packages.add(fp);
    fp.add(link);
    if (fptmp != null && fp != fptmp)     fptmp.remove(link);
  }
}
Program: 21138
Project: 21138
Buggy source:
private LinkGrabberPanel(){
  super(new MigLayout("String_Node_Str","String_Node_Str","String_Node_Str"));
  PACKAGENAME_UNSORTED=JDLocale.L("String_Node_Str","String_Node_Str");
  PACKAGENAME_UNCHECKED=JDLocale.L("String_Node_Str","String_Node_Str");
  guiConfig=JDUtilities.getSubConfig(SimpleGuiConstants.GUICONFIGNAME);
  internalTreeTable=new LinkGrabberTreeTable(new LinkGrabberTreeTableModel(this),this);
  JScrollPane scrollPane=new JScrollPane(internalTreeTable);
  this.add(scrollPane,"String_Node_Str");
  FilePackageInfo=new LinkGrabberFilePackageInfo();
  Update_Async=new Timer(50,this);
  Update_Async.setInitialDelay(50);
  Update_Async.setRepeats(false);
  INSTANCE=this;
}

Fixed version (ground truth):
private LinkGrabberPanel(){
  super(new MigLayout("String_Node_Str","String_Node_Str","String_Node_Str"));
  PACKAGENAME_UNSORTED=JDLocale.L("String_Node_Str","String_Node_Str");
  PACKAGENAME_UNCHECKED=JDLocale.L("String_Node_Str","String_Node_Str");
  guiConfig=JDUtilities.getSubConfig(SimpleGuiConstants.GUICONFIGNAME);
  internalTreeTable=new LinkGrabberTreeTable(new LinkGrabberTreeTableModel(this),this);
  JScrollPane scrollPane=new JScrollPane(internalTreeTable);
  this.add(scrollPane,"String_Node_Str");
  FilePackageInfo=new LinkGrabberFilePackageInfo();
  Update_Async=new Timer(50,this);
  Update_Async.setInitialDelay(50);
  Update_Async.setRepeats(false);
  gathertimer=new Timer(2000,LinkGrabberPanel.this);
  gathertimer.setInitialDelay(2000);
  gathertimer.setRepeats(false);
  INSTANCE=this;
}
Program: 21139
Project: 21139
Buggy source:
public synchronized void addLinks(DownloadLink[] linkList){
  for (  DownloadLink element : linkList) {
    if (isDupe(element))     continue;
    addToWaitingList(element);
  }
  Update_Async.restart();
  if (gathertimer != null) {
    gathertimer.stop();
    gathertimer.removeActionListener(LinkGrabberPanel.this);
    gathertimer=null;
  }
  gathertimer=new Timer(2000,LinkGrabberPanel.this);
  gathertimer.setInitialDelay(2000);
  gathertimer.setRepeats(false);
  gathertimer.start();
}

Fixed version (ground truth):
public synchronized void addLinks(DownloadLink[] linkList){
  for (  DownloadLink element : linkList) {
    if (isDupe(element))     continue;
    addToWaitingList(element);
  }
  Update_Async.restart();
  gathertimer.restart();
}
Program: 21140
Project: 21140
Buggy source:
private void update(){
  DownloadController dlc=JDUtilities.getDownloadController();
  packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getPackages().size()));
  downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getAllDownloadLinks().size()));
  long tot=0;
  long loaded=0;
  for (  DownloadLink l : dlc.getAllDownloadLinks()) {
    tot+=l.getDownloadSize();
    loaded+=l.getDownloadCurrent();
  }
  totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatKbReadable(tot / 1024)));
  progress.setMaximum(tot);
  progress.setValue(loaded);
  if (JDUtilities.getController().getSpeedMeter() > 1024) {
    speed.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatBytesToMB(JDUtilities.getController().getSpeedMeter()) + "String_Node_Str"));
    long etanum=(tot - loaded) / JDUtilities.getController().getSpeedMeter();
    eta.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatSeconds(etanum)));
  }
 else {
    eta.setText("String_Node_Str");
    speed.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
private void update(){
  DownloadController dlc=JDUtilities.getDownloadController();
  packages.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getPackages().size()));
  downloadlinks.setText(JDLocale.LF("String_Node_Str","String_Node_Str",dlc.getAllDownloadLinks().size()));
  long tot=0;
  long loaded=0;
  for (  DownloadLink l : dlc.getAllDownloadLinks()) {
    if (!l.getLinkStatus().hasStatus(LinkStatus.ERROR_ALREADYEXISTS) && l.isEnabled())     tot+=l.getDownloadSize();
    loaded+=l.getDownloadCurrent();
  }
  totalsize.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatKbReadable(tot / 1024)));
  progress.setMaximum(tot);
  progress.setValue(loaded);
  if (JDUtilities.getController().getSpeedMeter() > 1024) {
    speed.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatBytesToMB(JDUtilities.getController().getSpeedMeter()) + "String_Node_Str"));
    long etanum=(tot - loaded) / JDUtilities.getController().getSpeedMeter();
    eta.setText(JDLocale.LF("String_Node_Str","String_Node_Str",JDUtilities.formatSeconds(etanum)));
  }
 else {
    eta.setText("String_Node_Str");
    speed.setText("String_Node_Str");
  }
}
Program: 21143
Project: 21143
Buggy source:
@Override protected void setupChunks() throws Exception {
  try {
    if (checkResumabled() && isResume()) {
      logger.finer("String_Node_Str");
      this.setupResume();
    }
 else {
      logger.finer("String_Node_Str");
      this.setupVirginStart();
    }
  }
 catch (  Exception e) {
    try {
      if (outputChannel != null)       outputChannel.force(false);
      logger.info("String_Node_Str");
      if (outputFile != null)       outputFile.close();
      if (outputChannel != null)       outputChannel.close();
    }
 catch (    Exception e2) {
      e2.printStackTrace();
    }
    addException(e);
    throw e;
  }
}

Fixed version (ground truth):
@Override protected void setupChunks() throws Exception {
  try {
    if (isResume() && checkResumabled()) {
      logger.finer("String_Node_Str");
      this.setupResume();
    }
 else {
      logger.finer("String_Node_Str");
      this.setupVirginStart();
    }
  }
 catch (  Exception e) {
    try {
      if (outputChannel != null)       outputChannel.force(false);
      logger.info("String_Node_Str");
      if (outputFile != null)       outputFile.close();
      if (outputChannel != null)       outputChannel.close();
    }
 catch (    Exception e2) {
      e2.printStackTrace();
    }
    addException(e);
    throw e;
  }
}
Program: 21144
Project: 21144
Buggy source:
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  String trafficleft=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  String validuntil=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  ai.setTrafficLeft(trafficleft);
  SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  try {
    Date date=dateFormat.parse(validuntil);
    ai.setValidUntil(date.getTime());
  }
 catch (  ParseException e) {
    return null;
  }
  ai.setValid(true);
  return ai;
}

Fixed version (ground truth):
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  String trafficleft=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  String validuntil=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  ai.setTrafficLeft(trafficleft);
  SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  String[] splitted=validuntil.split("String_Node_Str");
  Date date=dateFormat.parse(splitted[2] + "String_Node_Str" + splitted[1]+ "String_Node_Str"+ splitted[0]);
  ai.setValidUntil(date.getTime());
  ai.setValid(true);
  return ai;
}
Program: 21147
Project: 21147
Buggy source:
/** 
 * ÃœberprÃ¼ft ob eine IP gÃ¼ltig ist. das verwendete Pattern aknn in der config editiert werden.
 * @param ip
 * @return
 */
public static boolean validateIP(String ip){
  return Pattern.compile(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_GLOBAL_IP_MASK,"String_Node_Str" + "String_Node_Str")).matcher(ip).matches();
}

Fixed version (ground truth):
/** 
 * ÃœberprÃ¼ft ob eine IP gÃ¼ltig ist. das verwendete Pattern aknn in der config editiert werden.
 * @param ip
 * @return
 */
public static boolean validateIP(String ip){
  return Pattern.compile(JDUtilities.getSubConfig("String_Node_Str").getStringProperty(Configuration.PARAM_GLOBAL_IP_MASK,"String_Node_Str" + "String_Node_Str")).matcher(ip).matches();
}
Program: 21149
Project: 21149
Buggy source:
public Account getAccount(){
  String pass=new String(txtPassword.getPassword());
  if (account == null)   return null;
  if (!account.getUser().equals(txtUsername.getText()) || !account.getPass().equals(pass)) {
    account.setUser(txtUsername.getText());
    account.setPass(pass);
    account.setProperty("String_Node_Str",null);
  }
  account.setEnabled(chkEnable.isSelected());
  return account;
}

Fixed version (ground truth):
public Account getAccount(){
  String pass=new String(txtPassword.getPassword());
  if (account == null)   return null;
  if (!account.getUser().equals(txtUsername.getText()) || !account.getPass().equals(pass)) {
    account.setUser(txtUsername.getText());
    account.setPass(pass);
    account.getProperties().clear();
  }
  account.setEnabled(chkEnable.isSelected());
  return account;
}
Program: 21150
Project: 21150
Buggy source:
private void tryClickNLoad(CryptedLink cryptedLink){
  if (this.isClickNLoadEnabled() && OPEN_CLICK_N_LOAD >= 0 && OPEN_CLICK_N_LOAD <= 25) {
    try {
      JDUtilities.acquireUserIO_Semaphore();
    }
 catch (    InterruptedException e1) {
      return;
    }
    if (OPEN_CLICK_N_LOAD < 0)     return;
    boolean open=JDUtilities.getGUI().showConfirmDialog(JDLocale.LF("String_Node_Str","String_Node_Str",this.getHost()));
    if (open) {
      try {
        JLinkButton.openURL("String_Node_Str" + Encoding.urlEncode(cryptedLink.getCryptedUrl().replace("String_Node_Str","String_Node_Str")));
        OPEN_CLICK_N_LOAD++;
      }
 catch (      Exception e) {
        open=false;
      }
    }
    if (!open) {
      OPEN_CLICK_N_LOAD=-1;
    }
    JDUtilities.releaseUserIO_Semaphore();
  }
}

Fixed version (ground truth):
private void tryClickNLoad(CryptedLink cryptedLink){
  if (this.isClickNLoadEnabled() && OPEN_CLICK_N_LOAD >= 0 && OPEN_CLICK_N_LOAD <= 25) {
    try {
      JDUtilities.acquireUserIO_Semaphore();
    }
 catch (    InterruptedException e1) {
      return;
    }
    if (OPEN_CLICK_N_LOAD < 0)     return;
    boolean open=JDUtilities.getGUI().showConfirmDialog(JDLocale.LF("String_Node_Str","String_Node_Str",this.getHost()));
    if (open) {
      try {
        JLinkButton.openURL(cryptedLink.getCryptedUrl());
        OPEN_CLICK_N_LOAD++;
      }
 catch (      Exception e) {
        open=false;
      }
    }
    if (!open) {
      OPEN_CLICK_N_LOAD=-1;
    }
    JDUtilities.releaseUserIO_Semaphore();
  }
}
Program: 21152
Project: 21152
Buggy source:
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> ar=decryptItMain(param);
  if (ar.size() > 1) {
    SJTable sjt=new SJTable(SimpleGUI.CURRENTGUI.getFrame(),ar);
    ar=sjt.dls;
  }
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  SerienjunkiesThread[] threads=new SerienjunkiesThread[ar.size()];
  this.progress=progress;
  for (int i=0; i < threads.length; i++) {
    DownloadLink downloadLink=ar.get(i);
    threads[i]=new SerienjunkiesThread(downloadLink,param);
    threads[i].start();
  }
  for (int i=0; i < threads.length; i++) {
    if (ar.get(i) != null) {
      while (threads[i].isAlive()) {
synchronized (threads[i]) {
          threads[i].wait();
        }
      }
      if (threads[i].result != null)       decryptedLinks.addAll(threads[i].result);
    }
  }
  return decryptedLinks;
}

Fixed version (ground truth):
public ArrayList<DownloadLink> decryptIt(CryptedLink param,ProgressController progress) throws Exception {
  ArrayList<DownloadLink> ar=decryptItMain(param);
  if (ar.size() > 1) {
    SerienjunkiesSJTable sjt=new SerienjunkiesSJTable(SimpleGUI.CURRENTGUI.getFrame(),ar);
    ar=sjt.dls;
  }
  ArrayList<DownloadLink> decryptedLinks=new ArrayList<DownloadLink>();
  SerienjunkiesThread[] threads=new SerienjunkiesThread[ar.size()];
  this.progress=progress;
  for (int i=0; i < threads.length; i++) {
    DownloadLink downloadLink=ar.get(i);
    threads[i]=new SerienjunkiesThread(downloadLink,param);
    threads[i].start();
  }
  for (int i=0; i < threads.length; i++) {
    if (ar.get(i) != null) {
      while (threads[i].isAlive()) {
synchronized (threads[i]) {
          threads[i].wait();
        }
      }
      if (threads[i].result != null)       decryptedLinks.addAll(threads[i].result);
    }
  }
  return decryptedLinks;
}
Program: 21157
Project: 21157
Buggy source:
@Override public AccountInfo getAccountInformation(Account account) throws Exception {
  if (account.getProperty("String_Node_Str") != null) {
    AccountInfo ai=(AccountInfo)account.getProperty("String_Node_Str");
    if ((System.currentTimeMillis() - ai.getCreateTime()) < 5 * 60 * 1000) {
      return ai;
    }
  }
  AccountInfo ai=new AccountInfo(this,account);
  String api="String_Node_Str" + account.getUser() + "String_Node_Str"+ account.getPass()+ "String_Node_Str";
  br.getPage(api);
  String error=br.getRegex("String_Node_Str").getMatch(0);
  if (error != null) {
    ai.setStatus(JDLocale.LF("String_Node_Str","String_Node_Str",error.trim()));
    ai.setValid(false);
    return ai;
  }
  String[][] matches=br.getRegex("String_Node_Str").getMatches();
  HashMap<String,String> data=getMap(matches);
  ai.setTrafficLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setTrafficMax(12 * 1024 * 1024* 1024l);
  ai.setFilesNum(Integer.parseInt(data.get("String_Node_Str")));
  ai.setPremiumPoints(Integer.parseInt(data.get("String_Node_Str")));
  ai.setNewPremiumPoints(Integer.parseInt(data.get("String_Node_Str")));
  ai.setUsedSpace(Integer.parseInt(data.get("String_Node_Str")));
  ai.setTrafficShareLeft((Integer.parseInt(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setValidUntil(Long.parseLong(data.get("String_Node_Str")) * 1000);
  if (ai.getValidUntil() < System.currentTimeMillis()) {
    ai.setExpired(true);
  }
  account.setProperty("String_Node_Str",ai);
  return ai;
}

Fixed version (ground truth):
@Override public AccountInfo getAccountInformation(Account account) throws Exception {
  if (account.getProperty("String_Node_Str") != null) {
    AccountInfo ai=(AccountInfo)account.getProperty("String_Node_Str");
    if ((System.currentTimeMillis() - ai.getCreateTime()) < 5 * 60 * 1000) {
      return ai;
    }
  }
  AccountInfo ai=new AccountInfo(this,account);
  String api="String_Node_Str" + account.getUser() + "String_Node_Str"+ account.getPass()+ "String_Node_Str";
  br.getPage(api);
  String error=br.getRegex("String_Node_Str").getMatch(0);
  if (error != null) {
    ai.setStatus(JDLocale.LF("String_Node_Str","String_Node_Str",error.trim()));
    ai.setValid(false);
    return ai;
  }
  String[][] matches=br.getRegex("String_Node_Str").getMatches();
  HashMap<String,String> data=getMap(matches);
  ai.setTrafficLeft((Long.parseLong(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setTrafficMax(12 * 1024 * 1024* 1024l);
  ai.setFilesNum(Integer.parseInt(data.get("String_Node_Str")));
  ai.setPremiumPoints(Integer.parseInt(data.get("String_Node_Str")));
  ai.setNewPremiumPoints(Integer.parseInt(data.get("String_Node_Str")));
  ai.setUsedSpace(Long.parseLong(data.get("String_Node_Str")));
  ai.setTrafficShareLeft((Integer.parseInt(data.get("String_Node_Str")) / 1000) * 1024l * 1024l);
  ai.setValidUntil(Long.parseLong(data.get("String_Node_Str")) * 1000);
  if (ai.getValidUntil() < System.currentTimeMillis()) {
    ai.setExpired(true);
  }
  account.setProperty("String_Node_Str",ai);
  return ai;
}
Program: 21159
Project: 21159
Buggy source:
private boolean update(){
  if (SKIP_UPLOAD)   return true;
  ftp=new SimpleFTP();
  try {
    ftp.connect("String_Node_Str",1200,"String_Node_Str",JOptionPane.showInputDialog("String_Node_Str"));
    ftp.bin();
    ftp.cwd("String_Node_Str");
    return secureUploadFolder(dir,null,webRoot);
  }
 catch (  HeadlessException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
private boolean update(){
  if (SKIP_UPLOAD)   return true;
  ftp=new SimpleFTP();
  try {
    Thread.sleep(3000);
    ftp.connect("String_Node_Str",1200,"String_Node_Str",JOptionPane.showInputDialog("String_Node_Str"));
    ftp.bin();
    ftp.cwd("String_Node_Str");
    return secureUploadFolder(dir,null,webRoot);
  }
 catch (  HeadlessException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return false;
}
Program: 21160
Project: 21160
Buggy source:
public void createPanel(JPanel panel,int nr){
  if (premiumActivated) {
    chkEnable=new JCheckBox(JDLocale.LF("String_Node_Str","String_Node_Str",nr));
    chkEnable.setForeground(INACTIVE);
  }
 else {
    chkEnable=new JCheckBox(JDLocale.LF("String_Node_Str","String_Node_Str",nr));
    chkEnable.setForeground(DISABLED);
  }
  panel.add(chkEnable,"String_Node_Str");
  chkEnable.addChangeListener(this);
  panel.add(btnCheck=new JButton(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  btnCheck.addActionListener(this);
  panel.add(btnDelete=new JButton(JDUtilities.getScaledImageIcon(JDTheme.V("String_Node_Str"),-1,14)));
  btnDelete.addActionListener(this);
  panel.add(new JSeparator(),"String_Node_Str");
  panel.add(txtStatus=new JTextField("String_Node_Str"),"String_Node_Str");
  txtStatus.setEditable(false);
  panel.add(lblUsername=new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  panel.add(txtUsername=new JTextField("String_Node_Str"));
  txtUsername.addFocusListener(this);
  panel.add(lblPassword=new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  panel.add(txtPassword=new JDPasswordField(),"String_Node_Str");
  txtPassword.addFocusListener(this);
  chkEnable.setSelected(false);
}

Fixed version (ground truth):
public void createPanel(JPanel panel,int nr){
  if (premiumActivated) {
    chkEnable=new JCheckBox(JDLocale.LF("String_Node_Str","String_Node_Str",nr));
    chkEnable.setForeground(INACTIVE);
  }
 else {
    chkEnable=new JCheckBox(JDLocale.LF("String_Node_Str","String_Node_Str",nr));
    chkEnable.setForeground(DISABLED);
  }
  panel.add(chkEnable,"String_Node_Str");
  chkEnable.addChangeListener(this);
  panel.add(btnCheck=new JButton(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  btnCheck.addActionListener(this);
  panel.add(btnDelete=new JButton(JDUtilities.getScaledImageIcon(JDTheme.V("String_Node_Str"),-1,14)));
  btnDelete.addActionListener(this);
  panel.add(new JSeparator(),"String_Node_Str");
  panel.add(txtStatus=new JTextField("String_Node_Str"),"String_Node_Str");
  txtStatus.setEditable(false);
  panel.add(lblUsername=new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  panel.add(txtUsername=new JTextField("String_Node_Str"));
  txtUsername.addFocusListener(this);
  panel.add(lblPassword=new JLabel(JDLocale.L("String_Node_Str","String_Node_Str")),"String_Node_Str");
  panel.add(txtPassword=new JDPasswordField(),"String_Node_Str");
  txtPassword.addFocusListener(this);
  this.account=new Account(txtUsername.getText(),new String(txtPassword.getPassword()));
  chkEnable.setSelected(false);
  account.setEnabled(chkEnable.isSelected());
}
Program: 21161
Project: 21161
Buggy source:
/** 
 * List ist immer eine ArrayList<Account> mit Daten aus der config
 * @param list
 */
@SuppressWarnings("String_Node_Str") public void setAccounts(Object list){
  ArrayList<Account> accounts=(ArrayList<Account>)list;
  for (int i=0; i < accountNum; i++) {
    if (i >= accounts.size())     break;
    accs[i].setAccount(accounts.get(i));
  }
  createDataset();
}

Fixed version (ground truth):
/** 
 * List ist immer eine ArrayList<Account> mit Daten aus der config
 * @param list
 */
@SuppressWarnings("String_Node_Str") public void setAccounts(Object list){
  ArrayList<Account> accounts=(ArrayList<Account>)list;
  for (int i=0; i < accountNum; i++) {
    if (i >= accounts.size())     break;
    if (accounts.get(i) != null)     accs[i].setAccount(accounts.get(i));
  }
  createDataset();
}
Program: 21163
Project: 21163
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink){
  try {
    br.getPage(downloadLink.getDownloadURL());
    if (br.getRedirectLocation() == null) {
      String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
      String filesize;
      if ((filesize=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)) != null) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(filesize) * 1024 * 1024));
      }
 else       if ((filesize=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)) != null) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(filesize) * 1024));
      }
      downloadLink.setName(filename);
      return true;
    }
  }
 catch (  Exception e) {
  }
  downloadLink.setAvailable(false);
  return false;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink){
  try {
    br.getPage(downloadLink.getDownloadURL());
    if (br.getRedirectLocation() == null) {
      String filename=br.getRegex("String_Node_Str").getMatch(0);
      String filesize;
      if ((filesize=br.getRegex("String_Node_Str").getMatch(0)) != null) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(filesize.replaceAll("String_Node_Str","String_Node_Str")) * 1024 * 1024));
      }
 else       if ((filesize=br.getRegex("String_Node_Str").getMatch(0)) != null) {
        downloadLink.setDownloadSize((int)Math.round(Double.parseDouble(filesize.replaceAll("String_Node_Str","String_Node_Str")) * 1024));
      }
      downloadLink.setName(filename);
      return true;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  downloadLink.setAvailable(false);
  return false;
}
Program: 21164
Project: 21164
Buggy source:
public boolean isPremium(){
  if (UserInfo.containsKey("String_Node_Str")) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isPremium(){
  if (UserInfo.containsKey("String_Node_Str")) {
    Date d=new Date(Long.parseLong(UserInfo.get("String_Node_Str")) * 1000l);
    if (d.compareTo(new Date()) >= 0)     return true;
  }
  return false;
}
Program: 21165
Project: 21165
Buggy source:
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  if (!UserInfo.containsKey("String_Node_Str")) {
    ai.setValid(false);
    return ai;
  }
  if (!UserInfo.containsKey("String_Node_Str")) {
    ai.setValid(true);
    ai.setStatus("String_Node_Str");
    return ai;
  }
  Date d=new Date(Long.parseLong(UserInfo.get("String_Node_Str")) * 1000l);
  if (d.compareTo(new Date()) >= 0) {
    ai.setValid(true);
  }
 else {
    ai.setValid(false);
  }
  ai.setValidUntil(d.getTime());
  return ai;
}

Fixed version (ground truth):
public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  this.setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  if (!UserInfo.containsKey("String_Node_Str")) {
    ai.setValid(false);
    return ai;
  }
  if (!UserInfo.containsKey("String_Node_Str")) {
    ai.setValid(true);
    ai.setStatus("String_Node_Str");
    return ai;
  }
  Date d=new Date(Long.parseLong(UserInfo.get("String_Node_Str")) * 1000l);
  if (d.compareTo(new Date()) >= 0) {
    ai.setValid(true);
    ai.setValidUntil(d.getTime());
  }
 else {
    ai.setValid(true);
    ai.setStatus("String_Node_Str");
  }
  return ai;
}
Program: 21166
Project: 21166
Buggy source:
@Override public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  if (!isPremium()) {
    ai.setValid(false);
    ai.setStatus("String_Node_Str");
    return ai;
  }
  br.getPage("String_Node_Str");
  String points=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (points != null)   ai.setPremiumPoints(points);
  String expire=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  ai.setValidUntil(Regex.getMilliSeconds(expire,"String_Node_Str",null));
  ai.setTrafficLeft(-1);
  ai.setValid(true);
  return ai;
}

Fixed version (ground truth):
@Override public AccountInfo getAccountInformation(Account account) throws Exception {
  AccountInfo ai=new AccountInfo(this,account);
  setBrowserExclusive();
  try {
    login(account);
  }
 catch (  PluginException e) {
    ai.setValid(false);
    return ai;
  }
  if (!isPremium()) {
    ai.setValid(false);
    ai.setStatus("String_Node_Str");
    return ai;
  }
  br.getPage("String_Node_Str");
  String points=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  if (points != null)   ai.setPremiumPoints(points);
  String expire=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);
  ai.setValidUntil(Regex.getMilliSeconds(expire,"String_Node_Str",Locale.ENGLISH));
  ai.setTrafficLeft(-1);
  ai.setValid(true);
  return ai;
}
Program: 21170
Project: 21170
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.getPage(downloadLink.getDownloadURL());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(filename.trim());
  downloadLink.setDownloadSize(Regex.getSize(filesize));
  return true;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  br.getPage(downloadLink.getDownloadURL());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
  String filesize=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(filename.trim());
  downloadLink.setDownloadSize(Regex.getSize(filesize));
  return true;
}
Program: 21171
Project: 21171
Buggy source:
static public final String decrypterPattern_Redirecter_Plugin(){
  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"};
  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 completePattern.toString();
}

Fixed version (ground truth):
static public final String decrypterPattern_Redirecter_Plugin(){
  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"};
  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 completePattern.toString();
}
Program: 21174
Project: 21174
Buggy source:
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  String url=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,"String_Node_Str" + url);
  HTTPConnection con=dl.getConnection();
  if (!con.isContentDisposition()) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink downloadLink) throws Exception {
  getFileInformation(downloadLink);
  String url=br.getRegex(Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE)).getMatch(0);
  br.setFollowRedirects(true);
  dl=br.openDownload(downloadLink,url);
  HTTPConnection con=dl.getConnection();
  if (!con.isContentDisposition()) {
    con.disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,10 * 60 * 1000l);
  }
  dl.startDownload();
}