Program: 130100
Project: 130100
Buggy source:
/** 
 * wzhang Comment method "updateItem".
 * @param item
 * @param checked
 */
private void updateItem(final TreeItem item,boolean checked,boolean isEvent){
  if (item == null) {
    return;
  }
  Object data=item.getData();
  if (data != null && data instanceof TableNode) {
    TableNode tableNode=(TableNode)data;
    if (tableNode.getType() == TableNode.TABLE) {
      String pattern=getNameFilter();
      SearchPattern matcher=new SearchPattern();
      matcher.setPattern(pattern);
      if (!matcher.matches(tableNode.getValue())) {
        return;
      }
      if (isEvent) {
        Set<MetadataTable> tables=ConnectionHelper.getTables(getConnection());
        for (        MetadataTable table : tables) {
          if (table.getLabel().equals(tableNode.getValue())) {
            item.setChecked(true);
          }
        }
        item.setChecked(!checked);
      }
      if (checked) {
        if (!item.getChecked()) {
          MetadataTable existTable=getExistTable(item.getText(0));
          if (existTable != null) {
            refreshExistItem(existTable,item);
          }
 else {
            item.setText(3,Messages.getString("String_Node_Str"));
            countPending++;
            parentWizardPage.setPageComplete(false);
            refreshTable(item,-1);
          }
        }
 else {
          updateStatus(IStatus.OK,null);
        }
        item.setChecked(true);
      }
 else {
        if (item.getChecked()) {
          clearTableItem(item);
          item.setChecked(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * wzhang Comment method "updateItem".
 * @param item
 * @param checked
 */
private void updateItem(final TreeItem item,boolean checked,boolean isEvent){
  if (item == null) {
    return;
  }
  Object data=item.getData();
  if (data != null && data instanceof TableNode) {
    TableNode tableNode=(TableNode)data;
    if (tableNode.getType() == TableNode.TABLE) {
      String pattern=getNameFilter();
      SearchPattern matcher=new SearchPattern();
      matcher.setPattern(pattern);
      if (!matcher.matches(tableNode.getValue())) {
        return;
      }
      if (isEvent) {
        Set<MetadataTable> tables=ConnectionHelper.getTables(getConnection());
        for (        MetadataTable table : tables) {
          if (table.getLabel().equals(tableNode.getValue())) {
            item.setChecked(true);
          }
        }
        item.setChecked(!checked);
      }
      if (checked) {
        if (!item.getChecked()) {
          MetadataTable existTable=getExistTable(item.getText(0));
          if (existTable != null) {
            refreshExistItem(existTable,item);
          }
 else {
            item.setText(3,Messages.getString("String_Node_Str"));
            refreshColumnData(tableNode,item);
            countPending++;
            parentWizardPage.setPageComplete(false);
            refreshTable(item,-1);
          }
        }
 else {
          updateStatus(IStatus.OK,null);
        }
        item.setChecked(true);
      }
 else {
        if (item.getChecked()) {
          clearTableItem(item);
          item.setChecked(false);
        }
      }
    }
  }
}