Program: 68412
Project: 68412
Buggy source:
private void setDataSourceTreeViewer(){
  dataSourceFilteredTree.getViewer().setContentProvider(new ITreeContentProvider(){
    DataSourceType[] types=null;
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    public Object[] getElements(    Object inputElement){
      types=new DataSourceType[((Collection)inputElement).size()];
      Iterator iter=((Collection)inputElement).iterator();
      int i=0;
      while (iter.hasNext()) {
        types[i]=(DataSourceType)iter.next();
        i++;
      }
      setPageComplete(false);
      return types;
    }
    public Object[] getChildren(    Object parentElement){
      if (parentElement instanceof DataSourceType) {
        return ((DataSourceType)parentElement).getDataSourceList().toArray();
      }
 else {
        return new Object[0];
      }
    }
    public Object getParent(    Object element){
      if (types != null) {
        for (int i=0; i < types.length; i++) {
          if (types[i].getDataSourceList().contains(element))           return types[i];
        }
      }
      return null;
    }
    public boolean hasChildren(    Object element){
      if (element instanceof DataSourceType) {
        return true;
      }
 else       if (element instanceof DataSourceHandle) {
        return false;
      }
      return false;
    }
  }
);
  dataSourceFilteredTree.getViewer().setLabelProvider(new ILabelProvider(){
    public Image getImage(    Object element){
      return null;
    }
    public String getText(    Object element){
      if (element instanceof DataSourceType) {
        return ((DataSourceType)element).getDataSourceDisplayName();
      }
 else       if (element instanceof DataSourceHandle) {
        return ((DataSourceHandle)element).getName();
      }
      return element.toString();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
);
  dataSourceFilteredTree.getViewer().setComparator(new ViewerComparator(new Comparator(){
    public int compare(    Object o1,    Object o2){
      return o1.toString().compareTo(o2.toString());
    }
  }
));
  Map sourceMap=getDataSourceMap();
  dataSourceFilteredTree.getViewer().setInput(sourceMap.values());
  dataSourceFilteredTree.getViewer().expandAll();
  if (dataSourceFilteredTree.getViewer().getTree().getItems().length > 0) {
    dataSourceFilteredTree.getViewer().getTree().select(dataSourceFilteredTree.getViewer().getTree().getItem(0).getItem(0));
    doDataSourceSelectionChanged(dataSourceFilteredTree.getViewer().getTree().getItem(0).getData());
    dataSetTypeChooser.getCombo().setEnabled(true);
  }
  setPageComplete(!hasWizard() && (getMessageType() != ERROR));
}

Fixed version (ground truth):
private void setDataSourceTreeViewer(){
  dataSourceFilteredTree.getViewer().setContentProvider(new ITreeContentProvider(){
    DataSourceType[] types=null;
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    public Object[] getElements(    Object inputElement){
      types=new DataSourceType[((Collection)inputElement).size()];
      Iterator iter=((Collection)inputElement).iterator();
      int i=0;
      while (iter.hasNext()) {
        types[i]=(DataSourceType)iter.next();
        i++;
      }
      return types;
    }
    public Object[] getChildren(    Object parentElement){
      if (parentElement instanceof DataSourceType) {
        return ((DataSourceType)parentElement).getDataSourceList().toArray();
      }
 else {
        return new Object[0];
      }
    }
    public Object getParent(    Object element){
      if (types != null) {
        for (int i=0; i < types.length; i++) {
          if (types[i].getDataSourceList().contains(element))           return types[i];
        }
      }
      return null;
    }
    public boolean hasChildren(    Object element){
      if (element instanceof DataSourceType) {
        return true;
      }
 else       if (element instanceof DataSourceHandle) {
        return false;
      }
      return false;
    }
  }
);
  dataSourceFilteredTree.getViewer().setLabelProvider(new ILabelProvider(){
    public Image getImage(    Object element){
      return null;
    }
    public String getText(    Object element){
      if (element instanceof DataSourceType) {
        return ((DataSourceType)element).getDataSourceDisplayName();
      }
 else       if (element instanceof DataSourceHandle) {
        return ((DataSourceHandle)element).getName();
      }
      return element.toString();
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void dispose(){
    }
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void removeListener(    ILabelProviderListener listener){
    }
  }
);
  dataSourceFilteredTree.getViewer().addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      setPageStatus();
    }
  }
);
  dataSourceFilteredTree.getViewer().setComparator(new ViewerComparator(new Comparator(){
    public int compare(    Object o1,    Object o2){
      return o1.toString().compareTo(o2.toString());
    }
  }
));
  Map sourceMap=getDataSourceMap();
  dataSourceFilteredTree.getViewer().setInput(sourceMap.values());
  dataSourceFilteredTree.getViewer().expandAll();
  if (dataSourceFilteredTree.getViewer().getTree().getItems().length > 0) {
    dataSourceFilteredTree.getViewer().getTree().select(dataSourceFilteredTree.getViewer().getTree().getItem(0).getItem(0));
    doDataSourceSelectionChanged(dataSourceFilteredTree.getViewer().getTree().getItem(0).getData());
    dataSetTypeChooser.getCombo().setEnabled(true);
  }
  setPageComplete(!hasWizard() && (getMessageType() != ERROR));
}