Program: 66865
Project: 66865
Buggy source:
@Override public void fillArc(ArcRenderEvent are) throws ChartException {
  if (iv != null) {
    iv.modifyEvent(are);
  }
  final Fill flBackground=validateMultipleFill(are.getBackground());
  if (isFullTransparent(flBackground)) {
    return;
  }
  if (flBackground instanceof ColorDefinition) {
    final ColorDefinition cl=(ColorDefinition)flBackground;
    final Color clrPrevious=_g2d.getColor();
    final Color currentColor=(Color)_ids.getColor(cl);
    _g2d.setColor(currentColor);
    if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {
      Shape outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Shape innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      Shape prevClip=_g2d.getClip();
      Area ar2=new Area(fArea);
      if (prevClip != null) {
        Area ar1=new Area(prevClip);
        ar2.intersect(ar1);
      }
      _g2d.setClip(ar2);
      _g2d.fill(fArea);
      _g2d.setClip(prevClip);
    }
 else {
      _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle())));
    }
    _g2d.setColor(clrPrevious);
  }
 else   if (flBackground instanceof Gradient) {
    final Gradient g=(Gradient)flBackground;
    final ColorDefinition cdStart=g.getStartColor();
    final ColorDefinition cdEnd=g.getEndColor();
    double dAngleInDegrees=g.getDirection();
    final double dAngleInRadians=((-dAngleInDegrees * Math.PI) / 180.0);
    Bounds bo=are.getBounds();
    if (dAngleInDegrees < -90 || dAngleInDegrees > 90) {
      throw new ChartException(ChartDeviceExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{new Double(dAngleInDegrees)},Messages.getResourceBundle(getULocale()));
    }
    Point2D.Double p2dStart, p2dEnd;
    if (dAngleInDegrees == 90) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dEnd=new Point2D.Double(bo.getLeft(),bo.getTop());
    }
 else     if (dAngleInDegrees == -90) {
      p2dEnd=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
    }
 else     if (dAngleInDegrees > 0) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop() + bo.getHeight() - bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));
    }
 else     if (dAngleInDegrees < 0) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop() + bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));
    }
 else {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop());
    }
    final Paint pPrevious=_g2d.getPaint();
    _g2d.setPaint(new GradientPaint(p2dStart,(Color)_ids.getColor(cdStart),p2dEnd,(Color)_ids.getColor(cdEnd)));
    if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {
      Shape outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Shape innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      Shape prevClip=_g2d.getClip();
      Area ar2=new Area(fArea);
      if (prevClip != null) {
        Area ar1=new Area(prevClip);
        ar2.intersect(ar1);
      }
      _g2d.setClip(ar2);
      _g2d.fill(fArea);
      _g2d.setClip(prevClip);
    }
 else {
      _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle())));
    }
    _g2d.setPaint(pPrevious);
  }
 else   if (flBackground instanceof org.eclipse.birt.chart.model.attribute.Image) {
    final Bounds bo=are.getBounds();
    final Rectangle2D.Double r2d=new Rectangle2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth(),bo.getHeight());
    Shape shPreviousClip=_g2d.getClip();
    Area ar=null;
    if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {
      Shape outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Shape innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      if (shPreviousClip != null) {
        Area ar1=new Area(shPreviousClip);
        fArea.intersect(ar1);
      }
      ar=fArea;
    }
 else {
      final Shape shArc=new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle()));
      Area ar2=new Area(shArc);
      if (shPreviousClip != null) {
        Area ar1=new Area(shPreviousClip);
        ar2.intersect(ar1);
      }
      ar=ar2;
    }
    if (flBackground instanceof PatternImage) {
      fillWithPatternImage(new Area(ar),flBackground);
      return;
    }
    _g2d.setClip(ar);
    java.awt.Image img=createImageFromModel(flBackground);
    if (img != null) {
      final Size szImage=_ids.getSize(img);
      int iXRepeat=(int)(Math.ceil(r2d.width / szImage.getWidth()));
      int iYRepeat=(int)(Math.ceil(r2d.height / szImage.getHeight()));
      ImageObserver io=(ImageObserver)_ids.getObserver();
      for (int i=0; i < iXRepeat; i++) {
        for (int j=0; j < iYRepeat; j++) {
          _g2d.drawImage(img,(int)(r2d.x + i * szImage.getWidth()),(int)(r2d.y + j * szImage.getHeight()),io);
        }
      }
    }
    _g2d.setClip(shPreviousClip);
  }
}

Fixed version (ground truth):
@Override public void fillArc(ArcRenderEvent are) throws ChartException {
  if (iv != null) {
    iv.modifyEvent(are);
  }
  final Fill flBackground=validateMultipleFill(are.getBackground());
  if (isFullTransparent(flBackground)) {
    return;
  }
  if (flBackground instanceof ColorDefinition) {
    final ColorDefinition cl=(ColorDefinition)flBackground;
    final Color clrPrevious=_g2d.getColor();
    final Color currentColor=(Color)_ids.getColor(cl);
    _g2d.setColor(currentColor);
    if ((are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) || (are.getInnerRadius() > 0 && are.getOuterRadius() <= 0)) {
      Shape outerArc, innerArc;
      if (are.getOuterRadius() > 0) {
        outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
 else {
        outerArc=new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
      innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      Shape prevClip=_g2d.getClip();
      Area ar2=new Area(fArea);
      if (prevClip != null) {
        Area ar1=new Area(prevClip);
        ar2.intersect(ar1);
      }
      _g2d.setClip(ar2);
      _g2d.fill(fArea);
      _g2d.setClip(prevClip);
    }
 else {
      _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle())));
    }
    _g2d.setColor(clrPrevious);
  }
 else   if (flBackground instanceof Gradient) {
    final Gradient g=(Gradient)flBackground;
    final ColorDefinition cdStart=g.getStartColor();
    final ColorDefinition cdEnd=g.getEndColor();
    double dAngleInDegrees=g.getDirection();
    final double dAngleInRadians=((-dAngleInDegrees * Math.PI) / 180.0);
    Bounds bo=are.getBounds();
    if (dAngleInDegrees < -90 || dAngleInDegrees > 90) {
      throw new ChartException(ChartDeviceExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{new Double(dAngleInDegrees)},Messages.getResourceBundle(getULocale()));
    }
    Point2D.Double p2dStart, p2dEnd;
    if (dAngleInDegrees == 90) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dEnd=new Point2D.Double(bo.getLeft(),bo.getTop());
    }
 else     if (dAngleInDegrees == -90) {
      p2dEnd=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
    }
 else     if (dAngleInDegrees > 0) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop() + bo.getHeight());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop() + bo.getHeight() - bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));
    }
 else     if (dAngleInDegrees < 0) {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop() + bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));
    }
 else {
      p2dStart=new Point2D.Double(bo.getLeft(),bo.getTop());
      p2dEnd=new Point2D.Double(bo.getLeft() + bo.getWidth(),bo.getTop());
    }
    final Paint pPrevious=_g2d.getPaint();
    _g2d.setPaint(new GradientPaint(p2dStart,(Color)_ids.getColor(cdStart),p2dEnd,(Color)_ids.getColor(cdEnd)));
    if ((are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) || (are.getInnerRadius() > 0 && are.getOuterRadius() <= 0)) {
      Shape outerArc, innerArc;
      if (are.getOuterRadius() > 0) {
        outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
 else {
        outerArc=new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
      innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      Shape prevClip=_g2d.getClip();
      Area ar2=new Area(fArea);
      if (prevClip != null) {
        Area ar1=new Area(prevClip);
        ar2.intersect(ar1);
      }
      _g2d.setClip(ar2);
      _g2d.fill(fArea);
      _g2d.setClip(prevClip);
    }
 else {
      _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle())));
    }
    _g2d.setPaint(pPrevious);
  }
 else   if (flBackground instanceof org.eclipse.birt.chart.model.attribute.Image) {
    final Bounds bo=are.getBounds();
    final Rectangle2D.Double r2d=new Rectangle2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth(),bo.getHeight());
    Shape shPreviousClip=_g2d.getClip();
    Area ar=null;
    if ((are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) || (are.getInnerRadius() > 0 && are.getOuterRadius() <= 0)) {
      Shape outerArc, innerArc;
      if (are.getOuterRadius() > 0) {
        outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
 else {
        outerArc=new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      }
      innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      if (shPreviousClip != null) {
        Area ar1=new Area(shPreviousClip);
        fArea.intersect(ar1);
      }
      ar=fArea;
    }
 else {
      final Shape shArc=new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toG2dArcType(are.getStyle()));
      Area ar2=new Area(shArc);
      if (shPreviousClip != null) {
        Area ar1=new Area(shPreviousClip);
        ar2.intersect(ar1);
      }
      ar=ar2;
    }
    if (flBackground instanceof PatternImage) {
      fillWithPatternImage(new Area(ar),flBackground);
      return;
    }
    _g2d.setClip(ar);
    java.awt.Image img=createImageFromModel(flBackground);
    if (img != null) {
      final Size szImage=_ids.getSize(img);
      int iXRepeat=(int)(Math.ceil(r2d.width / szImage.getWidth()));
      int iYRepeat=(int)(Math.ceil(r2d.height / szImage.getHeight()));
      ImageObserver io=(ImageObserver)_ids.getObserver();
      for (int i=0; i < iXRepeat; i++) {
        for (int j=0; j < iYRepeat; j++) {
          _g2d.drawImage(img,(int)(r2d.x + i * szImage.getWidth()),(int)(r2d.y + j * szImage.getHeight()),io);
        }
      }
    }
    _g2d.setClip(shPreviousClip);
  }
}