Program: 72338
Project: 72338
Buggy source:
public Composite createDataDragSource(Composite parent){
  cmpStack=new Composite(parent,SWT.NONE);
  cmpStack.setLayoutData(new GridData(GridData.FILL_BOTH));
  stackLayout=new StackLayout();
  stackLayout.marginHeight=0;
  stackLayout.marginWidth=0;
  cmpStack.setLayout(stackLayout);
  cmpCubeTree=ChartUIUtil.createCompositeWrapper(cmpStack);
  cmpDataPreview=ChartUIUtil.createCompositeWrapper(cmpStack);
  Label label=new Label(cmpCubeTree,SWT.NONE);
{
    label.setText(Messages.getString("String_Node_Str"));
    label.setFont(JFaceResources.getBannerFont());
  }
  if (!dataProvider.isInXTabMeasureCell()) {
    Label description=new Label(cmpCubeTree,SWT.WRAP);
{
      GridData gd=new GridData(GridData.FILL_HORIZONTAL);
      description.setLayoutData(gd);
      description.setText(Messages.getString("String_Node_Str"));
    }
  }
  cubeTreeViewer=new TreeViewer(cmpCubeTree,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  cubeTreeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
  ((GridData)cubeTreeViewer.getTree().getLayoutData()).heightHint=120;
  ViewsTreeProvider provider=new ViewsTreeProvider();
  cubeTreeViewer.setLabelProvider(provider);
  cubeTreeViewer.setContentProvider(provider);
  cubeTreeViewer.setInput(getCube());
  final DragSource dragSource=new DragSource(cubeTreeViewer.getTree(),DND.DROP_COPY);
  dragSource.setTransfer(new Transfer[]{SimpleTextTransfer.getInstance()});
  dragSource.addDragListener(new DragSourceListener(){
    private String text=null;
    public void dragFinished(    DragSourceEvent event){
    }
    public void dragSetData(    DragSourceEvent event){
      event.data=text;
    }
    public void dragStart(    DragSourceEvent event){
      text=createCubeExpression();
      if (text == null) {
        event.doit=false;
      }
    }
  }
);
  cubeTreeViewer.getTree().addListener(SWT.MouseDown,new Listener(){
    public void handleEvent(    Event event){
      if (event.button == 3 && event.widget instanceof Tree) {
        Tree tree=(Tree)event.widget;
        TreeItem treeItem=tree.getSelection()[0];
        if (treeItem.getData() instanceof LevelHandle || treeItem.getData() instanceof MeasureHandle) {
          tree.setMenu(createMenuManager(treeItem.getData()).createContextMenu(tree));
          tree.getMenu().setVisible(true);
        }
 else {
          tree.setMenu(null);
        }
      }
    }
  }
);
  label=new Label(cmpDataPreview,SWT.NONE);
{
    label.setText(Messages.getString("String_Node_Str"));
    label.setFont(JFaceResources.getBannerFont());
  }
  Label description=new Label(cmpDataPreview,SWT.WRAP);
{
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    description.setLayoutData(gd);
    description.setText(Messages.getString("String_Node_Str"));
  }
  tablePreview=new CustomPreviewTable(cmpDataPreview,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.FULL_SELECTION);
{
    GridData gridData=new GridData(GridData.FILL_BOTH);
    gridData.widthHint=400;
    gridData.heightHint=120;
    tablePreview.setLayoutData(gridData);
    tablePreview.setHeaderAlignment(SWT.LEFT);
    tablePreview.addListener(CustomPreviewTable.MOUSE_RIGHT_CLICK_TYPE,this);
  }
  updateDragDataSource();
  return cmpStack;
}

Fixed version (ground truth):
public Composite createDataDragSource(Composite parent){
  cmpStack=new Composite(parent,SWT.NONE);
  cmpStack.setLayoutData(new GridData(GridData.FILL_BOTH));
  stackLayout=new StackLayout();
  stackLayout.marginHeight=0;
  stackLayout.marginWidth=0;
  cmpStack.setLayout(stackLayout);
  cmpCubeTree=ChartUIUtil.createCompositeWrapper(cmpStack);
  cmpDataPreview=ChartUIUtil.createCompositeWrapper(cmpStack);
  Label label=new Label(cmpCubeTree,SWT.NONE);
{
    label.setText(Messages.getString("String_Node_Str"));
    label.setFont(JFaceResources.getBannerFont());
  }
  if (!dataProvider.isInXTabMeasureCell() && !dataProvider.isInMultiView()) {
    Label description=new Label(cmpCubeTree,SWT.WRAP);
{
      GridData gd=new GridData(GridData.FILL_HORIZONTAL);
      description.setLayoutData(gd);
      description.setText(Messages.getString("String_Node_Str"));
    }
  }
  cubeTreeViewer=new TreeViewer(cmpCubeTree,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  cubeTreeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
  ((GridData)cubeTreeViewer.getTree().getLayoutData()).heightHint=120;
  ViewsTreeProvider provider=new ViewsTreeProvider();
  cubeTreeViewer.setLabelProvider(provider);
  cubeTreeViewer.setContentProvider(provider);
  cubeTreeViewer.setInput(getCube());
  final DragSource dragSource=new DragSource(cubeTreeViewer.getTree(),DND.DROP_COPY);
  dragSource.setTransfer(new Transfer[]{SimpleTextTransfer.getInstance()});
  dragSource.addDragListener(new DragSourceListener(){
    private String text=null;
    public void dragFinished(    DragSourceEvent event){
    }
    public void dragSetData(    DragSourceEvent event){
      event.data=text;
    }
    public void dragStart(    DragSourceEvent event){
      text=createCubeExpression();
      if (text == null) {
        event.doit=false;
      }
    }
  }
);
  cubeTreeViewer.getTree().addListener(SWT.MouseDown,new Listener(){
    public void handleEvent(    Event event){
      if (event.button == 3 && event.widget instanceof Tree) {
        Tree tree=(Tree)event.widget;
        TreeItem treeItem=tree.getSelection()[0];
        if (treeItem.getData() instanceof LevelHandle || treeItem.getData() instanceof MeasureHandle) {
          tree.setMenu(createMenuManager(treeItem.getData()).createContextMenu(tree));
          tree.getMenu().setVisible(true);
        }
 else {
          tree.setMenu(null);
        }
      }
    }
  }
);
  label=new Label(cmpDataPreview,SWT.NONE);
{
    label.setText(Messages.getString("String_Node_Str"));
    label.setFont(JFaceResources.getBannerFont());
  }
  if (!dataProvider.isInXTabMeasureCell() && !dataProvider.isInMultiView()) {
    Label description=new Label(cmpDataPreview,SWT.WRAP);
{
      GridData gd=new GridData(GridData.FILL_HORIZONTAL);
      description.setLayoutData(gd);
      description.setText(Messages.getString("String_Node_Str"));
    }
  }
  tablePreview=new CustomPreviewTable(cmpDataPreview,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.FULL_SELECTION);
{
    GridData gridData=new GridData(GridData.FILL_BOTH);
    gridData.widthHint=400;
    gridData.heightHint=120;
    tablePreview.setLayoutData(gridData);
    tablePreview.setHeaderAlignment(SWT.LEFT);
    tablePreview.addListener(CustomPreviewTable.MOUSE_RIGHT_CLICK_TYPE,this);
  }
  updateDragDataSource();
  return cmpStack;
}