Program: 70461
Project: 70461
Buggy source:
private void checkDataTypeImpl(Query query,Series series,boolean isBaseSeries){
  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 (chartModel instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(ChartUIUtil.getBaseSeriesDefinitions(chartModel).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
        }
 catch (        ChartException e) {
          WizardBase.showException(e.getLocalizedMessage());
        }
        if (baseSD != null) {
          if (!isBaseSeries && baseSD != orthSD && ChartUtil.isMagicAggregate(aggFunc)) {
            dataType=DataType.NUMERIC_LITERAL;
          }
        }
        if (isValidatedAxis(dataType,axis.getType())) {
          break;
        }
        AxisType[] axisTypes=provider.getCompatibleAxisType(series);
        for (int i=0; i < axisTypes.length; i++) {
          if (isValidatedAxis(dataType,axisTypes[i])) {
            axisNotification(axis,axisTypes[i]);
            ChartAdapter.beginIgnoreNotifications();
            axis.setType(axisTypes[i]);
            ChartAdapter.endIgnoreNotifications();
            break;
          }
        }
      }
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
      }
 catch (      ChartException ce) {
        WizardBase.showException(Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
      }
      break;
    }
  }
}

Fixed version (ground truth):
private void checkDataTypeImpl(Query query,Series series,boolean isBaseSeries){
  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 (chartModel instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(ChartUIUtil.getBaseSeriesDefinitions(chartModel).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
        }
 catch (        ChartException e) {
          WizardBase.showException(e.getLocalizedMessage());
        }
        if (baseSD != null) {
          if (!isBaseSeries && baseSD != orthSD && ChartUtil.isMagicAggregate(aggFunc)) {
            dataType=DataType.NUMERIC_LITERAL;
          }
        }
        AxisType[] axisTypes=provider.getCompatibleAxisType(series);
        for (int i=0; i < axisTypes.length; i++) {
          if (isValidatedAxis(dataType,axisTypes[i])) {
            axisNotification(axis,axisTypes[i]);
            ChartAdapter.beginIgnoreNotifications();
            axis.setType(axisTypes[i]);
            ChartAdapter.endIgnoreNotifications();
            break;
          }
        }
      }
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
      }
 catch (      ChartException ce) {
        WizardBase.showException(Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
      }
      break;
    }
  }
}