Program: 69591
Project: 69591
Buggy source:
public void changeTask(Notification notification){
  if (previewPainter != null) {
    if (notification == null) {
      if (getChartModel() instanceof ChartWithAxes) {
        checkDataTypeForChartWithAxes();
      }
      return;
    }
    if (notification.getEventType() == Notification.REMOVE && notification.getNotifier() instanceof Axis) {
      ChartWizard.removeAllExceptions("String_Node_Str" + notification.getOldValue().hashCode());
    }
    if ((notification.getNotifier() instanceof Query && ((Query)notification.getNotifier()).eContainer() instanceof Series)) {
      Query query=(Query)notification.getNotifier();
      checkDataType(query,(Series)query.eContainer());
      if (!(((ChartWizardContext)getContext()).getChartType() instanceof GanttChart) && !getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY) && getDataServiceProvider().checkState(IDataServiceProvider.HAS_DATA_SET)) {
        if (getChartModel() instanceof ChartWithAxes) {
          Axis axisWithCurrentQuery=(Axis)((Query)notification.getNotifier()).eContainer().eContainer().eContainer();
          if (ChartUIUtil.getAxisXForProcessing((ChartWithAxes)getChartModel()).isCategoryAxis() && axisWithCurrentQuery.eContainer() instanceof Axis) {
            SeriesDefinition base=ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0);
            if (!base.getGrouping().isEnabled()) {
              base.getGrouping().setEnabled(true);
            }
            if (axisWithCurrentQuery.getType() == AxisType.DATE_TIME_LITERAL || getDataServiceProvider().getDataType(query.getDefinition()) == DataType.DATE_TIME_LITERAL) {
              if (query.getGrouping() == null) {
                query.setGrouping(DataFactoryImpl.init().createSeriesGrouping());
              }
              SeriesGrouping group=query.getGrouping();
              group.setEnabled(true);
              group.setAggregateExpression("String_Node_Str");
            }
          }
        }
 else {
          if (((Query)notification.getNotifier()).eContainer().eContainer().eContainer() instanceof SeriesDefinition) {
            SeriesDefinition base=ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0);
            if (!base.getGrouping().isEnabled()) {
              base.getGrouping().setEnabled(true);
            }
          }
        }
      }
    }
    if (notification.getNotifier() instanceof SeriesDefinition && getChartModel() instanceof ChartWithAxes) {
      checkDataTypeForChartWithAxes();
    }
    if (notification.getNotifier() instanceof Query || notification.getNotifier() instanceof Axis || notification.getNotifier() instanceof SeriesDefinition|| notification.getNotifier() instanceof SeriesGrouping) {
      doPreview();
    }
 else     if (ChartPreviewPainterBase.isLivePreviewActive()) {
      ChartAdapter.beginIgnoreNotifications();
      ChartUIUtil.syncRuntimeSeries(getChartModel());
      ChartAdapter.endIgnoreNotifications();
      doPreview();
    }
 else {
      doPreview();
    }
  }
}

Fixed version (ground truth):
public void changeTask(Notification notification){
  if (previewPainter != null) {
    if (notification == null) {
      if (getChartModel() instanceof ChartWithAxes) {
        checkDataTypeForChartWithAxes();
      }
      return;
    }
    if (notification.getEventType() == Notification.REMOVE && notification.getNotifier() instanceof Axis) {
      ChartWizard.removeAllExceptions("String_Node_Str" + notification.getOldValue().hashCode());
    }
    if (notification.getNotifier() instanceof SeriesDefinition && getChartModel() instanceof ChartWithAxes) {
      checkDataTypeForChartWithAxes();
    }
    if (notification.getNotifier() instanceof Query || notification.getNotifier() instanceof Axis || notification.getNotifier() instanceof SeriesDefinition|| notification.getNotifier() instanceof SeriesGrouping) {
      doPreview();
    }
 else     if (ChartPreviewPainterBase.isLivePreviewActive()) {
      ChartAdapter.beginIgnoreNotifications();
      ChartUIUtil.syncRuntimeSeries(getChartModel());
      ChartAdapter.endIgnoreNotifications();
      doPreview();
    }
 else {
      doPreview();
    }
  }
}