Program: 53129
Project: 53129
Buggy source:
public FlightPlot(){
  Map<String,TrackExporter> exporters=new LinkedHashMap<String,TrackExporter>();
  for (  TrackExporter exporter : new TrackExporter[]{new KMLTrackExporter(),new GPXTrackExporter()}) {
    exporters.put(exporter.getName(),exporter);
  }
  exportDialog=new TrackExportDialog(exporters);
  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.setDropTarget(new DropTarget(){
    public synchronized void drop(    DropTargetDropEvent evt){
      try {
        evt.acceptDrop(DnDConstants.ACTION_COPY);
        List<File> droppedFiles=(List<File>)evt.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
        if (droppedFiles.size() == 1) {
          File file=droppedFiles.get(0);
          openLog(file.getAbsolutePath());
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  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);
  FileNameExtensionFilter[] logExtensionfilters=new FileNameExtensionFilter[]{new FileNameExtensionFilter("String_Node_Str","String_Node_Str","String_Node_Str"),new FileNameExtensionFilter("String_Node_Str","String_Node_Str")};
  openLogFileChooser=new JFileChooser();
  for (  FileNameExtensionFilter filter : logExtensionfilters) {
    openLogFileChooser.addChoosableFileFilter(filter);
  }
  openLogFileChooser.setFileFilter(logExtensionfilters[0]);
  openLogFileChooser.setDialogTitle("String_Node_Str");
  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();
  }
}

Fixed version (ground truth):
public FlightPlot(){
  Map<String,TrackExporter> exporters=new LinkedHashMap<String,TrackExporter>();
  for (  TrackExporter exporter : new TrackExporter[]{new KMLTrackExporter(),new GPXTrackExporter()}) {
    exporters.put(exporter.getName(),exporter);
  }
  exportDialog=new TrackExportDialog(exporters);
  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.setDropTarget(new DropTarget(){
    public synchronized void drop(    DropTargetDropEvent evt){
      try {
        evt.acceptDrop(DnDConstants.ACTION_COPY);
        List<File> droppedFiles=(List<File>)evt.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
        if (droppedFiles.size() == 1) {
          File file=droppedFiles.get(0);
          openLog(file.getAbsolutePath());
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  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){
      if (editingProcessor == null) {
        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);
        editingProcessor=null;
      }
    }
  }
;
  parametersTableModel.addTableModelListener(parameterChangedListener);
  FileNameExtensionFilter[] logExtensionfilters=new FileNameExtensionFilter[]{new FileNameExtensionFilter("String_Node_Str","String_Node_Str","String_Node_Str"),new FileNameExtensionFilter("String_Node_Str","String_Node_Str")};
  openLogFileChooser=new JFileChooser();
  for (  FileNameExtensionFilter filter : logExtensionfilters) {
    openLogFileChooser.addChoosableFileFilter(filter);
  }
  openLogFileChooser.setFileFilter(logExtensionfilters[0]);
  openLogFileChooser.setDialogTitle("String_Node_Str");
  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();
  }
}