Program: 6751
Project: 6751
Buggy source:
public TrackList(final RobonoboFrame frame,TrackListTableModel model){
  this.model=model;
  this.frame=frame;
  log=LogFactory.getLog(getClass());
  setLayout(new GridLayout(1,0));
  setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
  table=new JXTable(model);
  table.setFont(RoboFont.getFont(13,false));
  table.setRowHeight(21);
  table.setColumnControlVisible(true);
  table.setHorizontalScrollEnabled(true);
  table.setFillsViewportHeight(true);
  table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  table.setBackground(Color.WHITE);
  table.setHighlighters(HighlighterFactory.createSimpleStriping());
  table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
  table.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
    public void valueChanged(    ListSelectionEvent e){
      frame.mainPanel.getPlaybackPanel().trackSelectionChanged();
    }
  }
);
  table.getColumn(0).setCellRenderer(new PlaybackStatusRenderer());
  TextRenderer tr=new TextRenderer();
  table.getColumn(1).setCellRenderer(tr);
  table.getColumn(2).setCellRenderer(tr);
  table.getColumn(3).setCellRenderer(tr);
  table.getColumn(4).setCellRenderer(tr);
  table.getColumn(5).setCellRenderer(tr);
  table.getColumn(6).setCellRenderer(tr);
  table.getColumn(7).setCellRenderer(tr);
  table.getColumn(8).setCellRenderer(new TransferStatusCellRenderer());
  table.getColumn(9).setCellRenderer(tr);
  table.getColumn(10).setCellRenderer(tr);
  table.getColumn(11).setCellRenderer(new DateRenderer());
  table.getColumn(12).setCellRenderer(tr);
  table.setSortable(false);
  table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer());
  table.getTableHeader().setFont(RoboFont.getFont(13,false));
  if (javaMajorVersion() >= 6) {
    table.setAutoCreateRowSorter(false);
    table.setRowSorter(null);
  }
  scrollPane=new JScrollPane(table);
  if (model.wantScrollEventsEver())   viewportListener=new ViewportListener();
  if (model instanceof GlazedTrackListTableModel) {
    GlazedTrackListTableModel gtltm=(GlazedTrackListTableModel)model;
    if (gtltm.canSort()) {
      TableComparatorChooser<Track> tcc=TableComparatorChooser.install(table,gtltm.getSortedList(),TableComparatorChooser.SINGLE_COLUMN);
      if (viewportListener != null)       tcc.addSortActionListener(viewportListener);
    }
    MatcherEditor<Track> matchEdit=gtltm.getMatcherEditor();
    if (matchEdit != null && viewportListener != null)     matchEdit.addMatcherEditorListener(viewportListener);
  }
  TableColumnModelExt cm=(TableColumnModelExt)table.getColumnModel();
  cm.getColumn(0).setPreferredWidth(22);
  cm.getColumn(1).setPreferredWidth(187);
  cm.getColumn(2).setPreferredWidth(137);
  cm.getColumn(3).setPreferredWidth(139);
  cm.getColumn(4).setPreferredWidth(44);
  cm.getColumn(5).setPreferredWidth(40);
  cm.getColumn(6).setPreferredWidth(47);
  cm.getColumn(7).setPreferredWidth(60);
  cm.getColumn(8).setPreferredWidth(160);
  cm.getColumn(9).setPreferredWidth(80);
  cm.getColumn(10).setPreferredWidth(80);
  cm.getColumn(11).setPreferredWidth(140);
  cm.getColumn(12).setPreferredWidth(300);
  int[] hiddenCols=model.hiddenCols();
  List<TableColumn> cols=cm.getColumns(true);
  for (int i=0; i < hiddenCols.length; i++) {
    TableColumnExt colExt=(TableColumnExt)cols.get(hiddenCols[i]);
    colExt.setVisible(false);
  }
  table.addMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() == 2) {
        frame.mainPanel.getPlaybackPanel().playSelectedTracks();
        e.consume();
      }
    }
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (!e.isPopupTrigger())       return;
      int mouseRow=table.rowAtPoint(e.getPoint());
      boolean alreadySel=false;
      for (      int selRow : table.getSelectedRows()) {
        if (selRow == mouseRow) {
          alreadySel=true;
          break;
        }
      }
      if (!alreadySel)       table.getSelectionModel().addSelectionInterval(mouseRow,mouseRow);
      popupMenu.refresh();
      popupMenu.show(e.getComponent(),e.getX(),e.getY());
    }
  }
);
  if (viewportListener != null)   scrollPane.getViewport().addChangeListener(viewportListener);
  add(scrollPane,"String_Node_Str");
}

Fixed version (ground truth):
public TrackList(final RobonoboFrame frame,TrackListTableModel model){
  this.model=model;
  this.frame=frame;
  log=LogFactory.getLog(getClass());
  setLayout(new GridLayout(1,0));
  setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
  table=new JXTable(model);
  table.setFont(RoboFont.getFont(13,false));
  table.setRowHeight(21);
  table.setColumnControlVisible(true);
  table.setHorizontalScrollEnabled(true);
  table.setFillsViewportHeight(true);
  table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  table.setBackground(Color.WHITE);
  table.setHighlighters(HighlighterFactory.createSimpleStriping());
  table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
  table.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
    public void valueChanged(    ListSelectionEvent e){
      frame.mainPanel.getPlaybackPanel().trackSelectionChanged();
    }
  }
);
  table.getColumn(0).setCellRenderer(new PlaybackStatusRenderer());
  TextRenderer tr=new TextRenderer();
  table.getColumn(1).setCellRenderer(tr);
  table.getColumn(2).setCellRenderer(tr);
  table.getColumn(3).setCellRenderer(tr);
  table.getColumn(4).setCellRenderer(tr);
  table.getColumn(5).setCellRenderer(tr);
  table.getColumn(6).setCellRenderer(tr);
  table.getColumn(7).setCellRenderer(tr);
  table.getColumn(8).setCellRenderer(new TransferStatusCellRenderer());
  table.getColumn(9).setCellRenderer(tr);
  table.getColumn(10).setCellRenderer(tr);
  table.getColumn(11).setCellRenderer(new DateRenderer());
  table.getColumn(12).setCellRenderer(tr);
  table.setSortable(false);
  table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer());
  table.getTableHeader().setFont(RoboFont.getFont(13,false));
  if (javaMajorVersion() >= 6) {
    table.setAutoCreateRowSorter(false);
    table.setRowSorter(null);
  }
  scrollPane=new JScrollPane(table);
  if (model.wantScrollEventsEver())   viewportListener=new ViewportListener();
  if (model instanceof GlazedTrackListTableModel) {
    GlazedTrackListTableModel gtltm=(GlazedTrackListTableModel)model;
    MatcherEditor<Track> matchEdit=gtltm.getMatcherEditor();
    if (matchEdit != null && viewportListener != null)     matchEdit.addMatcherEditorListener(viewportListener);
  }
  TableColumnModelExt cm=(TableColumnModelExt)table.getColumnModel();
  cm.getColumn(0).setPreferredWidth(22);
  cm.getColumn(1).setPreferredWidth(187);
  cm.getColumn(2).setPreferredWidth(137);
  cm.getColumn(3).setPreferredWidth(139);
  cm.getColumn(4).setPreferredWidth(44);
  cm.getColumn(5).setPreferredWidth(40);
  cm.getColumn(6).setPreferredWidth(47);
  cm.getColumn(7).setPreferredWidth(60);
  cm.getColumn(8).setPreferredWidth(160);
  cm.getColumn(9).setPreferredWidth(80);
  cm.getColumn(10).setPreferredWidth(80);
  cm.getColumn(11).setPreferredWidth(140);
  cm.getColumn(12).setPreferredWidth(300);
  int[] hiddenCols=model.hiddenCols();
  List<TableColumn> cols=cm.getColumns(true);
  for (int i=0; i < hiddenCols.length; i++) {
    TableColumnExt colExt=(TableColumnExt)cols.get(hiddenCols[i]);
    colExt.setVisible(false);
  }
  table.addMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() == 2) {
        frame.mainPanel.getPlaybackPanel().playSelectedTracks();
        e.consume();
      }
    }
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (!e.isPopupTrigger())       return;
      int mouseRow=table.rowAtPoint(e.getPoint());
      boolean alreadySel=false;
      for (      int selRow : table.getSelectedRows()) {
        if (selRow == mouseRow) {
          alreadySel=true;
          break;
        }
      }
      if (!alreadySel)       table.getSelectionModel().addSelectionInterval(mouseRow,mouseRow);
      popupMenu.refresh();
      popupMenu.show(e.getComponent(),e.getX(),e.getY());
    }
  }
);
  if (viewportListener != null)   scrollPane.getViewport().addChangeListener(viewportListener);
  add(scrollPane,"String_Node_Str");
}