Program: 130103
Project: 130103
Buggy source:
@Override public void widgetSelected(final SelectionEvent e){
  if (e.detail == SWT.CHECK) {
    TreeItem treeItem=(TreeItem)e.item;
    Object data=treeItem.getData();
    TableNode tableNode=(TableNode)data;
    int type=tableNode.getType();
    boolean promptNeeded=treeItem.getChecked();
    if (useProvider()) {
      if (type != TableNode.COLUMN) {
        treeItem.setGrayed(true);
      }
      if (type == TableNode.TABLE) {
        viewer.expandToLevel(tableNode,AbstractTreeViewer.ALL_LEVELS);
        for (        TreeItem childItem : treeItem.getItems()) {
          if (childItem.getData() != null) {
            TableNode childNode=(TableNode)childItem.getData();
            int childNodeType=childNode.getType();
            if (childNodeType == TableNode.COLUMN_FAMILY) {
              childItem.setChecked(promptNeeded);
              for (              TreeItem colItem : childItem.getItems()) {
                updateLeafItem(colItem,promptNeeded,TableNode.COLUMN);
              }
            }
 else             if (childNodeType == TableNode.COLUMN) {
              updateLeafItem(childItem,promptNeeded,TableNode.COLUMN);
            }
          }
        }
      }
 else       if (type == TableNode.COLUMN_FAMILY) {
        viewer.expandToLevel(tableNode,AbstractTreeViewer.ALL_LEVELS);
        for (        TreeItem colItem : treeItem.getItems()) {
          updateLeafItem(colItem,promptNeeded,TableNode.COLUMN);
        }
      }
 else       if (type == TableNode.COLUMN) {
        updateLeafItem(treeItem,promptNeeded,TableNode.COLUMN);
      }
    }
 else {
      if (type != TableNode.TABLE) {
        treeItem.setGrayed(true);
      }
      if (type == TableNode.CATALOG) {
        for (        TreeItem schemaItem : treeItem.getItems()) {
          if (schemaItem.getData() != null) {
            int t=((TableNode)schemaItem.getData()).getType();
            if (t == TableNode.SCHEMA) {
              for (              TreeItem tableItem : schemaItem.getItems()) {
                updateItem(tableItem,promptNeeded,true);
              }
            }
 else             if (t == TableNode.TABLE) {
              updateItem(schemaItem,promptNeeded,true);
            }
          }
        }
      }
 else       if (type == TableNode.SCHEMA) {
        for (        TreeItem tableItem : treeItem.getItems()) {
          updateItem(tableItem,promptNeeded,true);
        }
      }
 else       if (type == TableNode.TABLE) {
        if (promptNeeded) {
          MetadataTable existTable=getExistTable(treeItem.getText(0));
          if (existTable != null) {
            refreshExistItem(existTable,treeItem);
          }
 else {
            treeItem.setText(2,"String_Node_Str");
            treeItem.setText(3,Messages.getString("String_Node_Str"));
            countPending++;
            parentWizardPage.setPageComplete(false);
            refreshTable(treeItem,-1);
          }
        }
 else {
          clearTableItem(treeItem);
          if (treeItem.getText() != null && treeItem.getText().equals(Messages.getString("String_Node_Str"))) {
            countPending--;
          }
        }
      }
    }
    boolean pageC=pageComplete();
    if (pageC) {
      parentWizardPage.setPageComplete(false);
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent e){
  if (e.detail == SWT.CHECK) {
    TreeItem treeItem=(TreeItem)e.item;
    Object data=treeItem.getData();
    TableNode tableNode=(TableNode)data;
    int type=tableNode.getType();
    boolean promptNeeded=treeItem.getChecked();
    if (useProvider()) {
      if (type != TableNode.COLUMN) {
        treeItem.setGrayed(true);
      }
      if (type == TableNode.TABLE) {
        viewer.expandToLevel(tableNode,AbstractTreeViewer.ALL_LEVELS);
        for (        TreeItem childItem : treeItem.getItems()) {
          if (childItem.getData() != null) {
            TableNode childNode=(TableNode)childItem.getData();
            int childNodeType=childNode.getType();
            if (childNodeType == TableNode.COLUMN_FAMILY) {
              childItem.setChecked(promptNeeded);
              for (              TreeItem colItem : childItem.getItems()) {
                updateLeafItem(colItem,promptNeeded,TableNode.COLUMN);
              }
            }
 else             if (childNodeType == TableNode.COLUMN) {
              updateLeafItem(childItem,promptNeeded,TableNode.COLUMN);
            }
          }
        }
      }
 else       if (type == TableNode.COLUMN_FAMILY) {
        viewer.expandToLevel(tableNode,AbstractTreeViewer.ALL_LEVELS);
        for (        TreeItem colItem : treeItem.getItems()) {
          updateLeafItem(colItem,promptNeeded,TableNode.COLUMN);
        }
      }
 else       if (type == TableNode.COLUMN) {
        updateLeafItem(treeItem,promptNeeded,TableNode.COLUMN);
      }
    }
 else {
      if (type != TableNode.TABLE) {
        treeItem.setGrayed(true);
      }
      if (type == TableNode.CATALOG) {
        for (        TreeItem schemaItem : treeItem.getItems()) {
          if (schemaItem.getData() != null) {
            int t=((TableNode)schemaItem.getData()).getType();
            if (t == TableNode.SCHEMA) {
              for (              TreeItem tableItem : schemaItem.getItems()) {
                updateItem(tableItem,promptNeeded,true);
              }
            }
 else             if (t == TableNode.TABLE) {
              updateItem(schemaItem,promptNeeded,true);
            }
          }
        }
      }
 else       if (type == TableNode.SCHEMA) {
        for (        TreeItem tableItem : treeItem.getItems()) {
          updateItem(tableItem,promptNeeded,true);
        }
      }
 else       if (type == TableNode.TABLE) {
        if (promptNeeded) {
          MetadataTable existTable=getExistTable(treeItem.getText(0));
          if (existTable != null) {
            refreshExistItem(existTable,treeItem);
          }
 else {
            treeItem.setText(2,"String_Node_Str");
            treeItem.setText(3,Messages.getString("String_Node_Str"));
            refreshColumnData(tableNode,treeItem);
            countPending++;
            parentWizardPage.setPageComplete(false);
            refreshTable(treeItem,-1);
          }
        }
 else {
          clearTableItem(treeItem);
          if (treeItem.getText() != null && treeItem.getText().equals(Messages.getString("String_Node_Str"))) {
            countPending--;
          }
        }
      }
    }
    boolean pageC=pageComplete();
    if (pageC) {
      parentWizardPage.setPageComplete(false);
    }
  }
}