Program: 66247
Project: 66247
Buggy source:
/** 
 * @param ipr
 * @param oSource
 * @param dpha
 * @param loaFront
 * @param f
 * @param lia
 * @param cd
 * @param dSeriesThickness
 * @param bOffset
 * @param bTransposed
 * @param bDeferred
 * @param bInverted true: downward, false: upward
 * @param bIsStacked
 * @throws ChartException
 */
private void renderRiserCone2D(IPrimitiveRenderer ipr,Object oSource,DataPointHints dpha,Location[] loaFront,Fill f,LineAttributes lia,ChartDimension cd,double dSeriesThickness,boolean bOffset,boolean bTransposed,boolean bDeferred,boolean bInverted,boolean bIsStacked,double ovalHeight,int zorder_hint) throws ChartException {
  ArrayList alModel=new ArrayList();
  if (!isDimension3D()) {
    f=FillUtil.convertFillToGradient(f,bTransposed);
  }
 else {
    f=FillUtil.convertFillToGradient3D(f,bTransposed);
  }
  PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,PolygonRenderEvent.class);
  LineRenderEvent lre=((EventObjectCache)ipr).getEventObject(oSource,LineRenderEvent.class);
  ArcRenderEvent are=((EventObjectCache)ipr).getEventObject(oSource,ArcRenderEvent.class);
  double dBottomWidth=0d;
  if (bIsStacked) {
    dBottomWidth=bTransposed ? loaFront[0].getY() - loaFront[3].getY() : loaFront[3].getX() - loaFront[0].getX();
  }
 else {
    dBottomWidth=bTransposed ? loaFront[2].getY() - loaFront[0].getY() : loaFront[2].getX() - loaFront[0].getX();
  }
  double dTopWidth=0d;
  if (bIsStacked) {
    dTopWidth=bTransposed ? loaFront[1].getY() - loaFront[2].getY() : loaFront[2].getX() - loaFront[1].getX();
  }
 else {
    dTopWidth=Double.NaN;
  }
  if (bOffset) {
    for (int i=0; i < loaFront.length; i++) {
      if (bTransposed) {
        loaFront[i].setX(loaFront[i].getX() + dSeriesThickness);
      }
 else {
        loaFront[i].setY(loaFront[i].getY() - dSeriesThickness);
      }
    }
  }
  LineAttributes liaBorder=goFactory.copyOf(lia);
  if (liaBorder.getColor() == null) {
    liaBorder.setColor(FillUtil.getDarkerColor(f));
  }
  Bounds bottomBounds;
  if (bTransposed) {
    if (bIsStacked) {
      bottomBounds=goFactory.createBounds(loaFront[3].getX() - ovalHeight,loaFront[3].getY() + dBottomWidth,ovalHeight * 2,Math.abs(dBottomWidth));
    }
 else {
      bottomBounds=goFactory.createBounds(loaFront[0].getX() - ovalHeight,loaFront[0].getY() + dBottomWidth,ovalHeight * 2,Math.abs(dBottomWidth));
    }
  }
 else {
    bottomBounds=goFactory.createBounds(loaFront[0].getX(),loaFront[0].getY() - ovalHeight,dBottomWidth,ovalHeight * 2);
  }
  Bounds topBounds;
  double topHeight=ovalHeight * dTopWidth / dBottomWidth;
  if (bTransposed) {
    if (bIsStacked) {
      topBounds=goFactory.createBounds(loaFront[2].getX() - topHeight,loaFront[2].getY() + dTopWidth,topHeight * 2,Math.abs(dTopWidth));
    }
 else {
      topBounds=null;
    }
  }
 else {
    topBounds=goFactory.createBounds(loaFront[1].getX(),loaFront[1].getY() - topHeight,dTopWidth,topHeight * 2);
  }
  if (!bTransposed) {
    if (bInverted) {
      Bounds tmpBounds=topBounds;
      topBounds=bottomBounds;
      bottomBounds=tmpBounds;
    }
  }
 else {
    if (!bInverted) {
      Bounds tmpBounds=topBounds;
      topBounds=bottomBounds;
      bottomBounds=tmpBounds;
    }
  }
  if (bottomBounds != null) {
    are.setOutline(liaBorder);
    are.setBounds(bottomBounds);
    are.setBackground(f);
    are.setAngleExtent(360);
    are.setStyle(ArcRenderEvent.OPEN);
    if (bTransposed) {
      are.setStartAngle(90);
    }
 else {
      are.setStartAngle(180);
    }
    if (bDeferred) {
      alModel.add(are.copy());
    }
 else {
      ipr.drawArc(are);
      ipr.fillArc(are);
    }
  }
  pre.setPoints(loaFront);
  pre.setBackground(f);
  pre.setOutline(null);
  if (bDeferred) {
    alModel.add(pre.copy());
  }
 else {
    ipr.fillPolygon(pre);
  }
  lre.setLineAttributes(liaBorder);
  lre.setStart(loaFront[0]);
  lre.setEnd(loaFront[1]);
  if (bDeferred) {
    alModel.add(lre.copy());
  }
 else {
    ipr.drawLine(lre);
  }
  lre.setLineAttributes(liaBorder);
  if (bIsStacked) {
    lre.setStart(loaFront[3]);
    lre.setEnd(loaFront[2]);
  }
 else {
    lre.setStart(loaFront[2]);
    lre.setEnd(loaFront[1]);
  }
  if (bDeferred) {
    alModel.add(lre.copy());
  }
 else {
    ipr.drawLine(lre);
  }
  if (topBounds != null) {
    are.setOutline(liaBorder);
    are.setBounds(topBounds);
    are.setBackground(f);
    are.setAngleExtent(360);
    are.setStyle(ArcRenderEvent.OPEN);
    if (bTransposed) {
      are.setStartAngle(90);
    }
 else {
      are.setStartAngle(180);
    }
    if (bDeferred) {
      alModel.add(are.copy());
    }
 else {
      ipr.drawArc(are);
      ipr.fillArc(are);
    }
  }
  renderInteractivity(ipr,dpha,are);
  if (!alModel.isEmpty()) {
    dc.addModel(new WrappedInstruction(getDeferredCache(),alModel,PrimitiveRenderEvent.FILL | PrimitiveRenderEvent.DRAW,zorder_hint));
  }
}

Fixed version (ground truth):
/** 
 * @param ipr
 * @param oSource
 * @param dpha
 * @param loaFront
 * @param f
 * @param lia
 * @param cd
 * @param dSeriesThickness
 * @param bOffset
 * @param bTransposed
 * @param bDeferred
 * @param bInverted true: downward, false: upward
 * @param bIsStacked
 * @param compareBounds this bounds is used to adjust the order of polygon, if this bound isn't null, chart will use this bounds instead of actual bounds of polygon for order.
 * @throws ChartException
 */
private void renderRiserCone2D(IPrimitiveRenderer ipr,Object oSource,DataPointHints dpha,Location[] loaFront,Fill f,LineAttributes lia,ChartDimension cd,double dSeriesThickness,boolean bOffset,boolean bTransposed,boolean bDeferred,boolean bInverted,boolean bIsStacked,double ovalHeight,int zorder_hint,Bounds compareBounds) throws ChartException {
  ArrayList alModel=new ArrayList();
  if (!isDimension3D()) {
    f=FillUtil.convertFillToGradient(f,bTransposed);
  }
 else {
    f=FillUtil.convertFillToGradient3D(f,bTransposed);
  }
  PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(oSource,PolygonRenderEvent.class);
  LineRenderEvent lre=((EventObjectCache)ipr).getEventObject(oSource,LineRenderEvent.class);
  ArcRenderEvent are=((EventObjectCache)ipr).getEventObject(oSource,ArcRenderEvent.class);
  double dBottomWidth=0d;
  if (bIsStacked) {
    dBottomWidth=bTransposed ? loaFront[0].getY() - loaFront[3].getY() : loaFront[3].getX() - loaFront[0].getX();
  }
 else {
    dBottomWidth=bTransposed ? loaFront[2].getY() - loaFront[0].getY() : loaFront[2].getX() - loaFront[0].getX();
  }
  double dTopWidth=0d;
  if (bIsStacked) {
    dTopWidth=bTransposed ? loaFront[1].getY() - loaFront[2].getY() : loaFront[2].getX() - loaFront[1].getX();
  }
 else {
    dTopWidth=Double.NaN;
  }
  if (bOffset) {
    for (int i=0; i < loaFront.length; i++) {
      if (bTransposed) {
        loaFront[i].setX(loaFront[i].getX() + dSeriesThickness);
      }
 else {
        loaFront[i].setY(loaFront[i].getY() - dSeriesThickness);
      }
    }
  }
  LineAttributes liaBorder=goFactory.copyOf(lia);
  if (liaBorder.getColor() == null) {
    liaBorder.setColor(FillUtil.getDarkerColor(f));
  }
  Bounds bottomBounds;
  if (bTransposed) {
    if (bIsStacked) {
      bottomBounds=goFactory.createBounds(loaFront[3].getX() - ovalHeight,loaFront[3].getY() + dBottomWidth,ovalHeight * 2,Math.abs(dBottomWidth));
    }
 else {
      bottomBounds=goFactory.createBounds(loaFront[0].getX() - ovalHeight,loaFront[0].getY() + dBottomWidth,ovalHeight * 2,Math.abs(dBottomWidth));
    }
  }
 else {
    bottomBounds=goFactory.createBounds(loaFront[0].getX(),loaFront[0].getY() - ovalHeight,dBottomWidth,ovalHeight * 2);
  }
  Bounds topBounds;
  double topHeight=ovalHeight * dTopWidth / dBottomWidth;
  if (bTransposed) {
    if (bIsStacked) {
      topBounds=goFactory.createBounds(loaFront[2].getX() - topHeight,loaFront[2].getY() + dTopWidth,topHeight * 2,Math.abs(dTopWidth));
    }
 else {
      topBounds=null;
    }
  }
 else {
    topBounds=goFactory.createBounds(loaFront[1].getX(),loaFront[1].getY() - topHeight,dTopWidth,topHeight * 2);
  }
  if (!bTransposed) {
    if (bInverted) {
      Bounds tmpBounds=topBounds;
      topBounds=bottomBounds;
      bottomBounds=tmpBounds;
    }
  }
 else {
    if (!bInverted) {
      Bounds tmpBounds=topBounds;
      topBounds=bottomBounds;
      bottomBounds=tmpBounds;
    }
  }
  if (bottomBounds != null) {
    are.setOutline(liaBorder);
    are.setBounds(bottomBounds);
    are.setBackground(f);
    are.setAngleExtent(360);
    are.setStyle(ArcRenderEvent.OPEN);
    if (bTransposed) {
      are.setStartAngle(90);
    }
 else {
      are.setStartAngle(180);
    }
    if (bDeferred) {
      alModel.add(are.copy());
    }
 else {
      ipr.drawArc(are);
      ipr.fillArc(are);
    }
  }
  pre.setPoints(loaFront);
  pre.setBackground(f);
  pre.setOutline(null);
  if (bDeferred) {
    alModel.add(pre.copy());
  }
 else {
    ipr.fillPolygon(pre);
  }
  lre.setLineAttributes(liaBorder);
  lre.setStart(loaFront[0]);
  lre.setEnd(loaFront[1]);
  if (bDeferred) {
    alModel.add(lre.copy());
  }
 else {
    ipr.drawLine(lre);
  }
  lre.setLineAttributes(liaBorder);
  if (bIsStacked) {
    lre.setStart(loaFront[3]);
    lre.setEnd(loaFront[2]);
  }
 else {
    lre.setStart(loaFront[2]);
    lre.setEnd(loaFront[1]);
  }
  if (bDeferred) {
    alModel.add(lre.copy());
  }
 else {
    ipr.drawLine(lre);
  }
  if (topBounds != null) {
    are.setOutline(liaBorder);
    are.setBounds(topBounds);
    are.setBackground(f);
    are.setAngleExtent(360);
    are.setStyle(ArcRenderEvent.OPEN);
    if (bTransposed) {
      are.setStartAngle(90);
    }
 else {
      are.setStartAngle(180);
    }
    if (bDeferred) {
      alModel.add(are.copy());
    }
 else {
      ipr.drawArc(are);
      ipr.fillArc(are);
    }
  }
  renderInteractivity(ipr,dpha,are);
  if (!alModel.isEmpty()) {
    WrappedInstruction wi=new WrappedInstruction(getDeferredCache(),alModel,PrimitiveRenderEvent.FILL | PrimitiveRenderEvent.DRAW,zorder_hint);
    wi.setCompareBounds(compareBounds);
    dc.addModel(wi);
  }
}