Program: 72772
Project: 72772
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 cRegisteredEntries=ChartUIExtensionsImpl.instance().getSeriesUIComponents();
  Iterator iterEntries=cRegisteredEntries.iterator();
  String sSeries=null;
  while (iterEntries.hasNext()) {
    ISeriesUIProvider provider=(ISeriesUIProvider)iterEntries.next();
    sSeries=provider.getSeriesClass();
    if (sSeries.equals(series.getClass().getName())) {
      if (getChartModel() instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(SeriesDefinition)(ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        boolean hasException=false;
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD);
        }
 catch (        ChartException e) {
          hasException=true;
          WizardBase.showException(e.getLocalizedMessage());
        }
        if (!hasException) {
          WizardBase.removeException();
        }
        if (baseSD != orthSD && baseSD.eContainer() != axis && ChartUtil.isMagicAggregate(aggFunc)) {
          dataType=DataType.NUMERIC_LITERAL;
        }
        if (isValidatedAxis(dataType,axis.getType())) {
          break;
        }
        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;
          }
        }
        if (needValidate) {
          for (int i=0; i < axisTypes.length; i++) {
            if (isValidatedAxis(dataType,axisTypes[i])) {
              axisNotification(axis,axisTypes[i]);
              axis.setType(axisTypes[i]);
              break;
            }
          }
        }
      }
      boolean bException=false;
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
      }
 catch (      ChartException ce) {
        bException=true;
        WizardBase.showException(Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
        if (ce.getMessage().endsWith(expression)) {
          ChartAdapter.beginIgnoreNotifications();
          query.setDefinition("String_Node_Str");
          ChartAdapter.endIgnoreNotifications();
        }
      }
      if (!bException) {
        WizardBase.removeException();
      }
      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 cRegisteredEntries=ChartUIExtensionsImpl.instance().getSeriesUIComponents();
  Iterator iterEntries=cRegisteredEntries.iterator();
  String sSeries=null;
  while (iterEntries.hasNext()) {
    ISeriesUIProvider provider=(ISeriesUIProvider)iterEntries.next();
    sSeries=provider.getSeriesClass();
    if (sSeries.equals(series.getClass().getName())) {
      if (getChartModel() instanceof ChartWithAxes) {
        DataType dataType=getDataServiceProvider().getDataType(expression);
        SeriesDefinition baseSD=(SeriesDefinition)(ChartUIUtil.getBaseSeriesDefinitions(getChartModel()).get(0));
        SeriesDefinition orthSD=null;
        orthSD=(SeriesDefinition)series.eContainer();
        boolean hasException=false;
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD);
        }
 catch (        ChartException e) {
          hasException=true;
          WizardBase.showException(e.getLocalizedMessage());
        }
        if (!hasException) {
          WizardBase.removeException();
        }
        if (baseSD != orthSD && baseSD.eContainer() != axis && ChartUtil.isMagicAggregate(aggFunc)) {
          dataType=DataType.NUMERIC_LITERAL;
        }
        if (isValidatedAxis(dataType,axis.getType())) {
          break;
        }
        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) {
          for (int i=0; i < axisTypes.length; i++) {
            if (isValidatedAxis(dataType,axisTypes[i])) {
              axisNotification(axis,axisTypes[i]);
              axis.setType(axisTypes[i]);
              break;
            }
          }
        }
      }
      boolean bException=false;
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
      }
 catch (      ChartException ce) {
        bException=true;
        WizardBase.showException(Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()}));
        if (ce.getMessage().endsWith(expression)) {
          ChartAdapter.beginIgnoreNotifications();
          query.setDefinition("String_Node_Str");
          ChartAdapter.endIgnoreNotifications();
        }
      }
      if (!bException) {
        WizardBase.removeException();
      }
      break;
    }
  }
}