nus-yam/ex-repair huggingface dataset:
Program: 47772
Project: 47772
Buggy source:
/** 
 * Returns a legend item for a series.
 * @param datasetIndex  the dataset index (zero-based).
 * @param series  the series index (zero-based).
 * @return The legend item (possibly <code>null</code>).
 */
@Override public LegendItem getLegendItem(int datasetIndex,int series){
  CategoryPlot cp=getPlot();
  if (cp == null) {
    return null;
  }
  if (!isSeriesVisible(series) || !isSeriesVisibleInLegend(series)) {
    return null;
  }
  CategoryDataset dataset=cp.getDataset(datasetIndex);
  String label=getLegendItemLabelGenerator().generateLabel(dataset,series);
  String description=label;
  String toolTipText=null;
  if (getLegendItemToolTipGenerator() != null) {
    toolTipText=getLegendItemToolTipGenerator().generateLabel(dataset,series);
  }
  String urlText=null;
  if (getLegendItemURLGenerator() != null) {
    urlText=getLegendItemURLGenerator().generateLabel(dataset,series);
  }
  Shape shape=lookupLegendShape(series);
  Paint paint=lookupSeriesPaint(series);
  Paint outlinePaint=lookupSeriesOutlinePaint(series);
  Stroke outlineStroke=lookupSeriesOutlineStroke(series);
  LegendItem result=new LegendItem(label,description,toolTipText,urlText,shape,paint,outlineStroke,outlinePaint);
  result.setLabelFont(lookupLegendTextFont(series));
  Paint labelPaint=lookupLegendTextPaint(series);
  if (labelPaint != null) {
    result.setLabelPaint(labelPaint);
  }
  result.setDataset(dataset);
  result.setDatasetIndex(datasetIndex);
  result.setSeriesKey(dataset.getRowKey(series));
  result.setSeriesIndex(series);
  return result;
}

Fixed version (ground truth):
/** 
 * Returns a legend item for a series.
 * @param datasetIndex  the dataset index (zero-based).
 * @param series  the series index (zero-based).
 * @return The legend item (possibly {@code null}).
 */
@Override public LegendItem getLegendItem(int datasetIndex,int series){
  CategoryPlot cp=getPlot();
  if (cp == null) {
    return null;
  }
  if (!isSeriesVisible(series) || !isSeriesVisibleInLegend(series)) {
    return null;
  }
  CategoryDataset dataset=cp.getDataset(datasetIndex);
  String label=getLegendItemLabelGenerator().generateLabel(dataset,series);
  String description=label;
  String toolTipText=null;
  if (getLegendItemToolTipGenerator() != null) {
    toolTipText=getLegendItemToolTipGenerator().generateLabel(dataset,series);
  }
  String urlText=null;
  if (getLegendItemURLGenerator() != null) {
    urlText=getLegendItemURLGenerator().generateLabel(dataset,series);
  }
  Shape shape=lookupLegendShape(series);
  Paint paint=lookupSeriesPaint(series);
  Paint outlinePaint=lookupSeriesOutlinePaint(series);
  Stroke outlineStroke=lookupSeriesOutlineStroke(series);
  LegendItem result=new LegendItem(label,description,toolTipText,urlText,shape,paint,outlineStroke,outlinePaint);
  result.setLabelFont(lookupLegendTextFont(series));
  Paint labelPaint=lookupLegendTextPaint(series);
  if (labelPaint != null) {
    result.setLabelPaint(labelPaint);
  }
  result.setDataset(dataset);
  result.setDatasetIndex(datasetIndex);
  result.setSeriesKey(dataset.getRowKey(series));
  result.setSeriesIndex(series);
  return result;
}
Program: 47773
Project: 47773
Buggy source:
/** 
 * Sets the paint used to color the median and average markers and sends a   {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 * @see #getArtifactPaint()
 */
public void setArtifactPaint(Paint paint){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.artifactPaint=paint;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the paint used to color the median and average markers and sends a   {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint ({@code null} not permitted).
 * @see #getArtifactPaint()
 */
public void setArtifactPaint(Paint paint){
  ParamChecks.nullNotPermitted(paint,"String_Node_Str");
  this.artifactPaint=paint;
  fireChangeEvent();
}
Program: 47774
Project: 47774
Buggy source:
/** 
 * Tests this renderer for equality with an arbitrary object.
 * @param obj  the object (<code>null</code> permitted).
 * @return <code>true</code> or <code>false</code>.
 */
@Override public boolean equals(Object obj){
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof BoxAndWhiskerRenderer)) {
    return false;
  }
  BoxAndWhiskerRenderer that=(BoxAndWhiskerRenderer)obj;
  if (this.fillBox != that.fillBox) {
    return false;
  }
  if (this.itemMargin != that.itemMargin) {
    return false;
  }
  if (this.maximumBarWidth != that.maximumBarWidth) {
    return false;
  }
  if (this.meanVisible != that.meanVisible) {
    return false;
  }
  if (this.medianVisible != that.medianVisible) {
    return false;
  }
  if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) {
    return false;
  }
  if (this.whiskerWidth != that.whiskerWidth) {
    return false;
  }
  if (!PaintUtils.equal(this.artifactPaint,that.artifactPaint)) {
    return false;
  }
  return super.equals(obj);
}

Fixed version (ground truth):
/** 
 * Tests this renderer for equality with an arbitrary object.
 * @param obj  the object ({@code null} permitted).
 * @return {@code true} or {@code false}.
 */
@Override public boolean equals(Object obj){
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof BoxAndWhiskerRenderer)) {
    return false;
  }
  BoxAndWhiskerRenderer that=(BoxAndWhiskerRenderer)obj;
  if (this.fillBox != that.fillBox) {
    return false;
  }
  if (this.itemMargin != that.itemMargin) {
    return false;
  }
  if (this.maximumBarWidth != that.maximumBarWidth) {
    return false;
  }
  if (this.meanVisible != that.meanVisible) {
    return false;
  }
  if (this.medianVisible != that.medianVisible) {
    return false;
  }
  if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) {
    return false;
  }
  if (this.whiskerWidth != that.whiskerWidth) {
    return false;
  }
  if (!PaintUtils.equal(this.artifactPaint,that.artifactPaint)) {
    return false;
  }
  return super.equals(obj);
}
Program: 47777
Project: 47777
Buggy source:
/** 
 * Sets the size (width or height, depending on the orientation of the plot) for the domain axis of each subplot.
 * @param space  the space (<code>null</code> permitted).
 */
protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space){
  for (  XYPlot subplot : this.subplots) {
    subplot.setFixedRangeAxisSpace(space,false);
  }
}

Fixed version (ground truth):
/** 
 * Sets the size (width or height, depending on the orientation of the plot) for the domain axis of each subplot.
 * @param space  the space ({@code null} permitted).
 */
protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space){
  for (  XYPlot subplot : this.subplots) {
    subplot.setFixedRangeAxisSpace(space,false);
  }
}
Program: 47778
Project: 47778
Buggy source:
/** 
 * Handles a 'click' on the plot by updating the anchor values.
 * @param x  x-coordinate, where the click occured.
 * @param y  y-coordinate, where the click occured.
 * @param info  object containing information about the plot dimensions.
 */
@Override public void handleClick(int x,int y,PlotRenderingInfo info){
  Rectangle2D dataArea=info.getDataArea();
  if (dataArea.contains(x,y)) {
    for (int i=0; i < this.subplots.size(); i++) {
      XYPlot subplot=this.subplots.get(i);
      PlotRenderingInfo subplotInfo=info.getSubplotInfo(i);
      subplot.handleClick(x,y,subplotInfo);
    }
  }
}

Fixed version (ground truth):
/** 
 * Handles a 'click' on the plot by updating the anchor values.
 * @param x  x-coordinate, where the click occurred.
 * @param y  y-coordinate, where the click occurred.
 * @param info  object containing information about the plot dimensions.
 */
@Override public void handleClick(int x,int y,PlotRenderingInfo info){
  Rectangle2D dataArea=info.getDataArea();
  if (dataArea.contains(x,y)) {
    for (int i=0; i < this.subplots.size(); i++) {
      XYPlot subplot=this.subplots.get(i);
      PlotRenderingInfo subplotInfo=info.getSubplotInfo(i);
      subplot.handleClick(x,y,subplotInfo);
    }
  }
}
Program: 47779
Project: 47779
Buggy source:
/** 
 * Returns a range representing the extent of the data values in this plot (obtained from the subplots) that will be rendered against the specified axis.  NOTE: This method is intended for internal JFreeChart use, and is public only so that code in the axis classes can call it.  Since only the domain axis is shared between subplots, the JFreeChart code will only call this method for the domain values (although this is not checked/enforced).
 * @param axis  the axis.
 * @return The range (possibly <code>null</code>).
 */
@Override public Range getDataRange(ValueAxis axis){
  Range result=null;
  if (this.subplots != null) {
    for (    XYPlot subplot : this.subplots) {
      result=Range.combine(result,subplot.getDataRange(axis));
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns a range representing the extent of the data values in this plot (obtained from the subplots) that will be rendered against the specified axis.  NOTE: This method is intended for internal JFreeChart use, and is public only so that code in the axis classes can call it.  Since only the domain axis is shared between subplots, the JFreeChart code will only call this method for the domain values (although this is not checked/enforced).
 * @param axis  the axis.
 * @return The range (possibly <code>null</code>).
 */
@Override public Range getDataRange(ValueAxis axis){
  if (this.subplots == null) {
    return null;
  }
  Range result=null;
  for (  XYPlot subplot : this.subplots) {
    result=Range.combine(result,subplot.getDataRange(axis));
  }
  return result;
}
Program: 47780
Project: 47780
Buggy source:
/** 
 * Returns the list of subplots.  The returned list may be empty, but is never <code>null</code>.
 * @return An unmodifiable list of subplots.
 */
public List<XYPlot> getSubplots(){
  if (this.subplots != null) {
    return Collections.unmodifiableList(this.subplots);
  }
 else {
    return Collections.EMPTY_LIST;
  }
}

Fixed version (ground truth):
/** 
 * Returns the list of subplots.  The returned list may be empty, but is never   {@code null}.
 * @return An unmodifiable list of subplots.
 */
public List<XYPlot> getSubplots(){
  return Collections.unmodifiableList(this.subplots);
}
Program: 47781
Project: 47781
Buggy source:
/** 
 * Finds the range of y-values that fall within the specified range of x-values (where the x-values are interpreted as milliseconds since the epoch and converted to time periods using the specified timezone).
 * @param xRange  the subset of x-values to use ({@code null} notpermitted).
 * @param xAnchor  the anchor point for the x-values ({@code null}not permitted).
 * @param zone  the time zone ({@code null} not permitted).
 * @return The range of y-values.
 * @since 1.0.18
 */
public Range findValueRange(Range xRange,TimePeriodAnchor xAnchor,TimeZone zone){
  ParamChecks.nullNotPermitted(xRange,"String_Node_Str");
  ParamChecks.nullNotPermitted(xAnchor,"String_Node_Str");
  ParamChecks.nullNotPermitted(zone,"String_Node_Str");
  if (this.data.isEmpty()) {
    return null;
  }
  Calendar calendar=Calendar.getInstance(zone);
  double lowY=Double.POSITIVE_INFINITY;
  double highY=Double.NEGATIVE_INFINITY;
  for (  TimeSeriesDataItem item : this.data) {
    long millis=item.getPeriod().getMillisecond(xAnchor,calendar);
    if (xRange.contains(millis)) {
      Number n=item.getValue();
      if (n != null) {
        double v=n.doubleValue();
        lowY=Math.min(lowY,v);
        highY=Math.max(highY,v);
      }
    }
  }
  if (Double.isInfinite(lowY) && Double.isInfinite(highY)) {
    if (lowY < highY) {
      return new Range(lowY,highY);
    }
 else {
      return new Range(Double.NaN,Double.NaN);
    }
  }
  return new Range(lowY,highY);
}

Fixed version (ground truth):
/** 
 * Finds the range of y-values that fall within the specified range of x-values (where the x-values are interpreted as milliseconds since the epoch and converted to time periods using the specified timezone).
 * @param xRange  the subset of x-values to use ({@code null} notpermitted).
 * @param xAnchor  the anchor point for the x-values ({@code null}not permitted).
 * @param zone  the time zone ({@code null} not permitted).
 * @return The range of y-values.
 * @since 1.0.18
 */
public Range findValueRange(Range xRange,TimePeriodAnchor xAnchor,TimeZone zone){
  ParamChecks.nullNotPermitted(xRange,"String_Node_Str");
  ParamChecks.nullNotPermitted(xAnchor,"String_Node_Str");
  ParamChecks.nullNotPermitted(zone,"String_Node_Str");
  if (this.data.isEmpty()) {
    return null;
  }
  Calendar calendar=Calendar.getInstance(zone);
  double lowY=Double.POSITIVE_INFINITY;
  double highY=Double.NEGATIVE_INFINITY;
  for (  TimeSeriesDataItem item : this.data) {
    long millis=item.getPeriod().getMillisecond(xAnchor,calendar);
    if (xRange.contains(millis)) {
      Number n=item.getValue();
      if (n != null) {
        double v=n.doubleValue();
        lowY=minIgnoreNaN(lowY,v);
        highY=maxIgnoreNaN(highY,v);
      }
    }
  }
  if (Double.isInfinite(lowY) && Double.isInfinite(highY)) {
    if (lowY < highY) {
      return new Range(lowY,highY);
    }
 else {
      return new Range(Double.NaN,Double.NaN);
    }
  }
  return new Range(lowY,highY);
}
Program: 47783
Project: 47783
Buggy source:
/** 
 * Draws the axis on a Java 2D graphics device (such as the screen or a printer).
 * @param g2  the graphics device (<code>null</code> not permitted).
 * @param cursor  the cursor location.
 * @param plotArea  the area within which the plot and axes should be drawn(<code>null</code> not permitted).
 * @param dataArea  the area within which the data should be drawn(<code>null</code> not permitted).
 * @param edge  the axis location (<code>null</code> not permitted).
 * @param plotState  collects information about the plot(<code>null</code> permitted).
 * @return The axis state (never <code>null</code>).
 */
@Override public AxisState draw(Graphics2D g2,double cursor,Rectangle2D plotArea,Rectangle2D dataArea,RectangleEdge edge,PlotRenderingInfo plotState){
  AxisState info=new AxisState(cursor);
  if (isVisible()) {
    info=super.draw(g2,cursor,plotArea,dataArea,edge,plotState);
  }
  if (this.gridBandsVisible) {
    drawGridBands(g2,plotArea,dataArea,edge,info.getTicks());
  }
  return info;
}

Fixed version (ground truth):
/** 
 * Draws the axis on a Java 2D graphics device (such as the screen or a printer).
 * @param g2  the graphics device (<code>null</code> not permitted).
 * @param cursor  the cursor location.
 * @param plotArea  the area within which the plot and axes should be drawn(<code>null</code> not permitted).
 * @param dataArea  the area within which the data should be drawn(<code>null</code> not permitted).
 * @param edge  the axis location (<code>null</code> not permitted).
 * @param plotState  collects information about the plot(<code>null</code> permitted).
 * @return The axis state (never <code>null</code>).
 */
@Override public AxisState draw(Graphics2D g2,double cursor,Rectangle2D plotArea,Rectangle2D dataArea,RectangleEdge edge,PlotRenderingInfo plotState){
  AxisState info=new AxisState(cursor);
  if (isVisible()) {
    info=super.draw(g2,cursor,plotArea,dataArea,edge,plotState);
  }
  if (this.gridBandsVisible) {
    drawGridBands(g2,dataArea,edge,info.getTicks());
  }
  return info;
}
Program: 47784
Project: 47784
Buggy source:
/** 
 * Sets the visibility of the grid bands and notifies registered listeners that the axis has been modified.
 * @param flag  the new setting.
 * @see #isGridBandsVisible()
 */
public void setGridBandsVisible(boolean flag){
  if (this.gridBandsVisible != flag) {
    this.gridBandsVisible=flag;
    fireChangeEvent();
  }
}

Fixed version (ground truth):
/** 
 * Sets the visibility of the grid bands and notifies registered listeners that the axis has been modified.
 * @param flag  the new setting.
 * @see #isGridBandsVisible()
 */
public void setGridBandsVisible(boolean flag){
  this.gridBandsVisible=flag;
  fireChangeEvent();
}
Program: 47785
Project: 47785
Buggy source:
/** 
 * Draws the grid bands.  Alternate bands are colored using <CODE>gridBandPaint</CODE> (<CODE>DEFAULT_GRID_BAND_PAINT</CODE> by default).
 * @param g2  the graphics device.
 * @param plotArea  the area within which the chart should be drawn.
 * @param dataArea  the area within which the plot should be drawn (asubset of the drawArea).
 * @param edge  the axis location.
 * @param ticks  the ticks.
 */
protected void drawGridBands(Graphics2D g2,Rectangle2D plotArea,Rectangle2D dataArea,RectangleEdge edge,List<ValueTick> ticks){
  Shape savedClip=g2.getClip();
  g2.clip(dataArea);
  if (RectangleEdge.isTopOrBottom(edge)) {
    drawGridBandsHorizontal(g2,plotArea,dataArea,true,ticks);
  }
 else   if (RectangleEdge.isLeftOrRight(edge)) {
    drawGridBandsVertical(g2,plotArea,dataArea,true,ticks);
  }
  g2.setClip(savedClip);
}

Fixed version (ground truth):
/** 
 * Draws the grid bands.  Alternate bands are colored using <CODE>gridBandPaint</CODE> (<CODE>DEFAULT_GRID_BAND_PAINT</CODE> by default).
 * @param g2  the graphics target (<code>null</code> not permitted).
 * @param dataArea  the data area to which the axes are aligned (<code>null</code> not permitted).
 * @param edge  the edge to which the axis is aligned (<code>null</code> notpermitted).
 * @param ticks  the ticks (<code>null</code> not permitted).
 */
protected void drawGridBands(Graphics2D g2,Rectangle2D dataArea,RectangleEdge edge,List<ValueTick> ticks){
  Shape savedClip=g2.getClip();
  g2.clip(dataArea);
  if (RectangleEdge.isTopOrBottom(edge)) {
    drawGridBandsHorizontal(g2,dataArea,true,ticks);
  }
 else   if (RectangleEdge.isLeftOrRight(edge)) {
    drawGridBandsVertical(g2,dataArea,true,ticks);
  }
  g2.setClip(savedClip);
}
Program: 47786
Project: 47786
Buggy source:
/** 
 * Draws the grid bands for the axis when it is at the top or bottom of the plot.
 * @param g2  the graphics device.
 * @param drawArea  the area within which the chart should be drawn.
 * @param plotArea  the area within which the plot should be drawn (asubset of the drawArea).
 * @param firstGridBandIsDark  True: the first grid band takes thecolor of <CODE>gridBandPaint</CODE>. False: the second grid band takes the color of <CODE>gridBandPaint</CODE>.
 * @param ticks  a list of ticks.
 */
protected void drawGridBandsVertical(Graphics2D g2,Rectangle2D drawArea,Rectangle2D plotArea,boolean firstGridBandIsDark,List<ValueTick> ticks){
  boolean currentGridBandIsDark=firstGridBandIsDark;
  double xx=plotArea.getX();
  double yy1, yy2;
  double outlineStrokeWidth;
  Stroke outlineStroke=getPlot().getOutlineStroke();
  if (outlineStroke != null && outlineStroke instanceof BasicStroke) {
    outlineStrokeWidth=((BasicStroke)outlineStroke).getLineWidth();
  }
 else {
    outlineStrokeWidth=1d;
  }
  for (  ValueTick tick : ticks) {
    yy1=valueToJava2D(tick.getValue() + 0.5d,plotArea,RectangleEdge.LEFT);
    yy2=valueToJava2D(tick.getValue() - 0.5d,plotArea,RectangleEdge.LEFT);
    if (currentGridBandIsDark) {
      g2.setPaint(this.gridBandPaint);
    }
 else {
      g2.setPaint(this.gridBandAlternatePaint);
    }
    Rectangle2D band=new Rectangle2D.Double(xx + outlineStrokeWidth,yy1,plotArea.getMaxX() - xx - outlineStrokeWidth,yy2 - yy1);
    g2.fill(band);
    currentGridBandIsDark=!currentGridBandIsDark;
  }
  g2.setPaintMode();
}

Fixed version (ground truth):
/** 
 * Draws the grid bands for an axis that is aligned to the left or right of the data area (that is, a vertical axis).
 * @param g2  the graphics target (<code>null</code> not permitted).
 * @param dataArea  the area for the data (to which the axes are aligned,<code>null</code> not permitted).
 * @param firstGridBandIsDark  True: the first grid band takes thecolor of <CODE>gridBandPaint</CODE>. False: the second grid band takes the color of <CODE>gridBandPaint</CODE>.
 * @param ticks  a list of ticks (<code>null</code> not permitted).
 */
protected void drawGridBandsVertical(Graphics2D g2,Rectangle2D dataArea,boolean firstGridBandIsDark,List<ValueTick> ticks){
  boolean currentGridBandIsDark=firstGridBandIsDark;
  double xx=dataArea.getX();
  double yy1, yy2;
  double outlineStrokeWidth=1.0;
  Stroke outlineStroke=getPlot().getOutlineStroke();
  if (outlineStroke != null && outlineStroke instanceof BasicStroke) {
    outlineStrokeWidth=((BasicStroke)outlineStroke).getLineWidth();
  }
  for (  ValueTick tick : ticks) {
    yy1=valueToJava2D(tick.getValue() + 0.5d,dataArea,RectangleEdge.LEFT);
    yy2=valueToJava2D(tick.getValue() - 0.5d,dataArea,RectangleEdge.LEFT);
    if (currentGridBandIsDark) {
      g2.setPaint(this.gridBandPaint);
    }
 else {
      g2.setPaint(this.gridBandAlternatePaint);
    }
    Rectangle2D band=new Rectangle2D.Double(xx + outlineStrokeWidth,Math.min(yy1,yy2),dataArea.getMaxX() - xx - outlineStrokeWidth,Math.abs(yy2 - yy1));
    g2.fill(band);
    currentGridBandIsDark=!currentGridBandIsDark;
  }
}
Program: 47787
Project: 47787
Buggy source:
/** 
 * Draws the grid bands for the axis when it is at the top or bottom of the plot.
 * @param g2  the graphics device.
 * @param plotArea  the area within which the chart should be drawn.
 * @param dataArea  the area within which the plot should be drawn(a subset of the drawArea).
 * @param firstGridBandIsDark  True: the first grid band takes thecolor of <CODE>gridBandPaint</CODE>. False: the second grid band takes the color of <CODE>gridBandPaint</CODE>.
 * @param ticks  the ticks.
 */
protected void drawGridBandsHorizontal(Graphics2D g2,Rectangle2D plotArea,Rectangle2D dataArea,boolean firstGridBandIsDark,List<ValueTick> ticks){
  boolean currentGridBandIsDark=firstGridBandIsDark;
  double yy=dataArea.getY();
  double xx1, xx2;
  double outlineStrokeWidth;
  if (getPlot().getOutlineStroke() != null) {
    outlineStrokeWidth=((BasicStroke)getPlot().getOutlineStroke()).getLineWidth();
  }
 else {
    outlineStrokeWidth=1d;
  }
  for (  ValueTick tick : ticks) {
    xx1=valueToJava2D(tick.getValue() - 0.5d,dataArea,RectangleEdge.BOTTOM);
    xx2=valueToJava2D(tick.getValue() + 0.5d,dataArea,RectangleEdge.BOTTOM);
    if (currentGridBandIsDark) {
      g2.setPaint(this.gridBandPaint);
    }
 else {
      g2.setPaint(this.gridBandAlternatePaint);
    }
    Rectangle2D band=new Rectangle2D.Double(xx1,yy + outlineStrokeWidth,xx2 - xx1,dataArea.getMaxY() - yy - outlineStrokeWidth);
    g2.fill(band);
    currentGridBandIsDark=!currentGridBandIsDark;
  }
  g2.setPaintMode();
}

Fixed version (ground truth):
/** 
 * Draws the grid bands for the axis when it is at the top or bottom of the plot.
 * @param g2  the graphics target (<code>null</code> not permitted).
 * @param dataArea  the area for the data (to which the axes are aligned,<code>null</code> not permitted).
 * @param firstGridBandIsDark  True: the first grid band takes thecolor of <CODE>gridBandPaint</CODE>. False: the second grid band takes the color of <CODE>gridBandPaint</CODE>.
 * @param ticks  a list of ticks (<code>null</code> not permitted).
 */
protected void drawGridBandsHorizontal(Graphics2D g2,Rectangle2D dataArea,boolean firstGridBandIsDark,List<ValueTick> ticks){
  boolean currentGridBandIsDark=firstGridBandIsDark;
  double yy=dataArea.getY();
  double xx1, xx2;
  double outlineStrokeWidth=1.0;
  Stroke outlineStroke=getPlot().getOutlineStroke();
  if (outlineStroke != null && outlineStroke instanceof BasicStroke) {
    outlineStrokeWidth=((BasicStroke)outlineStroke).getLineWidth();
  }
  for (  ValueTick tick : ticks) {
    xx1=valueToJava2D(tick.getValue() - 0.5d,dataArea,RectangleEdge.BOTTOM);
    xx2=valueToJava2D(tick.getValue() + 0.5d,dataArea,RectangleEdge.BOTTOM);
    if (currentGridBandIsDark) {
      g2.setPaint(this.gridBandPaint);
    }
 else {
      g2.setPaint(this.gridBandAlternatePaint);
    }
    Rectangle2D band=new Rectangle2D.Double(Math.min(xx1,xx2),yy + outlineStrokeWidth,Math.abs(xx2 - xx1),dataArea.getMaxY() - yy - outlineStrokeWidth);
    g2.fill(band);
    currentGridBandIsDark=!currentGridBandIsDark;
  }
}
Program: 47788
Project: 47788
Buggy source:
/** 
 * Fills a band between two values on the axis.  This can be used to color bands between the grid lines.
 * @param g2  the graphics device.
 * @param plot  the plot.
 * @param axis  the domain axis.
 * @param dataArea  the data area.
 * @param start  the start value.
 * @param end  the end value.
 */
@Override public void fillDomainGridBand(Graphics2D g2,XYPlot plot,ValueAxis axis,Rectangle2D dataArea,double start,double end){
  double x1=axis.valueToJava2D(start,dataArea,plot.getDomainAxisEdge());
  double x2=axis.valueToJava2D(end,dataArea,plot.getDomainAxisEdge());
  Rectangle2D band;
  if (plot.getOrientation() == PlotOrientation.VERTICAL) {
    band=new Rectangle2D.Double(Math.min(x1,x2),dataArea.getMinY(),Math.abs(x2 - x1),dataArea.getWidth());
  }
 else {
    band=new Rectangle2D.Double(dataArea.getMinX(),Math.min(x1,x2),dataArea.getWidth(),Math.abs(x2 - x1));
  }
  Paint paint=plot.getDomainTickBandPaint();
  if (paint != null) {
    g2.setPaint(paint);
    g2.fill(band);
  }
}

Fixed version (ground truth):
/** 
 * Fills a band between two values on the axis.  This can be used to color bands between the grid lines.
 * @param g2  the graphics device.
 * @param plot  the plot.
 * @param axis  the domain axis.
 * @param dataArea  the data area.
 * @param start  the start value.
 * @param end  the end value.
 */
@Override public void fillDomainGridBand(Graphics2D g2,XYPlot plot,ValueAxis axis,Rectangle2D dataArea,double start,double end){
  double x1=axis.valueToJava2D(start,dataArea,plot.getDomainAxisEdge());
  double x2=axis.valueToJava2D(end,dataArea,plot.getDomainAxisEdge());
  Rectangle2D band;
  if (plot.getOrientation() == PlotOrientation.VERTICAL) {
    band=new Rectangle2D.Double(Math.min(x1,x2),dataArea.getMinY(),Math.abs(x2 - x1),dataArea.getHeight());
  }
 else {
    band=new Rectangle2D.Double(dataArea.getMinX(),Math.min(x1,x2),dataArea.getWidth(),Math.abs(x2 - x1));
  }
  Paint paint=plot.getDomainTickBandPaint();
  if (paint != null) {
    g2.setPaint(paint);
    g2.fill(band);
  }
}
Program: 47789
Project: 47789
Buggy source:
/** 
 * Initialises the renderer and returns a state object that should be passed to all subsequent calls to the drawItem() method. <P> This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain.  The renderer can do nothing if it chooses.
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param data  the data.
 * @param info  an optional info collection object to return data back tothe caller.
 * @return The renderer state (never <code>null</code>).
 */
@Override public XYItemRendererState initialise(Graphics2D g2,Rectangle2D dataArea,XYPlot plot,XYDataset data,PlotRenderingInfo info){
  XYItemRendererState state=new XYItemRendererState(info);
  return state;
}

Fixed version (ground truth):
/** 
 * Initialises the renderer and returns a state object that should be passed to all subsequent calls to the drawItem() method. <P> This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain.  The renderer can do nothing if it chooses.
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param data  the data.
 * @param info  an optional info collection object to return data back tothe caller.
 * @return The renderer state (never <code>null</code>).
 */
@Override public XYItemRendererState initialise(Graphics2D g2,Rectangle2D dataArea,XYPlot plot,XYDataset data,PlotRenderingInfo info){
  return new XYItemRendererState(info);
}
Program: 47791
Project: 47791
Buggy source:
/** 
 * Sets the paint that will be used to draw bars having negative values, and sends a   {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setNegativeBarPaint(Paint paint){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.negativeBarPaint=paint;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the paint that will be used to draw bars having negative values, and sends a   {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setNegativeBarPaint(Paint paint){
  ParamChecks.nullNotPermitted(paint,"String_Node_Str");
  this.negativeBarPaint=paint;
  fireChangeEvent();
}
Program: 47793
Project: 47793
Buggy source:
/** 
 * Sets the paint that will be used to draw bars having positive values.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setPositiveBarPaint(Paint paint){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.positiveBarPaint=paint;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the paint that will be used to draw bars having positive values.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setPositiveBarPaint(Paint paint){
  ParamChecks.nullNotPermitted(paint,"String_Node_Str");
  this.positiveBarPaint=paint;
  fireChangeEvent();
}
Program: 47794
Project: 47794
Buggy source:
/** 
 * Constructs a new waterfall renderer.
 * @param firstBarPaint  the color of the first bar (<code>null</code> notpermitted).
 * @param positiveBarPaint  the color for bars with positive values(<code>null</code> not permitted).
 * @param negativeBarPaint  the color for bars with negative values(<code>null</code> not permitted).
 * @param lastBarPaint  the color of the last bar (<code>null</code> notpermitted).
 */
public WaterfallBarRenderer(Paint firstBarPaint,Paint positiveBarPaint,Paint negativeBarPaint,Paint lastBarPaint){
  super();
  if (firstBarPaint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (positiveBarPaint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (negativeBarPaint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (lastBarPaint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.firstBarPaint=firstBarPaint;
  this.lastBarPaint=lastBarPaint;
  this.positiveBarPaint=positiveBarPaint;
  this.negativeBarPaint=negativeBarPaint;
  setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL));
  setMinimumBarLength(1.0);
}

Fixed version (ground truth):
/** 
 * Constructs a new waterfall renderer.
 * @param firstBarPaint  the color of the first bar (<code>null</code> notpermitted).
 * @param positiveBarPaint  the color for bars with positive values(<code>null</code> not permitted).
 * @param negativeBarPaint  the color for bars with negative values(<code>null</code> not permitted).
 * @param lastBarPaint  the color of the last bar (<code>null</code> notpermitted).
 */
public WaterfallBarRenderer(Paint firstBarPaint,Paint positiveBarPaint,Paint negativeBarPaint,Paint lastBarPaint){
  super();
  ParamChecks.nullNotPermitted(firstBarPaint,"String_Node_Str");
  ParamChecks.nullNotPermitted(positiveBarPaint,"String_Node_Str");
  ParamChecks.nullNotPermitted(negativeBarPaint,"String_Node_Str");
  ParamChecks.nullNotPermitted(lastBarPaint,"String_Node_Str");
  this.firstBarPaint=firstBarPaint;
  this.lastBarPaint=lastBarPaint;
  this.positiveBarPaint=positiveBarPaint;
  this.negativeBarPaint=negativeBarPaint;
  setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL));
  setMinimumBarLength(1.0);
}
Program: 47795
Project: 47795
Buggy source:
/** 
 * Sets the paint that will be used to draw the first bar and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setFirstBarPaint(Paint paint){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.firstBarPaint=paint;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the paint that will be used to draw the first bar and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setFirstBarPaint(Paint paint){
  ParamChecks.nullNotPermitted(paint,"String_Node_Str");
  this.firstBarPaint=paint;
  fireChangeEvent();
}
Program: 47796
Project: 47796
Buggy source:
/** 
 * Sets the paint that will be used to draw the last bar and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setLastBarPaint(Paint paint){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.lastBarPaint=paint;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the paint that will be used to draw the last bar and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param paint  the paint (<code>null</code> not permitted).
 */
public void setLastBarPaint(Paint paint){
  ParamChecks.nullNotPermitted(paint,"String_Node_Str");
  this.lastBarPaint=paint;
  fireChangeEvent();
}
Program: 47797
Project: 47797
Buggy source:
/** 
 * Adds a block to the arrangement manager at the specified edge.
 * @param block  the block (<code>null</code> permitted).
 * @param key  the edge (an instance of {@link RectangleEdge}) or <code>null</code> for the center block.
 */
@Override public void add(Block block,Object key){
  if (key == null) {
    this.centerBlock=block;
  }
 else {
    RectangleEdge edge=(RectangleEdge)key;
    if (edge == RectangleEdge.TOP) {
      this.topBlock=block;
    }
 else     if (edge == RectangleEdge.BOTTOM) {
      this.bottomBlock=block;
    }
 else     if (edge == RectangleEdge.LEFT) {
      this.leftBlock=block;
    }
 else     if (edge == RectangleEdge.RIGHT) {
      this.rightBlock=block;
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds a block to the arrangement manager at the specified edge. If the key is not an instance of   {@link RectangleEdge} the block willbe added in the center.
 * @param block  the block (<code>null</code> permitted).
 * @param key  the edge (an instance of {@link RectangleEdge}) or <code>null</code> for the center block.
 */
@Override public void add(Block block,Object key){
  if (!(key instanceof RectangleEdge)) {
    this.centerBlock=block;
  }
 else {
    RectangleEdge edge=(RectangleEdge)key;
    if (edge == RectangleEdge.TOP) {
      this.topBlock=block;
    }
 else     if (edge == RectangleEdge.BOTTOM) {
      this.bottomBlock=block;
    }
 else     if (edge == RectangleEdge.LEFT) {
      this.leftBlock=block;
    }
 else     if (edge == RectangleEdge.RIGHT) {
      this.rightBlock=block;
    }
  }
}
Program: 47798
Project: 47798
Buggy source:
/** 
 * Creates a new axis.
 * @param label  the axis label (<code>null</code> permitted).
 * @param first  the first time period in the axis range(<code>null</code> not permitted).
 * @param last  the last time period in the axis range(<code>null</code> not permitted).
 * @param timeZone  the time zone (<code>null</code> not permitted).
 * @param locale  the locale (<code>null</code> not permitted).
 * @since 1.0.13
 */
public PeriodAxis(String label,RegularTimePeriod first,RegularTimePeriod last,TimeZone timeZone,Locale locale){
  super(label,null);
  ParamChecks.nullNotPermitted(timeZone,"String_Node_Str");
  ParamChecks.nullNotPermitted(locale,"String_Node_Str");
  this.first=first;
  this.last=last;
  this.timeZone=timeZone;
  this.locale=locale;
  this.calendar=Calendar.getInstance(timeZone,locale);
  this.first.peg(this.calendar);
  this.last.peg(this.calendar);
  this.autoRangeTimePeriodClass=first.getClass();
  this.majorTickTimePeriodClass=first.getClass();
  this.minorTickMarksVisible=false;
  this.minorTickTimePeriodClass=RegularTimePeriod.downsize(this.majorTickTimePeriodClass);
  setAutoRange(true);
  this.labelInfo=new PeriodAxisLabelInfo[2];
  this.labelInfo[0]=new PeriodAxisLabelInfo(Month.class,new SimpleDateFormat("String_Node_Str",locale));
  this.labelInfo[1]=new PeriodAxisLabelInfo(Year.class,new SimpleDateFormat("String_Node_Str",locale));
}

Fixed version (ground truth):
/** 
 * Creates a new axis.
 * @param label  the axis label (<code>null</code> permitted).
 * @param first  the first time period in the axis range(<code>null</code> not permitted).
 * @param last  the last time period in the axis range(<code>null</code> not permitted).
 * @param timeZone  the time zone (<code>null</code> not permitted).
 * @param locale  the locale (<code>null</code> not permitted).
 * @since 1.0.13
 */
public PeriodAxis(String label,RegularTimePeriod first,RegularTimePeriod last,TimeZone timeZone,Locale locale){
  super(label,null);
  ParamChecks.nullNotPermitted(timeZone,"String_Node_Str");
  ParamChecks.nullNotPermitted(locale,"String_Node_Str");
  this.first=first;
  this.last=last;
  this.timeZone=timeZone;
  this.locale=locale;
  this.calendar=Calendar.getInstance(timeZone,locale);
  this.first.peg(this.calendar);
  this.last.peg(this.calendar);
  this.autoRangeTimePeriodClass=first.getClass();
  this.majorTickTimePeriodClass=first.getClass();
  this.minorTickMarksVisible=false;
  this.minorTickTimePeriodClass=RegularTimePeriod.downsize(this.majorTickTimePeriodClass);
  setAutoRange(true);
  this.labelInfo=new PeriodAxisLabelInfo[2];
  SimpleDateFormat df0=new SimpleDateFormat("String_Node_Str",locale);
  df0.setTimeZone(timeZone);
  this.labelInfo[0]=new PeriodAxisLabelInfo(Month.class,df0);
  SimpleDateFormat df1=new SimpleDateFormat("String_Node_Str",locale);
  df1.setTimeZone(timeZone);
  this.labelInfo[1]=new PeriodAxisLabelInfo(Year.class,df1);
}
Program: 47800
Project: 47800
Buggy source:
/** 
 * Set the composite which will be used for filling polygons and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param composite  the composite to use (<code>null</code> notpermitted).
 * @since 1.0.14
 */
public void setFillComposite(Composite composite){
  if (composite == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.fillComposite=composite;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the composite which will be used for filling polygons and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param composite  the composite to use (<code>null</code> notpermitted).
 * @since 1.0.14
 */
public void setFillComposite(Composite composite){
  ParamChecks.nullNotPermitted(composite,"String_Node_Str");
  this.fillComposite=composite;
  fireChangeEvent();
}
Program: 47801
Project: 47801
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getBaseToolTipGenerator(){
  return this.baseToolTipGenerator;
}

Fixed version (ground truth):
/** 
 * Returns the default tool tip generator.
 * @return The default tool tip generator (possibly <code>null</code>).
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getBaseToolTipGenerator(){
  return this.baseToolTipGenerator;
}
Program: 47802
Project: 47802
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public void setBaseToolTipGenerator(XYToolTipGenerator generator){
  this.baseToolTipGenerator=generator;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the default tool tip generator and sends a   {@link RendererChangeEvent} to all registered listeners.
 * @param generator  the generator (<code>null</code> permitted).
 * @since 1.0.14
 */
@Override public void setBaseToolTipGenerator(XYToolTipGenerator generator){
  this.baseToolTipGenerator=generator;
  fireChangeEvent();
}
Program: 47803
Project: 47803
Buggy source:
/** 
 * Sets the shape used as a line in each legend item and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param line  the line (<code>null</code> not permitted).
 * @see #getLegendLine()
 */
public void setLegendLine(Shape line){
  if (line == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.legendLine=line;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the shape used as a line in each legend item and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param line  the line (<code>null</code> not permitted).
 * @see #getLegendLine()
 */
public void setLegendLine(Shape line){
  ParamChecks.nullNotPermitted(line,"String_Node_Str");
  this.legendLine=line;
  fireChangeEvent();
}
Program: 47804
Project: 47804
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public void setSeriesToolTipGenerator(int series,XYToolTipGenerator generator){
  this.toolTipGeneratorList.set(series,generator);
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the tooltip generator for the specified series.
 * @param series  the series index.
 * @param generator  the tool tip generator (<code>null</code> permitted).
 * @since 1.0.14
 */
@Override public void setSeriesToolTipGenerator(int series,XYToolTipGenerator generator){
  this.toolTipGeneratorList.set(series,generator);
  fireChangeEvent();
}
Program: 47805
Project: 47805
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public void setURLGenerator(XYURLGenerator urlGenerator){
  this.urlGenerator=urlGenerator;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the URL generator.
 * @param urlGenerator  the generator (<code>null</code> permitted)
 * @since 1.0.14
 */
@Override public void setURLGenerator(XYURLGenerator urlGenerator){
  this.urlGenerator=urlGenerator;
  fireChangeEvent();
}
Program: 47806
Project: 47806
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public XYURLGenerator getURLGenerator(){
  return this.urlGenerator;
}

Fixed version (ground truth):
/** 
 * Returns the URL generator.
 * @return The URL generator (possibly <code>null</code>).
 * @since 1.0.14
 */
@Override public XYURLGenerator getURLGenerator(){
  return this.urlGenerator;
}
Program: 47807
Project: 47807
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getToolTipGenerator(int series,int item){
  XYToolTipGenerator generator=this.toolTipGeneratorList.get(series);
  if (generator == null) {
    generator=this.baseToolTipGenerator;
  }
  return generator;
}

Fixed version (ground truth):
/** 
 * Returns the tooltip generator for the specified series and item.
 * @param series  the series index.
 * @param item  the item index.
 * @return The tooltip generator (possibly <code>null</code>).
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getToolTipGenerator(int series,int item){
  XYToolTipGenerator generator=this.toolTipGeneratorList.get(series);
  if (generator == null) {
    generator=this.baseToolTipGenerator;
  }
  return generator;
}
Program: 47808
Project: 47808
Buggy source:
/** 
 * Draw the radial gridlines - the rings.
 * @param g2  the drawing surface.
 * @param plot  the plot.
 * @param radialAxis  the radial axis.
 * @param ticks  the ticks.
 * @param dataArea  the data area.
 */
@Override public void drawRadialGridLines(Graphics2D g2,PolarPlot plot,ValueAxis radialAxis,List<ValueTick> ticks,Rectangle2D dataArea){
  g2.setFont(radialAxis.getTickLabelFont());
  g2.setPaint(plot.getRadiusGridlinePaint());
  g2.setStroke(plot.getRadiusGridlineStroke());
  double axisMin=radialAxis.getLowerBound();
  Point center=plot.translateToJava2D(axisMin,axisMin,radialAxis,dataArea);
  for (  ValueTick tick : ticks) {
    double angleDegrees=plot.isCounterClockwise() ? plot.getAngleOffset() : -plot.getAngleOffset();
    Point p=plot.translateToJava2D(angleDegrees,((NumberTick)tick).getNumber().doubleValue(),radialAxis,dataArea);
    int r=p.x - center.x;
    int upperLeftX=center.x - r;
    int upperLeftY=center.y - r;
    int d=2 * r;
    Ellipse2D ring=new Ellipse2D.Double(upperLeftX,upperLeftY,d,d);
    g2.setPaint(plot.getRadiusGridlinePaint());
    g2.draw(ring);
  }
}

Fixed version (ground truth):
/** 
 * Draw the radial gridlines - the rings.
 * @param g2  the drawing surface (<code>null</code> not permitted).
 * @param plot  the plot (<code>null</code> not permitted).
 * @param radialAxis  the radial axis (<code>null</code> not permitted).
 * @param ticks  the ticks (<code>null</code> not permitted).
 * @param dataArea  the data area.
 */
@Override public void drawRadialGridLines(Graphics2D g2,PolarPlot plot,ValueAxis radialAxis,List<ValueTick> ticks,Rectangle2D dataArea){
  ParamChecks.nullNotPermitted(radialAxis,"String_Node_Str");
  g2.setFont(radialAxis.getTickLabelFont());
  g2.setPaint(plot.getRadiusGridlinePaint());
  g2.setStroke(plot.getRadiusGridlineStroke());
  double centerValue;
  if (radialAxis.isInverted()) {
    centerValue=radialAxis.getUpperBound();
  }
 else {
    centerValue=radialAxis.getLowerBound();
  }
  Point center=plot.translateToJava2D(0,centerValue,radialAxis,dataArea);
  for (  ValueTick tick : ticks) {
    double angleDegrees=plot.isCounterClockwise() ? plot.getAngleOffset() : -plot.getAngleOffset();
    Point p=plot.translateToJava2D(angleDegrees,((NumberTick)tick).getNumber().doubleValue(),radialAxis,dataArea);
    int r=p.x - center.x;
    int upperLeftX=center.x - r;
    int upperLeftY=center.y - r;
    int d=2 * r;
    Ellipse2D ring=new Ellipse2D.Double(upperLeftX,upperLeftY,d,d);
    g2.setPaint(plot.getRadiusGridlinePaint());
    g2.draw(ring);
  }
}
Program: 47810
Project: 47810
Buggy source:
/** 
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getSeriesToolTipGenerator(int series){
  return this.toolTipGeneratorList.get(series);
}

Fixed version (ground truth):
/** 
 * Returns the tool tip generator for the specified series.
 * @return The tooltip generator (possibly <code>null</code>).
 * @since 1.0.14
 */
@Override public XYToolTipGenerator getSeriesToolTipGenerator(int series){
  return this.toolTipGeneratorList.get(series);
}
Program: 47811
Project: 47811
Buggy source:
/** 
 * Draw the angular gridlines - the spokes.
 * @param g2  the drawing surface.
 * @param plot  the plot.
 * @param ticks  the ticks.
 * @param dataArea  the data area.
 */
@Override public void drawAngularGridLines(Graphics2D g2,PolarPlot plot,List<ValueTick> ticks,Rectangle2D dataArea){
  g2.setFont(plot.getAngleLabelFont());
  g2.setStroke(plot.getAngleGridlineStroke());
  g2.setPaint(plot.getAngleGridlinePaint());
  double axisMin=plot.getAxis().getLowerBound();
  double maxRadius=plot.getAxis().getUpperBound();
  Point center=plot.translateToJava2D(axisMin,axisMin,plot.getAxis(),dataArea);
  for (  ValueTick tick : ticks) {
    double tickVal=tick.getValue();
    Point p=plot.translateToJava2D(tickVal,maxRadius,plot.getAxis(),dataArea);
    g2.setPaint(plot.getAngleGridlinePaint());
    g2.drawLine(center.x,center.y,p.x,p.y);
    if (plot.isAngleLabelsVisible()) {
      int x=p.x;
      int y=p.y;
      g2.setPaint(plot.getAngleLabelPaint());
      TextUtilities.drawAlignedString(tick.getText(),g2,x,y,tick.getTextAnchor());
    }
  }
}

Fixed version (ground truth):
/** 
 * Draw the angular gridlines - the spokes.
 * @param g2  the drawing surface.
 * @param plot  the plot (<code>null</code> not permitted).
 * @param ticks  the ticks (<code>null</code> not permitted).
 * @param dataArea  the data area.
 */
@Override public void drawAngularGridLines(Graphics2D g2,PolarPlot plot,List<ValueTick> ticks,Rectangle2D dataArea){
  g2.setFont(plot.getAngleLabelFont());
  g2.setStroke(plot.getAngleGridlineStroke());
  g2.setPaint(plot.getAngleGridlinePaint());
  ValueAxis axis=plot.getAxis();
  double centerValue, outerValue;
  if (axis.isInverted()) {
    outerValue=axis.getLowerBound();
    centerValue=axis.getUpperBound();
  }
 else {
    outerValue=axis.getUpperBound();
    centerValue=axis.getLowerBound();
  }
  Point center=plot.translateToJava2D(0,centerValue,axis,dataArea);
  for (  ValueTick tick : ticks) {
    double tickVal=tick.getValue();
    Point p=plot.translateToJava2D(tickVal,outerValue,plot.getAxis(),dataArea);
    g2.setPaint(plot.getAngleGridlinePaint());
    g2.drawLine(center.x,center.y,p.x,p.y);
    if (plot.isAngleLabelsVisible()) {
      int x=p.x;
      int y=p.y;
      g2.setPaint(plot.getAngleLabelPaint());
      TextUtilities.drawAlignedString(tick.getText(),g2,x,y,tick.getTextAnchor());
    }
  }
}