Program: 147966
Project: 147966
Buggy source:
/** 
 * DOC hbhong Comment method "initServerObjectTable".
 */
private void initServerObjectFilter(){
  boolean enableNamePatternFilter=PreferenceUtil.getBoolean(NamePatternViewFilter.PROP_ENABLE);
  enableNameFilterBun.setSelection(enableNamePatternFilter);
  String namePattern=PreferenceUtil.getString(NamePatternViewFilter.PROP_NAME_PATTERN);
  if (namePattern == null || namePattern.trim().length() == 0) {
    namePattern="String_Node_Str";
  }
  namePatternTxt.setText(namePattern);
  namePatternTxt.setEnabled(enableNamePatternFilter);
  boolean enableServerObjFilter=PreferenceUtil.getBoolean(ServerObjectViewFilter.PROP_ENABLE);
  enableServerObjFilterBun.setSelection(enableServerObjFilter);
  allConfigs=RepositoryNodeConfigurationManager.getConfigurations();
  serverObjViewer.setInput(allConfigs);
  Set<String> enabledObjectLabels=PreferenceUtil.getStringSet(ServerObjectViewFilter.PROP_ENABLE_LIST);
  enabledConfigs=new HashSet<IRepositoryNodeConfiguration>();
  for (  IRepositoryNodeConfiguration conf : allConfigs) {
    String label=getLabel(conf);
    if (enabledObjectLabels.contains(label)) {
      serverObjViewer.setChecked(conf,true);
      enabledConfigs.add(conf);
    }
  }
  enableServerObjFilterComposite(enableServerObjFilter);
  enableAllBun.setSelection(enabledConfigs.size() == allConfigs.size());
  boolean enableLastServerFilter=PreferenceUtil.getBoolean(LastServerViewFilter.PROP_ENABLE);
  enableLastServerFilterBun.setSelection(enableLastServerFilter);
  String serverName=PreferenceUtil.getString(LastServerViewFilter.LAST_SERVER_NAME);
  serverNameTxt.setText(serverName == null ? "String_Node_Str" : serverName);
  enableLastServerFilterComposite(enableLastServerFilter);
}

Fixed version (ground truth):
/** 
 * DOC hbhong Comment method "initServerObjectTable".
 */
private void initServerObjectFilter(){
  boolean enableNamePatternFilter=PreferenceUtil.getBoolean(NamePatternViewFilter.PROP_ENABLE);
  enableNameFilterBun.setSelection(enableNamePatternFilter);
  String namePattern=PreferenceUtil.getString(NamePatternViewFilter.PROP_NAME_PATTERN);
  if (namePattern == null || namePattern.trim().length() == 0) {
    namePattern="String_Node_Str";
  }
  namePatternTxt.setText(namePattern);
  namePatternTxt.setEnabled(enableNamePatternFilter);
  boolean enableServerObjFilter=PreferenceUtil.getBoolean(ServerObjectViewFilter.PROP_ENABLE);
  enableServerObjFilterBun.setSelection(enableServerObjFilter);
  allConfigs=Arrays.asList(RepositoryResourceUtil.getCategoryViewObjects());
  serverObjViewer.setInput(allConfigs);
  Set<String> enabledObjectLabels=PreferenceUtil.getStringSet(ServerObjectViewFilter.PROP_ENABLE_LIST);
  enabledConfigs=new HashSet<IRepositoryViewObject>();
  for (  IRepositoryViewObject conf : allConfigs) {
    String label=getLabel(conf);
    if (enabledObjectLabels.contains(label)) {
      serverObjViewer.setChecked(conf,true);
      enabledConfigs.add(conf);
    }
  }
  enableServerObjFilterComposite(enableServerObjFilter);
  enableAllBun.setSelection(enabledConfigs.size() == allConfigs.size());
  boolean enableLastServerFilter=PreferenceUtil.getBoolean(LastServerViewFilter.PROP_ENABLE);
  enableLastServerFilterBun.setSelection(enableLastServerFilter);
  String serverName=PreferenceUtil.getString(LastServerViewFilter.LAST_SERVER_NAME);
  serverNameTxt.setText(serverName == null ? "String_Node_Str" : serverName);
  enableLastServerFilterComposite(enableLastServerFilter);
}