Program: 70456
Project: 70456
Buggy source:
private List<String> checkDataType(Query query,Series series){
  List<String> errorMsgs=new ArrayList<String>(2);
  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();
        boolean hasException=false;
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
        }
 catch (        ChartException e) {
          hasException=true;
          WizardBase.showException(e.getLocalizedMessage());
          errorMsgs.add(e.getLocalizedMessage());
        }
        if (!hasException) {
          WizardBase.removeException();
        }
        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) {
          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;
        String errMsg=Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()});
        WizardBase.showException(errMsg);
        errorMsgs.add(errMsg);
      }
      if (!bException) {
        WizardBase.removeException();
      }
      break;
    }
  }
  return errorMsgs;
}

Fixed version (ground truth):
private List<String> checkDataType(Query query,Series series){
  List<String> errorMsgs=new ArrayList<String>(2);
  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();
        boolean hasException=false;
        String aggFunc=null;
        try {
          aggFunc=ChartUtil.getAggregateFuncExpr(orthSD,baseSD,query);
        }
 catch (        ChartException e) {
          hasException=true;
          WizardBase.showException(e.getLocalizedMessage());
          errorMsgs.add(e.getLocalizedMessage());
        }
        if (!hasException) {
          WizardBase.removeException();
        }
        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;
            }
          }
        }
      }
      boolean bException=false;
      try {
        provider.validateSeriesBindingType(series,getDataServiceProvider());
      }
 catch (      ChartException ce) {
        bException=true;
        String errMsg=Messages.getFormattedString("String_Node_Str",new String[]{ce.getLocalizedMessage(),series.getDisplayName()});
        WizardBase.showException(errMsg);
        errorMsgs.add(errMsg);
      }
      if (!bException) {
        WizardBase.removeException();
      }
      break;
    }
  }
  return errorMsgs;
}