Program: 21421
Project: 21421
Buggy source:
/** 
 * Hier werden die Aktionen ausgewertet und weitergeleitet
 * @param e Die erwünschte Aktion
 */
public void actionPerformed(ActionEvent e){
  if (e.getSource() == reconnectBox) {
    HTTPReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);
    ExternReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);
    JDUtilities.getConfiguration().setProperty(Configuration.PARAM_DISABLE_RECONNECT,reconnectBox.getSelectedObjects() != null);
    fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_CONFIG));
    return;
  }
switch (e.getID()) {
case JDAction.ITEMS_MOVE_UP:
case JDAction.ITEMS_MOVE_DOWN:
case JDAction.ITEMS_MOVE_TOP:
case JDAction.ITEMS_MOVE_BOTTOM:
    tabDownloadTable.moveSelectedItems(e.getID());
  break;
case JDAction.APP_PAUSE_DOWNLOADS:
fireUIEvent(new UIEvent(this,UIEvent.UI_PAUSE_DOWNLOADS,btnPause.isSelected()));
break;
case JDAction.APP_TESTER:
Interaction.handleInteraction(Interaction.INTERACTION_TESTTRIGGER,false);
break;
case JDAction.APP_START_STOP_DOWNLOADS:
this.startStopDownloads();
break;
case JDAction.APP_SAVE_DLC:
JFileChooser fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showSaveDialog(frame);
File ret=fc.getSelectedFile();
if (JDUtilities.getFileExtension(ret) == null || !JDUtilities.getFileExtension(ret).equalsIgnoreCase("String_Node_Str")) {
ret=new File(ret.getAbsolutePath() + "String_Node_Str");
}
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_LINKS,ret));
}
break;
case JDAction.APP_LOAD_DLC:
fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showOpenDialog(frame);
ret=fc.getSelectedFile();
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LOAD_LINKS,ret));
}
break;
case JDAction.APP_LOAD_CONTAINER:
fc=new JFileChooser();
fc.showOpenDialog(frame);
File file=fc.getSelectedFile();
if (file != null && file.exists()) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LOAD_CONTAINER,file));
}
break;
case JDAction.APP_EXIT:
frame.setVisible(false);
frame.dispose();
fireUIEvent(new UIEvent(this,UIEvent.UI_EXIT));
break;
case JDAction.APP_LOG:
logDialog.setVisible(!logDialog.isVisible());
menViewLog.setSelected(!logDialog.isVisible());
break;
case JDAction.APP_RECONNECT:
this.doReconnect();
break;
case JDAction.APP_UPDATE:
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_UPDATE));
break;
case JDAction.ITEMS_REMOVE:
if (!JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_DISABLE_CONFIRM_DIALOGS,false)) {
if (this.showConfirmDialog("String_Node_Str")) {
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
}
}
 else {
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
}
break;
case JDAction.ITEMS_DND:
this.toggleDnD();
break;
case JDAction.ITEMS_ADD:
Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
String cb="String_Node_Str";
try {
cb=(String)clipboard.getData(DataFlavor.stringFlavor);
}
 catch (UnsupportedFlavorException e1) {
}
catch (IOException e1) {
}
String data=JOptionPane.showInputDialog(frame,"String_Node_Str",cb);
if (data != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_TO_PROCESS,data));
}
break;
case JDAction.APP_SEARCH:
SearchDialog s=new SearchDialog(this.getFrame());
data=s.getText();
if (!data.endsWith("String_Node_Str")) {
logger.info(data);
if (data != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_TO_PROCESS,data));
}
}
break;
case JDAction.APP_CONFIGURATION:
boolean configChanged=ConfigurationDialog.showConfig(frame,this);
if (configChanged) fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_CONFIG));
break;
}
}

Fixed version (ground truth):
/** 
 * Hier werden die Aktionen ausgewertet und weitergeleitet
 * @param e Die erwünschte Aktion
 */
public void actionPerformed(ActionEvent e){
  if (e.getSource() == reconnectBox) {
    HTTPReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);
    ExternReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);
    JDUtilities.getConfiguration().setProperty(Configuration.PARAM_DISABLE_RECONNECT,reconnectBox.getSelectedObjects() != null);
    fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_CONFIG));
    return;
  }
switch (e.getID()) {
case JDAction.ITEMS_MOVE_UP:
case JDAction.ITEMS_MOVE_DOWN:
case JDAction.ITEMS_MOVE_TOP:
case JDAction.ITEMS_MOVE_BOTTOM:
    tabDownloadTable.moveSelectedItems(e.getID());
  break;
case JDAction.APP_PAUSE_DOWNLOADS:
fireUIEvent(new UIEvent(this,UIEvent.UI_PAUSE_DOWNLOADS,btnPause.isSelected()));
break;
case JDAction.APP_TESTER:
logger.finer("String_Node_Str");
Interaction.handleInteraction(Interaction.INTERACTION_TESTTRIGGER,false);
break;
case JDAction.APP_START_STOP_DOWNLOADS:
this.startStopDownloads();
break;
case JDAction.APP_SAVE_DLC:
JFileChooser fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showSaveDialog(frame);
File ret=fc.getSelectedFile();
if (JDUtilities.getFileExtension(ret) == null || !JDUtilities.getFileExtension(ret).equalsIgnoreCase("String_Node_Str")) {
ret=new File(ret.getAbsolutePath() + "String_Node_Str");
}
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_LINKS,ret));
}
break;
case JDAction.APP_LOAD_DLC:
fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showOpenDialog(frame);
ret=fc.getSelectedFile();
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LOAD_LINKS,ret));
}
break;
case JDAction.APP_LOAD_CONTAINER:
fc=new JFileChooser();
fc.showOpenDialog(frame);
File file=fc.getSelectedFile();
if (file != null && file.exists()) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LOAD_CONTAINER,file));
}
break;
case JDAction.APP_EXIT:
frame.setVisible(false);
frame.dispose();
fireUIEvent(new UIEvent(this,UIEvent.UI_EXIT));
break;
case JDAction.APP_LOG:
logDialog.setVisible(!logDialog.isVisible());
menViewLog.setSelected(!logDialog.isVisible());
break;
case JDAction.APP_RECONNECT:
this.doReconnect();
break;
case JDAction.APP_UPDATE:
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_UPDATE));
break;
case JDAction.ITEMS_REMOVE:
if (!JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_DISABLE_CONFIRM_DIALOGS,false)) {
if (this.showConfirmDialog("String_Node_Str")) {
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
}
}
 else {
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
}
break;
case JDAction.ITEMS_DND:
this.toggleDnD();
break;
case JDAction.ITEMS_ADD:
Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
String cb="String_Node_Str";
try {
cb=(String)clipboard.getData(DataFlavor.stringFlavor);
}
 catch (UnsupportedFlavorException e1) {
}
catch (IOException e1) {
}
String data=JOptionPane.showInputDialog(frame,"String_Node_Str",cb);
if (data != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_TO_PROCESS,data));
}
break;
case JDAction.APP_SEARCH:
SearchDialog s=new SearchDialog(this.getFrame());
data=s.getText();
if (!data.endsWith("String_Node_Str")) {
logger.info(data);
if (data != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_TO_PROCESS,data));
}
}
break;
case JDAction.APP_CONFIGURATION:
boolean configChanged=ConfigurationDialog.showConfig(frame,this);
if (configChanged) fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_CONFIG));
break;
}
}