Program: 21238
Project: 21238
Buggy source:
public void onUnrarEvent(int id,UnrarWrapper wrapper){
  LinkStatus ls=wrapper.getDownloadLink().getLinkStatus();
  if (wrapper.getDownloadLink().getFilePackage() == FilePackage.getDefaultFilePackage() && wrapper.getDownloadLink().getProperty("String_Node_Str") == null) {
    logger.warning("String_Node_Str" + wrapper.getDownloadLink());
    ProgressController progress=new ProgressController(JDLocale.LF("String_Node_Str","String_Node_Str",wrapper.getDownloadLink().getFileOutput()),100);
    wrapper.getDownloadLink().setProperty("String_Node_Str",progress);
  }
  if (wrapper.getDownloadLink().getProperty("String_Node_Str") != null) {
    onUnrarDummyEvent(id,wrapper);
    return;
  }
  int min;
switch (id) {
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED:
    ArrayList<DownloadLink> list=this.getArchiveList(wrapper.getDownloadLink());
  for (  DownloadLink link : list) {
    if (link == null)     continue;
    LinkStatus lls=link.getLinkStatus();
    if (wrapper.getException() != null) {
      lls.addStatus(LinkStatus.ERROR_POST_PROCESS);
      lls.setErrorMessage("String_Node_Str" + wrapper.getException().getMessage());
      link.requestGuiUpdate();
    }
 else {
      lls.addStatus(LinkStatus.ERROR_POST_PROCESS);
      lls.setErrorMessage("String_Node_Str");
      link.requestGuiUpdate();
    }
  }
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_FAILED_PASSWORD:
wrapper.getDownloadLink().requestGuiUpdate();
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_ASK_UNKNOWN_PASS,true)) {
String pass=JDUtilities.getGUI().showUserInputDialog(JDLocale.LF("String_Node_Str","String_Node_Str",wrapper.getDownloadLink().getName()));
if (pass == null) {
ls.addStatus(LinkStatus.ERROR_POST_PROCESS);
ls.setStatusText("String_Node_Str");
this.onFinished(wrapper);
break;
}
wrapper.setPassword(pass);
}
break;
case JDUnrarConstants.WRAPPER_CRACK_PASSWORD:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_NEW_STATUS:
break;
case JDUnrarConstants.WRAPPER_START_OPEN_ARCHIVE:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_OPEN_ARCHIVE_SUCCESS:
min=this.getPluginConfig().getIntegerProperty(JDUnrarConstants.CONFIG_KEY_SUBPATH_MINNUM,0);
if (min > 0) {
ArrayList<ArchivFile> files=wrapper.getFiles();
int i=0;
for (ArchivFile af : files) {
if (af.getSize() > 0) i++;
}
if (min <= i) {
Boolean usesub=this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_USE_SUBPATH,false);
this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_USE_SUBPATH,false);
File dl=this.getExtractToPath(wrapper.getDownloadLink());
wrapper.setExtractTo(dl);
this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_USE_SUBPATH,usesub);
ArrayList<DownloadLink> linkList=this.getArchiveList(wrapper.getDownloadLink());
for (DownloadLink l : linkList) {
if (l == null) continue;
l.setProperty(JDUnrarConstants.DOWNLOADLINK_KEY_EXTRACTEDPATH,dl.getAbsolutePath());
}
}
}
break;
case JDUnrarConstants.WRAPPER_PASSWORD_FOUND:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
wrapper.getDownloadLink().setPluginProgress(null);
break;
case JDUnrarConstants.WRAPPER_PASSWORT_CRACKING:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
if (wrapper.getDownloadLink().getPluginProgress() == null) {
wrapper.getDownloadLink().setPluginProgress(new PluginProgress(wrapper.getCrackProgress(),100,Color.GREEN.darker()));
}
 else {
wrapper.getDownloadLink().getPluginProgress().setCurrent(wrapper.getCrackProgress());
}
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_ON_PROGRESS:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
if (wrapper.getDownloadLink().getPluginProgress() == null) {
wrapper.getDownloadLink().setPluginProgress(new PluginProgress(wrapper.getExtractedSize(),wrapper.getTotalSize(),Color.YELLOW.darker()));
}
 else {
wrapper.getDownloadLink().getPluginProgress().setCurrent(wrapper.getExtractedSize());
}
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_START_EXTRACTION:
break;
case JDUnrarConstants.WRAPPER_STARTED:
break;
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED_CRC:
list=this.getArchiveList(wrapper.getDownloadLink());
DownloadLink crc=list.size() >= wrapper.getCurrentVolume() ? list.get(wrapper.getCurrentVolume() - 1) : null;
if (crc != null) {
crc.getLinkStatus().removeStatus(LinkStatus.FINISHED);
crc.getLinkStatus().addStatus(LinkStatus.ERROR_DOWNLOAD_FAILED);
crc.getLinkStatus().setErrorMessage(JDLocale.LF("String_Node_Str","String_Node_Str",crc.getName()));
crc.requestGuiUpdate();
}
 else {
for (DownloadLink link : list) {
if (link == null) continue;
link.getLinkStatus().setErrorMessage("String_Node_Str");
link.requestGuiUpdate();
}
}
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PROGRESS_SINGLE_FILE_FINISHED:
break;
case JDUnrarConstants.WRAPPER_FINISHED_SUCCESSFULL:
list=this.getArchiveList(wrapper.getDownloadLink());
File[] files=new File[wrapper.getFiles().size()];
int i=0;
for (ArchivFile af : wrapper.getFiles()) {
files[i++]=af.getFile();
}
JDUtilities.getController().fireControlEvent(new ControlEvent(wrapper,ControlEvent.CONTROL_ON_FILEOUTPUT,files));
for (DownloadLink link : list) {
if (link == null) continue;
link.getLinkStatus().addStatus(LinkStatus.FINISHED);
link.getLinkStatus().setStatusText("String_Node_Str");
link.requestGuiUpdate();
}
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_REMOVE_INFO_FILE,false)) {
File fileOutput=new File(wrapper.getDownloadLink().getFileOutput());
File infoFiles=new File(fileOutput.getParentFile(),fileOutput.getName().replaceFirst("String_Node_Str","String_Node_Str") + "String_Node_Str");
if (infoFiles.exists() && infoFiles.delete()) {
logger.info(infoFiles.getName() + "String_Node_Str");
}
}
this.onFinished(wrapper);
break;
default :
System.out.println("String_Node_Str");
}
}

Fixed version (ground truth):
public void onUnrarEvent(int id,UnrarWrapper wrapper){
  LinkStatus ls=wrapper.getDownloadLink().getLinkStatus();
  if (wrapper.getDownloadLink().getFilePackage() == FilePackage.getDefaultFilePackage() && wrapper.getDownloadLink().getProperty("String_Node_Str") == null) {
    logger.warning("String_Node_Str" + wrapper.getDownloadLink());
    ProgressController progress=new ProgressController(JDLocale.LF("String_Node_Str","String_Node_Str",wrapper.getDownloadLink().getFileOutput()),100);
    wrapper.getDownloadLink().setProperty("String_Node_Str",progress);
  }
  if (wrapper.getDownloadLink().getProperty("String_Node_Str") != null) {
    onUnrarDummyEvent(id,wrapper);
    return;
  }
  int min;
switch (id) {
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED:
    ArrayList<DownloadLink> list=this.getArchiveList(wrapper.getDownloadLink());
  for (  DownloadLink link : list) {
    if (link == null)     continue;
    LinkStatus lls=link.getLinkStatus();
    if (wrapper.getException() != null) {
      lls.addStatus(LinkStatus.ERROR_POST_PROCESS);
      lls.setErrorMessage("String_Node_Str" + wrapper.getException().getMessage());
      link.requestGuiUpdate();
    }
 else {
      lls.addStatus(LinkStatus.ERROR_POST_PROCESS);
      lls.setErrorMessage("String_Node_Str");
      link.requestGuiUpdate();
    }
  }
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PASSWORD_NEEDED_TO_CONTINUE:
wrapper.getDownloadLink().requestGuiUpdate();
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_ASK_UNKNOWN_PASS,true)) {
String pass=JDUtilities.getGUI().showUserInputDialog(JDLocale.LF("String_Node_Str","String_Node_Str",wrapper.getDownloadLink().getName()));
if (pass == null) {
ls.addStatus(LinkStatus.ERROR_POST_PROCESS);
ls.setStatusText("String_Node_Str");
this.onFinished(wrapper);
break;
}
wrapper.setPassword(pass);
}
break;
case JDUnrarConstants.WRAPPER_CRACK_PASSWORD:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_NEW_STATUS:
break;
case JDUnrarConstants.WRAPPER_START_OPEN_ARCHIVE:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_OPEN_ARCHIVE_SUCCESS:
assignRealDownloadDir(wrapper);
break;
case JDUnrarConstants.WRAPPER_PASSWORD_FOUND:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
wrapper.getDownloadLink().requestGuiUpdate();
wrapper.getDownloadLink().setPluginProgress(null);
break;
case JDUnrarConstants.WRAPPER_PASSWORT_CRACKING:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
if (wrapper.getDownloadLink().getPluginProgress() == null) {
wrapper.getDownloadLink().setPluginProgress(new PluginProgress(wrapper.getCrackProgress(),100,Color.GREEN.darker()));
}
 else {
wrapper.getDownloadLink().getPluginProgress().setCurrent(wrapper.getCrackProgress());
}
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_ON_PROGRESS:
wrapper.getDownloadLink().getLinkStatus().setStatusText("String_Node_Str");
if (wrapper.getDownloadLink().getPluginProgress() == null) {
wrapper.getDownloadLink().setPluginProgress(new PluginProgress(wrapper.getExtractedSize(),wrapper.getTotalSize(),Color.YELLOW.darker()));
}
 else {
wrapper.getDownloadLink().getPluginProgress().setCurrent(wrapper.getExtractedSize());
}
wrapper.getDownloadLink().requestGuiUpdate();
break;
case JDUnrarConstants.WRAPPER_START_EXTRACTION:
break;
case JDUnrarConstants.WRAPPER_STARTED:
break;
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED_CRC:
list=this.getArchiveList(wrapper.getDownloadLink());
DownloadLink crc=list.size() >= wrapper.getCurrentVolume() ? list.get(wrapper.getCurrentVolume() - 1) : null;
if (crc != null) {
crc.getLinkStatus().removeStatus(LinkStatus.FINISHED);
crc.getLinkStatus().addStatus(LinkStatus.ERROR_DOWNLOAD_FAILED);
crc.getLinkStatus().setErrorMessage(JDLocale.LF("String_Node_Str","String_Node_Str",crc.getName()));
crc.requestGuiUpdate();
}
 else {
for (DownloadLink link : list) {
if (link == null) continue;
link.getLinkStatus().setErrorMessage("String_Node_Str");
link.requestGuiUpdate();
}
}
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PROGRESS_SINGLE_FILE_FINISHED:
break;
case JDUnrarConstants.WRAPPER_FINISHED_SUCCESSFULL:
list=this.getArchiveList(wrapper.getDownloadLink());
File[] files=new File[wrapper.getFiles().size()];
int i=0;
for (ArchivFile af : wrapper.getFiles()) {
files[i++]=af.getFile();
}
JDUtilities.getController().fireControlEvent(new ControlEvent(wrapper,ControlEvent.CONTROL_ON_FILEOUTPUT,files));
for (DownloadLink link : list) {
if (link == null) continue;
link.getLinkStatus().addStatus(LinkStatus.FINISHED);
link.getLinkStatus().setStatusText("String_Node_Str");
link.requestGuiUpdate();
}
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_REMOVE_INFO_FILE,false)) {
File fileOutput=new File(wrapper.getDownloadLink().getFileOutput());
File infoFiles=new File(fileOutput.getParentFile(),fileOutput.getName().replaceFirst("String_Node_Str","String_Node_Str") + "String_Node_Str");
if (infoFiles.exists() && infoFiles.delete()) {
logger.info(infoFiles.getName() + "String_Node_Str");
}
}
this.onFinished(wrapper);
break;
default :
System.out.println("String_Node_Str");
}
}