Buggy code:
public class CriticBrowserDialog extends JFrame implements ActionListener , ItemListener , DocumentListener , ListSelectionListener { public static int _numCriticBrowser = 0 ; private static final String BUNDLE = "Cognitive" ; static final String high = Localizer . localize ( CriticBrowserDialog . BUNDLE , "level.high" ) ; static final String medium = Localizer . localize ( CriticBrowserDialog . BUNDLE , "level.medium" ) ; static final String low = Localizer . localize ( CriticBrowserDialog . BUNDLE , "level.low" ) ; public static final String [ ] PRIORITIES = new String [ ] { CriticBrowserDialog . high , CriticBrowserDialog . medium , CriticBrowserDialog . low } ; public static final String [ ] USE_CLAR = new String [ ] { "Always" , "If<seq2seq4repair_space>Only<seq2seq4repair_space>One" , "Never" } ; protected JLabel _criticsLabel = new JLabel ( "Critics" ) ; protected JLabel _clsNameLabel = new JLabel ( "Critic<seq2seq4repair_space>Class:<seq2seq4repair_space>" ) ; protected JLabel _headlineLabel = new JLabel ( "Headline:<seq2seq4repair_space>" ) ; protected JLabel _priorityLabel = new JLabel ( "Priority:<seq2seq4repair_space>" ) ; protected JLabel _moreInfoLabel = new JLabel ( "MoreInfo:<seq2seq4repair_space>" ) ; protected JLabel _descLabel = new JLabel ( "Description:<seq2seq4repair_space>" ) ; protected JLabel _clarifierLabel = new JLabel ( "Use<seq2seq4repair_space>Clarifier:<seq2seq4repair_space>" ) ; TableModelCritics _tableModel = new TableModelCritics ( ) ; protected JTable _table = new JTable ( 30 , 3 ) ; protected JLabel _className = new JLabel ( "" ) ; protected JTextField _headline = new JTextField ( "" , 40 ) ; protected JComboBox _priority = new JComboBox ( CriticBrowserDialog . PRIORITIES ) ; protected JTextField _moreInfo = new JTextField ( "" , 35 ) ; protected JTextArea _desc = new JTextArea ( "" , 6 , 40 ) ; protected JComboBox _useClar = new JComboBox ( CriticBrowserDialog . USE_CLAR ) ; protected JButton _okButton = new JButton ( "OK" ) ; protected JButton _wakeButton = new JButton ( "Wake" ) ; protected JButton _configButton = new JButton ( "Configure" ) ; protected JButton _networkButton = new JButton ( "Edit<seq2seq4repair_space>Network" ) ; protected JButton _goButton = new JButton ( "Go" ) ; protected Critic _target ; public CriticBrowserDialog ( ) { } public void setTarget ( Object t ) { } public void setTargetHeadline ( ) { } public void setTargetPriority ( ) { } public void setTargetMoreInfo ( ) { } public void setTargetDesc ( ) { } public void setTargetUseClarifiers ( ) { } public void actionPerformed ( ActionEvent e ) { } public void valueChanged ( ListSelectionEvent lse ) { if ( lse . getValueIsAdjusting ( ) ) return ; Object src = lse . getSource ( ) ; if ( src != ( _table . getSelectionModel ( ) ) ) { System . out . println ( ( "src<seq2seq4repair_space>=<seq2seq4repair_space>" + src ) ) ; return ; } <START_BUG> int row = lse . getFirstIndex ( ) ; <END_BUG> Vector critics = Agency . getCritics ( ) ; setTarget ( critics . elementAt ( row ) ) ; } public void insertUpdate ( DocumentEvent e ) { } public void removeUpdate ( DocumentEvent e ) { } public void changedUpdate ( DocumentEvent e ) { } public void itemStateChanged ( ItemEvent e ) { } }

Fix:
int row = _table . getSelectedRow ( ) ;