Program: 21084
Project: 21084
Buggy source:
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
@SuppressWarnings("String_Node_Str") public void controlEvent(ControlEvent event){
  if (event == null) {
    logger.warning("String_Node_Str");
    return;
  }
switch (event.getID()) {
case ControlEvent.CONTROL_INIT_COMPLETE:
    watchdog=DownloadWatchDog.getInstance();
  break;
case ControlEvent.CONTROL_ON_FILEOUTPUT:
File[] list=(File[])event.getParameter();
for (File file : list) {
if (isContainerFile(file)) {
  if (JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_RELOADCONTAINER,true)) {
    loadContainerFile(file);
  }
}
}
break;
case ControlEvent.CONTROL_LOG_OCCURED:
break;
case ControlEvent.CONTROL_SYSTEM_EXIT:
break;
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
if (!(event.getSource() instanceof PluginForHost)) {
return;
}
lastDownloadFinished=((SingleDownloadController)event.getParameter()).getDownloadLink();
addToFinished(lastDownloadFinished);
if (lastDownloadFinished.getFilePackage().getRemainingLinks() == 0) {
Interaction.handleInteraction(Interaction.INTERACTION_DOWNLOAD_PACKAGE_FINISHED,this);
if (JDUtilities.getConfiguration().getIntegerProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION) == 2) {
JDUtilities.getDownloadController().removePackage(lastDownloadFinished.getFilePackage());
break;
}
}
if (lastDownloadFinished.getLinkStatus().hasStatus(LinkStatus.FINISHED) && JDUtilities.getConfiguration().getIntegerProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION) == 0) {
lastDownloadFinished.getFilePackage().remove(lastDownloadFinished);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
if (uiInterface == null) return;
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,false);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED_HIDEGRABBER:
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,true);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED_HIDEGRABBER_START:
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,true);
if (getDownloadStatus() == JDController.DOWNLOAD_NOT_RUNNING) {
toggleStartStop();
}
}
break;
}
}

Fixed version (ground truth):
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
@SuppressWarnings("String_Node_Str") public void controlEvent(ControlEvent event){
  if (event == null) {
    logger.warning("String_Node_Str");
    return;
  }
switch (event.getID()) {
case ControlEvent.CONTROL_INIT_COMPLETE:
    watchdog=DownloadWatchDog.getInstance();
  break;
case ControlEvent.CONTROL_ON_FILEOUTPUT:
File[] list=(File[])event.getParameter();
for (File file : list) {
if (isContainerFile(file)) {
  if (JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_RELOADCONTAINER,true)) {
    loadContainerFile(file);
  }
}
}
break;
case ControlEvent.CONTROL_LOG_OCCURED:
break;
case ControlEvent.CONTROL_SYSTEM_EXIT:
break;
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
if (!(event.getSource() instanceof PluginForHost)) {
return;
}
lastDownloadFinished=((SingleDownloadController)event.getParameter()).getDownloadLink();
addToFinished(lastDownloadFinished);
if (lastDownloadFinished.getFilePackage().getRemainingLinks() == 0) {
Interaction.handleInteraction(Interaction.INTERACTION_DOWNLOAD_PACKAGE_FINISHED,this);
if (JDUtilities.getConfiguration().getIntegerProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION) == 2) {
JDUtilities.getDownloadController().removePackage(lastDownloadFinished.getFilePackage());
break;
}
}
if (lastDownloadFinished.getLinkStatus().isFinished() && JDUtilities.getConfiguration().getIntegerProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION) == 0) {
lastDownloadFinished.getFilePackage().remove(lastDownloadFinished);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
if (uiInterface == null) return;
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,false);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED_HIDEGRABBER:
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,true);
}
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED_HIDEGRABBER_START:
if (event.getParameter() != null && event.getParameter() instanceof ArrayList && ((ArrayList)event.getParameter()).size() > 0) {
ArrayList<DownloadLink> links=(ArrayList<DownloadLink>)event.getParameter();
uiInterface.addLinksToGrabber(links,true);
if (getDownloadStatus() == JDController.DOWNLOAD_NOT_RUNNING) {
toggleStartStop();
}
}
break;
}
}