Program: 139918
Project: 139918
Buggy source:
private void addSpecifiedListeners(){
  this.addChartMouseListener(new ChartMouseListener(){
    public void chartMouseClicked(    ChartMouseEvent event){
      setRangeZoomable(event.getTrigger().getButton() == 1);
      setDomainZoomable(event.getTrigger().getButton() == 1);
      if (event.getTrigger().getButton() != 3) {
        return;
      }
      Menu menu=new Menu(getShell(),SWT.POP_UP);
      setMenu(menu);
      MenuItem itemShowInFullScreen=new MenuItem(menu,SWT.PUSH);
      itemShowInFullScreen.setText("String_Node_Str");
      itemShowInFullScreen.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          Display.getDefault().asyncExec(new Runnable(){
            public void run(){
              ChartUtils.showChartInFillScreen(createChart(),indicator);
            }
          }
);
        }
      }
);
      ChartEntity chartEntity=event.getEntity();
      if (chartEntity != null) {
        if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator().equals(indicator.eClass())) {
          addMenuOnBubbleChart(chartEntity,menu);
        }
 else         if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator().equals(indicator.eClass())) {
          addMenuOnGantChart(chartEntity,menu);
        }
      }
      menu.setVisible(true);
    }
    private void addMenuOnBubbleChart(    ChartEntity chartEntity,    Menu menu){
      XYItemEntity xyItemEntity=(XYItemEntity)chartEntity;
      DefaultXYZDataset xyzDataSet=(DefaultXYZDataset)xyItemEntity.getDataset();
      int ind=xyItemEntity.getSeriesIndex();
      final Comparable<?> seriesKey=xyzDataSet.getSeriesKey(xyItemEntity.getSeriesIndex());
      final String seriesK=String.valueOf(seriesKey);
      try {
        final Map<String,ValueAggregator> createXYZDatasets=ChartDatasetUtils.createXYZDatasets(indicator,column);
        final ValueAggregator valueAggregator=createXYZDatasets.get(seriesKey);
        valueAggregator.addSeriesToXYZDataset(xyzDataSet,seriesK);
        String seriesLabel=valueAggregator.getLabels(seriesK).get(xyItemEntity.getItem());
        EList<Column> nominalList=indicator.getNominalColumns();
        final String queryString=MultiColumnSetValueExplorer.getInstance().getQueryStirng(column,analysis,nominalList,seriesK,seriesLabel);
        MenuItem item=new MenuItem(menu,SWT.PUSH);
        item.setText("String_Node_Str");
        item.addSelectionListener(new SelectionAdapter(){
          @Override public void widgetSelected(          SelectionEvent e){
            Display.getDefault().asyncExec(new Runnable(){
              public void run(){
                TdDataProvider tdDataProvider=SwitchHelpers.TDDATAPROVIDER_SWITCH.doSwitch(analysis.getContext().getConnection());
                String query=queryString;
                String editorName=ColumnHelper.getColumnSetOwner(column).getName();
                CorePlugin.getDefault().runInDQViewer(tdDataProvider,query,editorName);
              }
            }
);
          }
        }
);
      }
 catch (      Throwable e) {
        log.error(e,e);
      }
    }
    public void chartMouseMoved(    ChartMouseEvent event){
    }
  }
);
}

Fixed version (ground truth):
private void addSpecifiedListeners(){
  this.addChartMouseListener(new ChartMouseListener(){
    public void chartMouseClicked(    ChartMouseEvent event){
      setRangeZoomable(event.getTrigger().getButton() == 1);
      setDomainZoomable(event.getTrigger().getButton() == 1);
      if (event.getTrigger().getButton() != 3) {
        return;
      }
      Menu menu=new Menu(getShell(),SWT.POP_UP);
      setMenu(menu);
      MenuItem itemShowInFullScreen=new MenuItem(menu,SWT.PUSH);
      itemShowInFullScreen.setText("String_Node_Str");
      itemShowInFullScreen.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          Display.getDefault().asyncExec(new Runnable(){
            public void run(){
              ChartUtils.showChartInFillScreen(createChart(),indicator);
            }
          }
);
        }
      }
);
      ChartEntity chartEntity=event.getEntity();
      if (chartEntity != null) {
        if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator().equals(indicator.eClass())) {
          addMenuOnBubbleChart(chartEntity,menu);
        }
 else         if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator().equals(indicator.eClass())) {
          addMenuOnGantChart(chartEntity,menu);
        }
      }
      menu.setVisible(true);
    }
    private void addMenuOnBubbleChart(    ChartEntity chartEntity,    Menu menu){
      if (chartEntity instanceof XYItemEntity) {
        XYItemEntity xyItemEntity=(XYItemEntity)chartEntity;
        DefaultXYZDataset xyzDataSet=(DefaultXYZDataset)xyItemEntity.getDataset();
        final Comparable<?> seriesKey=xyzDataSet.getSeriesKey(xyItemEntity.getSeriesIndex());
        final String seriesK=String.valueOf(seriesKey);
        try {
          final Map<String,ValueAggregator> createXYZDatasets=ChartDatasetUtils.createXYZDatasets(indicator,column);
          final ValueAggregator valueAggregator=createXYZDatasets.get(seriesKey);
          valueAggregator.addSeriesToXYZDataset(xyzDataSet,seriesK);
          String seriesLabel=valueAggregator.getLabels(seriesK).get(xyItemEntity.getItem());
          EList<Column> nominalList=indicator.getNominalColumns();
          final String queryString=MultiColumnSetValueExplorer.getInstance().getQueryStirng(column,analysis,nominalList,seriesK,seriesLabel);
          MenuItem item=new MenuItem(menu,SWT.PUSH);
          item.setText("String_Node_Str");
          item.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            SelectionEvent e){
              Display.getDefault().asyncExec(new Runnable(){
                public void run(){
                  TdDataProvider tdDataProvider=SwitchHelpers.TDDATAPROVIDER_SWITCH.doSwitch(analysis.getContext().getConnection());
                  String query=queryString;
                  String editorName=ColumnHelper.getColumnSetOwner(column).getName();
                  CorePlugin.getDefault().runInDQViewer(tdDataProvider,query,editorName);
                }
              }
);
            }
          }
);
        }
 catch (        Throwable e) {
          log.error(e,e);
        }
      }
    }
    public void chartMouseMoved(    ChartMouseEvent event){
    }
  }
);
}