Program: 125072
Project: 125072
Buggy source:
private void addSchemaFields(){
  schemaTreeViewer=new ContainerCheckedTreeViewer(scrolledCompositeFileViewer,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  schemaTreeViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
  schemaTreeViewer.setUseHashlookup(true);
  schemaTreeViewer.addFilter(new FileSelectorViewerFilter());
  schemaTree=schemaTreeViewer.getTree();
  schemaTree.setHeaderVisible(true);
  schemaTree.setLinesVisible(true);
  schemaTree.addListener(SWT.Expand,new Listener(){
    public void handleEvent(    Event event){
      TreeItem treeItem=(TreeItem)event.item;
      for (      TreeItem item : treeItem.getItems()) {
        if (item.getData() != null) {
          IHDFSNode node=(IHDFSNode)item.getData();
          if (node.getType() == EHadoopFileTypes.FILE) {
            if (isExistTable(node)) {
              item.setChecked(true);
            }
 else {
              item.setChecked(false);
            }
          }
 else {
            item.setGrayed(item.getChecked());
          }
        }
      }
    }
  }
);
  int columnWidth1=250;
  int columnWidth2=100;
  int columnWidth3=110;
  int columnWidth4=130;
  int columnWidth5=140;
  TreeColumn fileName=new TreeColumn(schemaTree,SWT.LEFT);
  fileName.setText(Messages.getString("String_Node_Str"));
  fileName.setWidth(columnWidth1);
  TreeColumn fileType=new TreeColumn(schemaTree,SWT.LEFT);
  fileType.setText(Messages.getString("String_Node_Str"));
  fileType.setWidth(columnWidth2);
  TreeColumn fileSize=new TreeColumn(schemaTree,SWT.LEFT);
  fileSize.setText(Messages.getString("String_Node_Str"));
  fileSize.setWidth(columnWidth3);
  TreeColumn nbColumns=new TreeColumn(schemaTree,SWT.LEFT);
  nbColumns.setText(Messages.getString("String_Node_Str"));
  nbColumns.setWidth(columnWidth4);
  TreeColumn creationStatus=new TreeColumn(schemaTree,SWT.LEFT);
  creationStatus.setText(Messages.getString("String_Node_Str"));
  creationStatus.setWidth(columnWidth5);
  AbstractMetadataExtractorViewProvider viewProvider=new FileSelectorTreeViewerProvider();
  schemaTreeViewer.setLabelProvider(viewProvider);
  schemaTreeViewer.setContentProvider(viewProvider);
  schemaTreeViewer.setInput(HDFSModelUtil.convert2HDFSConnectionBean(getConnection()));
  scrolledCompositeFileViewer.setContent(schemaTree);
  scrolledCompositeFileViewer.setMinSize(schemaTree.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}

Fixed version (ground truth):
private void addSchemaFields(){
  schemaTreeViewer=new ContainerCheckedTreeViewer(scrolledCompositeFileViewer,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION| SWT.MULTI);
  schemaTreeViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
  schemaTreeViewer.setUseHashlookup(true);
  schemaTreeViewer.addFilter(new FileSelectorViewerFilter());
  schemaTree=schemaTreeViewer.getTree();
  schemaTree.setHeaderVisible(true);
  schemaTree.setLinesVisible(true);
  schemaTree.addListener(SWT.Expand,new Listener(){
    public void handleEvent(    Event event){
      TreeItem treeItem=(TreeItem)event.item;
      for (      TreeItem item : treeItem.getItems()) {
        if (item.getData() != null) {
          IHDFSNode node=(IHDFSNode)item.getData();
          if (node.getType() == EHadoopFileTypes.FILE) {
            if (isExistTable(node)) {
              item.setChecked(true);
            }
 else {
              item.setChecked(false);
            }
          }
 else {
            item.setGrayed(item.getChecked());
          }
        }
      }
    }
  }
);
  int columnWidth1=250;
  int columnWidth2=100;
  int columnWidth3=110;
  int columnWidth4=130;
  int columnWidth5=140;
  TreeColumn fileName=new TreeColumn(schemaTree,SWT.LEFT);
  fileName.setText(Messages.getString("String_Node_Str"));
  fileName.setWidth(columnWidth1);
  TreeColumn fileType=new TreeColumn(schemaTree,SWT.LEFT);
  fileType.setText(Messages.getString("String_Node_Str"));
  fileType.setWidth(columnWidth2);
  TreeColumn fileSize=new TreeColumn(schemaTree,SWT.LEFT);
  fileSize.setText(Messages.getString("String_Node_Str"));
  fileSize.setWidth(columnWidth3);
  TreeColumn nbColumns=new TreeColumn(schemaTree,SWT.LEFT);
  nbColumns.setText(Messages.getString("String_Node_Str"));
  nbColumns.setWidth(columnWidth4);
  TreeColumn creationStatus=new TreeColumn(schemaTree,SWT.LEFT);
  creationStatus.setText(Messages.getString("String_Node_Str"));
  creationStatus.setWidth(columnWidth5);
  AbstractMetadataExtractorViewProvider viewProvider=new FileSelectorTreeViewerProvider();
  schemaTreeViewer.setLabelProvider(viewProvider);
  schemaTreeViewer.setContentProvider(viewProvider);
  schemaTreeViewer.setInput(getConnectionBean());
  scrolledCompositeFileViewer.setContent(schemaTree);
  scrolledCompositeFileViewer.setMinSize(schemaTree.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}