Program: 69967
Project: 69967
Buggy source:
private void checkDataType(Query query,Series series){
  String expression=query.getDefinition();
  Axis axis=null;
  for (EObject o=query; o != null; ) {
    o=o.eContainer();
    if (o instanceof Axis) {
      axis=(Axis)o;
      break;
    }
  }
  Collection<ISeriesUIProvider> cRegisteredEntries=ChartUIExtensionsImpl.instance().getSeriesUIComponents(getContext().getClass().getSimpleName());
  Iterator<ISeriesUIProvider> iterEntries=cRegisteredEntries.iterator();
  String sSeries=null;
  while (iterEntries.hasNext()) {
    ISeriesUIProvider provider=iterEntries.next();
    sSeries=provider.getSeriesClass();
    if (sSeries.equals(series.getClass().getName())) {
      if (getChartModel() instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
          ChartWizard.removeException(ChartWizard.PluginSet_getAggF_ID);
        }
 catch (        ChartException e) {
          ChartWizard.showException(ChartWizard.PluginSet_getAggF_ID,e.getLocalizedMessage());
        }
        if (baseSD != orthSD && baseSD.eContainer() != axis && ChartUtil.isMagicAggregate(aggFunc)) {
          dataType=DataType.NUMERIC_LITERAL;
        }
        AxisType[] axisTypes=provider.getCompatibleAxisType(series);
        int[] validationIndex=provider.validationIndex(series);
        boolean needValidate=false;
        for (int i=0; i < validationIndex.length; i++) {
          if (query == series.getDataDefinition().get(i)) {
            needValidate=true;
            break;
          }
        }
        SeriesDefinition sd=(SeriesDefinition)series.eContainer();
        if (((Axis)sd.eContainer()).getSeriesDefinitions().indexOf(sd) > 0) {
          needValidate=false;
        }
        if (needValidate) {
          if (dataType == null) {
            dataType=ChartUIUtil.convertAxisTypeToDataType(axis.getType());
          }
          for (int i=0; i < axisTypes.length; i++) {
            if (isValidatedAxis(dataType,axisTypes[i])) {
              axisNotification(axis,axisTypes[i]);
              axis.setType(axisTypes[i]);
              break;
            }
          }
        }
      }
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
        ChartWizard.removeException(ChartWizard.CheckSeriesBindingType_ID + series.eContainer().hashCode());
      }
 catch (      ChartException ce) {
        ChartWizard.showException(ChartWizard.CheckSeriesBindingType_ID + series.eContainer().hashCode(),Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
      }
      break;
    }
  }
}

Fixed version (ground truth):
private void checkDataType(Query query,Series series){
  String expression=query.getDefinition();
  Axis axis=null;
  for (EObject o=query; o != null; ) {
    o=o.eContainer();
    if (o instanceof Axis) {
      axis=(Axis)o;
      break;
    }
  }
  Collection<ISeriesUIProvider> cRegisteredEntries=ChartUIExtensionsImpl.instance().getSeriesUIComponents(getContext().getClass().getSimpleName());
  Iterator<ISeriesUIProvider> iterEntries=cRegisteredEntries.iterator();
  String sSeries=null;
  while (iterEntries.hasNext()) {
    ISeriesUIProvider provider=iterEntries.next();
    sSeries=provider.getSeriesClass();
    if (sSeries.equals(series.getClass().getName())) {
      boolean isMagicAgg=false;
      if (getChartModel() instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
          ChartWizard.removeException(ChartWizard.PluginSet_getAggF_ID);
        }
 catch (        ChartException e) {
          ChartWizard.showException(ChartWizard.PluginSet_getAggF_ID,e.getLocalizedMessage());
        }
        if (baseSD != orthSD && baseSD.eContainer() != axis && ChartUtil.isMagicAggregate(aggFunc)) {
          dataType=DataType.NUMERIC_LITERAL;
          isMagicAgg=true;
        }
        if (!isValidatedAxis(dataType,axis.getType())) {
          AxisType[] axisTypes=provider.getCompatibleAxisType(series);
          int[] validationIndex=provider instanceof BubbleSeriesUIProvider ? new int[]{0} : provider.validationIndex(series);
          boolean needValidate=false;
          for (int i=0; i < validationIndex.length; i++) {
            if (query == series.getDataDefinition().get(i)) {
              needValidate=true;
              break;
            }
          }
          SeriesDefinition sd=(SeriesDefinition)series.eContainer();
          if (((Axis)sd.eContainer()).getSeriesDefinitions().indexOf(sd) > 0) {
            needValidate=false;
          }
          if (needValidate) {
            for (int i=0; i < axisTypes.length; i++) {
              if (isValidatedAxis(dataType,axisTypes[i])) {
                axisNotification(axis,axisTypes[i]);
                axis.setType(axisTypes[i]);
                break;
              }
            }
          }
        }
      }
      try {
        if (!isMagicAgg) {
          provider.validateSeriesBindingType(series,getDataServiceProvider());
        }
        ChartWizard.removeException(ChartWizard.CheckSeriesBindingType_ID + series.eContainer().hashCode());
      }
 catch (      ChartException ce) {
        ChartWizard.showException(ChartWizard.CheckSeriesBindingType_ID + series.eContainer().hashCode(),Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
      }
      break;
    }
  }
}