Program: 78385
Project: 78385
Buggy source:
/** 
 * Adds drag support to tree..Must set tree before execution.
 */
public void addDragSupportToTree(){
  DragSource dragSource=new DragSource(availableDbObjectsTree,DND.DROP_COPY);
  dragSource.setTransfer(new Transfer[]{TextTransfer.getInstance()});
  dragSource.addDragListener(new DragSourceAdapter(){
    public void dragStart(    DragSourceEvent event){
      TreeItem[] selection=availableDbObjectsTree.getSelection();
      if (selection.length > 0) {
        if (selection[0].getData() instanceof DbObject) {
          if (((DbObject)selection[0].getData()).getType() == DbObject.PROCEDURE_TYPE) {
            event.doit=false;
            return;
          }
        }
 else         if (selection[0].getData() instanceof ProcedureParameter) {
          event.doit=false;
          return;
        }
      }
 else       if (selection.length <= 0 || selection[0].getData() == null) {
        event.doit=false;
        return;
      }
    }
    public void dragSetData(    DragSourceEvent event){
      if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
        TreeItem[] selection=availableDbObjectsTree.getSelection();
        if (selection.length > 0) {
          Object obj=selection[0].getData();
          if (obj instanceof DbObject) {
            event.data=((DbObject)obj).getName();
          }
 else           if (obj instanceof Procedure) {
            event.data=((Procedure)obj).getProcedureNameWithSchema();
          }
 else           event.data=selection[0].getData();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Adds drag support to tree..Must set tree before execution.
 */
public void addDragSupportToTree(){
  DragSource dragSource=new DragSource(availableDbObjectsTree,DND.DROP_COPY);
  dragSource.setTransfer(new Transfer[]{TextTransfer.getInstance()});
  dragSource.addDragListener(new DragSourceAdapter(){
    public void dragStart(    DragSourceEvent event){
      TreeItem[] selection=availableDbObjectsTree.getSelection();
      if (selection.length > 0) {
        if (selection[0].getData() instanceof DbObject) {
          if (((DbObject)selection[0].getData()).getType() == DbObject.PROCEDURE_TYPE) {
            event.doit=false;
            return;
          }
        }
 else         if (selection[0].getData() instanceof ProcedureParameter) {
          event.doit=false;
          return;
        }
      }
 else       if (selection.length <= 0 || selection[0].getData() == null) {
        event.doit=false;
        return;
      }
    }
    public void dragSetData(    DragSourceEvent event){
      if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
        TreeItem[] selection=availableDbObjectsTree.getSelection();
        if (selection.length > 0) {
          Object obj=selection[0].getData();
          if (obj instanceof DbObject) {
            event.data=getDnDString(((DbObject)obj).getName());
          }
 else           if (obj instanceof Procedure) {
            event.data=getDnDString(((Procedure)obj).getProcedureNameWithSchema());
          }
 else {
            event.data=getDnDString(selection[0].getData());
          }
        }
      }
    }
  }
);
}