Program: 76609
Project: 76609
Buggy source:
/** 
 * @param seOrthogonal
 * @return
 */
public final SeriesRenderingHints getSeriesRenderingHints(Series seOrthogonal) throws ChartException, IllegalArgumentException {
  if (seOrthogonal == null || seOrthogonal.getClass() == SeriesImpl.class) {
    return null;
  }
  final EList elCategories=cwoa.getSeriesDefinitions();
  if (elCategories.size() != 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_FORMAT,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  final SeriesDefinition sd=(SeriesDefinition)elCategories.get(0);
  final List al=sd.getRunTimeSeries();
  if (al.size() != 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_FORMAT,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  final Series seBase=(Series)al.get(0);
  final DataSetIterator dsiBaseValues=new DataSetIterator(seBase.getDataSet());
  final DataSetIterator dsiOrthogonalValues=new DataSetIterator(seOrthogonal.getDataSet());
  DataPointHints[] dpha=null;
  if (dsiBaseValues.size() != dsiOrthogonalValues.size()) {
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{new Integer(dsiBaseValues.size()),new Integer(dsiOrthogonalValues.size())},rtc.getULocale()));
  }
 else {
    final int iCount=dsiOrthogonalValues.size();
    dpha=new DataPointHints[iCount];
    final DataPoint dp=seOrthogonal.getDataPoint();
    final EList el=dp.getComponents();
    DataPointComponent dpc;
    DataPointComponentType dpct;
    FormatSpecifier fsBase=null, fsOrthogonal=null, fsSeries=null, fsPercentile=null;
    for (int i=0; i < el.size(); i++) {
      dpc=(DataPointComponent)el.get(i);
      dpct=dpc.getType();
      fsBase=dpc.getFormatSpecifier();
      if (fsBase == null) {
        fsBase=sd.getFormatSpecifier();
      }
      fsOrthogonal=dpc.getFormatSpecifier();
      if (fsOrthogonal == null && seOrthogonal.eContainer() instanceof SeriesDefinition) {
        fsOrthogonal=((SeriesDefinition)seOrthogonal.eContainer()).getFormatSpecifier();
      }
      fsSeries=dpc.getFormatSpecifier();
      fsPercentile=dpc.getFormatSpecifier();
    }
    UserDataSetHints udsh=new UserDataSetHints(seOrthogonal.getDataSets());
    udsh.reset();
    double total=0;
    for (int i=0; i < iCount; i++) {
      Object v=dsiOrthogonalValues.next();
      if (v instanceof Number) {
        total+=((Number)v).doubleValue();
      }
 else       if (v instanceof NumberDataElement) {
        total+=((NumberDataElement)v).getValue();
      }
    }
    dsiOrthogonalValues.reset();
    for (int i=0; i < iCount; i++) {
      Object orthValue=dsiOrthogonalValues.next();
      Object percentileValue=null;
      if (total != 0) {
        if (orthValue instanceof Number) {
          percentileValue=new Double(((Number)orthValue).doubleValue() / total);
        }
 else         if (orthValue instanceof NumberDataElement) {
          percentileValue=new Double(((NumberDataElement)orthValue).getValue() / total);
        }
      }
 else {
        percentileValue=new Double(0);
      }
      dpha[i]=new DataPointHints(dsiBaseValues.next(),orthValue,seOrthogonal.getSeriesIdentifier(),percentileValue,seOrthogonal.getDataPoint(),fsBase,fsOrthogonal,fsSeries,fsPercentile,i,null,-1,rtc);
      udsh.next(dpha[i]);
    }
  }
  return new SeriesRenderingHints(this,dpha,dsiBaseValues,dsiOrthogonalValues);
}

Fixed version (ground truth):
/** 
 * @param seOrthogonal
 * @return
 */
public final SeriesRenderingHints getSeriesRenderingHints(Series seOrthogonal) throws ChartException, IllegalArgumentException {
  if (seOrthogonal == null || seOrthogonal.getClass() == SeriesImpl.class) {
    return null;
  }
  final EList elCategories=cwoa.getSeriesDefinitions();
  if (elCategories.size() != 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_FORMAT,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  final SeriesDefinition sd=(SeriesDefinition)elCategories.get(0);
  final List al=sd.getRunTimeSeries();
  if (al.size() != 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_FORMAT,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  final Series seBase=(Series)al.get(0);
  final DataSetIterator dsiBaseValues=new DataSetIterator(seBase.getDataSet());
  final DataSetIterator dsiOrthogonalValues=new DataSetIterator(seOrthogonal.getDataSet());
  DataPointHints[] dpha=null;
  if (dsiBaseValues.size() != dsiOrthogonalValues.size()) {
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{new Integer(dsiBaseValues.size()),new Integer(dsiOrthogonalValues.size())},rtc.getULocale()));
  }
 else {
    final int iCount=dsiOrthogonalValues.size();
    dpha=new DataPointHints[iCount];
    final DataPoint dp=seOrthogonal.getDataPoint();
    final EList el=dp.getComponents();
    DataPointComponent dpc;
    DataPointComponentType dpct;
    FormatSpecifier fsBase=null, fsOrthogonal=null, fsSeries=null, fsPercentile=null;
    for (int i=0; i < el.size(); i++) {
      dpc=(DataPointComponent)el.get(i);
      dpct=dpc.getType();
      if (DataPointComponentType.BASE_VALUE_LITERAL.equals(dpct)) {
        fsBase=dpc.getFormatSpecifier();
        if (fsBase == null) {
          fsBase=sd.getFormatSpecifier();
        }
      }
      if (DataPointComponentType.ORTHOGONAL_VALUE_LITERAL.equals(dpct)) {
        fsOrthogonal=dpc.getFormatSpecifier();
        if (fsOrthogonal == null && seOrthogonal.eContainer() instanceof SeriesDefinition) {
          fsOrthogonal=((SeriesDefinition)seOrthogonal.eContainer()).getFormatSpecifier();
        }
      }
      if (DataPointComponentType.SERIES_VALUE_LITERAL.equals(dpct)) {
        fsSeries=dpc.getFormatSpecifier();
      }
      if (DataPointComponentType.PERCENTILE_ORTHOGONAL_VALUE_LITERAL.equals(dpct)) {
        fsPercentile=dpc.getFormatSpecifier();
      }
    }
    UserDataSetHints udsh=new UserDataSetHints(seOrthogonal.getDataSets());
    udsh.reset();
    double total=0;
    for (int i=0; i < iCount; i++) {
      Object v=dsiOrthogonalValues.next();
      if (v instanceof Number) {
        total+=((Number)v).doubleValue();
      }
 else       if (v instanceof NumberDataElement) {
        total+=((NumberDataElement)v).getValue();
      }
    }
    dsiOrthogonalValues.reset();
    for (int i=0; i < iCount; i++) {
      Object orthValue=dsiOrthogonalValues.next();
      Object percentileValue=null;
      if (total != 0) {
        if (orthValue instanceof Number) {
          percentileValue=new Double(((Number)orthValue).doubleValue() / total);
        }
 else         if (orthValue instanceof NumberDataElement) {
          percentileValue=new Double(((NumberDataElement)orthValue).getValue() / total);
        }
      }
 else {
        percentileValue=new Double(0);
      }
      dpha[i]=new DataPointHints(dsiBaseValues.next(),orthValue,seOrthogonal.getSeriesIdentifier(),percentileValue,seOrthogonal.getDataPoint(),fsBase,fsOrthogonal,fsSeries,fsPercentile,i,null,-1,rtc);
      udsh.next(dpha[i]);
    }
  }
  return new SeriesRenderingHints(this,dpha,dsiBaseValues,dsiOrthogonalValues);
}