Program: 122978
Project: 122978
Buggy source:
/** 
 * DOC zwang Comment method "createButtons".
 */
private void createButtonListener(){
  tabFactory.getTabbedPropertyComposite().getCompactButton().setVisible(true);
  tabFactory.getTabbedPropertyComposite().getTableButton().setVisible(true);
  tabFactory.getTabbedPropertyComposite().getCompactButton().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      tabFactory.getTabbedPropertyComposite().setCompactView(true);
      getPreference().setValue(TalendDesignerPrefConstants.VIEW_OPTIONS,ComponentSettingsView.DEFAULT);
      tabFactory.getTabbedPropertyComposite().getCompactButton().setImage(ImageProvider.getImage(EImage.COMPACT_VIEW));
      tabFactory.getTabbedPropertyComposite().getTableButton().setImage(ImageProvider.getImage(EImage.NO_TABLE_VIEW));
      if (getDc() != null) {
        getDc().dispose();
        if (getParentMap().get(ComponentSettingsView.PARENT) != null && getCategoryMap().get(ComponentSettingsView.CATEGORY) != null) {
          dc=new MultipleThreadDynamicComposite(getParentMap().get(ComponentSettingsView.PARENT),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,getCategoryMap().get(ComponentSettingsView.CATEGORY),element,true);
          dc.refresh();
        }
      }
    }
  }
);
  tabFactory.getTabbedPropertyComposite().getTableButton().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      tabFactory.getTabbedPropertyComposite().setCompactView(false);
      getPreference().setValue(TalendDesignerPrefConstants.VIEW_OPTIONS,ComponentSettingsView.TABLEVIEW);
      tabFactory.getTabbedPropertyComposite().getCompactButton().setImage(ImageProvider.getImage(EImage.NO_COMPACT_VIEW));
      tabFactory.getTabbedPropertyComposite().getTableButton().setImage(ImageProvider.getImage(EImage.TABLE_VIEW));
      if (getDc() != null) {
        getDc().dispose();
        if (getParentMap().get(ComponentSettingsView.PARENT) != null && getCategoryMap().get(ComponentSettingsView.CATEGORY) != null) {
          dc=new MultipleThreadDynamicComposite(getParentMap().get(ComponentSettingsView.PARENT),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,getCategoryMap().get(ComponentSettingsView.CATEGORY),element,false);
          dc.refresh();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC zwang Comment method "createButtons".
 */
private void createButtonListener(){
  tabFactory.getTabbedPropertyComposite().getCompactButton().setVisible(true);
  tabFactory.getTabbedPropertyComposite().getTableButton().setVisible(true);
  tabFactory.getTabbedPropertyComposite().getCompactButton().addSelectionListener(new SelectionListener(){
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
    @Override public void widgetSelected(    SelectionEvent e){
      tabFactory.getTabbedPropertyComposite().setCompactView(true);
      getPreference().setValue(TalendDesignerPrefConstants.VIEW_OPTIONS,ComponentSettingsView.DEFAULT);
      tabFactory.getTabbedPropertyComposite().getCompactButton().setImage(ImageProvider.getImage(EImage.COMPACT_VIEW));
      tabFactory.getTabbedPropertyComposite().getTableButton().setImage(ImageProvider.getImage(EImage.NO_TABLE_VIEW));
      if (getDc() != null) {
        getDc().dispose();
        if (getParentMap().get(ComponentSettingsView.PARENT) != null && getCategoryMap().get(ComponentSettingsView.CATEGORY) != null) {
          dc=new MultipleThreadDynamicComposite(getParentMap().get(ComponentSettingsView.PARENT),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,getCategoryMap().get(ComponentSettingsView.CATEGORY),element,true);
          dc.refresh();
        }
      }
    }
  }
);
  tabFactory.getTabbedPropertyComposite().getTableButton().addSelectionListener(new SelectionListener(){
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
    @Override public void widgetSelected(    SelectionEvent e){
      tabFactory.getTabbedPropertyComposite().setCompactView(false);
      getPreference().setValue(TalendDesignerPrefConstants.VIEW_OPTIONS,ComponentSettingsView.TABLEVIEW);
      tabFactory.getTabbedPropertyComposite().getCompactButton().setImage(ImageProvider.getImage(EImage.NO_COMPACT_VIEW));
      tabFactory.getTabbedPropertyComposite().getTableButton().setImage(ImageProvider.getImage(EImage.TABLE_VIEW));
      if (getDc() != null) {
        getDc().dispose();
        if (getParentMap().get(ComponentSettingsView.PARENT) != null && getCategoryMap().get(ComponentSettingsView.CATEGORY) != null) {
          dc=new MultipleThreadDynamicComposite(getParentMap().get(ComponentSettingsView.PARENT),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,getCategoryMap().get(ComponentSettingsView.CATEGORY),element,false);
          dc.refresh();
        }
      }
    }
  }
);
}