nus-yam/ex-repair huggingface dataset:
Program: 47813
Project: 47813
Buggy source:
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}
Program: 47814
Project: 47814
Buggy source:
/** 
 * Returns a string representation of this entity.  This is primarily useful for debugging.
 * @return A string representation of this entity.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(this.key);
  buf.append("String_Node_Str" + getToolTipText());
  buf.append("String_Node_Str" + getURLText());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of this entity.  This is primarily useful for debugging.
 * @return A string representation of this entity.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(this.key);
  buf.append("String_Node_Str").append(getToolTipText());
  buf.append("String_Node_Str").append(getURLText());
  return buf.toString();
}
Program: 47815
Project: 47815
Buggy source:
/** 
 * Returns a string containing the coordinates for a given shape.  This string is intended for use in an image map.
 * @param shape  the shape (<code>null</code> not permitted).
 * @return The coordinates for a given shape as string.
 */
private String getPolyCoords(Shape shape){
  if (shape == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer result=new StringBuffer();
  boolean first=true;
  float[] coords=new float[6];
  PathIterator pi=shape.getPathIterator(null,1.0);
  while (!pi.isDone()) {
    pi.currentSegment(coords);
    if (first) {
      first=false;
      result.append((int)coords[0]);
      result.append("String_Node_Str").append((int)coords[1]);
    }
 else {
      result.append("String_Node_Str");
      result.append((int)coords[0]);
      result.append("String_Node_Str");
      result.append((int)coords[1]);
    }
    pi.next();
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string containing the coordinates for a given shape.  This string is intended for use in an image map.
 * @param shape  the shape (<code>null</code> not permitted).
 * @return The coordinates for a given shape as string.
 */
private String getPolyCoords(Shape shape){
  if (shape == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuilder result=new StringBuilder();
  boolean first=true;
  float[] coords=new float[6];
  PathIterator pi=shape.getPathIterator(null,1.0);
  while (!pi.isDone()) {
    pi.currentSegment(coords);
    if (first) {
      first=false;
      result.append((int)coords[0]);
      result.append("String_Node_Str").append((int)coords[1]);
    }
 else {
      result.append("String_Node_Str");
      result.append((int)coords[0]);
      result.append("String_Node_Str");
      result.append((int)coords[1]);
    }
    pi.next();
  }
  return result.toString();
}
Program: 47816
Project: 47816
Buggy source:
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(this.toolTipText);
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(this.toolTipText);
  return buf.toString();
}
Program: 47817
Project: 47817
Buggy source:
/** 
 * Returns an HTML image map tag for this entity.  The returned fragment should be <code>XHTML 1.0</code> compliant.
 * @param toolTipTagFragmentGenerator  a generator for the HTML fragmentthat will contain the tooltip text (<code>null</code> not permitted if this entity contains tooltip information).
 * @param urlTagFragmentGenerator  a generator for the HTML fragment thatwill contain the URL reference (<code>null</code> not permitted if this entity has a URL).
 * @return The HTML tag.
 */
public String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,URLTagFragmentGenerator urlTagFragmentGenerator){
  StringBuffer tag=new StringBuffer();
  boolean hasURL=(this.urlText == null ? false : !this.urlText.equals("String_Node_Str"));
  boolean hasToolTip=(this.toolTipText == null ? false : !this.toolTipText.equals("String_Node_Str"));
  if (hasURL || hasToolTip) {
    tag.append("String_Node_Str" + getShapeType() + "String_Node_Str"+ "String_Node_Str"+ getShapeCoords()+ "String_Node_Str");
    if (hasToolTip) {
      tag.append(toolTipTagFragmentGenerator.generateToolTipFragment(this.toolTipText));
    }
    if (hasURL) {
      tag.append(urlTagFragmentGenerator.generateURLFragment(this.urlText));
    }
 else {
      tag.append("String_Node_Str");
    }
    if (!hasToolTip) {
      tag.append("String_Node_Str");
    }
    tag.append("String_Node_Str");
  }
  return tag.toString();
}

Fixed version (ground truth):
/** 
 * Returns an HTML image map tag for this entity.  The returned fragment should be <code>XHTML 1.0</code> compliant.
 * @param toolTipTagFragmentGenerator  a generator for the HTML fragmentthat will contain the tooltip text (<code>null</code> not permitted if this entity contains tooltip information).
 * @param urlTagFragmentGenerator  a generator for the HTML fragment thatwill contain the URL reference (<code>null</code> not permitted if this entity has a URL).
 * @return The HTML tag.
 */
public String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,URLTagFragmentGenerator urlTagFragmentGenerator){
  StringBuilder tag=new StringBuilder();
  boolean hasURL=(this.urlText == null ? false : !this.urlText.equals("String_Node_Str"));
  boolean hasToolTip=(this.toolTipText == null ? false : !this.toolTipText.equals("String_Node_Str"));
  if (hasURL || hasToolTip) {
    tag.append("String_Node_Str" + getShapeType() + "String_Node_Str"+ "String_Node_Str"+ getShapeCoords()+ "String_Node_Str");
    if (hasToolTip) {
      tag.append(toolTipTagFragmentGenerator.generateToolTipFragment(this.toolTipText));
    }
    if (hasURL) {
      tag.append(urlTagFragmentGenerator.generateURLFragment(this.urlText));
    }
 else {
      tag.append("String_Node_Str");
    }
    if (!hasToolTip) {
      tag.append("String_Node_Str");
    }
    tag.append("String_Node_Str");
  }
  return tag.toString();
}
Program: 47818
Project: 47818
Buggy source:
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}
Program: 47819
Project: 47819
Buggy source:
/** 
 * Returns a string representation of the plot entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the plot entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}
Program: 47820
Project: 47820
Buggy source:
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the chart entity, useful for debugging.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(getToolTipText());
  return buf.toString();
}
Program: 47821
Project: 47821
Buggy source:
/** 
 * Creates a new comparator.
 * @param type  the type (<code>BY_KEY</code> or <code>BY_VALUE</code>,<code>null</code> not permitted).
 * @param order  the order (<code>null</code> not permitted).
 */
public KeyedValueComparator(KeyedValueComparatorType type,SortOrder order){
  if (order == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.type=type;
  this.order=order;
}

Fixed version (ground truth):
/** 
 * Creates a new comparator.
 * @param type  the type (<code>BY_KEY</code> or <code>BY_VALUE</code>,<code>null</code> not permitted).
 * @param order  the order (<code>null</code> not permitted).
 */
public KeyedValueComparator(KeyedValueComparatorType type,SortOrder order){
  ParamChecks.nullNotPermitted(type,"String_Node_Str");
  ParamChecks.nullNotPermitted(order,"String_Node_Str");
  this.type=type;
  this.order=order;
}
Program: 47822
Project: 47822
Buggy source:
/** 
 * Returns a string containing a description of the object for debugging purposes.
 * @return A string.
 */
@Override public String toString(){
  StringBuffer result=new StringBuffer();
  for (int i=0; i < this.labels.size(); i++) {
    result.append(getPieLabelRecord(i).toString()).append("String_Node_Str");
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string containing a description of the object for debugging purposes.
 * @return A string.
 */
@Override public String toString(){
  StringBuilder result=new StringBuilder();
  for (int i=0; i < this.labels.size(); i++) {
    result.append(getPieLabelRecord(i).toString()).append("String_Node_Str");
  }
  return result.toString();
}
Program: 47823
Project: 47823
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: 47824
Project: 47824
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: 47825
Project: 47825
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: 47826
Project: 47826
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: 47827
Project: 47827
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: 47828
Project: 47828
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: 47829
Project: 47829
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: 47830
Project: 47830
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: 47831
Project: 47831
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: 47837
Project: 47837
Buggy source:
/** 
 * Returns a string that is equivalent to the input string, but with special characters converted to HTML escape sequences.
 * @param input  the string to escape (<code>null</code> not permitted).
 * @return A string with characters escaped.
 * @since 1.0.9
 */
public static String htmlEscape(String input){
  if (input == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer result=new StringBuffer();
  int length=input.length();
  for (int i=0; i < length; i++) {
    char c=input.charAt(i);
    if (c == '&') {
      result.append("String_Node_Str");
    }
 else     if (c == '\"') {
      result.append("String_Node_Str");
    }
 else     if (c == '<') {
      result.append("String_Node_Str");
    }
 else     if (c == '>') {
      result.append("String_Node_Str");
    }
 else     if (c == '\'') {
      result.append("String_Node_Str");
    }
 else     if (c == '\\') {
      result.append("String_Node_Str");
    }
 else {
      result.append(c);
    }
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string that is equivalent to the input string, but with special characters converted to HTML escape sequences.
 * @param input  the string to escape (<code>null</code> not permitted).
 * @return A string with characters escaped.
 * @since 1.0.9
 */
public static String htmlEscape(String input){
  if (input == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuilder result=new StringBuilder();
  int length=input.length();
  for (int i=0; i < length; i++) {
    char c=input.charAt(i);
    if (c == '&') {
      result.append("String_Node_Str");
    }
 else     if (c == '\"') {
      result.append("String_Node_Str");
    }
 else     if (c == '<') {
      result.append("String_Node_Str");
    }
 else     if (c == '>') {
      result.append("String_Node_Str");
    }
 else     if (c == '\'') {
      result.append("String_Node_Str");
    }
 else     if (c == '\\') {
      result.append("String_Node_Str");
    }
 else {
      result.append(c);
    }
  }
  return result.toString();
}
Program: 47839
Project: 47839
Buggy source:
/** 
 * Returns a string that is equivalent to the input string, but with special characters converted to JavaScript escape sequences.
 * @param input  the string to escape (<code>null</code> not permitted).
 * @return A string with characters escaped.
 * @since 1.0.13
 */
public static String javascriptEscape(String input){
  if (input == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer result=new StringBuffer();
  int length=input.length();
  for (int i=0; i < length; i++) {
    char c=input.charAt(i);
    if (c == '\"') {
      result.append("String_Node_Str");
    }
 else     if (c == '\'') {
      result.append("String_Node_Str");
    }
 else     if (c == '\\') {
      result.append("String_Node_Str");
    }
 else {
      result.append(c);
    }
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string that is equivalent to the input string, but with special characters converted to JavaScript escape sequences.
 * @param input  the string to escape (<code>null</code> not permitted).
 * @return A string with characters escaped.
 * @since 1.0.13
 */
public static String javascriptEscape(String input){
  if (input == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuilder result=new StringBuilder();
  int length=input.length();
  for (int i=0; i < length; i++) {
    char c=input.charAt(i);
    if (c == '\"') {
      result.append("String_Node_Str");
    }
 else     if (c == '\'') {
      result.append("String_Node_Str");
    }
 else     if (c == '\\') {
      result.append("String_Node_Str");
    }
 else {
      result.append(c);
    }
  }
  return result.toString();
}
Program: 47840
Project: 47840
Buggy source:
/** 
 * Generates a label for the specified series.  This label will be used for the chart legend.
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series.
 * @return A series label.
 */
@Override public String generateLabel(XYDataset dataset,int series){
  if (dataset == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuffer label=new StringBuffer();
  label.append(MessageFormat.format(this.formatPattern,createItemArray(dataset,series)));
  Integer key=new Integer(series);
  List extraLabels=(List)this.seriesLabelLists.get(key);
  if (extraLabels != null) {
    Object[] temp=new Object[1];
    for (int i=0; i < extraLabels.size(); i++) {
      temp[0]=extraLabels.get(i);
      String labelAddition=MessageFormat.format(this.additionalFormatPattern,temp);
      label.append(labelAddition);
    }
  }
  return label.toString();
}

Fixed version (ground truth):
/** 
 * Generates a label for the specified series.  This label will be used for the chart legend.
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series.
 * @return A series label.
 */
@Override public String generateLabel(XYDataset dataset,int series){
  if (dataset == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  StringBuilder label=new StringBuilder();
  label.append(MessageFormat.format(this.formatPattern,createItemArray(dataset,series)));
  Integer key=new Integer(series);
  List extraLabels=(List)this.seriesLabelLists.get(key);
  if (extraLabels != null) {
    Object[] temp=new Object[1];
    for (int i=0; i < extraLabels.size(); i++) {
      temp[0]=extraLabels.get(i);
      String labelAddition=MessageFormat.format(this.additionalFormatPattern,temp);
      label.append(labelAddition);
    }
  }
  return label.toString();
}
Program: 47841
Project: 47841
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: 47842
Project: 47842
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: 47843
Project: 47843
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: 47845
Project: 47845
Buggy source:
/** 
 * Sets up default encoders (uses Sun PNG Encoder if JDK 1.4+ and the SunPNGEncoderAdapter class is available).
 */
private static void init(){
  encoders=new Hashtable();
  encoders.put("String_Node_Str","String_Node_Str");
  try {
    Class.forName("String_Node_Str");
    Class.forName("String_Node_Str");
    encoders.put("String_Node_Str","String_Node_Str");
    encoders.put("String_Node_Str","String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    encoders.put("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Sets up default encoders (uses Sun PNG Encoder if JDK 1.4+ and the SunPNGEncoderAdapter class is available).
 */
private static void init(){
  encoders=new HashMap<String,String>();
  encoders.put("String_Node_Str","String_Node_Str");
  encoders.put("String_Node_Str","String_Node_Str");
}
Program: 47846
Project: 47846
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));
}
Program: 47848
Project: 47848
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: 47849
Project: 47849
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: 47850
Project: 47850
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: 47851
Project: 47851
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: 47852
Project: 47852
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: 47853
Project: 47853
Buggy source:
/** 
 * Sets the alpha transparency that should be used when drawing the marker, and sends a   {@link MarkerChangeEvent} to all registeredlisteners.  The alpha transparency is a value in the range 0.0f (completely transparent) to 1.0f (completely opaque).
 * @param alpha  the alpha transparency (must be in the range 0.0f to1.0f).
 * @throws IllegalArgumentException if <code>alpha</code> is not in thespecified range.
 * @see #getAlpha()
 */
public void setAlpha(float alpha){
  if (alpha < 0.0f || alpha > 1.0f)   throw new IllegalArgumentException("String_Node_Str");
  this.alpha=alpha;
  notifyListeners(new MarkerChangeEvent(this));
}

Fixed version (ground truth):
/** 
 * Sets the alpha transparency that should be used when drawing the marker, and sends a   {@link MarkerChangeEvent} to all registeredlisteners.  The alpha transparency is a value in the range 0.0f (completely transparent) to 1.0f (completely opaque).
 * @param alpha  the alpha transparency (must be in the range 0.0f to1.0f).
 * @throws IllegalArgumentException if <code>alpha</code> is not in thespecified range.
 * @see #getAlpha()
 */
public void setAlpha(float alpha){
  if (alpha < 0.0f || alpha > 1.0f) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.alpha=alpha;
  notifyListeners(new MarkerChangeEvent(this));
}