Program: 68531
Project: 68531
Buggy source:
public void renderSeries(IPrimitiveRenderer ipr,Plot p,ISeriesRenderingHints isrh) throws ChartException {
  final ChartWithAxes cwa=(ChartWithAxes)getModel();
  if (cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_LITERAL && cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{cwa.getDimension().getName()},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{getClass().getName(),Integer.valueOf(iSeriesIndex + 1),Integer.valueOf(iSeriesCount)},getRunTimeContext().getULocale()));
  BubbleSeries bs=(BubbleSeries)getSeries();
  if (!bs.isVisible()) {
    return;
  }
  final AbstractScriptHandler<?> sh=getRunTimeContext().getScriptHandler();
  final SeriesRenderingHints srh=(SeriesRenderingHints)isrh;
  DataPointHints[] dpha=srh.getDataPoints();
  Location lo;
  LineAttributes lia=bs.getLineAttributes();
  LineAttributes accLia=bs.getAccLineAttributes();
  Orientation accOrientation=bs.getAccOrientation();
  double[] faX=new double[dpha.length];
  double[] faY=new double[dpha.length];
  Integer[] iSize=new Integer[dpha.length];
  double[] dSizePixel=new double[dpha.length];
  SeriesDefinition sd=getSeriesDefinition();
  final EList<Fill> elPalette=sd.getSeriesPalette().getEntries();
  if (elPalette.isEmpty()) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{bs},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  final boolean bPaletteByCategory=isPaletteByCategory();
  if (bPaletteByCategory && bs.eContainer() instanceof SeriesDefinition) {
    sd=(SeriesDefinition)bs.eContainer();
  }
  int iThisSeriesIndex=sd.getRunTimeSeries().indexOf(bs);
  if (iThisSeriesIndex < 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{bs,sd},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  Fill fPaletteEntry=null;
  if (!bPaletteByCategory) {
    fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    updateTranslucency(fPaletteEntry,bs);
  }
  Marker m=null;
  if (bs.getMarkers().size() > 0) {
    m=bs.getMarkers().get(iThisSeriesIndex % bs.getMarkers().size());
  }
  final boolean isCategoryAxis=srh.isCategoryScale();
  final Bounds plotBounds=getPlotBoundsWithMargin();
  double dPointCoefficient=computeBestFit(srh,plotBounds,isCategoryAxis);
  if (dPointCoefficient == 0) {
    restoreClipping(ipr);
    return;
  }
  for (int i=0; i < dpha.length; i++) {
    BubbleEntry be=(BubbleEntry)dpha[i].getOrthogonalValue();
    if (!isValidBubbleEntry(be)) {
      faX[i]=Double.NaN;
      faY[i]=Double.NaN;
      continue;
    }
    double unitSize=dpha[i].getSize();
    lo=dpha[i].getLocation();
    if (cwa.isTransposed()) {
      faX[i]=srh.getLocationOnOrthogonal(be.getValue());
      faY[i]=lo.getY() + (isCategoryAxis ? (unitSize / 2) : 0);
    }
 else {
      faX[i]=lo.getX() + (isCategoryAxis ? (unitSize / 2) : 0);
      faY[i]=srh.getLocationOnOrthogonal(be.getValue());
    }
    dSizePixel[i]=be.getSize() * dPointCoefficient;
    iSize[i]=Integer.valueOf((int)(dSizePixel[i] / getDeviceScale()));
  }
  handleOutsideDataPoints(ipr,srh,faX,faY,false);
  PlotWith2DAxes pwa=(PlotWith2DAxes)getComputations();
  double dAxisMin;
  if (accOrientation == Orientation.HORIZONTAL_LITERAL) {
    OneAxis oaxaBase=pwa.getAxes().getPrimaryBase();
    AutoScale sc=oaxaBase.getScale();
    dAxisMin=sc.getTickCordinates().getStart();
  }
 else {
    OneAxis oaxaBase=pwa.getAxes().getPrimaryOrthogonal();
    AutoScale sc=oaxaBase.getScale();
    dAxisMin=sc.getTickCordinates().getStart();
  }
  if (accLia.isVisible()) {
    Location[] loa=new Location[2];
    for (int i=0; i < dpha.length; i++) {
      if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
        continue;
      }
      LineRenderEvent lre;
      if (accOrientation == Orientation.HORIZONTAL_LITERAL) {
        if (cwa.isTransposed()) {
          loa[0]=goFactory.createLocation(faX[i],dAxisMin);
        }
 else {
          loa[0]=goFactory.createLocation(dAxisMin,faY[i]);
        }
      }
 else {
        if (cwa.isTransposed()) {
          loa[0]=goFactory.createLocation(dAxisMin,faY[i]);
        }
 else {
          loa[0]=goFactory.createLocation(faX[i],dAxisMin);
        }
      }
      loa[1]=goFactory.createLocation(faX[i],faY[i]);
      lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
      lre.setLineAttributes(accLia);
      lre.setStart(loa[0]);
      lre.setEnd(loa[1]);
      ipr.drawLine(lre);
    }
  }
  if (bs.isCurve()) {
    CurveRenderer cr=new CurveRenderer(cwa,this,lia,goFactory.createLocations(faX,faY),false,-1,true,true,fPaletteEntry,bs.isPaletteLineColor(),true);
    cr.draw(ipr);
    renderShadowAsCurve(ipr,lia,srh,goFactory.createLocations(faX,faY),false,-1);
    if (m != null) {
      for (int i=0; i < dpha.length; i++) {
        if (dpha[i].isOutside()) {
          continue;
        }
        if (bPaletteByCategory) {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
        }
 else {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
        }
        updateTranslucency(fPaletteEntry,bs);
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
        renderMarker(bs,ipr,m,goFactory.createLocation(faX[i],faY[i]),bs.getLineAttributes(),fPaletteEntry,dpha[i],iSize[i],true,true);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
      }
    }
  }
 else {
    LineRenderEvent lre;
    final Location positionDelta=(cwa.isTransposed()) ? goFactory.createLocation(-3 * getDeviceScale(),0) : goFactory.createLocation(0,3 * getDeviceScale());
    Location[] loaShadow=null;
    lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
    final ColorDefinition cLineShadow=bs.getShadowColor();
    if (cLineShadow != null && cLineShadow.getTransparency() != goFactory.TRANSPARENT().getTransparency()) {
      for (int i=1; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
          continue;
        }
        int pindex=getPreviousNonNullIndex(i,dpha);
        if (pindex == -1) {
          continue;
        }
        if (loaShadow == null) {
          loaShadow=new Location[2];
          loaShadow[0]=goFactory.createLocation(faX[pindex] + positionDelta.getX(),faY[pindex] + positionDelta.getY());
          loaShadow[1]=goFactory.createLocation(faX[i] + positionDelta.getX(),faY[i] + positionDelta.getY());
        }
 else {
          loaShadow[0].set(faX[pindex] + positionDelta.getX(),faY[pindex] + positionDelta.getY());
          loaShadow[1].set(faX[i] + positionDelta.getX(),faY[i] + positionDelta.getY());
        }
        lre.setStart(loaShadow[0]);
        lre.setEnd(loaShadow[1]);
        LineAttributes liaShadow=goFactory.copyOf(lia);
        liaShadow.setColor(cLineShadow);
        lre.setLineAttributes(liaShadow);
        ipr.drawLine(lre);
      }
    }
    if (lia.isVisible()) {
      Location[] loa=new Location[2];
      for (int i=1; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
          continue;
        }
        int pindex=getPreviousNonNullIndex(i,dpha);
        if (pindex == -1) {
          continue;
        }
        loa[0]=goFactory.createLocation(faX[pindex],faY[pindex]);
        loa[1]=goFactory.createLocation(faX[i],faY[i]);
        lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
        if (bs.isPaletteLineColor()) {
          LineAttributes newLia=goFactory.copyOf(lia);
          newLia.setColor(FillUtil.getColor(fPaletteEntry));
          lre.setLineAttributes(newLia);
        }
 else {
          lre.setLineAttributes(lia);
        }
        lre.setStart(loa[0]);
        lre.setEnd(loa[1]);
        ipr.drawLine(lre);
      }
    }
    if (m != null) {
      for (int i=0; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue()) || dpha[i].isOutside()) {
          continue;
        }
        if (bPaletteByCategory) {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
        }
 else {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
        }
        updateTranslucency(fPaletteEntry,bs);
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
        renderMarker(bs,ipr,m,goFactory.createLocation(faX[i],faY[i]),bs.getLineAttributes(),fPaletteEntry,dpha[i],iSize[i],true,true);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
      }
    }
  }
  Label laDataPoint=null;
  Position pDataPoint=null;
  Location loDataPoint=null;
  try {
    laDataPoint=srh.getLabelAttributes(bs);
    pDataPoint=srh.getLabelPosition(bs);
    loDataPoint=goFactory.createLocation(0,0);
  }
 catch (  Exception ex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,ex);
  }
  if (laDataPoint.isVisible()) {
    for (int i=0; i < dpha.length; i++) {
      if (!isValidBubbleEntry(((BubbleEntry)dpha[i].getOrthogonalValue())) || dpha[i].isOutside()) {
        continue;
      }
      laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());
      final double dSize=dSizePixel[i];
switch (pDataPoint.getValue()) {
case Position.ABOVE:
        loDataPoint.set(faX[i],faY[i] - dSize - p.getVerticalSpacing());
      break;
case Position.BELOW:
    loDataPoint.set(faX[i],faY[i] + dSize + p.getVerticalSpacing());
  break;
case Position.LEFT:
loDataPoint.set(faX[i] - dSize - p.getHorizontalSpacing(),faY[i]);
break;
case Position.RIGHT:
loDataPoint.set(faX[i] + dSize + p.getHorizontalSpacing(),faY[i]);
break;
case Position.INSIDE:
loDataPoint.set(faX[i],faY[i]);
break;
default :
throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{pDataPoint},Messages.getResourceBundle(getRunTimeContext().getULocale()));
}
ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT_LABEL,dpha[i],laDataPoint,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT_LABEL,dpha[i]);
if (laDataPoint.isVisible()) {
renderLabel(StructureSource.createSeries(bs),TextRenderEvent.RENDER_TEXT_AT_LOCATION,laDataPoint,pDataPoint,loDataPoint,null);
}
ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT_LABEL,dpha[i],laDataPoint,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT_LABEL,dpha[i]);
}
}
if (getSeries().getCurveFitting() != null) {
Location[] larray=new Location[faX.length];
for (int i=0; i < larray.length; i++) {
larray[i]=goFactory.createLocation(faX[i],faY[i]);
}
larray=filterNull(larray);
renderFittingCurve(ipr,larray,getSeries().getCurveFitting(),false,true);
}
restoreClipping(ipr);
}

Fixed version (ground truth):
public void renderSeries(IPrimitiveRenderer ipr,Plot p,ISeriesRenderingHints isrh) throws ChartException {
  final ChartWithAxes cwa=(ChartWithAxes)getModel();
  if (cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_LITERAL && cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{cwa.getDimension().getName()},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{getClass().getName(),Integer.valueOf(iSeriesIndex + 1),Integer.valueOf(iSeriesCount)},getRunTimeContext().getULocale()));
  BubbleSeries bs=(BubbleSeries)getSeries();
  if (!bs.isVisible()) {
    restoreClipping(ipr);
    return;
  }
  final AbstractScriptHandler<?> sh=getRunTimeContext().getScriptHandler();
  final SeriesRenderingHints srh=(SeriesRenderingHints)isrh;
  DataPointHints[] dpha=srh.getDataPoints();
  Location lo;
  LineAttributes lia=bs.getLineAttributes();
  LineAttributes accLia=bs.getAccLineAttributes();
  Orientation accOrientation=bs.getAccOrientation();
  double[] faX=new double[dpha.length];
  double[] faY=new double[dpha.length];
  Integer[] iSize=new Integer[dpha.length];
  double[] dSizePixel=new double[dpha.length];
  SeriesDefinition sd=getSeriesDefinition();
  final EList<Fill> elPalette=sd.getSeriesPalette().getEntries();
  if (elPalette.isEmpty()) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{bs},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  final boolean bPaletteByCategory=isPaletteByCategory();
  if (bPaletteByCategory && bs.eContainer() instanceof SeriesDefinition) {
    sd=(SeriesDefinition)bs.eContainer();
  }
  int iThisSeriesIndex=sd.getRunTimeSeries().indexOf(bs);
  if (iThisSeriesIndex < 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{bs,sd},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  Fill fPaletteEntry=null;
  if (!bPaletteByCategory) {
    fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    updateTranslucency(fPaletteEntry,bs);
  }
  Marker m=null;
  if (bs.getMarkers().size() > 0) {
    m=bs.getMarkers().get(iThisSeriesIndex % bs.getMarkers().size());
  }
  final boolean isCategoryAxis=srh.isCategoryScale();
  final Bounds plotBounds=getPlotBoundsWithMargin();
  double dPointCoefficient=computeBestFit(srh,plotBounds,isCategoryAxis);
  if (dPointCoefficient == 0) {
    restoreClipping(ipr);
    return;
  }
  for (int i=0; i < dpha.length; i++) {
    BubbleEntry be=(BubbleEntry)dpha[i].getOrthogonalValue();
    if (!isValidBubbleEntry(be)) {
      faX[i]=Double.NaN;
      faY[i]=Double.NaN;
      continue;
    }
    double unitSize=dpha[i].getSize();
    lo=dpha[i].getLocation();
    if (cwa.isTransposed()) {
      faX[i]=srh.getLocationOnOrthogonal(be.getValue());
      faY[i]=lo.getY() + (isCategoryAxis ? (unitSize / 2) : 0);
    }
 else {
      faX[i]=lo.getX() + (isCategoryAxis ? (unitSize / 2) : 0);
      faY[i]=srh.getLocationOnOrthogonal(be.getValue());
    }
    dSizePixel[i]=be.getSize() * dPointCoefficient;
    iSize[i]=Integer.valueOf((int)(dSizePixel[i] / getDeviceScale()));
  }
  handleOutsideDataPoints(ipr,srh,faX,faY,false);
  PlotWith2DAxes pwa=(PlotWith2DAxes)getComputations();
  double dAxisMin;
  if (accOrientation == Orientation.HORIZONTAL_LITERAL) {
    OneAxis oaxaBase=pwa.getAxes().getPrimaryBase();
    AutoScale sc=oaxaBase.getScale();
    dAxisMin=sc.getTickCordinates().getStart();
  }
 else {
    OneAxis oaxaBase=pwa.getAxes().getPrimaryOrthogonal();
    AutoScale sc=oaxaBase.getScale();
    dAxisMin=sc.getTickCordinates().getStart();
  }
  if (accLia.isVisible()) {
    Location[] loa=new Location[2];
    for (int i=0; i < dpha.length; i++) {
      if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
        continue;
      }
      LineRenderEvent lre;
      if (accOrientation == Orientation.HORIZONTAL_LITERAL) {
        if (cwa.isTransposed()) {
          loa[0]=goFactory.createLocation(faX[i],dAxisMin);
        }
 else {
          loa[0]=goFactory.createLocation(dAxisMin,faY[i]);
        }
      }
 else {
        if (cwa.isTransposed()) {
          loa[0]=goFactory.createLocation(dAxisMin,faY[i]);
        }
 else {
          loa[0]=goFactory.createLocation(faX[i],dAxisMin);
        }
      }
      loa[1]=goFactory.createLocation(faX[i],faY[i]);
      lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
      lre.setLineAttributes(accLia);
      lre.setStart(loa[0]);
      lre.setEnd(loa[1]);
      ipr.drawLine(lre);
    }
  }
  if (bs.isCurve()) {
    CurveRenderer cr=new CurveRenderer(cwa,this,lia,goFactory.createLocations(faX,faY),false,-1,true,true,fPaletteEntry,bs.isPaletteLineColor(),true);
    cr.draw(ipr);
    renderShadowAsCurve(ipr,lia,srh,goFactory.createLocations(faX,faY),false,-1);
    if (m != null) {
      for (int i=0; i < dpha.length; i++) {
        if (dpha[i].isOutside()) {
          continue;
        }
        if (bPaletteByCategory) {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
        }
 else {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
        }
        updateTranslucency(fPaletteEntry,bs);
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
        renderMarker(bs,ipr,m,goFactory.createLocation(faX[i],faY[i]),bs.getLineAttributes(),fPaletteEntry,dpha[i],iSize[i],true,true);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
      }
    }
  }
 else {
    LineRenderEvent lre;
    final Location positionDelta=(cwa.isTransposed()) ? goFactory.createLocation(-3 * getDeviceScale(),0) : goFactory.createLocation(0,3 * getDeviceScale());
    Location[] loaShadow=null;
    lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
    final ColorDefinition cLineShadow=bs.getShadowColor();
    if (cLineShadow != null && cLineShadow.getTransparency() != goFactory.TRANSPARENT().getTransparency()) {
      for (int i=1; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
          continue;
        }
        int pindex=getPreviousNonNullIndex(i,dpha);
        if (pindex == -1) {
          continue;
        }
        if (loaShadow == null) {
          loaShadow=new Location[2];
          loaShadow[0]=goFactory.createLocation(faX[pindex] + positionDelta.getX(),faY[pindex] + positionDelta.getY());
          loaShadow[1]=goFactory.createLocation(faX[i] + positionDelta.getX(),faY[i] + positionDelta.getY());
        }
 else {
          loaShadow[0].set(faX[pindex] + positionDelta.getX(),faY[pindex] + positionDelta.getY());
          loaShadow[1].set(faX[i] + positionDelta.getX(),faY[i] + positionDelta.getY());
        }
        lre.setStart(loaShadow[0]);
        lre.setEnd(loaShadow[1]);
        LineAttributes liaShadow=goFactory.copyOf(lia);
        liaShadow.setColor(cLineShadow);
        lre.setLineAttributes(liaShadow);
        ipr.drawLine(lre);
      }
    }
    if (lia.isVisible()) {
      Location[] loa=new Location[2];
      for (int i=1; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue())) {
          continue;
        }
        int pindex=getPreviousNonNullIndex(i,dpha);
        if (pindex == -1) {
          continue;
        }
        loa[0]=goFactory.createLocation(faX[pindex],faY[pindex]);
        loa[1]=goFactory.createLocation(faX[i],faY[i]);
        lre=((EventObjectCache)ipr).getEventObject(StructureSource.createSeries(bs),LineRenderEvent.class);
        if (bs.isPaletteLineColor()) {
          LineAttributes newLia=goFactory.copyOf(lia);
          newLia.setColor(FillUtil.getColor(fPaletteEntry));
          lre.setLineAttributes(newLia);
        }
 else {
          lre.setLineAttributes(lia);
        }
        lre.setStart(loa[0]);
        lre.setEnd(loa[1]);
        ipr.drawLine(lre);
      }
    }
    if (m != null) {
      for (int i=0; i < dpha.length; i++) {
        if (!isValidBubbleEntry((BubbleEntry)dpha[i].getOrthogonalValue()) || dpha[i].isOutside()) {
          continue;
        }
        if (bPaletteByCategory) {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
        }
 else {
          fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
        }
        updateTranslucency(fPaletteEntry,bs);
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
        renderMarker(bs,ipr,m,goFactory.createLocation(faX[i],faY[i]),bs.getLineAttributes(),fPaletteEntry,dpha[i],iSize[i],true,true);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
      }
    }
  }
  Label laDataPoint=null;
  Position pDataPoint=null;
  Location loDataPoint=null;
  try {
    laDataPoint=srh.getLabelAttributes(bs);
    pDataPoint=srh.getLabelPosition(bs);
    loDataPoint=goFactory.createLocation(0,0);
  }
 catch (  Exception ex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,ex);
  }
  if (laDataPoint.isVisible()) {
    for (int i=0; i < dpha.length; i++) {
      if (!isValidBubbleEntry(((BubbleEntry)dpha[i].getOrthogonalValue())) || dpha[i].isOutside()) {
        continue;
      }
      laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());
      final double dSize=dSizePixel[i];
switch (pDataPoint.getValue()) {
case Position.ABOVE:
        loDataPoint.set(faX[i],faY[i] - dSize - p.getVerticalSpacing());
      break;
case Position.BELOW:
    loDataPoint.set(faX[i],faY[i] + dSize + p.getVerticalSpacing());
  break;
case Position.LEFT:
loDataPoint.set(faX[i] - dSize - p.getHorizontalSpacing(),faY[i]);
break;
case Position.RIGHT:
loDataPoint.set(faX[i] + dSize + p.getHorizontalSpacing(),faY[i]);
break;
case Position.INSIDE:
loDataPoint.set(faX[i],faY[i]);
break;
default :
throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{pDataPoint},Messages.getResourceBundle(getRunTimeContext().getULocale()));
}
ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT_LABEL,dpha[i],laDataPoint,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT_LABEL,dpha[i]);
if (laDataPoint.isVisible()) {
renderLabel(StructureSource.createSeries(bs),TextRenderEvent.RENDER_TEXT_AT_LOCATION,laDataPoint,pDataPoint,loDataPoint,null);
}
ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT_LABEL,dpha[i],laDataPoint,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT_LABEL,dpha[i]);
}
}
if (getSeries().getCurveFitting() != null) {
Location[] larray=new Location[faX.length];
for (int i=0; i < larray.length; i++) {
larray[i]=goFactory.createLocation(faX[i],faY[i]);
}
larray=filterNull(larray);
renderFittingCurve(ipr,larray,getSeries().getCurveFitting(),false,true);
}
restoreClipping(ipr);
}