nus-yam/ex-repair huggingface dataset:
Program: 20679
Project: 20679
Buggy source:
public void updateCredit(View v,int sign){
  LinearLayout row=(LinearLayout)v.getParent().getParent();
  TextView denominationText=(TextView)row.getChildAt(1);
  TextView addedCountText=(TextView)row.getChildAt(2);
  TextView remainCountText=(TextView)row.getChildAt(3);
  int denomination=Integer.parseInt(denominationText.getText().toString());
  int addedCount=Integer.parseInt(addedCountText.getText().toString());
  int remainCount=Integer.parseInt(remainCountText.getText().toString());
  int creditAdded=(int)Double.parseDouble(creditAddedTV.getText().toString());
  addedCount+=sign;
  addedCountText.setText(String.valueOf(addedCount));
  remainCount-=sign;
  remainCountText.setText(String.valueOf(remainCount));
  creditAdded+=sign * denomination;
  creditAddedTV.setText(AccountModel.crIntToString(creditAdded * 100));
  newBalanceTV.setText(AccountModel.crIntToString(creditAdded * 100 + balance));
  if (sign == -1) {
    if (addedCount <= 0) {
      v.setEnabled(false);
    }
    if (remainCount >= 1) {
      ((Button)(((LinearLayout)v.getParent()).getChildAt(0))).setEnabled(true);
    }
  }
  if (sign == 1) {
    if (addedCount >= 1) {
      ((Button)(((LinearLayout)v.getParent()).getChildAt(1))).setEnabled(true);
    }
    if (remainCount <= 0) {
      v.setEnabled(false);
    }
  }
  submitBtn.setEnabled(creditAdded > 0);
}

Fixed version (ground truth):
public void updateCredit(View v,int sign){
  LinearLayout row=(LinearLayout)v.getParent().getParent();
  TextView denominationText=(TextView)row.getChildAt(1);
  TextView addedCountText=(TextView)row.getChildAt(2);
  TextView remainCountText=(TextView)row.getChildAt(3);
  int denomination=Integer.parseInt(denominationText.getText().toString());
  int addedCount=Integer.parseInt(addedCountText.getText().toString());
  int remainCount=Integer.parseInt(remainCountText.getText().toString());
  int creditAdded=(int)Double.parseDouble(creditAddedTV.getText().toString().replace("String_Node_Str","String_Node_Str"));
  addedCount+=sign;
  addedCountText.setText(String.valueOf(addedCount));
  remainCount-=sign;
  remainCountText.setText(String.valueOf(remainCount));
  creditAdded+=sign * denomination;
  creditAddedTV.setText(AccountModel.crIntToString(creditAdded * 100));
  newBalanceTV.setText(AccountModel.crIntToString(creditAdded * 100 + balance));
  if (sign == -1) {
    if (addedCount <= 0) {
      v.setEnabled(false);
    }
    if (remainCount >= 1) {
      ((Button)(((LinearLayout)v.getParent()).getChildAt(0))).setEnabled(true);
    }
  }
  if (sign == 1) {
    if (addedCount >= 1) {
      ((Button)(((LinearLayout)v.getParent()).getChildAt(1))).setEnabled(true);
    }
    if (remainCount <= 0) {
      v.setEnabled(false);
    }
  }
  submitBtn.setEnabled(creditAdded > 0);
}
Program: 20680
Project: 20680
Buggy source:
DescriptorImpl(){
  super(HelloWorldBuilder.class);
}

Fixed version (ground truth):
DescriptorImpl(){
  super(HelloWorldBuilder.class);
  load();
}
Program: 20683
Project: 20683
Buggy source:
public void findID() throws PluginException {
  this.id=this.br.getRegex(IDREGEX).getMatch(0);
  if (this.id == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}

Fixed version (ground truth):
/** 
 * DO NOT use in Plugins at the moment, cause the current nightly is not able to use this function, directHTTP is included in jar and not updatable at the moment
 */
public void findID() throws PluginException {
  this.id=this.br.getRegex(IDREGEX).getMatch(0);
  if (this.id == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
Program: 20695
Project: 20695
Buggy source:
@Override public AccountInfo fetchAccountInfo(final Account account) throws Exception {
  final AccountInfo ai=new AccountInfo();
  try {
    login(account);
  }
 catch (  final PluginException e) {
    account.setValid(false);
    return ai;
  }
  ai.setStatus("String_Node_Str");
  ai.setUnlimitedTraffic();
  account.setValid(true);
  return ai;
}

Fixed version (ground truth):
@Override public AccountInfo fetchAccountInfo(final Account account) throws Exception {
  final AccountInfo ai=new AccountInfo();
  try {
    login(account,true);
  }
 catch (  final PluginException e) {
    account.setValid(false);
    return ai;
  }
  ai.setStatus("String_Node_Str");
  ai.setUnlimitedTraffic();
  account.setValid(true);
  return ai;
}
Program: 20696
Project: 20696
Buggy source:
public void login(final Account account) throws Exception {
  setBrowserExclusive();
  br.setDebug(true);
  br.setFollowRedirects(true);
  br.getPage(FACEBOOKMAINPAGE);
  final Form loginForm=br.getForm(0);
  if (loginForm == null) {
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  loginForm.remove("String_Node_Str");
  loginForm.remove(null);
  loginForm.put("String_Node_Str",account.getUser());
  loginForm.put("String_Node_Str",Encoding.urlEncode(account.getPass()));
  br.submitForm(loginForm);
  if (br.getCookie(FACEBOOKMAINPAGE,"String_Node_Str") == null || br.getCookie(FACEBOOKMAINPAGE,"String_Node_Str") == null) {
    throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void login(final Account account,final boolean force) throws Exception {
synchronized (LOCK) {
    br.setCookiesExclusive(false);
    final Object ret=account.getProperty("String_Node_Str",null);
    boolean acmatch=account.getUser().matches(account.getStringProperty("String_Node_Str",account.getUser()));
    if (acmatch)     acmatch=account.getPass().matches(account.getStringProperty("String_Node_Str",account.getPass()));
    if (acmatch && ret != null && ret instanceof HashMap<?,?> && !force) {
      final HashMap<String,String> cookies=(HashMap<String,String>)ret;
      if (cookies.containsKey("String_Node_Str") && cookies.containsKey("String_Node_Str") && account.isValid()) {
        for (        final String key : cookies.keySet()) {
          this.br.setCookie(FACEBOOKMAINPAGE,key,cookies.get(key));
        }
        return;
      }
    }
    br.setFollowRedirects(true);
    br.getPage(FACEBOOKMAINPAGE);
    final Form loginForm=br.getForm(0);
    if (loginForm == null) {
      throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
    }
    loginForm.remove("String_Node_Str");
    loginForm.remove(null);
    loginForm.put("String_Node_Str",account.getUser());
    loginForm.put("String_Node_Str",Encoding.urlEncode(account.getPass()));
    br.submitForm(loginForm);
    if (br.getCookie(FACEBOOKMAINPAGE,"String_Node_Str") == null || br.getCookie(FACEBOOKMAINPAGE,"String_Node_Str") == null) {
      throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_DISABLE);
    }
    final HashMap<String,String> cookies=new HashMap<String,String>();
    final Cookies add=this.br.getCookies(FACEBOOKMAINPAGE);
    for (    final Cookie c : add.getCookies()) {
      cookies.put(c.getKey(),c.getValue());
    }
    account.setProperty("String_Node_Str",account.getUser());
    account.setProperty("String_Node_Str",account.getPass());
    account.setProperty("String_Node_Str",cookies);
  }
}
Program: 20697
Project: 20697
Buggy source:
@Override public AvailableStatus requestFileInformation(final DownloadLink downloadLink) throws IOException {
  checkLinks(new DownloadLink[]{downloadLink});
  if (!downloadLink.isAvailabilityStatusChecked()) {
    downloadLink.setAvailableStatus(AvailableStatus.UNCHECKABLE);
  }
  return downloadLink.getAvailableStatus();
}

Fixed version (ground truth):
public AvailableStatus requestFileInformation(DownloadLink link) throws Exception {
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  final Account aa=AccountController.getInstance().getValidAccount(this);
  if (aa == null || !aa.isValid())   throw new PluginException(LinkStatus.ERROR_FATAL,"String_Node_Str");
  br.setFollowRedirects(true);
  login(aa,false);
  br.getPage(link.getDownloadURL());
  String getThisPage=br.getRegex("String_Node_Str").getMatch(0);
  if (getThisPage != null)   br.getPage(getThisPage.replace("String_Node_Str","String_Node_Str"));
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  dllink=Encoding.urlDecode(decodeUnicode(br.getRegex(DLLINKREGEXP).getMatch(1)),true);
  String filename=br.getRegex("String_Node_Str").getMatch(0);
  if (filename == null) {
    filename=br.getRegex("String_Node_Str").getMatch(0);
  }
  if (filename == null) {
    filename=br.getRegex("String_Node_Str").getMatch(0).trim();
    if (filename != null) {
      final String videoid=new Regex(link.getDownloadURL(),"String_Node_Str").getMatch(0);
      filename=filename + "String_Node_Str" + videoid;
    }
  }
  if (filename != null) {
    filename=filename.trim();
    link.setFinalFileName(filename + "String_Node_Str");
    return AvailableStatus.TRUE;
  }
 else {
    throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  }
}
Program: 20699
Project: 20699
Buggy source:
@Override public String getToolTip(KeyInfo obj){
  if (obj.hasWrongParameterCount())   return JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str");
  String match=new Regex(((KeyInfo)obj).getKey(),"String_Node_Str").getMatch(0);
  if (match != null) {
    StringBuilder toolTip=new StringBuilder();
    toolTip.append(JDL.LF(JDL_PREFIX + "String_Node_Str","String_Node_Str",match));
    if (new Regex(obj.getLanguage(),"String_Node_Str").matches()) {
      toolTip.append(new char[]{' ','['}).append(JDL.LF(JDL_PREFIX + "String_Node_Str","String_Node_Str")).append(']');
    }
    return toolTip.toString();
  }
  return super.getToolTip(obj);
}

Fixed version (ground truth):
@Override public String getToolTip(KeyInfo obj){
  if (obj.hasWrongParameterCount())   return JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str");
  String match=new Regex(((KeyInfo)obj).getKey(),"String_Node_Str").getMatch(0);
  if (match != null) {
    StringBuilder toolTip=new StringBuilder();
    toolTip.append(JDL.LF(JDL_PREFIX + "String_Node_Str","String_Node_Str",match));
    if (new Regex(obj.getLanguage(),"String_Node_Str").matches()) {
      toolTip.append(new char[]{' ','['}).append(JDL.LF(JDL_PREFIX + "String_Node_Str","String_Node_Str",obj.getLanguage())).append(']');
    }
    return toolTip.toString();
  }
  return super.getToolTip(obj);
}
Program: 20703
Project: 20703
Buggy source:
/** 
 * Bestimmt den Pfad in den das Archiv entpackt werden soll
 * @param link
 * @return
 */
private File getExtractToPath(DownloadLink link){
  IExtraction extractor=getExtractor(link);
  if (link.getProperty(ExtractionConstants.DOWNLOADLINK_KEY_EXTRACTTOPATH) != null)   return (File)link.getProperty(ExtractionConstants.DOWNLOADLINK_KEY_EXTRACTTOPATH);
  if (link.getHost().equals(DUMMY_HOSTER))   return new File(link.getFileOutput()).getParentFile();
  String path;
  if (!getPluginConfig().getBooleanProperty(ExtractionConstants.CONFIG_KEY_USE_EXTRACT_PATH,false)) {
    path=new File(link.getFileOutput()).getParent();
  }
 else {
    path=this.getPluginConfig().getStringProperty(ExtractionConstants.CONFIG_KEY_UNPACKPATH,JDUtilities.getDefaultDownloadDirectory());
  }
  File ret=new File(path);
  if (!this.getPluginConfig().getBooleanProperty(ExtractionConstants.CONFIG_KEY_USE_SUBPATH,false))   return ret;
  path=this.getPluginConfig().getStringProperty(ExtractionConstants.CONFIG_KEY_SUBPATH,"String_Node_Str");
  try {
    if (link.getFilePackage().getName() != null) {
      path=path.replace("String_Node_Str",link.getFilePackage().getName());
    }
 else {
      path=path.replace("String_Node_Str","String_Node_Str");
      logger.severe("String_Node_Str");
    }
    if (extractor.getArchiveName(link) != null) {
      path=path.replace("String_Node_Str",extractor.getArchiveName(link));
    }
 else {
      logger.severe("String_Node_Str");
    }
    if (link.getHost() != null) {
      path=path.replace("String_Node_Str",link.getHost());
    }
 else {
      logger.severe("String_Node_Str");
    }
    String dif=new File(JDUtilities.getDefaultDownloadDirectory()).getAbsolutePath().replace(new File(link.getFileOutput()).getParent(),"String_Node_Str");
    if (new File(dif).isAbsolute()) {
      dif="String_Node_Str";
    }
    path=path.replace("String_Node_Str",dif);
    path=path.replaceAll("String_Node_Str","String_Node_Str");
    path=path.replaceAll("String_Node_Str","String_Node_Str");
    return new File(ret,path);
  }
 catch (  Exception e) {
    JDLogger.exception(e);
    return ret;
  }
}

Fixed version (ground truth):
/** 
 * Bestimmt den Pfad in den das Archiv entpackt werden soll
 * @param link
 * @return
 */
private File getExtractToPath(DownloadLink link){
  if (link.getProperty(ExtractionConstants.DOWNLOADLINK_KEY_EXTRACTTOPATH) != null)   return (File)link.getProperty(ExtractionConstants.DOWNLOADLINK_KEY_EXTRACTTOPATH);
  if (link.getHost().equals(DUMMY_HOSTER))   return new File(link.getFileOutput()).getParentFile();
  String path;
  if (!getPluginConfig().getBooleanProperty(ExtractionConstants.CONFIG_KEY_USE_EXTRACT_PATH,false)) {
    path=new File(link.getFileOutput()).getParent();
  }
 else {
    path=this.getPluginConfig().getStringProperty(ExtractionConstants.CONFIG_KEY_UNPACKPATH,JDUtilities.getDefaultDownloadDirectory());
  }
  return new File(path);
}
Program: 20706
Project: 20706
Buggy source:
private boolean isContainer(File file){
  return isContainer(file.getName());
}

Fixed version (ground truth):
private boolean isContainer(String path){
  return path.matches("String_Node_Str");
}
Program: 20708
Project: 20708
Buggy source:
public void actionPerformed(ActionEvent e){
  if (JDFlags.hasSomeFlags(UserIO.getInstance().requestConfirmDialog(UserIO.NO_COUNTDOWN,JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str")),UserIO.RETURN_OK)) {
    String folder=(String)list.getSelectedValue();
    if (folder != null)     emptyFolder(folder);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  showGui();
}
Program: 20709
Project: 20709
Buggy source:
private boolean emptyFolder(File folder){
  if (folder.isDirectory()) {
    for (    File file : folder.listFiles()) {
      if (isContainer(file)) {
        file.delete();
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean emptyFolder(File folder){
  if (folder.exists() && folder.isDirectory()) {
    for (    File file : folder.listFiles()) {
      if (isContainer(file)) {
        file.delete();
      }
    }
    return true;
  }
  return false;
}
Program: 20710
Project: 20710
Buggy source:
private void deleteContainer(File container){
  if (isContainer(container))   container.delete();
}

Fixed version (ground truth):
private void deleteContainer(File container){
  if (isContainer(container)) {
    container.delete();
  }
}
Program: 20711
Project: 20711
Buggy source:
private void openInFilebrowser(String path){
  JDUtilities.openExplorer(new File(path));
}

Fixed version (ground truth):
private void openInFilebrowser(String path){
  File dir=new File(path);
  if (dir.exists()) {
    JDUtilities.openExplorer(dir);
  }
 else {
    UserIO.getInstance().requestConfirmDialog(UserIO.NO_COUNTDOWN,JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str"));
  }
}
Program: 20712
Project: 20712
Buggy source:
private void handleErrors(final Browser br) throws PluginException {
  String error=null;
  if (this.br.toString().startsWith("String_Node_Str")) {
    error=this.br.getRegex("String_Node_Str").getMatch(0);
    final String ipwait=new Regex(error,"String_Node_Str").getMatch(0);
    if (ipwait != null) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,Long.parseLong(ipwait) * 1000l);
    }
    if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,error);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,JDL.L("String_Node_Str","String_Node_Str"),5 * 60 * 1000l);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,JDL.L("String_Node_Str","String_Node_Str"),10 * 60 * 1000l);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1000l);
    }
 else {
      JDLogger.getLogger().fine(br.toString());
      throw new PluginException(LinkStatus.ERROR_FATAL,error);
    }
  }
}

Fixed version (ground truth):
private void handleErrors(final Browser br) throws PluginException {
  String error=null;
  if (this.br.toString().startsWith("String_Node_Str")) {
    error=this.br.getRegex("String_Node_Str").getMatch(0);
    int index=error.lastIndexOf("String_Node_Str");
    if (index > 0)     error=error.substring(0,index).trim();
    final String ipwait=new Regex(error,"String_Node_Str").getMatch(0);
    if (ipwait != null) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,null,Long.parseLong(ipwait) * 1000l);
    }
    if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND,error);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE,JDL.L("String_Node_Str","String_Node_Str"),5 * 60 * 1000l);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,JDL.L("String_Node_Str","String_Node_Str"),10 * 60 * 1000l);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_PREMIUM,PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);
    }
 else     if ("String_Node_Str".equals(error)) {
      throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,10 * 60 * 1000l);
    }
 else {
      JDLogger.getLogger().fine(br.toString());
      throw new PluginException(LinkStatus.ERROR_FATAL,error);
    }
  }
}
Program: 20715
Project: 20715
Buggy source:
public void update(){
  new GuiRunnable<Object>(){
    @Override public Object runSave(){
      History.updateEntries();
      HistoryEntry container=(HistoryEntry)table.getValueAt(table.getSelectedRow(),3);
      String info=container.isExisting() ? "String_Node_Str" : "String_Node_Str";
      updateInfo(JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str"),info);
      return null;
    }
  }
.start();
}

Fixed version (ground truth):
public void update(){
  new GuiRunnable<Object>(){
    @Override public Object runSave(){
      HistoryEntry container=(HistoryEntry)table.getValueAt(table.getSelectedRow(),3);
      container=History.updateEntry(container);
      String info=container.isExisting() ? "String_Node_Str" : "String_Node_Str";
      updateInfo(JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str"),info);
      return null;
    }
  }
.start();
}
Program: 20716
Project: 20716
Buggy source:
@Override public Object runSave(){
  History.updateEntries();
  HistoryEntry container=(HistoryEntry)table.getValueAt(table.getSelectedRow(),3);
  String info=container.isExisting() ? "String_Node_Str" : "String_Node_Str";
  updateInfo(JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str"),info);
  return null;
}

Fixed version (ground truth):
@Override public Object runSave(){
  HistoryEntry container=(HistoryEntry)table.getValueAt(table.getSelectedRow(),3);
  container=History.updateEntry(container);
  String info=container.isExisting() ? "String_Node_Str" : "String_Node_Str";
  updateInfo(JDL.L(JDL_PREFIX + "String_Node_Str","String_Node_Str"),info);
  return null;
}
Program: 20717
Project: 20717
Buggy source:
public void onPostSave(SubConfiguration subConfiguration){
  folder=subConfiguration.getStringProperty(FolderWatchConstants.PROPERTY_FOLDER);
  if (!folder.equals(folderOld)) {
    startWatching(false);
    startWatching(true);
  }
}

Fixed version (ground truth):
public void onPostSave(SubConfiguration subConfiguration){
  folder=subConfiguration.getStringProperty(FolderWatchConstants.PROPERTY_FOLDER);
  isAutoDelete=subConfiguration.getBooleanProperty(FolderWatchConstants.PROPERTY_AUTODELETE);
  if (!folder.equals(folderOld) || isAutoDelete != isAutoDeleteOld) {
    startWatching(false);
    startWatching(true);
  }
}
Program: 20718
Project: 20718
Buggy source:
private void showGui(){
  if (view == null) {
    view=new FolderWatchView();
    view.getBroadcaster().addListener(new SwitchPanelListener(){
      @Override public void onPanelEvent(      SwitchPanelEvent event){
        if (event.getEventID() == SwitchPanelEvent.ON_REMOVE) {
          showGuiAction.setSelected(false);
        }
      }
    }
);
    historyCleanup();
    historyGui=new FolderWatchPanel(getPluginConfig());
    view.setContent(historyGui);
    view.setInfoPanel(historyGui.getInfoPanel());
  }
  showGuiAction.setSelected(true);
  JDGui.getInstance().setContent(view);
}

Fixed version (ground truth):
private void showGui(){
  if (view == null) {
    view=new FolderWatchView();
    view.getBroadcaster().addListener(new SwitchPanelListener(){
      @Override public void onPanelEvent(      SwitchPanelEvent event){
        if (event.getEventID() == SwitchPanelEvent.ON_REMOVE) {
          showGuiAction.setSelected(false);
        }
      }
    }
);
    historyCleanup(null);
    historyGui=new FolderWatchPanel(getPluginConfig());
    view.setContent(historyGui);
    view.setInfoPanel(historyGui.getInfoPanel());
  }
  showGuiAction.setSelected(true);
  JDGui.getInstance().setContent(view);
}
Program: 20719
Project: 20719
Buggy source:
public void onMonitoringFileCreate(String filename){
  if (isContainer(filename)) {
    String absPath=folder + "String_Node_Str" + filename;
    String md5Hash=importContainer(absPath);
    historyAdd(new HistoryEntry(filename,absPath,md5Hash));
  }
}

Fixed version (ground truth):
public void onMonitoringFileCreate(String filename){
  if (isContainer(filename)) {
    String absPath=folder + "String_Node_Str" + filename;
    String md5Hash=importContainer(absPath);
    historyAdd(new HistoryEntry(filename,absPath,md5Hash));
    if (isAutoDelete) {
      final String container=absPath;
      Thread t=new Thread(new Runnable(){
        public void run(){
          try {
            while (LinkGrabberPanel.getLinkGrabber().isRunning()) {
              Thread.sleep(1000);
            }
          }
 catch (          InterruptedException e) {
            e.printStackTrace();
          }
          deleteContainer(container);
          logger.info(container + "String_Node_Str");
        }
      }
);
      t.run();
    }
  }
}
Program: 20721
Project: 20721
Buggy source:
public void onMonitoringFileDelete(String filename){
  historyCleanup();
}

Fixed version (ground truth):
public void onMonitoringFileDelete(String filename){
  historyCleanup(filename);
}
Program: 20722
Project: 20722
Buggy source:
public JDFolderWatch(PluginWrapper wrapper){
  super(wrapper);
  subConfig=getPluginConfig();
  isEnabled=subConfig.getBooleanProperty(FolderWatchConstants.PROPERTY_ENABLED,true);
  folder=subConfig.getStringProperty(FolderWatchConstants.PROPERTY_FOLDER,"String_Node_Str");
  History.setEntries(getHistoryEntriesFromConfig());
  historyCleanup();
  initConfig();
}

Fixed version (ground truth):
public JDFolderWatch(PluginWrapper wrapper){
  super(wrapper);
  subConfig=getPluginConfig();
  isEnabled=subConfig.getBooleanProperty(FolderWatchConstants.PROPERTY_ENABLED,false);
  folder=subConfig.getStringProperty(FolderWatchConstants.PROPERTY_FOLDER,"String_Node_Str");
  isAutoDelete=subConfig.getBooleanProperty(FolderWatchConstants.PROPERTY_AUTODELETE,false);
  History.setEntries(getHistoryEntriesFromConfig());
  historyCleanup(null);
  initConfig();
}
Program: 20723
Project: 20723
Buggy source:
private void historyCleanup(){
  History.updateEntries();
  subConfig.setProperty(FolderWatchConstants.PROPERTY_HISTORY,History.getEntries());
  subConfig.save();
  if (historyGui != null)   historyGui.refresh();
}

Fixed version (ground truth):
private void historyCleanup(String filename){
  if (filename == null)   History.updateEntries();
 else   History.updateEntry(filename);
  subConfig.setProperty(FolderWatchConstants.PROPERTY_HISTORY,History.getEntries());
  subConfig.save();
  if (historyGui != null)   historyGui.refresh();
}
Program: 20724
Project: 20724
Buggy source:
public void onPreSave(SubConfiguration subConfiguration){
  folderOld=folder;
}

Fixed version (ground truth):
public void onPreSave(SubConfiguration subConfiguration){
  folderOld=folder;
  isAutoDeleteOld=isAutoDelete;
}
Program: 20725
Project: 20725
Buggy source:
public static void updateEntries(){
  boolean value;
  for (  HistoryEntry entry : entries) {
    value=isFileExisting(entry.getAbsolutePath());
    entry.setExisting(value);
  }
}

Fixed version (ground truth):
public static void updateEntries(){
  for (  HistoryEntry entry : entries) {
    updateEntry(entry);
  }
}
Program: 20727
Project: 20727
Buggy source:
@SuppressWarnings("String_Node_Str") public void handleRequest(String url,HashMap<String,String> requestParameter){
  try {
    Template t=new Template(JDUtilities.getResourceFile("String_Node_Str" + url).getAbsolutePath());
    t.setParam("String_Node_Str",JDWebinterface.instance.getPluginID());
    t.setParam("String_Node_Str",JDWebinterface.getRefreshRate());
    boolean hasUnrar=false;
    OptionalPluginWrapper wrapper=JDUtilities.getOptionalPlugin("String_Node_Str");
    if (wrapper != null && wrapper.isEnabled())     hasUnrar=true;
    t.setParam("String_Node_Str",hasUnrar ? "String_Node_Str" : "String_Node_Str");
    if (url.startsWith("String_Node_Str") == true) {
      add_single_info(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_all_info(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_status_page(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_password_list(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_linkadder_page(t,requestParameter);
    }
    response.addContent(t.output());
    response.setOk();
  }
 catch (  FileNotFoundException e) {
    JDLogger.exception(e);
  }
catch (  IllegalStateException e) {
    JDLogger.exception(e);
  }
catch (  IOException e) {
    JDLogger.exception(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void handleRequest(String url,HashMap<String,String> requestParameter){
  try {
    url=new Regex(url,"String_Node_Str").getMatch(0);
    Template t=new Template(JDUtilities.getResourceFile("String_Node_Str" + url).getAbsolutePath());
    t.setParam("String_Node_Str",JDWebinterface.instance.getPluginID());
    t.setParam("String_Node_Str",JDWebinterface.getRefreshRate());
    boolean hasUnrar=false;
    OptionalPluginWrapper wrapper=JDUtilities.getOptionalPlugin("String_Node_Str");
    if (wrapper != null && wrapper.isEnabled())     hasUnrar=true;
    t.setParam("String_Node_Str",hasUnrar ? "String_Node_Str" : "String_Node_Str");
    if (url.startsWith("String_Node_Str") == true) {
      add_single_info(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_all_info(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_status_page(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_password_list(t,requestParameter);
    }
    if (url.startsWith("String_Node_Str") == true) {
      add_linkadder_page(t,requestParameter);
    }
    response.addContent(t.output());
    response.setOk();
  }
 catch (  FileNotFoundException e) {
    JDLogger.exception(e);
  }
catch (  IllegalStateException e) {
    JDLogger.exception(e);
  }
catch (  IOException e) {
    JDLogger.exception(e);
  }
}
Program: 20730
Project: 20730
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  URLConnectionAdapter con=br.openGetConnection(downloadLink.getDownloadURL());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  if (con.getResponseCode() == 503)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  br.followConnection();
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  if (br.containsHTML("String_Node_Str"))   downloadLink.getLinkStatus().setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
  String filename=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
  String filesize=br.getRegex(Pattern.compile("String_Node_Str",Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(1);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  downloadLink.setName(filename.trim());
  downloadLink.setDownloadSize(Regex.getSize(filesize));
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
  this.setBrowserExclusive();
  br.getHeaders().put("String_Node_Str",RandomUserAgent.generate());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  String fileID=new Regex(downloadLink.getDownloadURL(),"String_Node_Str").getMatch(0);
  br.getPage("String_Node_Str" + fileID);
  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(Pattern.compile("String_Node_Str",Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
  if (filename == null || filesize == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  downloadLink.setName(filename.trim());
  downloadLink.setDownloadSize(Regex.getSize(filesize + "String_Node_Str"));
  return AvailableStatus.TRUE;
}
Program: 20731
Project: 20731
Buggy source:
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.getPage("String_Node_Str");
  br.setFollowRedirects(false);
  br.getPage(downloadLink.getDownloadURL());
  String url=null;
  if (br.getRedirectLocation() == null) {
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
 else {
    url=br.getRedirectLocation();
  }
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,url,true,0);
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handlePremium(DownloadLink downloadLink,Account account) throws Exception {
  requestFileInformation(downloadLink);
  login(account);
  br.getPage("String_Node_Str");
  br.setFollowRedirects(false);
  URLConnectionAdapter con=br.openGetConnection(downloadLink.getDownloadURL());
  br.setCookie("String_Node_Str","String_Node_Str","String_Node_Str");
  if (con.getResponseCode() == 503)   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  br.followConnection();
  if (br.containsHTML("String_Node_Str"))   throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
  String url=null;
  if (br.getRedirectLocation() == null) {
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
 else {
    url=br.getRedirectLocation();
  }
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  dl=jd.plugins.BrowserAdapter.openDownload(br,downloadLink,url,true,0);
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}
Program: 20732
Project: 20732
Buggy source:
public FileMenu(){
  super(JDL.L("String_Node_Str","String_Node_Str"));
  add(new SaveMenu());
  addSeparator();
  add(new SettingsAction());
  addSeparator();
  add(new RestoreAction());
  add(new RestartAction());
  if (!OSDetector.isMac()) {
    add(new ExitAction());
  }
}

Fixed version (ground truth):
public FileMenu(){
  super(JDL.L("String_Node_Str","String_Node_Str"));
  add(new SaveMenu());
  addSeparator();
  add(new SettingsAction());
  addSeparator();
  add(new RestoreAction());
  add(new RestartAction());
  JMenuItem exitItem=add(new ExitAction());
  if (OSDetector.isMac()) {
    exitItem.setVisible(false);
  }
}
Program: 20733
Project: 20733
Buggy source:
/** 
 * Requests a FileChooserDialog.
 * @param id ID of the dialog (used to save and restore the old directory)
 * @param title dialog-title or null for default
 * @param fileSelectionMode mode for selecting files (like  {@link UserIO#FILES_ONLY}) or null for default
 * @param fileFilter filters the choosable files or null for default
 * @param multiSelection multible files choosable? or null for default
 * @param startDirectory the start directory
 * @param dialogType mode for the dialog type (like  {@link UserIO#OPEN_DIALOG}) or null for default
 * @return an array of files or null if the user cancel the dialog
 */
public File[] requestFileChooser(final String id,final String title,final Integer fileSelectionMode,final FileFilter fileFilter,final Boolean multiSelection,final File startDirectory,final Integer dialogType){
  return Dialog.getInstance().showFileChooser(id,title,fileSelectionMode,fileFilter,multiSelection == null ? false : multiSelection,dialogType,null);
}

Fixed version (ground truth):
/** 
 * Requests a FileChooserDialog.
 * @param id ID of the dialog (used to save and restore the old directory)
 * @param title dialog-title or null for default
 * @param fileSelectionMode mode for selecting files (like  {@link UserIO#FILES_ONLY}) or null for default
 * @param fileFilter filters the choosable files or null for default
 * @param multiSelection multible files choosable? or null for default
 * @param startDirectory the start directory
 * @param dialogType mode for the dialog type (like  {@link UserIO#OPEN_DIALOG}) or null for default
 * @return an array of files or null if the user cancel the dialog
 */
public File[] requestFileChooser(final String id,final String title,final Integer fileSelectionMode,final FileFilter fileFilter,final Boolean multiSelection,final File startDirectory,final Integer dialogType){
  return Dialog.getInstance().showFileChooser(id,title,fileSelectionMode == null ? -1 : fileSelectionMode,fileFilter,multiSelection == null ? false : multiSelection,dialogType == null ? -1 : dialogType,null);
}
Program: 20737
Project: 20737
Buggy source:
public void close(){
  try {
    inArchive.close();
  }
 catch (  SevenZipException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void close(){
  try {
    if (multiopener != null) {
      multiopener.close();
    }
    if (raropener != null) {
      raropener.close();
    }
    if (stream != null) {
      stream.close();
    }
    inArchive.close();
  }
 catch (  SevenZipException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 20740
Project: 20740
Buggy source:
/** 
 * @param currentPath the currentPath to set
 */
private void setCurrentPath(final File currentPath,boolean updateCombo){
  if (updateCombo)   cmboInput.setSelectedItem(currentPath.toString());
  if (currentPath != null && !currentPath.equals(this.currentPath)) {
    this.currentPath=currentPath;
    final String item=currentPath.toString();
    if (!files.contains(item)) {
      cmboInput.insertItemAt(item,0);
    }
    SubConfiguration guiConfig=SubConfiguration.getConfig("String_Node_Str");
    guiConfig.setProperty(getName(),createSortedVector(files,item,20));
    guiConfig.save();
  }
}

Fixed version (ground truth):
/** 
 * @param currentPath the currentPath to set
 */
private void setCurrentPath(final File currentPath,boolean updateCombo){
  if (updateCombo && currentPath != null)   cmboInput.setSelectedItem(currentPath.toString());
  if (currentPath != null && !currentPath.equals(this.currentPath)) {
    this.currentPath=currentPath;
    final String item=currentPath.toString();
    if (!files.contains(item)) {
      cmboInput.insertItemAt(item,0);
    }
    SubConfiguration guiConfig=SubConfiguration.getConfig("String_Node_Str");
    guiConfig.setProperty(getName(),createSortedVector(files,item,20));
    guiConfig.save();
  }
}
Program: 20743
Project: 20743
Buggy source:
/** 
 * Is used to let the extraction method prepare for the extraction. Will be called after the system started an extraction, but before the   {@link crackPassword} and {@link extract}.
 * @return False  if it's not possible to extract that archive.
 */
public boolean prepare();

Fixed version (ground truth):
/** 
 * Is used to let the extraction method prepare for the extraction. Will be called after the system started an extraction, but before the  {@link crackPassword} and {@link extract}.
 * @return False if it's not possible to extract that archive.
 */
public boolean prepare();
Program: 20744
Project: 20744
Buggy source:
/** 
 * Sets the   {@link Archive} which should be extracted.
 * @param archive The {@link Archive}.
 */
public void setArchiv(Archive archive);

Fixed version (ground truth):
/** 
 * Sets the   {@link Archive} which should be extracted.
 * @param archive The  {@link Archive}.
 */
public void setArchiv(Archive archive);
Program: 20745
Project: 20745
Buggy source:
/** 
 * Checks if the file from the filefilter is supported.
 * @param file The file which should be checked.
 * @return 
 */
public boolean isArchivSupportedFileFilter(String file);

Fixed version (ground truth):
/** 
 * Checks if the file from the filefilter is supported.
 * @param file The file which should be checked.
 * @return
 */
public boolean isArchivSupportedFileFilter(String file);
Program: 20746
Project: 20746
Buggy source:
/** 
 * Builds an   {@link Archive} with an finished {@link DownloadLink}. If the   {@link DownloadLink} contains only a part of an multipart archive, it has not to be to first one (eg. test.part1.rar).
 * @param link An complete downloaded file.
 * @return An {@link Archive} that contains all {@link Downloadlink}s.
 */
public Archive buildArchive(DownloadLink link);

Fixed version (ground truth):
/** 
 * Builds an   {@link Archive} with an finished {@link DownloadLink}. If the  {@link DownloadLink} contains only a part of an multipart archive, it hasnot to be to first one (eg. test.part1.rar).
 * @param link An complete downloaded file.
 * @return An {@link Archive} that contains all {@link Downloadlink}s.
 */
public Archive buildArchive(DownloadLink link);
Program: 20747
Project: 20747
Buggy source:
/** 
 * Sets the   {@link ExtractionController} which controlls the extraction.
 * @param controller The {@link ExtractionController}.
 */
public void setExtractionController(ExtractionController controller);

Fixed version (ground truth):
/** 
 * Sets the   {@link ExtractionController} which controlls the extraction.
 * @param controller The  {@link ExtractionController}.
 */
public void setExtractionController(ExtractionController controller);
Program: 20748
Project: 20748
Buggy source:
/** 
 * Sets the  pluginconfiguration.
 * @param config The configuration.
 */
public void setConfig(SubConfiguration config);

Fixed version (ground truth):
/** 
 * Sets the pluginconfiguration.
 * @param config The configuration.
 */
public void setConfig(SubConfiguration config);
Program: 20749
Project: 20749
Buggy source:
/** 
 * Returns the archivename of an   {@link Archive}.
 * @param archive The {@link Archive}.
 * @return The name of the archive.
 */
public String getArchiveName(DownloadLink link);

Fixed version (ground truth):
/** 
 * Returns the archivename of an   {@link Archive}.
 * @param archive The  {@link Archive}.
 * @return The name of the archive.
 */
public String getArchiveName(DownloadLink link);
Program: 20751
Project: 20751
Buggy source:
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, InterruptedException, PluginException {
  this.setBrowserExclusive();
  br.getPage("String_Node_Str");
  br.setFollowRedirects(true);
  URLConnectionAdapter con=br.openGetConnection(downloadLink.getDownloadURL());
  if (con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
    String filename=br.getRegex("String_Node_Str").getMatch(0);
    if (filename == null) {
      filename=br.getRegex("String_Node_Str").getMatch(1);
      if (filename != null) {
        String extension=br.getRegex("String_Node_Str").getMatch(1);
        if (extension == null)         extension="String_Node_Str";
        filename=filename.trim() + extension;
      }
    }
    String filesize=br.getRegex("String_Node_Str").getMatch(1);
    if (filename == null || filesize == null)     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    downloadLink.setName(filename.trim());
    downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
    if (br.containsHTML("String_Node_Str"))     downloadLink.getLinkStatus().setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
  }
 else {
    downloadLink.getLinkStatus().setStatusText("String_Node_Str");
    downloadLink.setName(getFileNameFromHeader(con));
    downloadLink.setDownloadSize(con.getContentLength());
    con.disconnect();
  }
  return AvailableStatus.TRUE;
}

Fixed version (ground truth):
@Override public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, InterruptedException, PluginException {
  this.setBrowserExclusive();
  br.getPage("String_Node_Str");
  br.setFollowRedirects(true);
  URLConnectionAdapter con=br.openGetConnection(downloadLink.getDownloadURL());
  if (con.getContentType().contains("String_Node_Str")) {
    br.followConnection();
    String filename=br.getRegex("String_Node_Str").getMatch(0);
    if (filename == null) {
      filename=br.getRegex("String_Node_Str").getMatch(1);
      if (filename != null) {
        String extension=br.getRegex("String_Node_Str").getMatch(1);
        if (extension == null)         extension="String_Node_Str";
        filename=filename.trim() + extension;
      }
    }
    String filesize=br.getRegex("String_Node_Str").getMatch(1);
    if (filename == null || filesize == null)     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    downloadLink.setName(filename.trim());
    downloadLink.setDownloadSize(Regex.getSize(filesize.replaceAll("String_Node_Str","String_Node_Str")));
    if (br.containsHTML(PREMIUMONLYTEXT))     downloadLink.getLinkStatus().setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
  }
 else {
    downloadLink.getLinkStatus().setStatusText("String_Node_Str");
    downloadLink.setName(getFileNameFromHeader(con));
    downloadLink.setDownloadSize(con.getContentLength());
    con.disconnect();
  }
  return AvailableStatus.TRUE;
}
Program: 20754
Project: 20754
Buggy source:
private void handleDownloadErrors() throws IOException, PluginException {
  logger.info("String_Node_Str");
  if (dl.getConnection().getResponseCode() == 416) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",1000l * 60 * 30);
  }
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    String error=dl.getConnection().getRequest().getCookies().get("String_Node_Str").getValue();
    if (error == null)     error=br.getCookie("String_Node_Str","String_Node_Str");
    if (error != null && error.contains("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,1000l * 15);
    if (error != null && error.contains("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,1 * 60 * 1000l);
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  if (dl.getConnection().getLongContentLength() == 0) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",1000l * 60 * 30);
  }
}

Fixed version (ground truth):
private void handleDownloadErrors() throws IOException, PluginException {
  logger.info("String_Node_Str");
  if (dl.getConnection().getResponseCode() == 416) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",1000l * 60 * 30);
  }
  if (!dl.getConnection().isContentDisposition()) {
    br.followConnection();
    Cookie cookie=dl.getConnection().getRequest().getCookies().get("String_Node_Str");
    String error=null;
    if (cookie != null)     error=cookie.getValue();
    if (error == null)     error=br.getCookie("String_Node_Str","String_Node_Str");
    if (error != null && error.contains("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,1000l * 15);
    if (error != null && error.contains("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_IP_BLOCKED,1 * 60 * 1000l);
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
    logger.warning("String_Node_Str");
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  if (dl.getConnection().getLongContentLength() == 0) {
    dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,"String_Node_Str",1000l * 60 * 30);
  }
}
Program: 20755
Project: 20755
Buggy source:
@Override public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  String url=br.getRegex("String_Node_Str").getMatch(0);
  if (url == null)   throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  url=Encoding.urlDecode(url,true);
  dl=jd.plugins.BrowserAdapter.openDownload(this.br,link,url,true,1);
  if (!dl.getConnection().isContentDisposition() && !dl.getConnection().getContentType().startsWith("String_Node_Str")) {
    this.dl.getConnection().disconnect();
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}

Fixed version (ground truth):
@Override public void handleFree(DownloadLink link) throws Exception {
  requestFileInformation(link);
  dl=jd.plugins.BrowserAdapter.openDownload(this.br,link,DLLINK,true,0);
  if (!dl.getConnection().isContentDisposition() && !dl.getConnection().getContentType().startsWith("String_Node_Str")) {
    br.followConnection();
    this.dl.getConnection().disconnect();
    if (br.containsHTML("String_Node_Str"))     throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE,JDL.L("String_Node_Str","String_Node_Str"),60 * 60 * 1000l);
    throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
  }
  dl.startDownload();
}