Program: 21942
Project: 21942
Buggy source:
/** 
 * Build rule table viewer
 */
private Table buildRuleTableViewer(Composite parent){
  int tableStyle=SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL| SWT.SINGLE| SWT.FULL_SELECTION;
  ruleTableViewer=new TableViewer(parent,tableStyle);
  Table ruleTable=ruleTableViewer.getTable();
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_LANGUAGE),70,RuleTableViewerSorter.RULE_LANGUAGE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_RULESET_NAME),110,RuleTableViewerSorter.RULE_RULESET_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_RULE_NAME),170,RuleTableViewerSorter.RULE_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,getMessage(StringKeys.PREF_RULESET_COLUMN_SINCE),40,RuleTableViewerSorter.RULE_SINCE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,getMessage(StringKeys.PREF_RULESET_COLUMN_PRIORITY),80,RuleTableViewerSorter.RULE_PRIORITY_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_DESCRIPTION),300,RuleTableViewerSorter.RULE_DESCRIPTION_COMPARATOR);
  ruleTable.setLinesVisible(true);
  ruleTable.setHeaderVisible(true);
  ruleTableViewer.setContentProvider(new RuleSetContentProvider());
  ruleTableViewer.setLabelProvider(new RuleLabelProvider());
  ruleTableViewer.setSorter(ruleTableViewerSorter);
  ruleTableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    /** 
 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
 */
    public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      Rule selectedRule=(Rule)selection.getFirstElement();
      rulePropertiesTableViewer.setInput(selectedRule);
      removeRuleButton.setEnabled(selectedRule != null);
      editRuleButton.setEnabled(selectedRule != null);
    }
  }
);
  ruleTableViewer.setColumnProperties(new String[]{PROPERTY_LANGUAGE,PROPERTY_RULESET_NAME,PROPERTY_RULE_NAME,PROPERTY_SINCE,PROPERTY_PRIORITY,PROPERTY_DESCRIPTION});
  ruleTableViewer.setCellModifier(new RuleCellModifier(ruleTableViewer));
  ruleTableViewer.setCellEditors(new CellEditor[]{null,null,null,null,new ComboBoxCellEditor(ruleTable,UISettings.getPriorityLabels()),new TextCellEditor(ruleTable)});
  populateRuleTable();
  return ruleTable;
}

Fixed version (ground truth):
/** 
 * Build rule table viewer
 */
private Table buildRuleTableViewer(Composite parent){
  int tableStyle=SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL| SWT.SINGLE| SWT.FULL_SELECTION;
  ruleTableViewer=new TableViewer(parent,tableStyle);
  Table ruleTable=ruleTableViewer.getTable();
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_LANGUAGE),70,RuleTableViewerSorter.RULE_LANGUAGE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_RULESET_NAME),110,RuleTableViewerSorter.RULE_RULESET_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_RULE_NAME),170,RuleTableViewerSorter.RULE_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,getMessage(StringKeys.PREF_RULESET_COLUMN_SINCE),40,RuleTableViewerSorter.RULE_SINCE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,getMessage(StringKeys.PREF_RULESET_COLUMN_PRIORITY),80,RuleTableViewerSorter.RULE_PRIORITY_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,getMessage(StringKeys.PREF_RULESET_COLUMN_DESCRIPTION),300,RuleTableViewerSorter.RULE_DESCRIPTION_COMPARATOR);
  ruleTable.setLinesVisible(true);
  ruleTable.setHeaderVisible(true);
  ruleTableViewer.setContentProvider(new RuleSetContentProvider());
  ruleTableViewer.setLabelProvider(new RuleLabelProvider());
  ruleTableViewer.setComparator(ruleTableViewerSorter);
  ruleTableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    /** 
 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
 */
    public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      Rule selectedRule=(Rule)selection.getFirstElement();
      rulePropertiesTableViewer.setInput(selectedRule);
      removeRuleButton.setEnabled(selectedRule != null);
      editRuleButton.setEnabled(selectedRule != null);
    }
  }
);
  ruleTableViewer.setColumnProperties(new String[]{PROPERTY_LANGUAGE,PROPERTY_RULESET_NAME,PROPERTY_RULE_NAME,PROPERTY_SINCE,PROPERTY_PRIORITY,PROPERTY_DESCRIPTION});
  ruleTableViewer.setCellModifier(new RuleCellModifier(ruleTableViewer));
  ruleTableViewer.setCellEditors(new CellEditor[]{null,null,null,null,new ComboBoxCellEditor(ruleTable,UISettings.getPriorityLabels()),new TextCellEditor(ruleTable)});
  populateRuleTable();
  return ruleTable;
}