Program: 21448
Project: 21448
Buggy source:
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
public void controlEvent(ControlEvent event){
switch (event.getID()) {
case ControlEvent.CONTROL_SINGLE_DOWNLOAD_FINISHED:
    lastDownloadFinished=(DownloadLink)event.getParameter();
  saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
if (this.getMissingPackageFiles(lastDownloadFinished) == 0) {
  Interaction.handleInteraction(Interaction.INTERACTION_DOWNLOAD_PACKAGE_FINISHED,this);
}
if (Configuration.FINISHED_DOWNLOADS_REMOVE.equals(JDUtilities.getConfiguration().getProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION))) {
downloadLinks.remove(lastDownloadFinished);
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
uiInterface.setDownloadLinks(downloadLinks);
}
break;
case ControlEvent.CONTROL_CAPTCHA_LOADED:
lastCaptchaLoaded=(File)event.getParameter();
break;
case ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED:
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
Object links=event.getParameter();
if (links != null && links instanceof Vector && ((Vector)links).size() > 0) {
uiInterface.addLinksToGrabber((Vector<DownloadLink>)links);
}
break;
case ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE:
Interaction interaction=(Interaction)event.getParameter();
if (interaction instanceof HTTPReconnect && interaction.getCallCode() == Interaction.INTERACTION_CALL_SUCCESS) {
Iterator<DownloadLink> iterator=downloadLinks.iterator();
DownloadLink i;
while (iterator.hasNext()) {
i=iterator.next();
if (i.getRemainingWaittime() > 0) {
i.setEndOfWaittime(0);
i.setStatus(DownloadLink.STATUS_TODO);
}
}
Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
}
 else if (interaction instanceof WebUpdate) {
if (interaction.getCallCode() == Interaction.INTERACTION_CALL_ERROR) {
}
 else {
uiInterface.showMessageDialog("String_Node_Str" + ((WebUpdate)interaction).getUpdater().getUpdatedFiles());
}
}
break;
default :
break;
}
uiInterface.delegatedControlEvent(event);
}

Fixed version (ground truth):
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
public void controlEvent(ControlEvent event){
switch (event.getID()) {
case ControlEvent.CONTROL_SINGLE_DOWNLOAD_FINISHED:
    lastDownloadFinished=(DownloadLink)event.getParameter();
  saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
if (this.getMissingPackageFiles(lastDownloadFinished) == 0) {
  Interaction.handleInteraction(Interaction.INTERACTION_DOWNLOAD_PACKAGE_FINISHED,this);
}
if (lastDownloadFinished.getStatus() == DownloadLink.STATUS_DONE && Configuration.FINISHED_DOWNLOADS_REMOVE.equals(JDUtilities.getConfiguration().getProperty(Configuration.PARAM_FINISHED_DOWNLOADS_ACTION))) {
downloadLinks.remove(lastDownloadFinished);
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
uiInterface.setDownloadLinks(downloadLinks);
}
break;
case ControlEvent.CONTROL_CAPTCHA_LOADED:
lastCaptchaLoaded=(File)event.getParameter();
break;
case ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED:
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
Object links=event.getParameter();
if (links != null && links instanceof Vector && ((Vector)links).size() > 0) {
uiInterface.addLinksToGrabber((Vector<DownloadLink>)links);
}
break;
case ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE:
Interaction interaction=(Interaction)event.getParameter();
if (interaction instanceof HTTPReconnect && interaction.getCallCode() == Interaction.INTERACTION_CALL_SUCCESS) {
Iterator<DownloadLink> iterator=downloadLinks.iterator();
DownloadLink i;
while (iterator.hasNext()) {
i=iterator.next();
if (i.getRemainingWaittime() > 0) {
i.setEndOfWaittime(0);
i.setStatus(DownloadLink.STATUS_TODO);
}
}
Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
}
 else if (interaction instanceof WebUpdate) {
if (interaction.getCallCode() == Interaction.INTERACTION_CALL_ERROR) {
}
 else {
uiInterface.showMessageDialog("String_Node_Str" + ((WebUpdate)interaction).getUpdater().getUpdatedFiles());
}
}
break;
default :
break;
}
uiInterface.delegatedControlEvent(event);
}