Program: 20869
Project: 20869
Buggy source:
private void handlePlugin(){
  try {
    this.startTime=System.currentTimeMillis();
    linkStatus.setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
    System.out.println("String_Node_Str");
    fireControlEvent(ControlEvent.CONTROL_PLUGIN_ACTIVE,currentPlugin);
    DownloadController.getInstance().fireDownloadLinkUpdate(downloadLink);
    currentPlugin.init();
    try {
      try {
        currentPlugin.handle(downloadLink);
      }
 catch (      BrowserException e) {
        e.closeConnection();
        if (e.getException() != null) {
          throw e.getException();
        }
 else {
          throw e;
        }
      }
    }
 catch (    UnknownHostException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",5 * 60 * 1000l));
    }
catch (    SocketTimeoutException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",10 * 60 * 1000l));
    }
catch (    SocketException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",5 * 60 * 1000l));
    }
catch (    IOException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(10 * 60 * 1000l);
    }
catch (    InterruptedException e) {
      logger.finest("String_Node_Str" + downloadLink.getPlugin().getVersion());
      linkStatus.addStatus(LinkStatus.ERROR_PLUGIN_DEFECT);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str") + JDUtilities.convertExceptionReadable(e));
    }
catch (    Exception e) {
      logger.finest("String_Node_Str" + downloadLink.getPlugin().getVersion());
      JDLogger.exception(e);
      linkStatus.addStatus(LinkStatus.ERROR_PLUGIN_DEFECT);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str") + JDUtilities.convertExceptionReadable(e));
    }
    if (isAborted() && !linkStatus.isFinished()) {
      linkStatus.setErrorMessage(null);
      linkStatus.setStatus(LinkStatus.TODO);
      return;
    }
    if (linkStatus.isFailed()) {
      logger.warning("String_Node_Str" + downloadLink.getLinkStatus());
    }
switch (linkStatus.getLatestStatus()) {
case LinkStatus.ERROR_LOCAL_IO:
      onErrorLocalIO(downloadLink,currentPlugin);
    break;
case LinkStatus.ERROR_IP_BLOCKED:
  onErrorIPWaittime(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE:
onErrorDownloadTemporarilyUnavailable(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE:
onErrorHostTemporarilyUnavailable(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_AGB_NOT_SIGNED:
onErrorAGBNotSigned(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_FILE_NOT_FOUND:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getName() + "String_Node_Str" + Formatter.formatReadable(downloadLink.getDownloadSize())+ "String_Node_Str"));
onErrorFileNotFound(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_LINK_IN_PROGRESS:
onErrorLinkBlock(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_FATAL:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
onErrorFatal(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_CAPTCHA:
onErrorCaptcha(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_PREMIUM:
onErrorPremium(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_DOWNLOAD_INCOMPLETE:
onErrorIncomplete(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_ALREADYEXISTS:
onErrorFileExists(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_DOWNLOAD_FAILED:
onErrorChunkloadFailed(downloadLink,currentPlugin);
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getName() + "String_Node_Str" + Formatter.formatReadable(downloadLink.getDownloadSize())+ "String_Node_Str"));
break;
case LinkStatus.ERROR_PLUGIN_DEFECT:
onErrorPluginDefect(downloadLink,currentPlugin);
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
break;
case LinkStatus.ERROR_NO_CONNECTION:
case LinkStatus.ERROR_TIMEOUT_REACHED:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
onErrorNoConnection(downloadLink,currentPlugin);
break;
default :
if (linkStatus.hasStatus(LinkStatus.FINISHED)) {
logger.finest("String_Node_Str" + downloadLink.getLinkStatus());
logger.info("String_Node_Str" + downloadLink.getFileOutput());
onDownloadFinishedSuccessFull(downloadLink);
}
 else {
retry(downloadLink,currentPlugin);
}
}
}
 catch (Exception e) {
logger.severe("String_Node_Str" + downloadLink.getPlugin().getVersion());
JDLogger.exception(e);
}
}

Fixed version (ground truth):
private void handlePlugin(){
  try {
    this.startTime=System.currentTimeMillis();
    linkStatus.setStatusText(JDL.L("String_Node_Str","String_Node_Str"));
    System.out.println("String_Node_Str");
    fireControlEvent(ControlEvent.CONTROL_PLUGIN_ACTIVE,currentPlugin);
    DownloadController.getInstance().fireDownloadLinkUpdate(downloadLink);
    currentPlugin.init();
    try {
      try {
        currentPlugin.handle(downloadLink);
      }
 catch (      BrowserException e) {
        e.closeConnection();
        if (e.getException() != null) {
          throw e.getException();
        }
 else {
          throw e;
        }
      }
    }
 catch (    UnknownHostException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",5 * 60 * 1000l));
    }
catch (    SocketTimeoutException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",10 * 60 * 1000l));
    }
catch (    SocketException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(SubConfiguration.getConfig("String_Node_Str").getGenericProperty("String_Node_Str",5 * 60 * 1000l));
    }
catch (    IOException e) {
      linkStatus.addStatus(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str"));
      linkStatus.setValue(10 * 60 * 1000l);
    }
catch (    InterruptedException e) {
      String rev=downloadLink.getPlugin() == null ? "String_Node_Str" : downloadLink.getPlugin().getVersion();
      logger.finest("String_Node_Str" + rev);
      linkStatus.addStatus(LinkStatus.ERROR_PLUGIN_DEFECT);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str") + JDUtilities.convertExceptionReadable(e));
    }
catch (    Exception e) {
      logger.finest("String_Node_Str" + downloadLink.getPlugin().getVersion());
      JDLogger.exception(e);
      linkStatus.addStatus(LinkStatus.ERROR_PLUGIN_DEFECT);
      linkStatus.setErrorMessage(JDL.L("String_Node_Str","String_Node_Str") + JDUtilities.convertExceptionReadable(e));
    }
    if (isAborted() && !linkStatus.isFinished()) {
      linkStatus.setErrorMessage(null);
      linkStatus.setStatus(LinkStatus.TODO);
      return;
    }
    if (linkStatus.isFailed()) {
      logger.warning("String_Node_Str" + downloadLink.getLinkStatus());
    }
switch (linkStatus.getLatestStatus()) {
case LinkStatus.ERROR_LOCAL_IO:
      onErrorLocalIO(downloadLink,currentPlugin);
    break;
case LinkStatus.ERROR_IP_BLOCKED:
  onErrorIPWaittime(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE:
onErrorDownloadTemporarilyUnavailable(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE:
onErrorHostTemporarilyUnavailable(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_AGB_NOT_SIGNED:
onErrorAGBNotSigned(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_FILE_NOT_FOUND:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getName() + "String_Node_Str" + Formatter.formatReadable(downloadLink.getDownloadSize())+ "String_Node_Str"));
onErrorFileNotFound(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_LINK_IN_PROGRESS:
onErrorLinkBlock(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_FATAL:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
onErrorFatal(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_CAPTCHA:
onErrorCaptcha(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_PREMIUM:
onErrorPremium(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_DOWNLOAD_INCOMPLETE:
onErrorIncomplete(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_ALREADYEXISTS:
onErrorFileExists(downloadLink,currentPlugin);
break;
case LinkStatus.ERROR_DOWNLOAD_FAILED:
onErrorChunkloadFailed(downloadLink,currentPlugin);
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getName() + "String_Node_Str" + Formatter.formatReadable(downloadLink.getDownloadSize())+ "String_Node_Str"));
break;
case LinkStatus.ERROR_PLUGIN_DEFECT:
onErrorPluginDefect(downloadLink,currentPlugin);
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
break;
case LinkStatus.ERROR_NO_CONNECTION:
case LinkStatus.ERROR_TIMEOUT_REACHED:
Balloon.showIfHidden(JDL.L("String_Node_Str","String_Node_Str"),JDTheme.II("String_Node_Str",32,32),JDL.LF("String_Node_Str","String_Node_Str",downloadLink.getHost()));
onErrorNoConnection(downloadLink,currentPlugin);
break;
default :
if (linkStatus.hasStatus(LinkStatus.FINISHED)) {
logger.finest("String_Node_Str" + downloadLink.getLinkStatus());
logger.info("String_Node_Str" + downloadLink.getFileOutput());
onDownloadFinishedSuccessFull(downloadLink);
}
 else {
retry(downloadLink,currentPlugin);
}
}
}
 catch (Exception e) {
logger.severe("String_Node_Str" + downloadLink.getPlugin().getVersion());
JDLogger.exception(e);
}
}