Program: 21945
Project: 21945
Buggy source:
/** 
 * Build rule table viewer
 */
private Table buildAvailableRulesTableViewer(final Composite parent){
  final int tableStyle=SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL| SWT.SINGLE| SWT.FULL_SELECTION| SWT.CHECK;
  availableRulesTableViewer=new TableViewer(parent,tableStyle);
  final Table ruleTable=availableRulesTableViewer.getTable();
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_LANGUAGE,70 + 20,RuleTableViewerSorter.RULE_LANGUAGE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_RULESET_NAME,110,RuleTableViewerSorter.RULE_RULESET_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_RULE_NAME,170,RuleTableViewerSorter.RULE_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,StringKeys.PREF_RULESET_COLUMN_PRIORITY,80,RuleTableViewerSorter.RULE_PRIORITY_COMPARATOR);
  ruleTable.setLinesVisible(true);
  ruleTable.setHeaderVisible(true);
  availableRulesTableViewer.setContentProvider(new RuleSetContentProvider());
  availableRulesTableViewer.setLabelProvider(new RuleLabelProvider());
  availableRulesTableViewer.setSorter(availableRuleTableViewerSorter);
  availableRulesTableViewer.setColumnProperties(new String[]{PMDPreferencePage.PROPERTY_LANGUAGE,PMDPreferencePage.PROPERTY_RULESET_NAME,PMDPreferencePage.PROPERTY_RULE_NAME,PMDPreferencePage.PROPERTY_PRIORITY});
  availableRulesTableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      updateDescriptionField();
    }
  }
);
  populateAvailableRulesTable();
  activeControls.add(ruleTable);
  return ruleTable;
}

Fixed version (ground truth):
/** 
 * Build rule table viewer
 */
private Table buildAvailableRulesTableViewer(final Composite parent){
  final int tableStyle=SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL| SWT.SINGLE| SWT.FULL_SELECTION| SWT.CHECK;
  availableRulesTableViewer=new TableViewer(parent,tableStyle);
  final Table ruleTable=availableRulesTableViewer.getTable();
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_LANGUAGE,70 + 20,RuleTableViewerSorter.RULE_LANGUAGE_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_RULESET_NAME,110,RuleTableViewerSorter.RULE_RULESET_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,true,StringKeys.PREF_RULESET_COLUMN_RULE_NAME,170,RuleTableViewerSorter.RULE_NAME_COMPARATOR);
  addColumnTo(ruleTable,SWT.LEFT,false,StringKeys.PREF_RULESET_COLUMN_PRIORITY,80,RuleTableViewerSorter.RULE_PRIORITY_COMPARATOR);
  ruleTable.setLinesVisible(true);
  ruleTable.setHeaderVisible(true);
  availableRulesTableViewer.setContentProvider(new RuleSetContentProvider());
  availableRulesTableViewer.setLabelProvider(new RuleLabelProvider());
  availableRulesTableViewer.setComparator(availableRuleTableViewerSorter);
  availableRulesTableViewer.setColumnProperties(new String[]{PMDPreferencePage.PROPERTY_LANGUAGE,PMDPreferencePage.PROPERTY_RULESET_NAME,PMDPreferencePage.PROPERTY_RULE_NAME,PMDPreferencePage.PROPERTY_PRIORITY});
  availableRulesTableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      updateDescriptionField();
    }
  }
);
  populateAvailableRulesTable();
  activeControls.add(ruleTable);
  return ruleTable;
}