Program: 88863
Project: 88863
Buggy source:
/** 
 * Creates a new instance
 */
public TrackChart(){
  chart=new JChart();
  chart.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      for (int i=0; i < chart.getData().size(); i++) {
        int idx=chart.getIndexAt(i,e.getX(),e.getY());
        for (        SelectionListener sl : selectionListeners) {
          sl.selected(i,idx);
        }
      }
    }
  }
);
  JToolBar toolBar=new JToolBar(JToolBar.VERTICAL);
  toolBar.setFloatable(false);
  toolBar.setRollover(true);
  JToggleButton distanceButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton heightButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton speedButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton timeButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  ButtonGroup bgv=new ButtonGroup();
  bgv.add(distanceButton);
  bgv.add(timeButton);
  ButtonGroup bgh=new ButtonGroup();
  bgh.add(heightButton);
  bgh.add(speedButton);
  distanceButton.setToolTipText("String_Node_Str");
  heightButton.setToolTipText("String_Node_Str");
  speedButton.setToolTipText("String_Node_Str");
  timeButton.setToolTipText("String_Node_Str");
  distanceButton.getModel().setSelected(chartModeHorz == ChartModeHorz.Distance);
  timeButton.getModel().setSelected(chartModeHorz == ChartModeHorz.Time);
  heightButton.getModel().setSelected(chartModeVert == ChartModeVert.Height);
  speedButton.getModel().setSelected(chartModeVert == ChartModeVert.Speed);
  toolBar.add(distanceButton);
  toolBar.add(timeButton);
  toolBar.addSeparator();
  toolBar.add(heightButton);
  toolBar.add(speedButton);
  distanceButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeHorz=ChartModeHorz.Distance;
      reload();
    }
  }
);
  heightButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeVert=ChartModeVert.Height;
      reload();
    }
  }
);
  speedButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeVert=ChartModeVert.Speed;
      reload();
    }
  }
);
  timeButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeHorz=ChartModeHorz.Time;
      reload();
    }
  }
);
  setLayout(new BorderLayout());
  add(toolBar,BorderLayout.WEST);
  add(chart);
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 */
public TrackChart(){
  chart=new JChart();
  chart.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      chart.setMarker(e.getX());
      for (int i=0; i < chart.getData().size(); i++) {
        int idx=chart.getIndexAt(i,e.getX(),e.getY());
        for (        SelectionListener sl : selectionListeners) {
          sl.selected(i,idx);
        }
      }
    }
  }
);
  JToolBar toolBar=new JToolBar(JToolBar.VERTICAL);
  toolBar.setFloatable(false);
  toolBar.setRollover(true);
  JToggleButton distanceButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton heightButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton speedButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  JToggleButton timeButton=new JToggleButton(new ImageIcon("String_Node_Str"));
  ButtonGroup bgv=new ButtonGroup();
  bgv.add(distanceButton);
  bgv.add(timeButton);
  ButtonGroup bgh=new ButtonGroup();
  bgh.add(heightButton);
  bgh.add(speedButton);
  distanceButton.setToolTipText("String_Node_Str");
  heightButton.setToolTipText("String_Node_Str");
  speedButton.setToolTipText("String_Node_Str");
  timeButton.setToolTipText("String_Node_Str");
  distanceButton.getModel().setSelected(chartModeHorz == ChartModeHorz.Distance);
  timeButton.getModel().setSelected(chartModeHorz == ChartModeHorz.Time);
  heightButton.getModel().setSelected(chartModeVert == ChartModeVert.Height);
  speedButton.getModel().setSelected(chartModeVert == ChartModeVert.Speed);
  toolBar.add(distanceButton);
  toolBar.add(timeButton);
  toolBar.addSeparator();
  toolBar.add(heightButton);
  toolBar.add(speedButton);
  distanceButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeHorz=ChartModeHorz.Distance;
      reload();
    }
  }
);
  heightButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeVert=ChartModeVert.Height;
      reload();
    }
  }
);
  speedButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeVert=ChartModeVert.Speed;
      reload();
    }
  }
);
  timeButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      chartModeHorz=ChartModeHorz.Time;
      reload();
    }
  }
);
  setLayout(new BorderLayout());
  add(toolBar,BorderLayout.WEST);
  add(chart);
}