Program: 53133
Project: 53133
Buggy source:
public FlightPlot(){
  preferences=Preferences.userRoot().node(appName);
  mainFrame=new JFrame(appNameAndVersion);
  mainFrame.setContentPane(mainPanel);
  mainFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  mainFrame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      onQuit();
    }
  }
);
  mainFrame.pack();
  createMenuBar();
  java.util.List<String> processors=new ArrayList<String>(processorsTypesList.getProcessorsList());
  Collections.sort(processors);
  addProcessorDialog=new AddProcessorDialog(processors.toArray(new String[processors.size()]));
  addProcessorDialog.pack();
  fieldsListDialog=new FieldsListDialog(new Runnable(){
    @Override public void run(){
      StringBuilder fieldsValue=new StringBuilder();
      for (      String field : fieldsListDialog.getSelectedFields()) {
        if (fieldsValue.length() > 0) {
          fieldsValue.append("String_Node_Str");
        }
        fieldsValue.append(field);
      }
      PlotProcessor processor=new Simple();
      processor.setParameters(Collections.<String,Object>singletonMap("String_Node_Str",fieldsValue.toString()));
      ProcessorPreset pp=new ProcessorPreset("String_Node_Str",processor.getProcessorType(),processor.getParameters(),Collections.<String,Color>emptyMap());
      updatePresetParameters(pp,null);
      int i=processorsListModel.getRowCount();
      processorsListModel.addRow(new Object[]{true,pp});
      processorsList.getSelectionModel().setSelectionInterval(i,i);
      processorsList.repaint();
      updateUsedColors();
      showAddProcessorDialog(true);
      processFile();
    }
  }
);
  logInfo=new LogInfo();
  addProcessorButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showAddProcessorDialog(false);
    }
  }
);
  removeProcessorButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      removeSelectedProcessor();
    }
  }
);
  openLogButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showOpenLogDialog();
    }
  }
);
  fieldsListButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      fieldsListDialog.setVisible(true);
    }
  }
);
  logInfoButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      logInfo.setVisible(true);
    }
  }
);
  processorsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  processorsList.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
    @Override public void valueChanged(    ListSelectionEvent listSelectionEvent){
      showProcessorParameters();
    }
  }
);
  processorsList.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"String_Node_Str");
  processorsList.getActionMap().put("String_Node_Str",new AbstractAction(){
    @Override public void actionPerformed(    ActionEvent ae){
      showAddProcessorDialog(true);
    }
  }
);
  processorsList.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      JTable target=(JTable)e.getSource();
      if (e.getClickCount() > 1 && target.getSelectedColumn() == 1) {
        showAddProcessorDialog(true);
      }
    }
  }
);
  processorsListModel.addTableModelListener(new TableModelListener(){
    @Override public void tableChanged(    TableModelEvent e){
      if (e.getType() == TableModelEvent.UPDATE) {
        if (e.getColumn() == 0) {
          processFile();
        }
      }
    }
  }
);
  parameterChangedListener=new TableModelListener(){
    @Override public void tableChanged(    TableModelEvent e){
      if (e.getType() == TableModelEvent.UPDATE) {
        int row=e.getFirstRow();
        onParameterChanged(row);
      }
    }
  }
;
  parametersTableModel.addTableModelListener(parameterChangedListener);
  try {
    loadPreferences();
  }
 catch (  BackingStoreException e) {
    e.printStackTrace();
  }
  presetComboBox.setMaximumRowCount(20);
  presetComboBox.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      onPresetAction(e);
    }
  }
);
  updatePresetEdited(true);
  deletePresetButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      onDeletePreset();
    }
  }
);
  mainFrame.setVisible(true);
  markerCheckBox.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent actionEvent){
      setChartMarkers();
    }
  }
);
}

Fixed version (ground truth):
public FlightPlot(){
  preferences=Preferences.userRoot().node(appName);
  mainFrame=new JFrame(appNameAndVersion);
  mainFrame.setContentPane(mainPanel);
  mainFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  mainFrame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      onQuit();
    }
  }
);
  mainFrame.pack();
  createMenuBar();
  java.util.List<String> processors=new ArrayList<String>(processorsTypesList.getProcessorsList());
  Collections.sort(processors);
  addProcessorDialog=new AddProcessorDialog(processors.toArray(new String[processors.size()]));
  addProcessorDialog.pack();
  fieldsListDialog=new FieldsListDialog(new Runnable(){
    @Override public void run(){
      StringBuilder fieldsValue=new StringBuilder();
      for (      String field : fieldsListDialog.getSelectedFields()) {
        if (fieldsValue.length() > 0) {
          fieldsValue.append("String_Node_Str");
        }
        fieldsValue.append(field);
      }
      PlotProcessor processor=new Simple();
      processor.setParameters(Collections.<String,Object>singletonMap("String_Node_Str",fieldsValue.toString()));
      ProcessorPreset pp=new ProcessorPreset("String_Node_Str",processor.getProcessorType(),processor.getParameters(),Collections.<String,Color>emptyMap());
      updatePresetParameters(pp,null);
      int i=processorsListModel.getRowCount();
      processorsListModel.addRow(new Object[]{true,pp});
      processorsList.getSelectionModel().setSelectionInterval(i,i);
      processorsList.repaint();
      updateUsedColors();
      showAddProcessorDialog(true);
      processFile();
    }
  }
);
  logInfo=new LogInfo();
  addProcessorButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showAddProcessorDialog(false);
    }
  }
);
  removeProcessorButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      removeSelectedProcessor();
    }
  }
);
  openLogButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showOpenLogDialog();
    }
  }
);
  fieldsListButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      fieldsListDialog.setVisible(true);
    }
  }
);
  logInfoButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      logInfo.setVisible(true);
    }
  }
);
  processorsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  processorsList.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
    @Override public void valueChanged(    ListSelectionEvent listSelectionEvent){
      showProcessorParameters();
    }
  }
);
  processorsList.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"String_Node_Str");
  processorsList.getActionMap().put("String_Node_Str",new AbstractAction(){
    @Override public void actionPerformed(    ActionEvent ae){
      showAddProcessorDialog(true);
    }
  }
);
  processorsList.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      JTable target=(JTable)e.getSource();
      if (e.getClickCount() > 1 && target.getSelectedColumn() == 1) {
        showAddProcessorDialog(true);
      }
    }
  }
);
  processorsListModel.addTableModelListener(new TableModelListener(){
    @Override public void tableChanged(    TableModelEvent e){
      if (e.getType() == TableModelEvent.UPDATE) {
        if (e.getColumn() == 0) {
          processFile();
        }
      }
    }
  }
);
  parameterChangedListener=new TableModelListener(){
    @Override public void tableChanged(    TableModelEvent e){
      if (e.getType() == TableModelEvent.UPDATE) {
        int row=e.getFirstRow();
        onParameterChanged(row);
      }
    }
  }
;
  parametersTableModel.addTableModelListener(parameterChangedListener);
  presetComboBox.setMaximumRowCount(20);
  presetComboBox.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      onPresetAction(e);
    }
  }
);
  updatePresetEdited(true);
  deletePresetButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      onDeletePreset();
    }
  }
);
  markerCheckBox.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent actionEvent){
      setChartMarkers();
    }
  }
);
  mainFrame.setVisible(true);
  try {
    loadPreferences();
  }
 catch (  BackingStoreException e) {
    e.printStackTrace();
  }
}