Program: 130086
Project: 130086
Buggy source:
public void drop(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null) {
    return;
  }
  Control control=dropTarget.getControl();
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  IMetadataTable table=null;
  if (draggedData.getTable() instanceof MetadataTable) {
    table=ConvertionHelper.convert((MetadataTable)draggedData.getTable());
  }
  FOXTreeNode targetNode=(FOXTreeNode)(targetItem.getData());
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (!targetNode.hasChildren()) {
      IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)dragdedData.get(0));
      targetNode.setDefaultValue(null);
      targetNode.setColumn(metaColumn);
      targetNode.setTable(table);
      targetNode.setDataType(metaColumn.getTalendType());
      linker.getXMLViewer().refresh(targetNode);
      linker.getXMLViewer().expandAll();
      Display display=linker.getSource().getDisplay();
      Cursor cursor=new Cursor(display,SWT.CURSOR_WAIT);
      linker.getSource().getShell().setCursor(cursor);
      linker.valuedChanged(targetItem);
      linker.getSource().getShell().setCursor(null);
    }
  }
 else   if (dragdedData.size() > 0) {
    DragAndDrogDialog dialog=new DragAndDrogDialog(null);
    dialog.open();
    if (dialog.getReturnCode() == IDialogConstants.CANCEL_ID) {
      return;
    }
    if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_TEXT)) {
      if (targetNode.hasChildren()) {
        List<FOXTreeNode> children=targetNode.getChildren();
        for (        FOXTreeNode foxTreeNode : children) {
          if (!(foxTreeNode instanceof Attribute)) {
            MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
            return;
          }
        }
      }
 else       if (targetNode.getParent() == null) {
        MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
        return;
      }
      IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)dragdedData.get(0));
      targetNode.setColumn(metaColumn);
      targetNode.setDataType(metaColumn.getTalendType());
      setDefaultFixValue(targetNode);
    }
 else     if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_SUBELEMENT)) {
      if (!(targetNode instanceof Element)) {
        MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
        return;
      }
      if (targetNode.getColumn() != null) {
        if (!MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str")) {
          return;
        }
        targetNode.setColumn(null);
      }
      for (      Object obj : dragdedData) {
        IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)obj);
        boolean isContain=false;
        for (        FOXTreeNode node : ((Element)targetNode).getElementChildren()) {
          if (node.getLabel().equals(metaColumn.getLabel())) {
            node.setColumn(metaColumn);
            node.setDataType(metaColumn.getTalendType());
            node.setTable(table);
            setDefaultFixValue(node);
            isContain=true;
          }
        }
        if (!isContain) {
          FOXTreeNode child=new Element(metaColumn.getLabel());
          child.setColumn(metaColumn);
          child.setDataType(metaColumn.getTalendType());
          child.setTable(table);
          targetNode.addChild(child);
        }
      }
      if (targetNode instanceof Element && targetNode.getParent() == null && targetNode.isLoop()) {
        targetNode.setLoop(false);
      }
      setDefaultFixValue(targetNode);
    }
 else     if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_ATTRIBUTE)) {
      if (!(targetNode instanceof Element)) {
        MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
        return;
      }
      for (      Object obj : dragdedData) {
        IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)obj);
        boolean isContain=false;
        for (        FOXTreeNode node : ((Element)targetNode).getAttributeChildren()) {
          if (node.getLabel().equals(metaColumn.getLabel())) {
            node.setColumn(metaColumn);
            node.setTable(table);
            node.setDataType(metaColumn.getTalendType());
            setDefaultFixValue(node);
            isContain=true;
          }
        }
        if (!isContain) {
          FOXTreeNode child=new Attribute(metaColumn.getLabel());
          child.setColumn(metaColumn);
          child.setDataType(metaColumn.getTalendType());
          child.setTable(table);
          targetNode.addChild(child);
        }
      }
      setDefaultFixValue(targetNode);
    }
    linker.getXMLViewer().refresh();
    linker.getXMLViewer().expandAll();
    Display display=linker.getSource().getDisplay();
    Cursor cursor=new Cursor(display,SWT.CURSOR_WAIT);
    linker.getSource().getShell().setCursor(cursor);
    linker.valuedChanged(targetItem);
    linker.getSource().getShell().setCursor(null);
  }
  linker.getXMLViewer().refresh();
  linker.getXMLViewer().expandAll();
  linker.updateLinksStyleAndControlsSelection(control,true);
  linker.getForm().updateConnection();
  linker.getForm().updateStatus();
}

Fixed version (ground truth):
public void drop(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null) {
    return;
  }
  Control control=dropTarget.getControl();
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  IMetadataTable table=null;
  if (draggedData.getTable() instanceof MetadataTable) {
    table=ConvertionHelper.convert((MetadataTable)draggedData.getTable());
  }
  FOXTreeNode targetNode=(FOXTreeNode)(targetItem.getData());
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (!targetNode.hasChildren()) {
      IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)dragdedData.get(0));
      targetNode.setDefaultValue(null);
      targetNode.setColumn(metaColumn);
      targetNode.setTable(table);
      targetNode.setDataType(metaColumn.getTalendType());
      linker.getXMLViewer().refresh(targetNode);
      linker.getXMLViewer().expandAll();
      Display display=linker.getSource().getDisplay();
      Cursor cursor=new Cursor(display,SWT.CURSOR_WAIT);
      linker.getSource().getShell().setCursor(cursor);
      linker.valuedChanged(targetItem);
      linker.getSource().getShell().setCursor(null);
    }
  }
 else   if (dragdedData.size() > 0) {
    DragAndDrogDialog dialog=new DragAndDrogDialog(null);
    dialog.open();
    if (dialog.getReturnCode() == IDialogConstants.CANCEL_ID) {
      return;
    }
    if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_TEXT)) {
      if (targetNode.hasChildren()) {
        List<FOXTreeNode> children=targetNode.getChildren();
        for (        FOXTreeNode foxTreeNode : children) {
          if (!(foxTreeNode instanceof Attribute) && !(foxTreeNode instanceof NameSpaceNode)) {
            MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
            return;
          }
        }
      }
      IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)dragdedData.get(0));
      targetNode.setColumn(metaColumn);
      targetNode.setDataType(metaColumn.getTalendType());
      setDefaultFixValue(targetNode);
    }
 else     if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_SUBELEMENT)) {
      if (!(targetNode instanceof Element)) {
        MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
        return;
      }
      if (targetNode.getColumn() != null) {
        if (!MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str")) {
          return;
        }
        targetNode.setColumn(null);
      }
      for (      Object obj : dragdedData) {
        IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)obj);
        boolean isContain=false;
        for (        FOXTreeNode node : ((Element)targetNode).getElementChildren()) {
          if (node.getLabel().equals(metaColumn.getLabel())) {
            node.setColumn(metaColumn);
            node.setDataType(metaColumn.getTalendType());
            node.setTable(table);
            setDefaultFixValue(node);
            isContain=true;
          }
        }
        if (!isContain) {
          FOXTreeNode child=new Element(metaColumn.getLabel());
          child.setColumn(metaColumn);
          child.setDataType(metaColumn.getTalendType());
          child.setTable(table);
          targetNode.addChild(child);
        }
      }
      if (targetNode instanceof Element && targetNode.getParent() == null && targetNode.isLoop()) {
        targetNode.setLoop(false);
      }
      setDefaultFixValue(targetNode);
    }
 else     if (dialog.getSelectValue().equals(DragAndDrogDialog.CREATE_AS_ATTRIBUTE)) {
      if (!(targetNode instanceof Element)) {
        MessageDialog.openConfirm(control.getShell(),"String_Node_Str","String_Node_Str" + targetNode.getLabel() + "String_Node_Str");
        return;
      }
      for (      Object obj : dragdedData) {
        IMetadataColumn metaColumn=ConvertionHelper.convertToIMetaDataColumn((MetadataColumn)obj);
        boolean isContain=false;
        for (        FOXTreeNode node : ((Element)targetNode).getAttributeChildren()) {
          if (node.getLabel().equals(metaColumn.getLabel())) {
            node.setColumn(metaColumn);
            node.setTable(table);
            node.setDataType(metaColumn.getTalendType());
            setDefaultFixValue(node);
            isContain=true;
          }
        }
        if (!isContain) {
          FOXTreeNode child=new Attribute(metaColumn.getLabel());
          child.setColumn(metaColumn);
          child.setDataType(metaColumn.getTalendType());
          child.setTable(table);
          targetNode.addChild(child);
        }
      }
      setDefaultFixValue(targetNode);
    }
    linker.getXMLViewer().refresh();
    linker.getXMLViewer().expandAll();
    Display display=linker.getSource().getDisplay();
    Cursor cursor=new Cursor(display,SWT.CURSOR_WAIT);
    linker.getSource().getShell().setCursor(cursor);
    linker.valuedChanged(targetItem);
    linker.getSource().getShell().setCursor(null);
  }
  linker.getXMLViewer().refresh();
  linker.getXMLViewer().expandAll();
  linker.updateLinksStyleAndControlsSelection(control,true);
  linker.getForm().updateConnection();
  linker.getForm().updateStatus();
}