Program: 79096
Project: 79096
Buggy source:
private void addFetchColumnListener(){
  availableDbObjectsTree.addListener(SWT.Expand,new Listener(){
    public void handleEvent(    Event event){
      TreeItem item=(TreeItem)event.item;
      if (item == null)       return;
      if (isSchemaNode(item) || (item == rootNode)) {
        return;
      }
      String tableName=Utility.getTreeItemsName(item);
      String catalogName=metaDataProvider.getCatalog();
      String schemaName=null;
      String schemaSeparator="String_Node_Str";
      if (metaDataProvider.isSchemaSupported()) {
        int index=-1;
        if ((index=tableName.lastIndexOf(schemaSeparator)) != -1) {
          schemaName=tableName.substring(0,index);
          tableName=tableName.substring(index + 1);
        }
      }
      if (item.getData() instanceof DbObject) {
        DbObject obj=(DbObject)item.getData();
        if (obj.getType() == DbObject.TABLE_TYPE || obj.getType() == DbObject.VIEW_TYPE) {
          ArrayList columnList=metaDataProvider.getColumns(catalogName,schemaName,tableName,null);
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,columnList,SWT.NONE,columnImage);
        }
 else         if (obj.getType() == DbObject.PROCEDURE_TYPE) {
          ArrayList procedureList=new ArrayList();
          ResultSet procedureRs=metaDataProvider.getAllProcedure(catalogName,schemaName,null);
          if (procedureRs == null) {
            return;
          }
          try {
            while (procedureRs.next()) {
              String name=procedureRs.getString("String_Node_Str");
              DbObject dbObject=new DbObject(name,name,DbObject.PROCEDURE_ITEM_TYPE);
              dbObject.setImage(columnImage);
              procedureList.add(dbObject);
            }
          }
 catch (          SQLException e) {
          }
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,procedureList,SWT.NONE,columnImage);
        }
 else         if (obj.getType() == DbObject.PROCEDURE_ITEM_TYPE) {
          ArrayList columnList=new ArrayList();
          columnList=metaDataProvider.getProcedureColumns(catalogName,schemaName,tableName,null);
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,columnList,SWT.NONE,columnImage);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void addFetchColumnListener(){
  availableDbObjectsTree.addListener(SWT.Expand,new Listener(){
    public void handleEvent(    Event event){
      TreeItem item=(TreeItem)event.item;
      if (item == null)       return;
      if (isSchemaNode(item) || (item == rootNode)) {
        return;
      }
      String tableName=Utility.getTreeItemsName(item);
      String catalogName=metaDataProvider.getCatalog();
      String schemaName=null;
      String schemaSeparator="String_Node_Str";
      if (metaDataProvider.isSchemaSupported()) {
        int index=-1;
        if ((index=tableName.lastIndexOf(schemaSeparator)) != -1) {
          schemaName=tableName.substring(0,index);
          tableName=tableName.substring(index + 1);
        }
      }
      if (item.getData() instanceof DbObject) {
        DbObject obj=(DbObject)item.getData();
        if (obj.getType() == DbObject.TABLE_TYPE || obj.getType() == DbObject.VIEW_TYPE) {
          ArrayList columnList=metaDataProvider.getColumns(catalogName,schemaName,tableName,null);
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,columnList,SWT.NONE,columnImage);
        }
 else         if (obj.getType() == DbObject.PROCEDURE_TYPE) {
          ArrayList procedureList=metaDataProvider.getAllProcedure(catalogName,schemaName,null);
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,procedureList,SWT.NONE,columnImage);
        }
      }
 else       if (item.getData() instanceof Procedure) {
        Procedure obj=(Procedure)item.getData();
{
          ArrayList columnList=metaDataProvider.getProcedureColumns(obj.getCatalog(),schemaName,tableName,null);
          TreeItem[] items=item.getItems();
          if (items != null) {
            for (int i=0; i < items.length; i++) {
              items[i].dispose();
            }
          }
          Utility.createTreeItems(item,columnList,SWT.NONE,columnImage);
        }
      }
    }
  }
);
}