Program: 21237
Project: 21237
Buggy source:
/** 
 * Als Dummy wird ein downloadlink bezeicnet, der nicht ind er downloadliste war, sondern nur angelegt wurde um als container für ein externes archiv zu dienen. Zur Fortschrittsanzeige wird ein progresscontroller verwendet
 * @param id
 * @param wrapper
 */
private void onUnrarDummyEvent(int id,UnrarWrapper wrapper){
  ProgressController pc=(ProgressController)wrapper.getDownloadLink().getProperty("String_Node_Str");
  int min;
switch (id) {
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED:
    if (wrapper.getException() != null) {
      pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str"+ wrapper.getException().getMessage());
    }
 else {
      pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
    }
  this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_FAILED_PASSWORD:
pc.setStatusText("String_Node_Str");
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) {
this.onFinished(wrapper);
break;
}
wrapper.setPassword(pass);
}
break;
case JDUnrarConstants.WRAPPER_PASSWORT_CRACKING:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
pc.setRange(100);
pc.setStatus(wrapper.getCrackProgress());
break;
case JDUnrarConstants.WRAPPER_CRACK_PASSWORD:
break;
case JDUnrarConstants.WRAPPER_NEW_STATUS:
break;
case JDUnrarConstants.WRAPPER_START_OPEN_ARCHIVE:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
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 (i < min) {
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);
}
}
break;
case JDUnrarConstants.WRAPPER_PASSWORD_FOUND:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
break;
case JDUnrarConstants.WRAPPER_ON_PROGRESS:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
pc.setRange(wrapper.getTotalSize());
pc.setStatus(wrapper.getExtractedSize());
break;
case JDUnrarConstants.WRAPPER_START_EXTRACTION:
break;
case JDUnrarConstants.WRAPPER_STARTED:
break;
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED_CRC:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PROGRESS_SINGLE_FILE_FINISHED:
break;
case JDUnrarConstants.WRAPPER_FINISHED_SUCCESSFULL:
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));
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
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):
/** 
 * Als Dummy wird ein downloadlink bezeicnet, der nicht ind er downloadliste war, sondern nur angelegt wurde um als container für ein externes archiv zu dienen. Zur Fortschrittsanzeige wird ein progresscontroller verwendet
 * @param id
 * @param wrapper
 */
private void onUnrarDummyEvent(int id,UnrarWrapper wrapper){
  ProgressController pc=(ProgressController)wrapper.getDownloadLink().getProperty("String_Node_Str");
  int min;
switch (id) {
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED:
    if (wrapper.getException() != null) {
      pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str"+ wrapper.getException().getMessage());
    }
 else {
      pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
    }
  this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PASSWORD_NEEDED_TO_CONTINUE:
pc.setStatusText("String_Node_Str");
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) {
this.onFinished(wrapper);
break;
}
wrapper.setPassword(pass);
}
break;
case JDUnrarConstants.WRAPPER_PASSWORT_CRACKING:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
pc.setRange(100);
pc.setStatus(wrapper.getCrackProgress());
break;
case JDUnrarConstants.WRAPPER_CRACK_PASSWORD:
break;
case JDUnrarConstants.WRAPPER_NEW_STATUS:
break;
case JDUnrarConstants.WRAPPER_START_OPEN_ARCHIVE:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
break;
case JDUnrarConstants.WRAPPER_OPEN_ARCHIVE_SUCCESS:
assignRealDownloadDir(wrapper);
break;
case JDUnrarConstants.WRAPPER_PASSWORD_FOUND:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
break;
case JDUnrarConstants.WRAPPER_ON_PROGRESS:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
pc.setRange(wrapper.getTotalSize());
pc.setStatus(wrapper.getExtractedSize());
break;
case JDUnrarConstants.WRAPPER_START_EXTRACTION:
break;
case JDUnrarConstants.WRAPPER_STARTED:
break;
case JDUnrarConstants.WRAPPER_EXTRACTION_FAILED_CRC:
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
this.onFinished(wrapper);
break;
case JDUnrarConstants.WRAPPER_PROGRESS_SINGLE_FILE_FINISHED:
break;
case JDUnrarConstants.WRAPPER_FINISHED_SUCCESSFULL:
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));
pc.setStatusText(wrapper.getFile().getName() + "String_Node_Str" + "String_Node_Str");
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");
}
}