Program: 96604
Project: 96604
Buggy source:
@Override protected Control createAdditionalContents(final Composite parent){
  ExpandableComposite section=new ExpandableComposite(parent,SWT.NONE,ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT| ExpandableComposite.EXPANDED);
  section.clientVerticalSpacing=0;
  section.setBackground(parent.getBackground());
  section.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  section.addExpansionListener(new ExpansionAdapter(){
    @Override public void expansionStateChanged(    ExpansionEvent e){
      parent.layout(true);
    }
  }
);
  section.setText("String_Node_Str");
  Composite composite=new Composite(section,SWT.NONE);
  section.setClient(composite);
  GridLayoutFactory.fillDefaults().numColumns(2).margins(0,5).applyTo(composite);
  CheckboxFilteredTree filteredTree=new CheckboxFilteredTree(composite,SWT.FULL_SELECTION | SWT.BORDER,new SubstringPatternFilter());
  GridDataFactory.fillDefaults().grab(true,true).hint(SWT.DEFAULT,200).applyTo(filteredTree);
  planViewer=filteredTree.getCheckboxTreeViewer();
  planViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      BuildPlan plan=(BuildPlan)event.getElement();
      plan.setSelected(event.getChecked());
    }
  }
);
  planViewer.setCheckStateProvider(new ICheckStateProvider(){
    public boolean isChecked(    Object element){
      return ((IBuildPlan)element).isSelected();
    }
    public boolean isGrayed(    Object element){
      for (      IBuildPlan child : ((IBuildPlan)element).getChildren()) {
        if (!child.isSelected()) {
          return true;
        }
      }
      return false;
    }
  }
);
  planViewer.setLabelProvider(new LabelProvider(){
    @Override public String getText(    Object element){
      return ((IBuildPlan)element).getName();
    }
  }
);
  planViewer.setContentProvider(new ITreeContentProvider(){
    private BuildServerConfiguration configuration;
    private final Object[] EMPTY_ARRAY=new Object[0];
    public void dispose(){
    }
    public Object[] getChildren(    Object parentElement){
      return EMPTY_ARRAY;
    }
    public Object[] getElements(    Object inputElement){
      return configuration.getPlans().toArray();
    }
    public Object getParent(    Object element){
      return null;
    }
    public boolean hasChildren(    Object element){
      return false;
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
      configuration=(BuildServerConfiguration)newInput;
    }
  }
);
  planViewer.setSorter(new ViewerSorter());
  Composite buttonComposite=new Composite(composite,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.TOP).applyTo(buttonComposite);
  GridLayoutFactory.fillDefaults().numColumns(1).margins(0,0).extendedMargins(0,0,0,0).applyTo(buttonComposite);
  createButtons(buttonComposite);
  return section;
}

Fixed version (ground truth):
@Override protected Control createAdditionalContents(final Composite parent){
  final ExpandableComposite section=new ExpandableComposite(parent,SWT.NONE,ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT| ExpandableComposite.EXPANDED);
  section.clientVerticalSpacing=0;
  section.setBackground(parent.getBackground());
  section.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  section.addExpansionListener(new ExpansionAdapter(){
    @Override public void expansionStateChanged(    ExpansionEvent e){
      if (section.getLayoutData() instanceof GridData) {
        ((GridData)section.getLayoutData()).grabExcessVerticalSpace=e.getState();
      }
      parent.layout(true);
    }
  }
);
  section.setText("String_Node_Str");
  Composite composite=new Composite(section,SWT.NONE);
  section.setClient(composite);
  GridLayoutFactory.fillDefaults().numColumns(2).margins(0,5).applyTo(composite);
  CheckboxFilteredTree filteredTree=new CheckboxFilteredTree(composite,SWT.FULL_SELECTION | SWT.BORDER,new SubstringPatternFilter());
  GridDataFactory.fillDefaults().grab(true,true).hint(SWT.DEFAULT,200).applyTo(filteredTree);
  planViewer=filteredTree.getCheckboxTreeViewer();
  planViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      BuildPlan plan=(BuildPlan)event.getElement();
      plan.setSelected(event.getChecked());
    }
  }
);
  planViewer.setCheckStateProvider(new ICheckStateProvider(){
    public boolean isChecked(    Object element){
      return ((IBuildPlan)element).isSelected();
    }
    public boolean isGrayed(    Object element){
      for (      IBuildPlan child : ((IBuildPlan)element).getChildren()) {
        if (!child.isSelected()) {
          return true;
        }
      }
      return false;
    }
  }
);
  planViewer.setLabelProvider(new LabelProvider(){
    @Override public String getText(    Object element){
      return ((IBuildPlan)element).getName();
    }
  }
);
  planViewer.setContentProvider(new ITreeContentProvider(){
    private BuildServerConfiguration configuration;
    private final Object[] EMPTY_ARRAY=new Object[0];
    public void dispose(){
    }
    public Object[] getChildren(    Object parentElement){
      return EMPTY_ARRAY;
    }
    public Object[] getElements(    Object inputElement){
      return configuration.getPlans().toArray();
    }
    public Object getParent(    Object element){
      return null;
    }
    public boolean hasChildren(    Object element){
      return false;
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
      configuration=(BuildServerConfiguration)newInput;
    }
  }
);
  planViewer.setSorter(new ViewerSorter());
  Composite buttonComposite=new Composite(composite,SWT.NONE);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.TOP).applyTo(buttonComposite);
  GridLayoutFactory.fillDefaults().numColumns(1).margins(0,0).extendedMargins(0,0,0,0).applyTo(buttonComposite);
  createButtons(buttonComposite);
  return section;
}