Program: 122612
Project: 122612
Buggy source:
private TreeViewer createTreeViewer(Composite listComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(listComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI);
  CheckboxTreeViewer viewer=filteredCheckboxTree.getViewer();
  viewer.setContentProvider(new ITreeContentProvider(){
    public Object[] getChildren(    Object parentElement){
      if (parentElement instanceof IContainerNode) {
        return ((IContainerNode)parentElement).getChildren().toArray();
      }
      return null;
    }
    public Object[] getElements(    Object inputElement){
      return repositoryUtil.getTreeViewInput().toArray();
    }
    public boolean hasChildren(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).hasChildren();
      }
      return false;
    }
    public Object getParent(    Object element){
      return null;
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  viewer.setLabelProvider(new LabelProvider(){
    @Override public String getText(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).getLabel();
      }
      return ((ItemRecord)element).getLabel();
    }
    @Override public Image getImage(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).getImage();
      }
 else       if (element instanceof ItemRecord) {
        return ((ItemRecord)element).getImage();
      }
      return super.getImage(element);
    }
  }
);
  viewer.setSorter(TreeBuilder.createSorter());
  viewer.setInput(this);
  viewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      filteredCheckboxTree.calculateCheckedLeafNodes();
      updateFinishStatus();
    }
  }
);
  return viewer;
}

Fixed version (ground truth):
private TreeViewer createTreeViewer(Composite listComposite){
  filteredCheckboxTree=new FilteredCheckboxTree(listComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI);
  CheckboxTreeViewer viewer=filteredCheckboxTree.getViewer();
  viewer.setContentProvider(new ITreeContentProvider(){
    public Object[] getChildren(    Object parentElement){
      if (parentElement instanceof IContainerNode) {
        return ((IContainerNode)parentElement).getChildren().toArray();
      }
      return null;
    }
    public Object[] getElements(    Object inputElement){
      return repositoryUtil.getTreeViewInput().toArray();
    }
    public boolean hasChildren(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).hasChildren();
      }
      return false;
    }
    public Object getParent(    Object element){
      return null;
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  viewer.setLabelProvider(new LabelProvider(){
    @Override public String getText(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).getLabel();
      }
      return ((ItemRecord)element).getLabel();
    }
    @Override public Image getImage(    Object element){
      if (element instanceof IContainerNode) {
        return ((IContainerNode)element).getImage();
      }
 else       if (element instanceof ItemRecord) {
        return ((ItemRecord)element).getImage();
      }
      return super.getImage(element);
    }
  }
);
  viewer.setSorter(TreeBuilder.createSorter());
  viewer.setInput(this);
  viewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      filteredCheckboxTree.calculateCheckedLeafNodes();
      updateFinishStatus();
    }
  }
);
  filteredCheckboxTree.getViewer().addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      return selectRepositoryNode(viewer,element);
    }
  }
);
  return viewer;
}