nus-yam/ex-repair huggingface dataset:
Program: 85831
Project: 85831
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: 85833
Project: 85833
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: 85834
Project: 85834
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: 85835
Project: 85835
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: 85836
Project: 85836
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: 85837
Project: 85837
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: 85838
Project: 85838
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: 85839
Project: 85839
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: 85840
Project: 85840
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: 85841
Project: 85841
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: 85842
Project: 85842
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: 85843
Project: 85843
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: 85844
Project: 85844
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: 85845
Project: 85845
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: 85847
Project: 85847
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: 85848
Project: 85848
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());
    }
  }
}
Program: 85849
Project: 85849
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: 85853
Project: 85853
Buggy source:
/** 
 * Initialises the renderer. <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.
 */
@Override public XYItemRendererState initialise(Graphics2D g2,Rectangle2D dataArea,XYPlot plot,XYDataset data,PlotRenderingInfo info){
  State state=(State)super.initialise(g2,dataArea,plot,data,info);
  state.setProcessVisibleItemsOnly(false);
  this.points=new Vector();
  setDrawSeriesLineAsPath(true);
  return state;
}

Fixed version (ground truth):
/** 
 * Initialises the renderer. <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.
 */
@Override public XYItemRendererState initialise(Graphics2D g2,Rectangle2D dataArea,XYPlot plot,XYDataset data,PlotRenderingInfo info){
  State state=(State)super.initialise(g2,dataArea,plot,data,info);
  state.setProcessVisibleItemsOnly(false);
  this.points=new ArrayList<ControlPoint>();
  setDrawSeriesLineAsPath(true);
  return state;
}
Program: 85854
Project: 85854
Buggy source:
/** 
 * Some general checks for the lookup table.
 */
public void testGeneral(){
  LookupPaintScale s=new LookupPaintScale(0.0,100.0,Color.BLACK);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.BLACK,s.getPaint(50.0));
  assertEquals(Color.BLACK,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(new Double(50.0),Color.BLUE);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.BLUE,s.getPaint(50.0));
  assertEquals(Color.BLUE,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(new Double(50.0),Color.RED);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.RED,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(new Double(25.0),Color.green);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.green,s.getPaint(25.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.RED,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(new Double(75.0),Color.yellow);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.green,s.getPaint(25.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.yellow,s.getPaint(75.0));
  assertEquals(Color.yellow,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
}

Fixed version (ground truth):
/** 
 * Some general checks for the lookup table.
 */
public void testGeneral(){
  LookupPaintScale s=new LookupPaintScale(0.0,100.0,Color.BLACK);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.BLACK,s.getPaint(50.0));
  assertEquals(Color.BLACK,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(50.0,Color.BLUE);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.BLUE,s.getPaint(50.0));
  assertEquals(Color.BLUE,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(50.0,Color.RED);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.RED,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(25.0,Color.green);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.green,s.getPaint(25.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.RED,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
  s.add(75.0,Color.yellow);
  assertEquals(Color.BLACK,s.getPaint(-1.0));
  assertEquals(Color.BLACK,s.getPaint(0.0));
  assertEquals(Color.green,s.getPaint(25.0));
  assertEquals(Color.RED,s.getPaint(50.0));
  assertEquals(Color.yellow,s.getPaint(75.0));
  assertEquals(Color.yellow,s.getPaint(100.0));
  assertEquals(Color.BLACK,s.getPaint(101.0));
}
Program: 85855
Project: 85855
Buggy source:
/** 
 * Serialize an instance, restore it, and check for equality.
 */
public void testSerialization(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=null;
  try {
    ByteArrayOutputStream buffer=new ByteArrayOutputStream();
    ObjectOutput out=new ObjectOutputStream(buffer);
    out.writeObject(g1);
    out.close();
    ObjectInput in=new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    g2=(LookupPaintScale)in.readObject();
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  assertEquals(g1,g2);
  g1=new LookupPaintScale(1.0,2.0,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.yellow));
  g1.add(new Double(1.5),new GradientPaint(1.1f,2.2f,Color.RED,3.3f,4.4f,Color.BLUE));
  g2=null;
  try {
    ByteArrayOutputStream buffer=new ByteArrayOutputStream();
    ObjectOutput out=new ObjectOutputStream(buffer);
    out.writeObject(g1);
    out.close();
    ObjectInput in=new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    g2=(LookupPaintScale)in.readObject();
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  assertEquals(g1,g2);
}

Fixed version (ground truth):
/** 
 * Serialize an instance, restore it, and check for equality.
 */
public void testSerialization(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=null;
  try {
    ByteArrayOutputStream buffer=new ByteArrayOutputStream();
    ObjectOutput out=new ObjectOutputStream(buffer);
    out.writeObject(g1);
    out.close();
    ObjectInput in=new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    g2=(LookupPaintScale)in.readObject();
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  assertEquals(g1,g2);
  g1=new LookupPaintScale(1.0,2.0,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.yellow));
  g1.add(1.5,new GradientPaint(1.1f,2.2f,Color.RED,3.3f,4.4f,Color.BLUE));
  g2=null;
  try {
    ByteArrayOutputStream buffer=new ByteArrayOutputStream();
    ObjectOutput out=new ObjectOutputStream(buffer);
    out.writeObject(g1);
    out.close();
    ObjectInput in=new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    g2=(LookupPaintScale)in.readObject();
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  assertEquals(g1,g2);
}
Program: 85856
Project: 85856
Buggy source:
/** 
 * A test for the equals() method.
 */
public void testEquals(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=new LookupPaintScale();
  assertTrue(g1.equals(g2));
  assertTrue(g2.equals(g1));
  g1=new LookupPaintScale(1.0,2.0,Color.RED);
  assertFalse(g1.equals(g2));
  g2=new LookupPaintScale(1.0,2.0,Color.RED);
  assertTrue(g1.equals(g2));
  g1.add(new Double(1.5),new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  assertFalse(g1.equals(g2));
  g2.add(new Double(1.5),new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  assertTrue(g1.equals(g2));
}

Fixed version (ground truth):
/** 
 * A test for the equals() method.
 */
public void testEquals(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=new LookupPaintScale();
  assertTrue(g1.equals(g2));
  assertTrue(g2.equals(g1));
  g1=new LookupPaintScale(1.0,2.0,Color.RED);
  assertFalse(g1.equals(g2));
  g2=new LookupPaintScale(1.0,2.0,Color.RED);
  assertTrue(g1.equals(g2));
  g1.add(1.5,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  assertFalse(g1.equals(g2));
  g2.add(1.5,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  assertTrue(g1.equals(g2));
}
Program: 85857
Project: 85857
Buggy source:
private boolean lineEquals(Line2D line,double x1,double y1,double x2,double y2){
  boolean result=true;
  double epsilon=0.0000000001;
  if (Math.abs(line.getX1() - x1) > epsilon)   result=false;
  if (Math.abs(line.getY1() - y1) > epsilon)   result=false;
  if (Math.abs(line.getX2() - x2) > epsilon)   result=false;
  if (Math.abs(line.getY2() - y2) > epsilon)   result=false;
  if (result == false) {
    System.out.println(line.getX1() + "String_Node_Str" + line.getY1()+ "String_Node_Str"+ line.getX2()+ "String_Node_Str"+ line.getY2());
  }
  return result;
}

Fixed version (ground truth):
private boolean lineEquals(Line2D line,double x1,double y1,double x2,double y2){
  boolean result=true;
  double epsilon=0.0000000001;
  if (Math.abs(line.getX1() - x1) > epsilon) {
    result=false;
  }
  if (Math.abs(line.getY1() - y1) > epsilon) {
    result=false;
  }
  if (Math.abs(line.getX2() - x2) > epsilon) {
    result=false;
  }
  if (Math.abs(line.getY2() - y2) > epsilon) {
    result=false;
  }
  if (result == false) {
    System.out.println(line.getX1() + "String_Node_Str" + line.getY1()+ "String_Node_Str"+ line.getX2()+ "String_Node_Str"+ line.getY2());
  }
  return result;
}
Program: 85858
Project: 85858
Buggy source:
/** 
 * Init method.
 * @throws ServletException never.
 */
@Override public void init() throws ServletException {
  return;
}

Fixed version (ground truth):
/** 
 * Init method.
 * @throws ServletException never.
 */
@Override public void init() throws ServletException {
}
Program: 85859
Project: 85859
Buggy source:
/** 
 * Service method.
 * @param request  the request.
 * @param response  the response.
 * @throws ServletException ??.
 * @throws IOException ??.
 */
@Override public void service(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  HttpSession session=request.getSession();
  String filename=request.getParameter("String_Node_Str");
  if (filename == null) {
    throw new ServletException("String_Node_Str");
  }
  filename=ServletUtilities.searchReplace(filename,"String_Node_Str","String_Node_Str");
  File file=new File(System.getProperty("String_Node_Str"),filename);
  if (!file.exists()) {
    throw new ServletException("String_Node_Str" + filename + "String_Node_Str");
  }
  boolean isChartInUserList=false;
  ChartDeleter chartDeleter=(ChartDeleter)session.getAttribute("String_Node_Str");
  if (chartDeleter != null) {
    isChartInUserList=chartDeleter.isChartAvailable(filename);
  }
  boolean isChartPublic=false;
  if (filename.length() >= 6) {
    if (filename.substring(0,6).equals("String_Node_Str")) {
      isChartPublic=true;
    }
  }
  boolean isOneTimeChart=false;
  if (filename.startsWith(ServletUtilities.getTempOneTimeFilePrefix())) {
    isOneTimeChart=true;
  }
  if (isChartInUserList || isChartPublic || isOneTimeChart) {
    ServletUtilities.sendTempFile(file,response);
    if (isOneTimeChart) {
      file.delete();
    }
  }
 else {
    throw new ServletException("String_Node_Str");
  }
  return;
}

Fixed version (ground truth):
/** 
 * Service method.
 * @param request  the request.
 * @param response  the response.
 * @throws ServletException ??.
 * @throws IOException ??.
 */
@Override public void service(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  HttpSession session=request.getSession();
  String filename=request.getParameter("String_Node_Str");
  if (filename == null) {
    throw new ServletException("String_Node_Str");
  }
  filename=ServletUtilities.searchReplace(filename,"String_Node_Str","String_Node_Str");
  File file=new File(System.getProperty("String_Node_Str"),filename);
  if (!file.exists()) {
    throw new ServletException("String_Node_Str" + filename + "String_Node_Str");
  }
  boolean isChartInUserList=false;
  ChartDeleter chartDeleter=(ChartDeleter)session.getAttribute("String_Node_Str");
  if (chartDeleter != null) {
    isChartInUserList=chartDeleter.isChartAvailable(filename);
  }
  boolean isChartPublic=false;
  if (filename.length() >= 6) {
    if (filename.substring(0,6).equals("String_Node_Str")) {
      isChartPublic=true;
    }
  }
  boolean isOneTimeChart=false;
  if (filename.startsWith(ServletUtilities.getTempOneTimeFilePrefix())) {
    isOneTimeChart=true;
  }
  if (isChartInUserList || isChartPublic || isOneTimeChart) {
    ServletUtilities.sendTempFile(file,response);
    if (isOneTimeChart) {
      file.delete();
    }
  }
 else {
    throw new ServletException("String_Node_Str");
  }
}
Program: 85860
Project: 85860
Buggy source:
/** 
 * Binary streams the specified file to the HTTP response in 1KB chunks.
 * @param file  the file to be streamed.
 * @param response  the HTTP response object.
 * @param mimeType  the mime type of the file, null allowed.
 * @throws IOException if there is an I/O problem.
 */
public static void sendTempFile(File file,HttpServletResponse response,String mimeType) throws IOException {
  if (file.exists()) {
    BufferedInputStream bis=new BufferedInputStream(new FileInputStream(file));
    if (mimeType != null) {
      response.setHeader("String_Node_Str",mimeType);
    }
    response.setHeader("String_Node_Str",String.valueOf(file.length()));
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str",Locale.ENGLISH);
    sdf.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
    response.setHeader("String_Node_Str",sdf.format(new Date(file.lastModified())));
    BufferedOutputStream bos=new BufferedOutputStream(response.getOutputStream());
    byte[] input=new byte[1024];
    boolean eof=false;
    while (!eof) {
      int length=bis.read(input);
      if (length == -1) {
        eof=true;
      }
 else {
        bos.write(input,0,length);
      }
    }
    bos.flush();
    bis.close();
    bos.close();
  }
 else {
    throw new FileNotFoundException(file.getAbsolutePath());
  }
  return;
}

Fixed version (ground truth):
/** 
 * Binary streams the specified file to the HTTP response in 1KB chunks.
 * @param file  the file to be streamed.
 * @param response  the HTTP response object.
 * @param mimeType  the mime type of the file, null allowed.
 * @throws IOException if there is an I/O problem.
 */
public static void sendTempFile(File file,HttpServletResponse response,String mimeType) throws IOException {
  if (file.exists()) {
    BufferedInputStream bis=new BufferedInputStream(new FileInputStream(file));
    if (mimeType != null) {
      response.setHeader("String_Node_Str",mimeType);
    }
    response.setHeader("String_Node_Str",String.valueOf(file.length()));
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str",Locale.ENGLISH);
    sdf.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
    response.setHeader("String_Node_Str",sdf.format(new Date(file.lastModified())));
    BufferedOutputStream bos=new BufferedOutputStream(response.getOutputStream());
    byte[] input=new byte[1024];
    boolean eof=false;
    while (!eof) {
      int length=bis.read(input);
      if (length == -1) {
        eof=true;
      }
 else {
        bos.write(input,0,length);
      }
    }
    bos.flush();
    bis.close();
    bos.close();
  }
 else {
    throw new FileNotFoundException(file.getAbsolutePath());
  }
}
Program: 85867
Project: 85867
Buggy source:
/** 
 * Returns the edge for a range axis.
 * @param index  the axis index.
 * @return The edge.
 */
public RectangleEdge getRangeAxisEdge(int index){
  AxisLocation location=getRangeAxisLocation(index);
  RectangleEdge result=Plot.resolveRangeAxisLocation(location,this.orientation);
  if (result == null) {
    result=RectangleEdge.opposite(getRangeAxisEdge(0));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the edge for a range axis.
 * @param index  the axis index.
 * @return The edge.
 */
public RectangleEdge getRangeAxisEdge(int index){
  AxisLocation location=getRangeAxisLocation(index);
  return Plot.resolveRangeAxisLocation(location,this.orientation);
}
Program: 85868
Project: 85868
Buggy source:
/** 
 * Sets the flag that enables or disables panning of the plot along the range axes.
 * @param pannable  the new flag value.
 * @see #isRangePannable() 
 * @since 1.0.13
 */
public void setRangePannable(boolean pannable){
  this.rangePannable=pannable;
}

Fixed version (ground truth):
/** 
 * Sets the flag that enables or disables panning of the plot along the range axes.
 * @param pannable  the new flag value.
 * @see #isRangePannable()
 * @since 1.0.13
 */
public void setRangePannable(boolean pannable){
  this.rangePannable=pannable;
}
Program: 85869
Project: 85869
Buggy source:
/** 
 * Returns the edge for a range axis.
 * @param index  the axis index.
 * @return The edge.
 * @see #getRangeAxisLocation(int)
 * @see #getOrientation()
 */
public RectangleEdge getRangeAxisEdge(int index){
  AxisLocation location=getRangeAxisLocation(index);
  RectangleEdge result=Plot.resolveRangeAxisLocation(location,this.orientation);
  if (result == null) {
    result=RectangleEdge.opposite(getRangeAxisEdge());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the edge for a range axis.
 * @param index  the axis index.
 * @return The edge.
 * @see #getRangeAxisLocation(int)
 * @see #getOrientation()
 */
public RectangleEdge getRangeAxisEdge(int index){
  AxisLocation location=getRangeAxisLocation(index);
  return Plot.resolveRangeAxisLocation(location,this.orientation);
}
Program: 85870
Project: 85870
Buggy source:
/** 
 * Returns the edge for a domain axis.
 * @param index  the axis index.
 * @return The edge.
 * @see #getRangeAxisEdge(int)
 */
public RectangleEdge getDomainAxisEdge(int index){
  AxisLocation location=getDomainAxisLocation(index);
  RectangleEdge result=Plot.resolveDomainAxisLocation(location,this.orientation);
  if (result == null) {
    result=RectangleEdge.opposite(getDomainAxisEdge());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the edge for a domain axis.
 * @param index  the axis index.
 * @return The edge.
 * @see #getRangeAxisEdge(int)
 */
public RectangleEdge getDomainAxisEdge(int index){
  AxisLocation location=getDomainAxisLocation(index);
  return Plot.resolveDomainAxisLocation(location,this.orientation);
}
Program: 85871
Project: 85871
Buggy source:
/** 
 * Returns the domain axis for a dataset.
 * @param index  the dataset index.
 * @return The axis.
 */
public ValueAxis getDomainAxisForDataset(int index){
  int upper=Math.max(getDatasetCount(),getRendererCount());
  if (index < 0 || index >= upper) {
    throw new IllegalArgumentException("String_Node_Str" + index + "String_Node_Str");
  }
  ValueAxis valueAxis=null;
  List axisIndices=(List)this.datasetToDomainAxesMap.get(new Integer(index));
  if (axisIndices != null) {
    Integer axisIndex=(Integer)axisIndices.get(0);
    valueAxis=getDomainAxis(axisIndex.intValue());
  }
 else {
    valueAxis=getDomainAxis(0);
  }
  return valueAxis;
}

Fixed version (ground truth):
/** 
 * Returns the domain axis for a dataset.
 * @param index  the dataset index.
 * @return The axis.
 */
public ValueAxis getDomainAxisForDataset(int index){
  int upper=Math.max(getDatasetCount(),getRendererCount());
  if (index < 0 || index >= upper) {
    throw new IllegalArgumentException("String_Node_Str" + index + "String_Node_Str");
  }
  ValueAxis valueAxis;
  List axisIndices=(List)this.datasetToDomainAxesMap.get(new Integer(index));
  if (axisIndices != null) {
    Integer axisIndex=(Integer)axisIndices.get(0);
    valueAxis=getDomainAxis(axisIndex.intValue());
  }
 else {
    valueAxis=getDomainAxis(0);
  }
  return valueAxis;
}
Program: 85872
Project: 85872
Buggy source:
/** 
 * Draws a range crosshair.
 * @param g2  the graphics target.
 * @param dataArea  the data area.
 * @param orientation  the plot orientation.
 * @param value  the crosshair value.
 * @param axis  the axis against which the value is measured.
 * @param stroke  the stroke used to draw the crosshair line.
 * @param paint  the paint used to draw the crosshair line.
 * @since 1.0.4
 */
protected void drawRangeCrosshair(Graphics2D g2,Rectangle2D dataArea,PlotOrientation orientation,double value,ValueAxis axis,Stroke stroke,Paint paint){
  if (axis.getRange().contains(value)) {
    Line2D line=null;
    if (orientation == PlotOrientation.HORIZONTAL) {
      double xx=axis.valueToJava2D(value,dataArea,RectangleEdge.BOTTOM);
      line=new Line2D.Double(xx,dataArea.getMinY(),xx,dataArea.getMaxY());
    }
 else {
      double yy=axis.valueToJava2D(value,dataArea,RectangleEdge.LEFT);
      line=new Line2D.Double(dataArea.getMinX(),yy,dataArea.getMaxX(),yy);
    }
    g2.setStroke(stroke);
    g2.setPaint(paint);
    g2.draw(line);
  }
}

Fixed version (ground truth):
/** 
 * Draws a range crosshair.
 * @param g2  the graphics target.
 * @param dataArea  the data area.
 * @param orientation  the plot orientation.
 * @param value  the crosshair value.
 * @param axis  the axis against which the value is measured.
 * @param stroke  the stroke used to draw the crosshair line.
 * @param paint  the paint used to draw the crosshair line.
 * @since 1.0.4
 */
protected void drawRangeCrosshair(Graphics2D g2,Rectangle2D dataArea,PlotOrientation orientation,double value,ValueAxis axis,Stroke stroke,Paint paint){
  if (axis.getRange().contains(value)) {
    Line2D line;
    if (orientation == PlotOrientation.HORIZONTAL) {
      double xx=axis.valueToJava2D(value,dataArea,RectangleEdge.BOTTOM);
      line=new Line2D.Double(xx,dataArea.getMinY(),xx,dataArea.getMaxY());
    }
 else {
      double yy=axis.valueToJava2D(value,dataArea,RectangleEdge.LEFT);
      line=new Line2D.Double(dataArea.getMinX(),yy,dataArea.getMaxX(),yy);
    }
    g2.setStroke(stroke);
    g2.setPaint(paint);
    g2.draw(line);
  }
}
Program: 85873
Project: 85873
Buggy source:
/** 
 * Draws the gridlines for the plot's primary range axis, if they are visible.
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 * @see #drawDomainGridlines(Graphics2D,Rectangle2D,List)
 */
protected void drawRangeGridlines(Graphics2D g2,Rectangle2D area,List ticks){
  if (getRenderer() == null) {
    return;
  }
  if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
    Stroke gridStroke=null;
    Paint gridPaint=null;
    ValueAxis axis=getRangeAxis();
    if (axis != null) {
      Iterator iterator=ticks.iterator();
      boolean paintLine=false;
      while (iterator.hasNext()) {
        paintLine=false;
        ValueTick tick=(ValueTick)iterator.next();
        if ((tick.getTickType() == TickType.MINOR) && isRangeMinorGridlinesVisible()) {
          gridStroke=getRangeMinorGridlineStroke();
          gridPaint=getRangeMinorGridlinePaint();
          paintLine=true;
        }
 else         if ((tick.getTickType() == TickType.MAJOR) && isRangeGridlinesVisible()) {
          gridStroke=getRangeGridlineStroke();
          gridPaint=getRangeGridlinePaint();
          paintLine=true;
        }
        if ((tick.getValue() != 0.0 || !isRangeZeroBaselineVisible()) && paintLine) {
          getRenderer().drawRangeGridline(g2,this,getRangeAxis(),area,tick.getValue(),gridPaint,gridStroke);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Draws the gridlines for the plot's primary range axis, if they are visible.
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 * @see #drawDomainGridlines(Graphics2D,Rectangle2D,List)
 */
protected void drawRangeGridlines(Graphics2D g2,Rectangle2D area,List ticks){
  if (getRenderer() == null) {
    return;
  }
  if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
    Stroke gridStroke=null;
    Paint gridPaint=null;
    ValueAxis axis=getRangeAxis();
    if (axis != null) {
      Iterator iterator=ticks.iterator();
      boolean paintLine;
      while (iterator.hasNext()) {
        paintLine=false;
        ValueTick tick=(ValueTick)iterator.next();
        if ((tick.getTickType() == TickType.MINOR) && isRangeMinorGridlinesVisible()) {
          gridStroke=getRangeMinorGridlineStroke();
          gridPaint=getRangeMinorGridlinePaint();
          paintLine=true;
        }
 else         if ((tick.getTickType() == TickType.MAJOR) && isRangeGridlinesVisible()) {
          gridStroke=getRangeGridlineStroke();
          gridPaint=getRangeGridlinePaint();
          paintLine=true;
        }
        if ((tick.getValue() != 0.0 || !isRangeZeroBaselineVisible()) && paintLine) {
          getRenderer().drawRangeGridline(g2,this,getRangeAxis(),area,tick.getValue(),gridPaint,gridStroke);
        }
      }
    }
  }
}
Program: 85874
Project: 85874
Buggy source:
/** 
 * Draws a domain crosshair.
 * @param g2  the graphics target.
 * @param dataArea  the data area.
 * @param orientation  the plot orientation.
 * @param value  the crosshair value.
 * @param axis  the axis against which the value is measured.
 * @param stroke  the stroke used to draw the crosshair line.
 * @param paint  the paint used to draw the crosshair line.
 * @since 1.0.4
 */
protected void drawDomainCrosshair(Graphics2D g2,Rectangle2D dataArea,PlotOrientation orientation,double value,ValueAxis axis,Stroke stroke,Paint paint){
  if (axis.getRange().contains(value)) {
    Line2D line=null;
    if (orientation == PlotOrientation.VERTICAL) {
      double xx=axis.valueToJava2D(value,dataArea,RectangleEdge.BOTTOM);
      line=new Line2D.Double(xx,dataArea.getMinY(),xx,dataArea.getMaxY());
    }
 else {
      double yy=axis.valueToJava2D(value,dataArea,RectangleEdge.LEFT);
      line=new Line2D.Double(dataArea.getMinX(),yy,dataArea.getMaxX(),yy);
    }
    g2.setStroke(stroke);
    g2.setPaint(paint);
    g2.draw(line);
  }
}

Fixed version (ground truth):
/** 
 * Draws a domain crosshair.
 * @param g2  the graphics target.
 * @param dataArea  the data area.
 * @param orientation  the plot orientation.
 * @param value  the crosshair value.
 * @param axis  the axis against which the value is measured.
 * @param stroke  the stroke used to draw the crosshair line.
 * @param paint  the paint used to draw the crosshair line.
 * @since 1.0.4
 */
protected void drawDomainCrosshair(Graphics2D g2,Rectangle2D dataArea,PlotOrientation orientation,double value,ValueAxis axis,Stroke stroke,Paint paint){
  if (axis.getRange().contains(value)) {
    Line2D line;
    if (orientation == PlotOrientation.VERTICAL) {
      double xx=axis.valueToJava2D(value,dataArea,RectangleEdge.BOTTOM);
      line=new Line2D.Double(xx,dataArea.getMinY(),xx,dataArea.getMaxY());
    }
 else {
      double yy=axis.valueToJava2D(value,dataArea,RectangleEdge.LEFT);
      line=new Line2D.Double(dataArea.getMinX(),yy,dataArea.getMaxX(),yy);
    }
    g2.setStroke(stroke);
    g2.setPaint(paint);
    g2.draw(line);
  }
}
Program: 85875
Project: 85875
Buggy source:
/** 
 * Returns the paint for the minor grid lines (if any) plotted against the  range axis.
 * @return The paint (never <code>null</code>).
 * @see #setRangeMinorGridlinePaint(Paint)
 * @since 1.0.12
 */
public Paint getRangeMinorGridlinePaint(){
  return this.rangeMinorGridlinePaint;
}

Fixed version (ground truth):
/** 
 * Returns the paint for the minor grid lines (if any) plotted against the range axis.
 * @return The paint (never <code>null</code>).
 * @see #setRangeMinorGridlinePaint(Paint)
 * @since 1.0.12
 */
public Paint getRangeMinorGridlinePaint(){
  return this.rangeMinorGridlinePaint;
}
Program: 85876
Project: 85876
Buggy source:
/** 
 * Confirm that cloning works.
 */
public void testCloning(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=null;
  try {
    g2=(LookupPaintScale)g1.clone();
  }
 catch (  CloneNotSupportedException e) {
    e.printStackTrace();
  }
  assertTrue(g1 != g2);
  assertTrue(g1.getClass() == g2.getClass());
  assertTrue(g1.equals(g2));
  g1.add(new Double(0.5),Color.RED);
  assertFalse(g1.equals(g2));
  g2.add(new Double(0.5),Color.RED);
  assertTrue(g1.equals(g2));
  g1=new LookupPaintScale(1.0,2.0,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.green));
  g1.add(new Double(1.5),new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  g2=null;
  try {
    g2=(LookupPaintScale)g1.clone();
  }
 catch (  CloneNotSupportedException e) {
    e.printStackTrace();
  }
  assertTrue(g1 != g2);
  assertTrue(g1.getClass() == g2.getClass());
  assertTrue(g1.equals(g2));
}

Fixed version (ground truth):
/** 
 * Confirm that cloning works.
 */
public void testCloning(){
  LookupPaintScale g1=new LookupPaintScale();
  LookupPaintScale g2=null;
  try {
    g2=(LookupPaintScale)g1.clone();
  }
 catch (  CloneNotSupportedException e) {
    e.printStackTrace();
  }
  assertTrue(g1 != g2);
  assertTrue(g1.getClass() == g2.getClass());
  assertTrue(g1.equals(g2));
  g1.add(0.5,Color.RED);
  assertFalse(g1.equals(g2));
  g2.add(0.5,Color.RED);
  assertTrue(g1.equals(g2));
  g1=new LookupPaintScale(1.0,2.0,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.green));
  g1.add(1.5,new GradientPaint(1.0f,2.0f,Color.RED,3.0f,4.0f,Color.BLUE));
  g2=null;
  try {
    g2=(LookupPaintScale)g1.clone();
  }
 catch (  CloneNotSupportedException e) {
    e.printStackTrace();
  }
  assertTrue(g1 != g2);
  assertTrue(g1.getClass() == g2.getClass());
  assertTrue(g1.equals(g2));
}