Program: 21417
Project: 21417
Buggy source:
/** 
 * Hier werden die UIEvente ausgewertet
 * @param uiEvent UIEent
 */
public void uiEvent(UIEvent uiEvent){
  Vector<DownloadLink> newLinks;
switch (uiEvent.getActionID()) {
case UIEvent.UI_PAUSE_DOWNLOADS:
    logger.info("String_Node_Str");
  pauseDownloads((Boolean)uiEvent.getParameter());
break;
case UIEvent.UI_START_DOWNLOADS:
startDownloads();
break;
case UIEvent.UI_STOP_DOWNLOADS:
stopDownloads();
break;
case UIEvent.UI_LINKS_TO_PROCESS:
String data=(String)uiEvent.getParameter();
distributeData=new DistributeData(data);
distributeData.addControlListener(this);
distributeData.start();
break;
case UIEvent.UI_SAVE_CONFIG:
JDUtilities.saveObject(null,JDUtilities.getConfiguration(),JDUtilities.getJDHomeDirectory(),JDUtilities.CONFIG_PATH.split("String_Node_Str")[0],"String_Node_Str" + JDUtilities.CONFIG_PATH.split("String_Node_Str")[1],Configuration.saveAsXML);
break;
case UIEvent.UI_LINKS_GRABBED:
Object links=uiEvent.getParameter();
if (links != null && links instanceof Vector && ((Vector)links).size() > 0) {
downloadLinks.addAll((Vector<DownloadLink>)links);
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
uiInterface.setDownloadLinks(downloadLinks);
}
break;
case UIEvent.UI_SAVE_LINKS:
File file=(File)uiEvent.getParameter();
saveDLC(file);
break;
case UIEvent.UI_LOAD_LINKS:
file=(File)uiEvent.getParameter();
loadContainerFile(file);
break;
case UIEvent.UI_LOAD_CONTAINER:
File containerFile=(File)uiEvent.getParameter();
loadContainerFile(containerFile);
break;
case UIEvent.UI_EXIT:
exit();
break;
case UIEvent.UI_SET_CLIPBOARD:
this.clipboard.setEnabled((Boolean)uiEvent.getParameter());
break;
case UIEvent.UI_LINKS_CHANGED:
newLinks=uiInterface.getDownloadLinks();
abortDeletedLink(downloadLinks,newLinks);
downloadLinks=newLinks;
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
break;
case UIEvent.UI_INTERACT_RECONNECT:
if (getRunningDownloadNum() > 0) {
logger.info("String_Node_Str");
stopDownloads();
}
if (Interaction.handleInteraction(Interaction.INTERACTION_NEED_RECONNECT,this)) {
uiInterface.showMessageDialog("String_Node_Str");
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);
}
}
if (Interaction.getInteractions(Interaction.INTERACTION_NEED_RECONNECT).length != 1) {
uiInterface.showMessageDialog("String_Node_Str" + Interaction.getInteractions(Interaction.INTERACTION_NEED_RECONNECT).length + "String_Node_Str");
}
}
 else {
if (Interaction.getInteractions(Interaction.INTERACTION_NEED_RECONNECT).length != 1) {
uiInterface.showMessageDialog("String_Node_Str");
}
 else {
uiInterface.showMessageDialog("String_Node_Str");
}
}
uiInterface.setDownloadLinks(downloadLinks);
break;
case UIEvent.UI_INTERACT_UPDATE:
WebUpdate wu=new WebUpdate();
wu.addControlListener(this);
wu.interact(this);
break;
}
}

Fixed version (ground truth):
/** 
 * Hier werden die UIEvente ausgewertet
 * @param uiEvent UIEent
 */
public void uiEvent(UIEvent uiEvent){
  Vector<DownloadLink> newLinks;
switch (uiEvent.getActionID()) {
case UIEvent.UI_PAUSE_DOWNLOADS:
    logger.info("String_Node_Str");
  pauseDownloads((Boolean)uiEvent.getParameter());
break;
case UIEvent.UI_START_DOWNLOADS:
startDownloads();
break;
case UIEvent.UI_STOP_DOWNLOADS:
stopDownloads();
break;
case UIEvent.UI_LINKS_TO_PROCESS:
String data=(String)uiEvent.getParameter();
distributeData=new DistributeData(data);
distributeData.addControlListener(this);
distributeData.start();
break;
case UIEvent.UI_SAVE_CONFIG:
JDUtilities.saveObject(null,JDUtilities.getConfiguration(),JDUtilities.getJDHomeDirectory(),JDUtilities.CONFIG_PATH.split("String_Node_Str")[0],"String_Node_Str" + JDUtilities.CONFIG_PATH.split("String_Node_Str")[1],Configuration.saveAsXML);
break;
case UIEvent.UI_LINKS_GRABBED:
Object links=uiEvent.getParameter();
if (links != null && links instanceof Vector && ((Vector)links).size() > 0) {
downloadLinks.addAll((Vector<DownloadLink>)links);
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
uiInterface.setDownloadLinks(downloadLinks);
}
break;
case UIEvent.UI_SAVE_LINKS:
File file=(File)uiEvent.getParameter();
saveDLC(file);
break;
case UIEvent.UI_LOAD_LINKS:
file=(File)uiEvent.getParameter();
loadContainerFile(file);
break;
case UIEvent.UI_LOAD_CONTAINER:
File containerFile=(File)uiEvent.getParameter();
loadContainerFile(containerFile);
break;
case UIEvent.UI_EXIT:
exit();
break;
case UIEvent.UI_SET_CLIPBOARD:
this.clipboard.setEnabled((Boolean)uiEvent.getParameter());
break;
case UIEvent.UI_LINKS_CHANGED:
newLinks=uiInterface.getDownloadLinks();
abortDeletedLink(downloadLinks,newLinks);
downloadLinks=newLinks;
saveDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
break;
case UIEvent.UI_INTERACT_RECONNECT:
if (getRunningDownloadNum() > 0) {
logger.info("String_Node_Str");
stopDownloads();
}
Interaction.handleInteraction(Interaction.INTERACTION_BEFORE_RECONNECT,this);
if (Interaction.handleInteraction(Interaction.INTERACTION_NEED_RECONNECT,this)) {
uiInterface.showMessageDialog("String_Node_Str");
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);
}
}
}
 else {
if (Interaction.getInteractions(Interaction.INTERACTION_NEED_RECONNECT).length != 1) {
uiInterface.showMessageDialog("String_Node_Str");
}
 else {
uiInterface.showMessageDialog("String_Node_Str");
}
}
Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
uiInterface.setDownloadLinks(downloadLinks);
break;
case UIEvent.UI_INTERACT_UPDATE:
WebUpdate wu=new WebUpdate();
wu.addControlListener(this);
wu.interact(this);
break;
}
}