Program: 21451
Project: 21451
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);
    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_START_STOP_DOWNLOADS:
if (btnStartStop.isSelected() && JDUtilities.getController().getDownloadStatus() == JDController.DOWNLOAD_NOT_RUNNING) {
  fireUIEvent(new UIEvent(this,UIEvent.UI_START_DOWNLOADS));
}
 else if (!btnStartStop.isSelected() && JDUtilities.getController().getDownloadStatus() == JDController.DOWNLOAD_RUNNING) {
  final SimpleGUI _this=this;
  new Thread(){
    public void run(){
      fireUIEvent(new UIEvent(_this,UIEvent.UI_STOP_DOWNLOADS));
    }
  }
.start();
}
break;
case JDAction.APP_SAVE:
JFileChooser fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showSaveDialog(frame);
File ret=fc.getSelectedFile();
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_LINKS,ret));
}
break;
case JDAction.APP_LOAD:
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());
break;
case JDAction.APP_RECONNECT:
int confirm=JOptionPane.showConfirmDialog(frame,"String_Node_Str");
if (confirm == JOptionPane.OK_OPTION) {
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_RECONNECT));
}
break;
case JDAction.APP_UPDATE:
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_UPDATE));
break;
case JDAction.ITEMS_REMOVE:
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
break;
case JDAction.ITEMS_DND:
if (dragNDrop.isVisible()) {
dragNDrop.setVisible(false);
fireUIEvent(new UIEvent(this,UIEvent.UI_SET_CLIPBOARD,false));
}
 else {
fireUIEvent(new UIEvent(this,UIEvent.UI_SET_CLIPBOARD,true));
dragNDrop.setVisible(true);
dragNDrop.setText("String_Node_Str");
}
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();
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_START_STOP_DOWNLOADS:
if (btnStartStop.isSelected() && JDUtilities.getController().getDownloadStatus() == JDController.DOWNLOAD_NOT_RUNNING) {
  fireUIEvent(new UIEvent(this,UIEvent.UI_START_DOWNLOADS));
}
 else if (!btnStartStop.isSelected() && JDUtilities.getController().getDownloadStatus() == JDController.DOWNLOAD_RUNNING) {
  final SimpleGUI _this=this;
  new Thread(){
    public void run(){
      fireUIEvent(new UIEvent(_this,UIEvent.UI_STOP_DOWNLOADS));
    }
  }
.start();
}
break;
case JDAction.APP_SAVE:
JFileChooser fc=new JFileChooser();
fc.setFileFilter(new JDFileFilter(null,"String_Node_Str",true));
fc.showSaveDialog(frame);
File ret=fc.getSelectedFile();
if (ret != null) {
fireUIEvent(new UIEvent(this,UIEvent.UI_SAVE_LINKS,ret));
}
break;
case JDAction.APP_LOAD:
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());
break;
case JDAction.APP_RECONNECT:
int confirm=JOptionPane.showConfirmDialog(frame,"String_Node_Str");
if (confirm == JOptionPane.OK_OPTION) {
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_RECONNECT));
}
break;
case JDAction.APP_UPDATE:
fireUIEvent(new UIEvent(this,UIEvent.UI_INTERACT_UPDATE));
break;
case JDAction.ITEMS_REMOVE:
if (this.showConfirmDialog("String_Node_Str")) {
tabDownloadTable.removeSelectedLinks();
fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_CHANGED,null));
}
break;
case JDAction.ITEMS_DND:
if (dragNDrop.isVisible()) {
dragNDrop.setVisible(false);
fireUIEvent(new UIEvent(this,UIEvent.UI_SET_CLIPBOARD,false));
}
 else {
fireUIEvent(new UIEvent(this,UIEvent.UI_SET_CLIPBOARD,true));
dragNDrop.setVisible(true);
dragNDrop.setText("String_Node_Str");
}
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();
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;
}
}