Program: 138377
Project: 138377
Buggy source:
private void createSimpleTable2(final ScrolledForm form,final Composite composite,final SimpleStatIndicator simpleStatIndicator){
  List<IndicatorUnit> units=new ArrayList<IndicatorUnit>();
  units.add(new IndicatorUnit(IndicatorEnum.RowCountIndicatorEnum,masterPage.getSimpleStatIndicator().getRowCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum,masterPage.getSimpleStatIndicator().getDistinctCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum,masterPage.getSimpleStatIndicator().getDuplicateCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.UniqueIndicatorEnum,masterPage.getSimpleStatIndicator().getUniqueCountIndicator(),null));
  EIndicatorChartType simpleStatType=EIndicatorChartType.SIMPLE_STATISTICS;
  IChartTypeStates chartTypeState=ChartTypeStatesOperator.getChartState(simpleStatType,units);
  ChartWithData chartData=new ChartWithData(simpleStatType,chartTypeState.getChart(),chartTypeState.getDataEntity());
  TableViewer tableviewer=chartTypeState.getTableForm(composite);
  tableviewer.setInput(chartData);
  TableUtils.addTooltipOnTableItem(tableviewer.getTable());
  DataExplorer dataExplorer=chartTypeState.getDataExplorer();
  Analysis analysis=this.getAnalysisHandler().getAnalysis();
  ChartTableFactory.addMenuAndTip(tableviewer,dataExplorer,analysis);
  if (!EditorPreferencePage.isHideGraphics()) {
    JFreeChart chart=chartTypeState.getChart();
    ChartDecorator.decorate(chart);
    if (chart != null) {
      ChartComposite cc=new ChartComposite(composite,SWT.NONE,chart,true);
      GridData gd=new GridData();
      gd.widthHint=PluginConstant.CHART_STANDARD_WIDHT;
      gd.heightHint=PluginConstant.CHART_STANDARD_HEIGHT;
      cc.setLayoutData(gd);
      addMouseListenerForChart(cc,dataExplorer,analysis);
    }
  }
}

Fixed version (ground truth):
private void createSimpleTable2(final ScrolledForm form,final Composite composite,final SimpleStatIndicator simpleStatIndicator){
  List<IndicatorUnit> units=new ArrayList<IndicatorUnit>();
  units.add(new IndicatorUnit(IndicatorEnum.RowCountIndicatorEnum,masterPage.getSimpleStatIndicator().getRowCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum,masterPage.getSimpleStatIndicator().getDistinctCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum,masterPage.getSimpleStatIndicator().getDuplicateCountIndicator(),null));
  units.add(new IndicatorUnit(IndicatorEnum.UniqueIndicatorEnum,masterPage.getSimpleStatIndicator().getUniqueCountIndicator(),null));
  EIndicatorChartType simpleStatType=EIndicatorChartType.SIMPLE_STATISTICS;
  IChartTypeStates chartTypeState=ChartTypeStatesOperator.getChartState(simpleStatType,units);
  ChartWithData chartData=new ChartWithData(simpleStatType,chartTypeState.getChart(),chartTypeState.getDataEntity());
  TableViewer tableviewer=chartTypeState.getTableForm(composite);
  tableviewer.setInput(chartData);
  TableUtils.addTooltipOnTableItem(tableviewer.getTable());
  DataExplorer dataExplorer=chartTypeState.getDataExplorer();
  Analysis analysis=this.getAnalysisHandler().getAnalysis();
  ChartTableFactory.addMenuAndTip(tableviewer,dataExplorer,analysis);
  if (!EditorPreferencePage.isHideGraphics()) {
    JFreeChart chart=chartTypeState.getChart();
    ChartDecorator.decorate(chart);
    if (chart != null) {
      ChartComposite cc=new ChartComposite(composite,SWT.NONE,chart,true);
      GridData gd=new GridData();
      gd.widthHint=PluginConstant.CHART_STANDARD_WIDHT;
      gd.heightHint=PluginConstant.CHART_STANDARD_HEIGHT;
      cc.setLayoutData(gd);
      ExecutionLanguage execuLanguage=analysis.getParameters().getExecutionLanguage();
      boolean isAllow=ExecutionLanguage.SQL.equals(execuLanguage) || ExecutionLanguage.JAVA.equals(execuLanguage) && analysis.getParameters().isStoreData();
      if (isAllow) {
        addMouseListenerForChart(cc,dataExplorer,analysis);
      }
    }
  }
}