Program: 123283
Project: 123283
Buggy source:
/** 
 * DOC talend Comment method "getTemplate".
 * @param event
 * @return the validate drag able node list
 */
protected Object getTemplate(DragSourceEvent event){
  final RootEditPart rootEditPart=getViewer().getRootEditPart();
  if (rootEditPart instanceof AbstractGraphicalEditPart) {
    AbstractGraphicalEditPart graphicPart=(AbstractGraphicalEditPart)rootEditPart;
    final IFigure figure=graphicPart.getFigure();
    final IFigure findFigureAt=figure.findFigureAt(new Point(event.x,event.y));
    if (findFigureAt instanceof ISash) {
      return findFigureAt;
    }
  }
  List selection=getViewer().getSelectedEditParts();
  if (selection == null || selection.isEmpty()) {
    return null;
  }
  TransferedObject object=null;
  Object lastSelection=getViewer().getSelectedEditParts().get(getViewer().getSelectedEditParts().size() - 1);
  TransferdType type=null;
  List toTransfer=new ArrayList();
  for (  Object o : selection) {
    if (lastSelection instanceof OutputTreeNodeEditPart) {
      toTransfer.clear();
      break;
    }
 else     if (lastSelection instanceof TreeNodeEditPart) {
      type=TransferdType.INPUT;
      if (o instanceof InputXmlTreeEditPart) {
        toTransfer.clear();
        break;
      }
      if (o instanceof TreeNodeEditPart) {
        TreeNodeEditPart nodePart=(TreeNodeEditPart)o;
        if (isDragable((TreeNode)nodePart.getModel())) {
          toTransfer.add(o);
        }
 else {
          toTransfer.clear();
          break;
        }
      }
    }
 else     if (lastSelection instanceof VarNodeEditPart) {
      type=TransferdType.VAR;
      if (o instanceof VarNodeEditPart) {
        toTransfer.add(o);
      }
    }
  }
  if (toTransfer.isEmpty()) {
    object=null;
  }
 else {
    object=new TransferedObject(toTransfer,type);
  }
  return object;
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "getTemplate".
 * @param event
 * @return the validate drag able node list
 */
protected Object getTemplate(DragSourceEvent event){
  final RootEditPart rootEditPart=getViewer().getRootEditPart();
  if (rootEditPart instanceof AbstractGraphicalEditPart) {
    AbstractGraphicalEditPart graphicPart=(AbstractGraphicalEditPart)rootEditPart;
    final IFigure figure=graphicPart.getFigure();
    final IFigure findFigureAt=figure.findFigureAt(new Point(event.x,event.y));
    if (findFigureAt instanceof ISash) {
      return findFigureAt;
    }
  }
  List selection=getViewer().getSelectedEditParts();
  if (selection == null || selection.isEmpty()) {
    return null;
  }
  TransferedObject object=null;
  Object lastSelection=getViewer().getSelectedEditParts().get(getViewer().getSelectedEditParts().size() - 1);
  TransferdType type=null;
  List toTransfer=new ArrayList();
  for (  Object o : selection) {
    if (lastSelection instanceof OutputTreeNodeEditPart) {
      toTransfer.clear();
      break;
    }
 else     if (lastSelection instanceof TreeNodeEditPart) {
      type=TransferdType.INPUT;
      if (o instanceof InputXmlTreeEditPart) {
        toTransfer.clear();
        break;
      }
      if (o instanceof TreeNodeEditPart) {
        TreeNodeEditPart nodePart=(TreeNodeEditPart)o;
        if (XmlMapUtil.isDragable((TreeNode)nodePart.getModel())) {
          toTransfer.add(o);
        }
 else {
          toTransfer.clear();
          break;
        }
      }
    }
 else     if (lastSelection instanceof VarNodeEditPart) {
      type=TransferdType.VAR;
      if (o instanceof VarNodeEditPart) {
        toTransfer.add(o);
      }
    }
  }
  if (toTransfer.isEmpty()) {
    object=null;
  }
 else {
    object=new TransferedObject(toTransfer,type);
  }
  return object;
}