Program: 67780
Project: 67780
Buggy source:
private void drawCrosshair(IPrimitiveRenderer ipr) throws ChartException {
  if (paletteEntry instanceof Gradient) {
    paletteEntry=((Gradient)paletteEntry).getStartColor();
  }
  if (!(paletteEntry instanceof ColorDefinition)) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{paletteEntry},Messages.getResourceBundle(iRender.getULocale()));
  }
  if (ChartUtil.isColorTransparent((ColorDefinition)paletteEntry)) {
    paletteEntry=goFactory.createColorDefinition(0,0,0,15);
  }
  final ColorDefinition cd=(ColorDefinition)paletteEntry;
  final LineAttributes lia=goFactory.createLineAttributes(goFactory.copyOf(cd),LineStyle.SOLID_LITERAL,la.getThickness());
  final LineRenderEvent lre=((EventObjectCache)ipr).getEventObject(oSource,LineRenderEvent.class);
  final Line3DRenderEvent lre3d=bRendering3D ? (Line3DRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,Line3DRenderEvent.class) : null;
  if (bRendering3D) {
    lre3d.setLineAttributes(lia);
    lre3d.setStart3D(goFactory.createLocation3D(lo3d.getX(),lo3d.getY() - iSize,lo3d.getZ()));
    lre3d.setEnd3D(goFactory.createLocation3D(lo3d.getX(),lo3d.getY() + iSize,lo3d.getZ()));
  }
 else {
    lre.setLineAttributes(lia);
    lre.setStart(goFactory.createLocation(lo.getX(),lo.getY() - iSize));
    lre.setEnd(goFactory.createLocation(lo.getX(),lo.getY() + iSize));
  }
  if (bRendering3D) {
    final Location3D[] loa=new Location3D[4];
    loa[0]=goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY() + iSize - 1,lo3d.getZ());
    loa[1]=goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY() + iSize - 1,lo3d.getZ());
    loa[2]=goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY() - iSize - 1,lo3d.getZ());
    loa[3]=goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY() - iSize - 1,lo3d.getZ());
    final Polygon3DRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,Polygon3DRenderEvent.class);
    pre.setPoints3D(loa);
    pre.setDoubleSided(true);
    preCopy=pre;
  }
 else {
    final Location[] loa=new Location[4];
    loa[0]=goFactory.createLocation(lo.getX() - iSize,lo.getY() + iSize);
    loa[1]=goFactory.createLocation(lo.getX() + iSize,lo.getY() + iSize);
    loa[2]=goFactory.createLocation(lo.getX() + iSize,lo.getY() - iSize);
    loa[3]=goFactory.createLocation(lo.getX() - iSize,lo.getY() - iSize);
    final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,PolygonRenderEvent.class);
    pre.setPoints(loa);
    preCopy=pre;
  }
  if (bRendering3D) {
    dc.addLine(lre3d);
    lre3d.setLineAttributes(lia);
    lre3d.setStart3D(goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY(),lo3d.getZ()));
    lre3d.setEnd3D(goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY(),lo3d.getZ()));
    dc.addLine(lre3d);
  }
 else {
    if (bDeferred) {
      dc.addMarker(lre,PrimitiveRenderEvent.DRAW,iSize);
    }
 else {
      ipr.drawLine(lre);
    }
    lre.setLineAttributes(lia);
    lre.setStart(goFactory.createLocation(lo.getX() - iSize,lo.getY()));
    lre.setEnd(goFactory.createLocation(lo.getX() + iSize,lo.getY()));
    if (bDeferred) {
      dc.addMarker(lre,PrimitiveRenderEvent.DRAW,iSize);
    }
 else {
      ipr.drawLine(lre);
    }
  }
}

Fixed version (ground truth):
private void drawCrosshair(IPrimitiveRenderer ipr) throws ChartException {
  paletteEntry=FillUtil.getColor(paletteEntry);
  if (ChartUtil.isColorTransparent((ColorDefinition)paletteEntry)) {
    paletteEntry=goFactory.createColorDefinition(0,0,0,15);
  }
  final ColorDefinition cd=(ColorDefinition)paletteEntry;
  final LineAttributes lia=goFactory.createLineAttributes(goFactory.copyOf(cd),LineStyle.SOLID_LITERAL,la.getThickness());
  final LineRenderEvent lre=((EventObjectCache)ipr).getEventObject(oSource,LineRenderEvent.class);
  final Line3DRenderEvent lre3d=bRendering3D ? (Line3DRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,Line3DRenderEvent.class) : null;
  if (bRendering3D) {
    lre3d.setLineAttributes(lia);
    lre3d.setStart3D(goFactory.createLocation3D(lo3d.getX(),lo3d.getY() - iSize,lo3d.getZ()));
    lre3d.setEnd3D(goFactory.createLocation3D(lo3d.getX(),lo3d.getY() + iSize,lo3d.getZ()));
  }
 else {
    lre.setLineAttributes(lia);
    lre.setStart(goFactory.createLocation(lo.getX(),lo.getY() - iSize));
    lre.setEnd(goFactory.createLocation(lo.getX(),lo.getY() + iSize));
  }
  if (bRendering3D) {
    final Location3D[] loa=new Location3D[4];
    loa[0]=goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY() + iSize - 1,lo3d.getZ());
    loa[1]=goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY() + iSize - 1,lo3d.getZ());
    loa[2]=goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY() - iSize - 1,lo3d.getZ());
    loa[3]=goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY() - iSize - 1,lo3d.getZ());
    final Polygon3DRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,Polygon3DRenderEvent.class);
    pre.setPoints3D(loa);
    pre.setDoubleSided(true);
    preCopy=pre;
  }
 else {
    final Location[] loa=new Location[4];
    loa[0]=goFactory.createLocation(lo.getX() - iSize,lo.getY() + iSize);
    loa[1]=goFactory.createLocation(lo.getX() + iSize,lo.getY() + iSize);
    loa[2]=goFactory.createLocation(lo.getX() + iSize,lo.getY() - iSize);
    loa[3]=goFactory.createLocation(lo.getX() - iSize,lo.getY() - iSize);
    final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,PolygonRenderEvent.class);
    pre.setPoints(loa);
    preCopy=pre;
  }
  if (bRendering3D) {
    dc.addLine(lre3d);
    lre3d.setLineAttributes(lia);
    lre3d.setStart3D(goFactory.createLocation3D(lo3d.getX() - iSize,lo3d.getY(),lo3d.getZ()));
    lre3d.setEnd3D(goFactory.createLocation3D(lo3d.getX() + iSize,lo3d.getY(),lo3d.getZ()));
    dc.addLine(lre3d);
  }
 else {
    if (bDeferred) {
      dc.addMarker(lre,PrimitiveRenderEvent.DRAW,iSize);
    }
 else {
      ipr.drawLine(lre);
    }
    lre.setLineAttributes(lia);
    lre.setStart(goFactory.createLocation(lo.getX() - iSize,lo.getY()));
    lre.setEnd(goFactory.createLocation(lo.getX() + iSize,lo.getY()));
    if (bDeferred) {
      dc.addMarker(lre,PrimitiveRenderEvent.DRAW,iSize);
    }
 else {
      ipr.drawLine(lre);
    }
  }
}