Program: 68533
Project: 68533
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) {
    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()));
  final GanttSeries gs=(GanttSeries)getSeries();
  if (!gs.isVisible()) {
    return;
  }
  final SeriesRenderingHints srh=(SeriesRenderingHints)isrh;
  final AbstractScriptHandler<?> sh=getRunTimeContext().getScriptHandler();
  final DataPointHints[] dpha=srh.getDataPoints();
  final LineAttributes lia=goFactory.copyOf(gs.getConnectionLine());
  final LineAttributes outlinelia=gs.getOutline();
  final int iLineWidth=lia.getThickness();
  final Marker mStart=gs.getStartMarker();
  final Marker mEnd=gs.getEndMarker();
  final boolean bTransposed=isTransposed();
  float[] faX=new float[dpha.length];
  float[][] faY=new float[dpha.length][2];
  Location lo;
  Location loStart=null, loEnd=null;
  Location[] loaLine=null;
  LineRenderEvent lre;
  PolygonRenderEvent pre;
  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[]{gs},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  final boolean bPaletteByCategory=isPaletteByCategory();
  if (bPaletteByCategory && gs.eContainer() instanceof SeriesDefinition) {
    sd=(SeriesDefinition)gs.eContainer();
  }
  int iThisSeriesIndex=sd.getRunTimeSeries().indexOf(gs);
  if (iThisSeriesIndex < 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{gs,sd},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  Fill fPaletteEntry=null;
  if (!bPaletteByCategory) {
    fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    updateTranslucency(fPaletteEntry,gs);
  }
  Fill fLineFill;
  if (gs.isPaletteLineColor()) {
    fLineFill=fPaletteEntry;
    lia.setColor(FillUtil.getColor(fPaletteEntry));
  }
 else {
    Fill outlineFill=gs.getOutlineFill();
    fLineFill=lia.getColor() == null ? outlineFill : lia.getColor();
    if (outlineFill != null) {
      lia.setColor(FillUtil.getColor(outlineFill));
    }
  }
  renderClipping(ipr,getPlotBounds());
  final AutoScale scale=getInternalOrthogonalAxis().getScale();
  for (int i=0; i < dpha.length; i++) {
    GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
    if (!isValidGanttEntry(ge)) {
      continue;
    }
    if (checkEntryInRange(se,scale.getMinimum(),scale.getMaximum()) > 0) {
      dpha[i].markOutside();
    }
    CDateTime geStart=ge.getStart();
    CDateTime geEnd=ge.getEnd();
    double dX=0, dY=0;
    double dStart=0, dEnd=0;
    lo=dpha[i].getLocation();
    dX=(int)lo.getX();
    dY=(int)lo.getY();
    if (srh.isCategoryScale()) {
      double fSize=dpha[i].getSize();
      if (bTransposed) {
        dY+=fSize / 2;
      }
 else {
        dX+=fSize / 2;
      }
    }
    if (geStart != null) {
      dStart=srh.getLocationOnOrthogonal(geStart);
    }
    if (geEnd != null) {
      dEnd=srh.getLocationOnOrthogonal(geEnd);
    }
 else {
      dEnd=dStart;
    }
    if (geStart == null) {
      dStart=dEnd;
    }
    if (loStart == null) {
      loStart=goFactory.createLocation(0,0);
      loEnd=goFactory.createLocation(0,0);
    }
    if (cwa.isTransposed()) {
      loStart.set(dStart,dY);
      loEnd.set(dEnd,dY);
      faX[i]=(float)dY;
      faY[i][0]=(float)dStart;
      faY[i][1]=(float)dEnd;
      loaLine=new Location[4];
      loaLine[0]=goFactory.createLocation(dStart,dY + iLineWidth / 2.0);
      loaLine[1]=goFactory.createLocation(dStart,dY - iLineWidth / 2.0);
      loaLine[2]=goFactory.createLocation(dEnd,dY - iLineWidth / 2.0);
      loaLine[3]=goFactory.createLocation(dEnd,dY + iLineWidth / 2.0);
    }
 else {
      loStart.set(dX,dStart);
      loEnd.set(dX,dEnd);
      faX[i]=(float)dX;
      faY[i][0]=(float)dStart;
      faY[i][1]=(float)dEnd;
      loaLine=new Location[4];
      loaLine[0]=goFactory.createLocation(dX + iLineWidth / 2.0,dStart);
      loaLine[1]=goFactory.createLocation(dX - iLineWidth / 2.0,dStart);
      loaLine[2]=goFactory.createLocation(dX - iLineWidth / 2.0,dEnd);
      loaLine[3]=goFactory.createLocation(dX + iLineWidth / 2.0,dEnd);
    }
    if (bPaletteByCategory) {
      fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
    }
 else {
      fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    }
    updateTranslucency(fPaletteEntry,gs);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
    if (lia.isVisible() && geStart != null && geEnd != null) {
      if (gs.isPaletteLineColor()) {
        fLineFill=fPaletteEntry;
        lia.setColor(FillUtil.getColor(fPaletteEntry));
      }
      if ((iLineWidth == 1) || (lia.getStyle() != LineStyle.SOLID_LITERAL)) {
        lre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),LineRenderEvent.class);
        lre.setLineAttributes(lia);
        lre.setStart(loStart);
        lre.setEnd(loEnd);
        ipr.drawLine(lre);
        renderInteractivity(ipr,dpha[i],lre);
      }
 else {
        pre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),PolygonRenderEvent.class);
        pre.setPoints(loaLine);
        pre.setBackground(fLineFill);
        ipr.fillPolygon(pre);
        renderInteractivity(ipr,dpha[i],pre);
      }
    }
    if (outlinelia.isVisible() && geStart != null && geEnd != null) {
      pre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),PolygonRenderEvent.class);
      pre.setPoints(loaLine);
      pre.setOutline(outlinelia);
      ipr.drawPolygon(pre);
    }
    if (geStart != null && mStart.isVisible() || dpha[i].isOutside()) {
      Location loStartMarker=loStart.copyInstance();
      Position mStartPosition=transposePosition(gs.getStartMarkerPosition());
switch (mStartPosition.getValue()) {
case Position.ABOVE:
        if (bTransposed) {
          loStartMarker.set(loStart.getX(),loStart.getY() - mStart.getSize());
        }
      break;
case Position.BELOW:
    if (bTransposed) {
      loStartMarker.set(loStart.getX(),loStart.getY() + mStart.getSize());
    }
  break;
}
Fill startFill=fPaletteEntry;
if (fPaletteEntry instanceof MultipleFill && ((MultipleFill)fPaletteEntry).getFills().size() > 0) {
startFill=((MultipleFill)fPaletteEntry).getFills().get(0);
}
renderMarker(gs,ipr,mStart,loStartMarker,outlinelia,startFill,dpha[i],null,true,false);
}
if (geEnd != null && mEnd.isVisible() || dpha[i].isOutside()) {
Location loEndMarker=loEnd.copyInstance();
Position mEndPosition=transposePosition(gs.getEndMarkerPosition());
switch (mEndPosition.getValue()) {
case Position.ABOVE:
if (bTransposed) {
  loEndMarker.set(loEnd.getX(),loEnd.getY() - mEnd.getSize());
}
break;
case Position.BELOW:
if (bTransposed) {
loEndMarker.set(loEnd.getX(),loEnd.getY() + mEnd.getSize());
}
break;
}
Fill endFill=fPaletteEntry;
if (fPaletteEntry instanceof MultipleFill && ((MultipleFill)fPaletteEntry).getFills().size() > 1) {
endFill=((MultipleFill)fPaletteEntry).getFills().get(1);
}
renderMarker(gs,ipr,mEnd,loEndMarker,outlinelia,endFill,dpha[i],null,true,false);
}
ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
}
Label laDataPoint=srh.getLabelAttributes(gs);
if (laDataPoint.isVisible()) {
Position pDataPoint=srh.getLabelPosition(gs);
Location loDataPoint=goFactory.createLocation(0,0);
final boolean useDecorationLabel=gs.isUseDecorationLabelValue();
final double dLabelGap=Math.max(Math.max(mStart.isVisible() ? mStart.getSize() : 0,mEnd.isVisible() ? mEnd.getSize() : 0),(lia.isVisible() ? iLineWidth / 2 : 0) + (outlinelia.isVisible() ? outlinelia.getThickness() : 0));
for (int i=0; i < dpha.length; i++) {
GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
if (ge == null || ge.getStart() == null || ge.getEnd() == null) {
continue;
}
if (!isValidGanttEntry(ge) || dpha[i].isOutside()) {
continue;
}
if (useDecorationLabel) {
laDataPoint.getCaption().setValue(ge.getLabel());
}
 else {
laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());
}
switch (pDataPoint.getValue()) {
case Position.ABOVE:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],faY[i][1] - mEnd.getSize() - p.getVerticalSpacing());
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i] - dLabelGap - p.getVerticalSpacing());
}
break;
case Position.BELOW:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],faY[i][0] + mStart.getSize() + p.getVerticalSpacing());
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i] + dLabelGap + p.getVerticalSpacing());
}
break;
case Position.LEFT:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i] - dLabelGap - p.getHorizontalSpacing(),(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set(faY[i][0] - dLabelGap - p.getHorizontalSpacing(),faX[i]);
}
break;
case Position.RIGHT:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i] + dLabelGap + p.getHorizontalSpacing(),(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set(faY[i][1] + dLabelGap + p.getHorizontalSpacing(),faX[i]);
}
break;
case Position.INSIDE:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i]);
}
break;
default :
throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{pDataPoint.getName()},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,laDataPoint);
if (laDataPoint.isVisible()) {
renderLabel(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),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,laDataPoint);
}
}
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) {
    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()));
  final GanttSeries gs=(GanttSeries)getSeries();
  if (!gs.isVisible()) {
    restoreClipping(ipr);
    return;
  }
  final SeriesRenderingHints srh=(SeriesRenderingHints)isrh;
  final AbstractScriptHandler<?> sh=getRunTimeContext().getScriptHandler();
  final DataPointHints[] dpha=srh.getDataPoints();
  final LineAttributes lia=goFactory.copyOf(gs.getConnectionLine());
  final LineAttributes outlinelia=gs.getOutline();
  final int iLineWidth=lia.getThickness();
  final Marker mStart=gs.getStartMarker();
  final Marker mEnd=gs.getEndMarker();
  final boolean bTransposed=isTransposed();
  float[] faX=new float[dpha.length];
  float[][] faY=new float[dpha.length][2];
  Location lo;
  Location loStart=null, loEnd=null;
  Location[] loaLine=null;
  LineRenderEvent lre;
  PolygonRenderEvent pre;
  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[]{gs},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  final boolean bPaletteByCategory=isPaletteByCategory();
  if (bPaletteByCategory && gs.eContainer() instanceof SeriesDefinition) {
    sd=(SeriesDefinition)gs.eContainer();
  }
  int iThisSeriesIndex=sd.getRunTimeSeries().indexOf(gs);
  if (iThisSeriesIndex < 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{gs,sd},Messages.getResourceBundle(getRunTimeContext().getULocale()));
  }
  Fill fPaletteEntry=null;
  if (!bPaletteByCategory) {
    fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    updateTranslucency(fPaletteEntry,gs);
  }
  Fill fLineFill;
  if (gs.isPaletteLineColor()) {
    fLineFill=fPaletteEntry;
    lia.setColor(FillUtil.getColor(fPaletteEntry));
  }
 else {
    Fill outlineFill=gs.getOutlineFill();
    fLineFill=lia.getColor() == null ? outlineFill : lia.getColor();
    if (outlineFill != null) {
      lia.setColor(FillUtil.getColor(outlineFill));
    }
  }
  renderClipping(ipr,getPlotBounds());
  final AutoScale scale=getInternalOrthogonalAxis().getScale();
  for (int i=0; i < dpha.length; i++) {
    GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
    if (!isValidGanttEntry(ge)) {
      continue;
    }
    if (checkEntryInRange(se,scale.getMinimum(),scale.getMaximum()) > 0) {
      dpha[i].markOutside();
    }
    CDateTime geStart=ge.getStart();
    CDateTime geEnd=ge.getEnd();
    double dX=0, dY=0;
    double dStart=0, dEnd=0;
    lo=dpha[i].getLocation();
    dX=(int)lo.getX();
    dY=(int)lo.getY();
    if (srh.isCategoryScale()) {
      double fSize=dpha[i].getSize();
      if (bTransposed) {
        dY+=fSize / 2;
      }
 else {
        dX+=fSize / 2;
      }
    }
    if (geStart != null) {
      dStart=srh.getLocationOnOrthogonal(geStart);
    }
    if (geEnd != null) {
      dEnd=srh.getLocationOnOrthogonal(geEnd);
    }
 else {
      dEnd=dStart;
    }
    if (geStart == null) {
      dStart=dEnd;
    }
    if (loStart == null) {
      loStart=goFactory.createLocation(0,0);
      loEnd=goFactory.createLocation(0,0);
    }
    if (cwa.isTransposed()) {
      loStart.set(dStart,dY);
      loEnd.set(dEnd,dY);
      faX[i]=(float)dY;
      faY[i][0]=(float)dStart;
      faY[i][1]=(float)dEnd;
      loaLine=new Location[4];
      loaLine[0]=goFactory.createLocation(dStart,dY + iLineWidth / 2.0);
      loaLine[1]=goFactory.createLocation(dStart,dY - iLineWidth / 2.0);
      loaLine[2]=goFactory.createLocation(dEnd,dY - iLineWidth / 2.0);
      loaLine[3]=goFactory.createLocation(dEnd,dY + iLineWidth / 2.0);
    }
 else {
      loStart.set(dX,dStart);
      loEnd.set(dX,dEnd);
      faX[i]=(float)dX;
      faY[i][0]=(float)dStart;
      faY[i][1]=(float)dEnd;
      loaLine=new Location[4];
      loaLine[0]=goFactory.createLocation(dX + iLineWidth / 2.0,dStart);
      loaLine[1]=goFactory.createLocation(dX - iLineWidth / 2.0,dStart);
      loaLine[2]=goFactory.createLocation(dX - iLineWidth / 2.0,dEnd);
      loaLine[3]=goFactory.createLocation(dX + iLineWidth / 2.0,dEnd);
    }
    if (bPaletteByCategory) {
      fPaletteEntry=FillUtil.getPaletteFill(elPalette,i);
    }
 else {
      fPaletteEntry=FillUtil.getPaletteFill(elPalette,iThisSeriesIndex);
    }
    updateTranslucency(fPaletteEntry,gs);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT,dpha[i]);
    if (lia.isVisible() && geStart != null && geEnd != null) {
      if (gs.isPaletteLineColor()) {
        fLineFill=fPaletteEntry;
        lia.setColor(FillUtil.getColor(fPaletteEntry));
      }
      if ((iLineWidth == 1) || (lia.getStyle() != LineStyle.SOLID_LITERAL)) {
        lre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),LineRenderEvent.class);
        lre.setLineAttributes(lia);
        lre.setStart(loStart);
        lre.setEnd(loEnd);
        ipr.drawLine(lre);
        renderInteractivity(ipr,dpha[i],lre);
      }
 else {
        pre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),PolygonRenderEvent.class);
        pre.setPoints(loaLine);
        pre.setBackground(fLineFill);
        ipr.fillPolygon(pre);
        renderInteractivity(ipr,dpha[i],pre);
      }
    }
    if (outlinelia.isVisible() && geStart != null && geEnd != null) {
      pre=((EventObjectCache)ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),PolygonRenderEvent.class);
      pre.setPoints(loaLine);
      pre.setOutline(outlinelia);
      ipr.drawPolygon(pre);
    }
    if (geStart != null && mStart.isVisible() || dpha[i].isOutside()) {
      Location loStartMarker=loStart.copyInstance();
      Position mStartPosition=transposePosition(gs.getStartMarkerPosition());
switch (mStartPosition.getValue()) {
case Position.ABOVE:
        if (bTransposed) {
          loStartMarker.set(loStart.getX(),loStart.getY() - mStart.getSize());
        }
      break;
case Position.BELOW:
    if (bTransposed) {
      loStartMarker.set(loStart.getX(),loStart.getY() + mStart.getSize());
    }
  break;
}
Fill startFill=fPaletteEntry;
if (fPaletteEntry instanceof MultipleFill && ((MultipleFill)fPaletteEntry).getFills().size() > 0) {
startFill=((MultipleFill)fPaletteEntry).getFills().get(0);
}
renderMarker(gs,ipr,mStart,loStartMarker,outlinelia,startFill,dpha[i],null,true,false);
}
if (geEnd != null && mEnd.isVisible() || dpha[i].isOutside()) {
Location loEndMarker=loEnd.copyInstance();
Position mEndPosition=transposePosition(gs.getEndMarkerPosition());
switch (mEndPosition.getValue()) {
case Position.ABOVE:
if (bTransposed) {
  loEndMarker.set(loEnd.getX(),loEnd.getY() - mEnd.getSize());
}
break;
case Position.BELOW:
if (bTransposed) {
loEndMarker.set(loEnd.getX(),loEnd.getY() + mEnd.getSize());
}
break;
}
Fill endFill=fPaletteEntry;
if (fPaletteEntry instanceof MultipleFill && ((MultipleFill)fPaletteEntry).getFills().size() > 1) {
endFill=((MultipleFill)fPaletteEntry).getFills().get(1);
}
renderMarker(gs,ipr,mEnd,loEndMarker,outlinelia,endFill,dpha[i],null,true,false);
}
ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_DATA_POINT,dpha[i],fPaletteEntry,getRunTimeContext().getScriptContext());
getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT,dpha[i]);
}
Label laDataPoint=srh.getLabelAttributes(gs);
if (laDataPoint.isVisible()) {
Position pDataPoint=srh.getLabelPosition(gs);
Location loDataPoint=goFactory.createLocation(0,0);
final boolean useDecorationLabel=gs.isUseDecorationLabelValue();
final double dLabelGap=Math.max(Math.max(mStart.isVisible() ? mStart.getSize() : 0,mEnd.isVisible() ? mEnd.getSize() : 0),(lia.isVisible() ? iLineWidth / 2 : 0) + (outlinelia.isVisible() ? outlinelia.getThickness() : 0));
for (int i=0; i < dpha.length; i++) {
GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
if (ge == null || ge.getStart() == null || ge.getEnd() == null) {
continue;
}
if (!isValidGanttEntry(ge) || dpha[i].isOutside()) {
continue;
}
if (useDecorationLabel) {
laDataPoint.getCaption().setValue(ge.getLabel());
}
 else {
laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());
}
switch (pDataPoint.getValue()) {
case Position.ABOVE:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],faY[i][1] - mEnd.getSize() - p.getVerticalSpacing());
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i] - dLabelGap - p.getVerticalSpacing());
}
break;
case Position.BELOW:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],faY[i][0] + mStart.getSize() + p.getVerticalSpacing());
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i] + dLabelGap + p.getVerticalSpacing());
}
break;
case Position.LEFT:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i] - dLabelGap - p.getHorizontalSpacing(),(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set(faY[i][0] - dLabelGap - p.getHorizontalSpacing(),faX[i]);
}
break;
case Position.RIGHT:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i] + dLabelGap + p.getHorizontalSpacing(),(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set(faY[i][1] + dLabelGap + p.getHorizontalSpacing(),faX[i]);
}
break;
case Position.INSIDE:
if (!cwa.isTransposed()) {
loDataPoint.set(faX[i],(faY[i][0] + faY[i][1]) / 2);
}
 else {
loDataPoint.set((faY[i][0] + faY[i][1]) / 2,faX[i]);
}
break;
default :
throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{pDataPoint.getName()},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,laDataPoint);
if (laDataPoint.isVisible()) {
renderLabel(WrappedStructureSource.createSeriesDataPoint(gs,dpha[i]),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,laDataPoint);
}
}
restoreClipping(ipr);
}