nus-yam/ex-repair huggingface dataset:
Program: 47854
Project: 47854
Buggy source:
/** 
 * Constructs a new marker.
 * @param paint  the paint (<code>null</code> not permitted).
 * @param stroke  the stroke (<code>null</code> not permitted).
 * @param outlinePaint  the outline paint (<code>null</code> permitted).
 * @param outlineStroke  the outline stroke (<code>null</code> permitted).
 * @param alpha  the alpha transparency (must be in the range 0.0f to1.0f).
 * @throws IllegalArgumentException if <code>paint</code> or<code>stroke</code> is <code>null</code>, or <code>alpha</code> is not in the specified range.
 */
protected Marker(Paint paint,Stroke stroke,Paint outlinePaint,Stroke outlineStroke,float alpha){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (stroke == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (alpha < 0.0f || alpha > 1.0f)   throw new IllegalArgumentException("String_Node_Str");
  this.paint=paint;
  this.stroke=stroke;
  this.outlinePaint=outlinePaint;
  this.outlineStroke=outlineStroke;
  this.alpha=alpha;
  this.labelFont=new Font("String_Node_Str",Font.PLAIN,9);
  this.labelPaint=Color.BLACK;
  this.labelAnchor=RectangleAnchor.TOP_LEFT;
  this.labelOffset=new RectangleInsets(3.0,3.0,3.0,3.0);
  this.labelOffsetType=LengthAdjustmentType.CONTRACT;
  this.labelTextAnchor=TextAnchor.CENTER;
  this.listenerList=new EventListenerList();
}

Fixed version (ground truth):
/** 
 * Constructs a new marker.
 * @param paint  the paint (<code>null</code> not permitted).
 * @param stroke  the stroke (<code>null</code> not permitted).
 * @param outlinePaint  the outline paint (<code>null</code> permitted).
 * @param outlineStroke  the outline stroke (<code>null</code> permitted).
 * @param alpha  the alpha transparency (must be in the range 0.0f to1.0f).
 * @throws IllegalArgumentException if <code>paint</code> or<code>stroke</code> is <code>null</code>, or <code>alpha</code> is not in the specified range.
 */
protected Marker(Paint paint,Stroke stroke,Paint outlinePaint,Stroke outlineStroke,float alpha){
  if (paint == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (stroke == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (alpha < 0.0f || alpha > 1.0f) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.paint=paint;
  this.stroke=stroke;
  this.outlinePaint=outlinePaint;
  this.outlineStroke=outlineStroke;
  this.alpha=alpha;
  this.labelFont=new Font("String_Node_Str",Font.PLAIN,9);
  this.labelPaint=Color.BLACK;
  this.labelAnchor=RectangleAnchor.TOP_LEFT;
  this.labelOffset=new RectangleInsets(3.0,3.0,3.0,3.0);
  this.labelOffsetType=LengthAdjustmentType.CONTRACT;
  this.labelTextAnchor=TextAnchor.CENTER;
  this.listenerList=new EventListenerList();
}
Program: 47855
Project: 47855
Buggy source:
/** 
 * Sets the alpha transparency used when drawing the background image.
 * @param alpha  the alpha transparency (in the range 0.0f to 1.0f, where0.0f is fully transparent, and 1.0f is fully opaque).
 * @throws IllegalArgumentException if <code>alpha</code> is not withinthe specified range.
 * @see #getBackgroundImageAlpha()
 */
public void setBackgroundImageAlpha(float alpha){
  if (alpha < 0.0f || alpha > 1.0f)   throw new IllegalArgumentException("String_Node_Str");
  if (this.backgroundImageAlpha != alpha) {
    this.backgroundImageAlpha=alpha;
    fireChangeEvent();
  }
}

Fixed version (ground truth):
/** 
 * Sets the alpha transparency used when drawing the background image.
 * @param alpha  the alpha transparency (in the range 0.0f to 1.0f, where0.0f is fully transparent, and 1.0f is fully opaque).
 * @throws IllegalArgumentException if <code>alpha</code> is not withinthe specified range.
 * @see #getBackgroundImageAlpha()
 */
public void setBackgroundImageAlpha(float alpha){
  if (alpha < 0.0f || alpha > 1.0f) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (this.backgroundImageAlpha != alpha) {
    this.backgroundImageAlpha=alpha;
    fireChangeEvent();
  }
}
Program: 47856
Project: 47856
Buggy source:
/** 
 * Translates a (theta, radius) pair into Java2D coordinates.  If <code>radius</code> is less than the lower bound of the axis, then this method returns the centre point.
 * @param angleDegrees  the angle in degrees.
 * @param radius  the radius.
 * @param dataArea  the data area.
 * @return A point in Java2D space.
 * @since 1.0.14
 */
public Point translateToJava2D(double angleDegrees,double radius,ValueAxis axis,Rectangle2D dataArea){
  if (counterClockwise)   angleDegrees=-angleDegrees;
  double radians=Math.toRadians(angleDegrees + this.angleOffset);
  double minx=dataArea.getMinX() + this.margin;
  double maxx=dataArea.getMaxX() - this.margin;
  double miny=dataArea.getMinY() + this.margin;
  double maxy=dataArea.getMaxY() - this.margin;
  double halfWidth=(maxx - minx) / 2.0;
  double halfHeight=(maxy - miny) / 2.0;
  double midX=minx + halfWidth;
  double midY=miny + halfHeight;
  double l=Math.min(halfWidth,halfHeight);
  Rectangle2D quadrant=new Rectangle2D.Double(midX,midY,l,l);
  double axisMin=axis.getLowerBound();
  double adjustedRadius=Math.max(radius,axisMin);
  double length=axis.valueToJava2D(adjustedRadius,quadrant,RectangleEdge.BOTTOM) - midX;
  float x=(float)(midX + Math.cos(radians) * length);
  float y=(float)(midY + Math.sin(radians) * length);
  int ix=Math.round(x);
  int iy=Math.round(y);
  Point p=new Point(ix,iy);
  return p;
}

Fixed version (ground truth):
/** 
 * Translates a (theta, radius) pair into Java2D coordinates.  If <code>radius</code> is less than the lower bound of the axis, then this method returns the centre point.
 * @param angleDegrees  the angle in degrees.
 * @param radius  the radius.
 * @param dataArea  the data area.
 * @return A point in Java2D space.
 * @since 1.0.14
 */
public Point translateToJava2D(double angleDegrees,double radius,ValueAxis axis,Rectangle2D dataArea){
  if (counterClockwise) {
    angleDegrees=-angleDegrees;
  }
  double radians=Math.toRadians(angleDegrees + this.angleOffset);
  double minx=dataArea.getMinX() + this.margin;
  double maxx=dataArea.getMaxX() - this.margin;
  double miny=dataArea.getMinY() + this.margin;
  double maxy=dataArea.getMaxY() - this.margin;
  double halfWidth=(maxx - minx) / 2.0;
  double halfHeight=(maxy - miny) / 2.0;
  double midX=minx + halfWidth;
  double midY=miny + halfHeight;
  double l=Math.min(halfWidth,halfHeight);
  Rectangle2D quadrant=new Rectangle2D.Double(midX,midY,l,l);
  double axisMin=axis.getLowerBound();
  double adjustedRadius=Math.max(radius,axisMin);
  double length=axis.valueToJava2D(adjustedRadius,quadrant,RectangleEdge.BOTTOM) - midX;
  float x=(float)(midX + Math.cos(radians) * length);
  float y=(float)(midY + Math.sin(radians) * length);
  int ix=Math.round(x);
  int iy=Math.round(y);
  Point p=new Point(ix,iy);
  return p;
}
Program: 47858
Project: 47858
Buggy source:
/** 
 * Binding this object to the session has no additional effects.
 * @param event  the session bind event.
 */
@Override public void valueBound(HttpSessionBindingEvent event){
  return;
}

Fixed version (ground truth):
/** 
 * Binding this object to the session has no additional effects.
 * @param event  the session bind event.
 */
@Override public void valueBound(HttpSessionBindingEvent event){
}
Program: 47859
Project: 47859
Buggy source:
/** 
 * When this object is unbound from the session (including upon session expiry) the files that have been added to the ArrayList are iterated and deleted.
 * @param event  the session unbind event.
 */
@Override public void valueUnbound(HttpSessionBindingEvent event){
  Iterator iter=this.chartNames.listIterator();
  while (iter.hasNext()) {
    String filename=(String)iter.next();
    File file=new File(System.getProperty("String_Node_Str"),filename);
    if (file.exists()) {
      file.delete();
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * When this object is unbound from the session (including upon session expiry) the files that have been added to the ArrayList are iterated and deleted.
 * @param event  the session unbind event.
 */
@Override public void valueUnbound(HttpSessionBindingEvent event){
  File tempDir=new File(System.getProperty("String_Node_Str"));
  for (  String filename : this.chartNames) {
    File file=new File(tempDir,filename);
    if (file.exists()) {
      file.delete();
    }
  }
}
Program: 47861
Project: 47861
Buggy source:
/** 
 * Creates a new series with the specified key and description.
 * @param key  the series key (<code>null</code> NOT permitted).
 * @param description  the series description (<code>null</code> permitted).
 */
protected Series(Comparable key,String description){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.key=key;
  this.description=description;
  this.listeners=new EventListenerList();
  this.propertyChangeSupport=new PropertyChangeSupport(this);
  this.vetoableChangeSupport=new VetoableChangeSupport(this);
  this.notify=true;
}

Fixed version (ground truth):
/** 
 * Creates a new series with the specified key and description.
 * @param key  the series key (<code>null</code> NOT permitted).
 * @param description  the series description (<code>null</code> permitted).
 */
protected Series(Comparable key,String description){
  ParamChecks.nullNotPermitted(key,"String_Node_Str");
  this.key=key;
  this.description=description;
  this.listeners=new EventListenerList();
  this.propertyChangeSupport=new PropertyChangeSupport(this);
  this.vetoableChangeSupport=new VetoableChangeSupport(this);
  this.notify=true;
}
Program: 47862
Project: 47862
Buggy source:
/** 
 * Sets the key for the series and sends a <code>VetoableChangeEvent</code> (with the property name "Key") to all registered listeners.  For  backwards compatibility, this method also fires a regular  <code>PropertyChangeEvent</code>.
 * @param key  the key (<code>null</code> not permitted).
 * @see #getKey()
 */
public void setKey(Comparable key){
  ParamChecks.nullNotPermitted(key,"String_Node_Str");
  Comparable old=this.key;
  try {
    this.vetoableChangeSupport.fireVetoableChange("String_Node_Str",old,key);
    this.key=key;
    this.propertyChangeSupport.firePropertyChange("String_Node_Str",old,key);
  }
 catch (  PropertyVetoException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sets the key for the series and sends a <code>VetoableChangeEvent</code> (with the property name "Key") to all registered listeners.  If the change is vetoed by a listener, this method will throw an  IllegalArgumentException.
 * @param key  the key (<code>null</code> not permitted).
 * @see #getKey()
 */
public void setKey(Comparable key){
  ParamChecks.nullNotPermitted(key,"String_Node_Str");
  Comparable old=this.key;
  try {
    this.vetoableChangeSupport.fireVetoableChange("String_Node_Str",old,key);
    this.key=key;
  }
 catch (  PropertyVetoException e) {
    throw new IllegalArgumentException(e);
  }
}
Program: 47863
Project: 47863
Buggy source:
/** 
 * Removes all the series from the collection and sends a  {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries(){
  for (int i=0; i < this.data.size(); i++) {
    XYSeries series=(XYSeries)this.data.get(i);
    series.removeChangeListener(this);
    series.removeVetoableChangeListener(this);
  }
  this.data.clear();
  fireDatasetChanged();
}

Fixed version (ground truth):
/** 
 * Removes all the series from the collection and sends a  {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries(){
  for (  XYSeries series : this.data) {
    series.removeChangeListener(this);
    series.removeVetoableChangeListener(this);
  }
  this.data.clear();
  fireDatasetChanged();
}
Program: 47864
Project: 47864
Buggy source:
/** 
 * Removes a series from the collection and sends a  {@link DatasetChangeEvent} to all registered listeners.
 * @param series  the series (<code>null</code> not permitted).
 */
public void removeSeries(XYSeries series){
  if (series == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    series.removeVetoableChangeListener(this);
    this.data.remove(series);
    fireDatasetChanged();
  }
}

Fixed version (ground truth):
/** 
 * Removes a series from the collection and sends a  {@link DatasetChangeEvent} to all registered listeners.
 * @param series  the series (<code>null</code> not permitted).
 */
public void removeSeries(XYSeries series){
  ParamChecks.nullNotPermitted(series,"String_Node_Str");
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    series.removeVetoableChangeListener(this);
    this.data.remove(series);
    fireDatasetChanged();
  }
}
Program: 47865
Project: 47865
Buggy source:
/** 
 * Returns the index of the specified series, or -1 if that series is not present in the dataset.
 * @param series  the series (<code>null</code> not permitted).
 * @return The series index.
 * @since 1.0.6
 */
public int indexOf(XYSeries series){
  if (series == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return this.data.indexOf(series);
}

Fixed version (ground truth):
/** 
 * Returns the index of the specified series, or -1 if that series is not present in the dataset.
 * @param series  the series (<code>null</code> not permitted).
 * @return The series index.
 * @since 1.0.6
 */
public int indexOf(XYSeries series){
  ParamChecks.nullNotPermitted(series,"String_Node_Str");
  return this.data.indexOf(series);
}
Program: 47866
Project: 47866
Buggy source:
/** 
 * Returns the x-value for the specified series and item.
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 * @return The value.
 */
@Override public Number getX(int series,int item){
  XYSeries s=(XYSeries)this.data.get(series);
  return s.getX(item);
}

Fixed version (ground truth):
/** 
 * Returns the x-value for the specified series and item.
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 * @return The value.
 */
@Override public Number getX(int series,int item){
  XYSeries s=this.data.get(series);
  return s.getX(item);
}
Program: 47867
Project: 47867
Buggy source:
/** 
 * Returns the y-value for the specified series and item.
 * @param series  the series (zero-based index).
 * @param index  the index of the item of interest (zero-based).
 * @return The value (possibly <code>null</code>).
 */
@Override public Number getY(int series,int index){
  XYSeries s=(XYSeries)this.data.get(series);
  return s.getY(index);
}

Fixed version (ground truth):
/** 
 * Returns the y-value for the specified series and item.
 * @param series  the series (zero-based index).
 * @param index  the index of the item of interest (zero-based).
 * @return The value (possibly <code>null</code>).
 */
@Override public Number getY(int series,int index){
  XYSeries s=this.data.get(series);
  return s.getY(index);
}
Program: 47868
Project: 47868
Buggy source:
/** 
 * Returns a series from the collection.
 * @param key  the key (<code>null</code> not permitted).
 * @return The series with the specified key.
 * @throws UnknownKeyException if <code>key</code> is not found in thecollection.
 * @since 1.0.9
 */
public XYSeries getSeries(Comparable key){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Iterator iterator=this.data.iterator();
  while (iterator.hasNext()) {
    XYSeries series=(XYSeries)iterator.next();
    if (key.equals(series.getKey())) {
      return series;
    }
  }
  throw new UnknownKeyException("String_Node_Str" + key);
}

Fixed version (ground truth):
/** 
 * Returns a series from the collection.
 * @param key  the key (<code>null</code> not permitted).
 * @return The series with the specified key.
 * @throws UnknownKeyException if <code>key</code> is not found in thecollection.
 * @since 1.0.9
 */
public XYSeries getSeries(Comparable key){
  ParamChecks.nullNotPermitted(key,"String_Node_Str");
  for (  XYSeries series : this.data) {
    if (key.equals(series.getKey())) {
      return series;
    }
  }
  throw new UnknownKeyException("String_Node_Str" + key);
}
Program: 47869
Project: 47869
Buggy source:
/** 
 * Constructs a dataset and populates it with a single series.
 * @param series  the series (<code>null</code> ignored).
 */
public XYSeriesCollection(XYSeries series){
  this.data=new java.util.ArrayList();
  this.intervalDelegate=new IntervalXYDelegate(this,false);
  addChangeListener(this.intervalDelegate);
  if (series != null) {
    this.data.add(series);
    series.addChangeListener(this);
    series.addVetoableChangeListener(this);
  }
}

Fixed version (ground truth):
/** 
 * Constructs a dataset and populates it with a single series.
 * @param series  the series (<code>null</code> ignored).
 */
public XYSeriesCollection(XYSeries series){
  this.data=new java.util.ArrayList<XYSeries>();
  this.intervalDelegate=new IntervalXYDelegate(this,false);
  addChangeListener(this.intervalDelegate);
  if (series != null) {
    this.data.add(series);
    series.addChangeListener(this);
    series.addVetoableChangeListener(this);
  }
}
Program: 47870
Project: 47870
Buggy source:
/** 
 * Receives notification that the key for one of the series in the  collection has changed, and vetos it if the key is already present in  the collection.
 * @param e  the event.
 * @since 1.0.14
 */
@Override public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
  if (!"String_Node_Str".equals(e.getPropertyName())) {
    return;
  }
  Series s=(Series)e.getSource();
  if (getSeries(s.getKey()) == null) {
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str");
  }
  Comparable key=(Comparable)e.getNewValue();
  if (this.getSeries(key) != null) {
    throw new PropertyVetoException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Receives notification that the key for one of the series in the  collection has changed, and vetos it if the key is already present in  the collection.
 * @param e  the event.
 * @since 1.0.14
 */
@Override public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException {
  if (!"String_Node_Str".equals(e.getPropertyName())) {
    return;
  }
  Series s=(Series)e.getSource();
  if (getSeriesIndex(s.getKey()) == -1) {
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str");
  }
  Comparable key=(Comparable)e.getNewValue();
  if (getSeriesIndex(key) >= 0) {
    throw new PropertyVetoException("String_Node_Str",e);
  }
}
Program: 47871
Project: 47871
Buggy source:
public UDFDateFormat(){
}

Fixed version (ground truth):
public UDFDateFormat(){
  standardFormatter.setLenient(false);
  formatter.setLenient(false);
}
Program: 47872
Project: 47872
Buggy source:
public UDFLastDay(){
}

Fixed version (ground truth):
public UDFLastDay(){
  standardFormatter.setLenient(false);
}
Program: 47873
Project: 47873
Buggy source:
public UDFStrToDate(){
}

Fixed version (ground truth):
public UDFStrToDate(){
  standardFormatter.setLenient(false);
  formatter.setLenient(false);
}
Program: 47874
Project: 47874
Buggy source:
public UDFToChar(){
}

Fixed version (ground truth):
public UDFToChar(){
  standardFormatter.setLenient(false);
  formatter.setLenient(false);
}
Program: 47876
Project: 47876
Buggy source:
private byte[] cacheInputStream(URL url) throws IOException {
  URLConnection connection=url.openConnection();
  connection.setRequestProperty("String_Node_Str",userAgent);
  InputStream ins=connection.getInputStream();
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  byte[] buf=new byte[256];
  while (true) {
    int n=ins.read(buf);
    if (n == -1)     break;
    bout.write(buf,0,n);
  }
  ins.close();
  byte[] data=bout.toByteArray();
  bout.close();
  return data;
}

Fixed version (ground truth):
private byte[] cacheInputStream(URL url) throws IOException {
  InputStream ins=localCache.get(url);
  if (ins == null) {
    URLConnection connection=url.openConnection();
    connection.setRequestProperty("String_Node_Str",userAgent);
    ins=connection.getInputStream();
  }
  try {
    byte[] data=readAllBytes(ins);
    localCache.put(url,new ByteArrayInputStream(data));
    return data;
  }
  finally {
    ins.close();
  }
}
Program: 47877
Project: 47877
Buggy source:
/** 
 * Sets the map overlay. This is a Painter<JXMapViewer> which will paint on top of the map. It can be used to draw waypoints, lines, or static overlays like text messages.
 * @param overlay the map overlay to use
 */
public void setOverlayPainter(Painter<? super JXMapViewer> overlay){
  Painter<? super JXMapViewer> old=getOverlayPainter();
  this.overlay=overlay;
  PropertyChangeListener listener=new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getNewValue().equals(Boolean.TRUE)) {
        repaint();
      }
    }
  }
;
  if (old instanceof AbstractPainter) {
    AbstractPainter<?> ap=(AbstractPainter<?>)overlay;
    ap.removePropertyChangeListener("String_Node_Str",listener);
  }
  if (overlay instanceof AbstractPainter) {
    AbstractPainter<?> ap=(AbstractPainter<?>)overlay;
    ap.addPropertyChangeListener("String_Node_Str",listener);
  }
  firePropertyChange("String_Node_Str",old,getOverlayPainter());
  repaint();
}

Fixed version (ground truth):
/** 
 * Sets the map overlay. This is a Painter<JXMapViewer> which will paint on top of the map. It can be used to draw waypoints, lines, or static overlays like text messages.
 * @param overlay the map overlay to use
 */
public void setOverlayPainter(Painter<? super JXMapViewer> overlay){
  Painter<? super JXMapViewer> old=getOverlayPainter();
  this.overlay=overlay;
  PropertyChangeListener listener=new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getNewValue().equals(Boolean.TRUE)) {
        repaint();
      }
    }
  }
;
  if (old instanceof AbstractPainter) {
    AbstractPainter<?> ap=(AbstractPainter<?>)old;
    ap.removePropertyChangeListener("String_Node_Str",listener);
  }
  if (overlay instanceof AbstractPainter) {
    AbstractPainter<?> ap=(AbstractPainter<?>)overlay;
    ap.addPropertyChangeListener("String_Node_Str",listener);
  }
  firePropertyChange("String_Node_Str",old,getOverlayPainter());
  repaint();
}
Program: 47878
Project: 47878
Buggy source:
@Override public void dispose(){
  service.shutdown();
}

Fixed version (ground truth):
@Override public void dispose(){
  if (service != null) {
    service.shutdown();
    service=null;
  }
}
Program: 47879
Project: 47879
Buggy source:
@Override public CacheResponse get(URI uri,String rqstMethod,Map<String,List<String>> rqstHeaders) throws IOException {
  File localFile=getLocalFile(uri);
  if (!localFile.exists()) {
    return null;
  }
  if (checkForUpdates) {
    if (isUpdateAvailable(uri,localFile)) {
      return null;
    }
  }
  return new LocalCacheResponse(localFile,rqstHeaders);
}

Fixed version (ground truth):
@Override public CacheResponse get(URI uri,String rqstMethod,Map<String,List<String>> rqstHeaders) throws IOException {
  File localFile=getLocalFile(uri);
  if (localFile == null) {
    return null;
  }
  if (!localFile.exists()) {
    return null;
  }
  if (checkForUpdates) {
    if (isUpdateAvailable(uri,localFile)) {
      return null;
    }
  }
  return new LocalCacheResponse(localFile,rqstHeaders);
}
Program: 47880
Project: 47880
Buggy source:
@Override public CacheRequest put(URI uri,URLConnection conn) throws IOException {
  if (!(conn instanceof HttpURLConnection) || !(((HttpURLConnection)conn).getRequestMethod().equals("String_Node_Str"))) {
    return null;
  }
  File localFile=getLocalFile(uri);
  new File(localFile.getParent()).mkdirs();
  return new LocalCacheRequest(localFile);
}

Fixed version (ground truth):
@Override public CacheRequest put(URI uri,URLConnection conn) throws IOException {
  if (!(conn instanceof HttpURLConnection) || !(((HttpURLConnection)conn).getRequestMethod().equals("String_Node_Str"))) {
    return null;
  }
  File localFile=getLocalFile(uri);
  if (localFile == null) {
    return null;
  }
  new File(localFile.getParent()).mkdirs();
  return new LocalCacheRequest(localFile);
}
Program: 47881
Project: 47881
Buggy source:
/** 
 * @param args the program args (ignored)
 */
public static <T>void main(String[] args){
  JXMapViewer mapViewer=new JXMapViewer();
  TileFactoryInfo info=new OSMTileFactoryInfo();
  DefaultTileFactory tileFactory=new DefaultTileFactory(info);
  tileFactory.setThreadPoolSize(8);
  mapViewer.setTileFactory(tileFactory);
  GeoPosition frankfurt=new GeoPosition(50,7,0,8,41,0);
  GeoPosition wiesbaden=new GeoPosition(50,5,0,8,14,0);
  GeoPosition mainz=new GeoPosition(50,0,0,8,16,0);
  GeoPosition darmstadt=new GeoPosition(49,52,0,8,39,0);
  GeoPosition offenbach=new GeoPosition(50,6,0,8,46,0);
  mapViewer.setZoom(7);
  mapViewer.setAddressLocation(frankfurt);
  List<GeoPosition> track=Arrays.asList(frankfurt,wiesbaden,mainz,darmstadt,offenbach);
  RoutePainter routePainter=new RoutePainter(track);
  Collection<Waypoint> waypoints=Arrays.asList(new Waypoint(frankfurt),new Waypoint(wiesbaden),new Waypoint(mainz),new Waypoint(darmstadt),new Waypoint(offenbach));
  WaypointPainter waypointPainter=new WaypointPainter();
  waypointPainter.setWaypoints(waypoints);
  CompoundPainter<JXMapViewer> painter=new CompoundPainter<JXMapViewer>();
  painter.setPainters(Arrays.asList(routePainter,waypointPainter));
  mapViewer.setOverlayPainter(painter);
  JFrame frame=new JFrame("String_Node_Str");
  frame.getContentPane().add(mapViewer);
  frame.setSize(800,600);
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.setVisible(true);
}

Fixed version (ground truth):
/** 
 * @param args the program args (ignored)
 */
public static <T>void main(String[] args){
  JXMapViewer mapViewer=new JXMapViewer();
  TileFactoryInfo info=new OSMTileFactoryInfo();
  DefaultTileFactory tileFactory=new DefaultTileFactory(info);
  tileFactory.setThreadPoolSize(8);
  mapViewer.setTileFactory(tileFactory);
  GeoPosition frankfurt=new GeoPosition(50,7,0,8,41,0);
  GeoPosition wiesbaden=new GeoPosition(50,5,0,8,14,0);
  GeoPosition mainz=new GeoPosition(50,0,0,8,16,0);
  GeoPosition darmstadt=new GeoPosition(49,52,0,8,39,0);
  GeoPosition offenbach=new GeoPosition(50,6,0,8,46,0);
  mapViewer.setZoom(7);
  mapViewer.setAddressLocation(frankfurt);
  List<GeoPosition> track=Arrays.asList(frankfurt,wiesbaden,mainz,darmstadt,offenbach);
  RoutePainter routePainter=new RoutePainter(track);
  Set<Waypoint> waypoints=new HashSet<Waypoint>(Arrays.asList(new Waypoint(frankfurt),new Waypoint(wiesbaden),new Waypoint(mainz),new Waypoint(darmstadt),new Waypoint(offenbach)));
  WaypointPainter waypointPainter=new WaypointPainter();
  waypointPainter.setWaypoints(waypoints);
  CompoundPainter<JXMapViewer> painter=new CompoundPainter<JXMapViewer>();
  painter.setPainters(Arrays.asList(routePainter,waypointPainter));
  mapViewer.setOverlayPainter(painter);
  JFrame frame=new JFrame("String_Node_Str");
  frame.getContentPane().add(mapViewer);
  frame.setSize(800,600);
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.setVisible(true);
}
Program: 47882
Project: 47882
Buggy source:
@Override public void mouseReleased(MouseEvent e){
  if (!dragging)   return;
  viewer.setPanEnabled(true);
  viewer.repaint();
  dragging=false;
}

Fixed version (ground truth):
@Override public void mouseReleased(MouseEvent e){
  if (!dragging)   return;
  if (e.getButton() != MouseEvent.BUTTON1)   return;
  viewer.setPanEnabled(true);
  viewer.repaint();
  dragging=false;
}
Program: 47883
Project: 47883
Buggy source:
@Override public DataInput[] splitInMasterAndVariant(DataInput dataInput){
  if (dataInput.getSize() - dataInput.getPosition() > UUID_LENGTH) {
    DataInput keyInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition(),dataInput.getPosition() + 16);
    DataInput variantInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition() + 16,dataInput.getSize());
    return new DataInput[]{keyInput,variantInput};
  }
 else {
    return new DataInput[]{dataInput,null};
  }
}

Fixed version (ground truth):
@Override public DataInput[] splitInMasterAndVariant(DataInput dataInput){
  if (dataInput.getSize() - dataInput.getPosition() > UUID_LENGTH) {
    DataInput keyInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition(),dataInput.getPosition() + 16);
    DataInput variantInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition() + 16,dataInput.getSize() - 17);
    return new DataInput[]{keyInput,variantInput};
  }
 else {
    return new DataInput[]{dataInput,null};
  }
}
Program: 47884
Project: 47884
Buggy source:
@Override public DataInput[] splitInMasterAndVariant(DataInput dataInput){
  int sepPos=dataInput.indexOf(VARIANT_SEPARATOR);
  if (sepPos == -1) {
    return new DataInput[]{dataInput,null};
  }
 else {
    DataInput keyInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition(),sepPos);
    DataInput variantInput=new DataInputImpl(((DataInputImpl)dataInput),sepPos + 1,dataInput.getSize());
    return new DataInput[]{keyInput,variantInput};
  }
}

Fixed version (ground truth):
@Override public DataInput[] splitInMasterAndVariant(DataInput dataInput){
  int sepPos=dataInput.indexOf(VARIANT_SEPARATOR);
  if (sepPos == -1) {
    return new DataInput[]{dataInput,null};
  }
 else {
    DataInput keyInput=new DataInputImpl(((DataInputImpl)dataInput),dataInput.getPosition(),sepPos - dataInput.getPosition());
    DataInput variantInput=new DataInputImpl(((DataInputImpl)dataInput),sepPos + 1,dataInput.getSize() - (sepPos + 1));
    return new DataInput[]{keyInput,variantInput};
  }
}
Program: 47886
Project: 47886
Buggy source:
/** 
 * Returns the position in the <code>DataInput</code> from where the next value will be read.
 */
int getPosition();

Fixed version (ground truth):
/** 
 * Returns the current position in the <code>DataInput</code> from where the next value will be read. The position is relative to the "view" of the <code>DataInput</code> on the underlying byte[].
 */
int getPosition();
Program: 47887
Project: 47887
Buggy source:
@Override public byte[] readBytes(int length){
  byte[] result=new byte[length];
  System.arraycopy(source,pos,result,0,length);
  pos+=length;
  return result;
}

Fixed version (ground truth):
@Override public byte[] readBytes(int length){
  byte[] result=new byte[length];
  System.arraycopy(source,startPosition + pos,result,0,length);
  pos+=length;
  return result;
}
Program: 47888
Project: 47888
Buggy source:
@Override public boolean readBoolean(){
  return (source[pos++] != 0);
}

Fixed version (ground truth):
@Override public boolean readBoolean(){
  return (source[startPosition + pos++] != 0);
}
Program: 47889
Project: 47889
Buggy source:
@Override public byte readByte(){
  return source[pos++];
}

Fixed version (ground truth):
@Override public byte readByte(){
  return source[startPosition + pos++];
}
Program: 47890
Project: 47890
Buggy source:
/** 
 * Constructor for the   {@link DataInput} based on an existing DataInputImpl.Its source (the underlying byte[]) is the same as for the given dataInput.
 * @param startPosition position within the source, relative to the startPosition of the given dataInput
 * @param size          the size of the DataInputThe source is a sub-array of the underlying byte[] from which the data will be read, limited between startPosition en startPosition+length It should have been created using  {@link DataOutputImpl}.
 */
public DataInputImpl(DataInputImpl dataInput,int startPosition,int size){
  this.source=dataInput.source;
  this.pos=dataInput.startPosition + startPosition;
  this.size=size;
}

Fixed version (ground truth):
/** 
 * Constructor for the   {@link DataInput} based on an existing DataInputImpl.Its source (the underlying byte[]) is the same as for the given dataInput.
 * @param startPosition position within the source, relative to the startPosition of the given dataInput
 * @param size          the size of the DataInput
 */
public DataInputImpl(DataInputImpl source,int startPosition,int size){
  this(source.source,source.startPosition + startPosition,size);
}
Program: 47891
Project: 47891
Buggy source:
@Override public int indexOf(byte value){
  for (int i=pos; i < size; i++) {
    if (source[i] == value) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
@Override public int indexOf(byte value){
  for (int i=pos; i < size; i++) {
    if (source[startPosition + i] == value) {
      return i;
    }
  }
  return -1;
}
Program: 47893
Project: 47893
Buggy source:
@BeforeClass public static void setUpBeforeClass() throws Exception {
  TestHelper.setupLogging("String_Node_Str");
  repoSetup.setupCore();
  repoSetup.setupRepository();
  typeManager=repoSetup.getTypeManager();
  repository=(Repository)repoSetup.getRepositoryManager().getDefaultTable();
  ids=repository.getIdGenerator();
  IndexManager indexManager=new IndexManager(repoSetup.getHadoopConf());
  linkIndex=new LinkIndex(indexManager,PureRepository.wrap((Repository)repoSetup.getRepositoryManager().getPublicRepository()));
  repoSetup.getSepModel().addSubscription("String_Node_Str");
  repoSetup.getTableManager().createTable(TABLE_A);
  repoSetup.getTableManager().createTable(TABLE_B);
  repoSetup.getTableManager().createTable(TABLE_C);
  repoSetup.startSepEventSlave("String_Node_Str",new LinkIndexUpdater(repoSetup.getRepositoryManager(),linkIndex));
}

Fixed version (ground truth):
@BeforeClass public static void setUpBeforeClass() throws Exception {
  TestHelper.setupLogging("String_Node_Str");
  repoSetup.setupCore();
  repoSetup.setupRepository();
  typeManager=repoSetup.getTypeManager();
  repository=(Repository)repoSetup.getRepositoryManager().getDefaultTable();
  ids=repository.getIdGenerator();
  IndexManager indexManager=new IndexManager(repoSetup.getHadoopConf());
  linkIndex=new LinkIndex(indexManager,repoSetup.getRepositoryManager());
  repoSetup.getSepModel().addSubscription("String_Node_Str");
  repoSetup.getTableManager().createTable(TABLE_A);
  repoSetup.getTableManager().createTable(TABLE_B);
  repoSetup.getTableManager().createTable(TABLE_C);
  repoSetup.startSepEventSlave("String_Node_Str",new LinkIndexUpdater(repoSetup.getRepositoryManager(),linkIndex));
}
Program: 47895
Project: 47895
Buggy source:
@Override public synchronized Repository getRepository(String tableName) throws IOException, InterruptedException {
  if (!repositoryCache.containsKey(tableName)) {
    Repository repository=(Repository)delegate.getPublicRepository().getTable(tableName);
    TrackingRepository trackingRepository=new TrackingRepository();
    trackingRepository.setDelegate(repository);
    repositoryCache.put(tableName,trackingRepository);
  }
  return repositoryCache.get(tableName);
}

Fixed version (ground truth):
@Override public synchronized Repository getRepository(String tenantId) throws IOException, InterruptedException {
  throw new RuntimeException("String_Node_Str");
}
Program: 47896
Project: 47896
Buggy source:
@Override public Repository getRepository(String tableName){
  try {
    return repositoryManager.getRepository(tableName);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public Repository getRepository(String tenantId){
  try {
    return repositoryManager.getRepository(tenantId);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
    throw new RuntimeException(e);
  }
}
Program: 47897
Project: 47897
Buggy source:
/** 
 * Returns a repository instance that is bound to a non-default storage table. The returned repository will automatically balance requests over the available Lily servers, and will retry operations according to what is specified in   {@link RetryConf}.
 * @param tableName name of the storage table for the requested repository
 */
@Override public Repository getRepository(String tableName){
  if (isClosed) {
    throw new IllegalStateException("String_Node_Str");
  }
  return balancingAndRetryingLilyConnection.getRepository(tableName);
}

Fixed version (ground truth):
@Override public Repository getRepository(String tenantId){
  if (isClosed) {
    throw new IllegalStateException("String_Node_Str");
  }
  return balancingAndRetryingLilyConnection.getRepository(tenantId);
}
Program: 47898
Project: 47898
Buggy source:
@Override public Repository getPublicRepository() throws IOException, InterruptedException {
  return balancingAndRetryingLilyConnection.getPublicRepository();
}

Fixed version (ground truth):
@Override public Repository getPublicRepository() throws IOException, InterruptedException {
  if (isClosed) {
    throw new IllegalStateException("String_Node_Str");
  }
  return balancingAndRetryingLilyConnection.getPublicRepository();
}
Program: 47899
Project: 47899
Buggy source:
/** 
 * Get a   {@link RepositoryTableManager} for handling the lifecycle of repository tables.
 */
public RepositoryTableManager getTableManager(){
  Configuration conf=getHBaseConfiguration(zk);
  return new RepositoryTableManagerImpl(conf,new HBaseTableFactoryImpl(conf));
}

Fixed version (ground truth):
/** 
 * Get a   {@link RepositoryTableManager} for handling the lifecycle of repository tables.
 */
public RepositoryTableManager getTableManager(){
  Configuration conf=getHBaseConfiguration(zk);
  return new RepositoryTableManagerImpl("String_Node_Str",conf,new HBaseTableFactoryImpl(conf));
}
Program: 47900
Project: 47900
Buggy source:
public void setupRepository() throws Exception {
  if (repositoryManagerSetup) {
    return;
  }
  setupTypeManager();
  blobStoreAccessFactory=createBlobAccess();
  blobManager=new BlobManagerImpl(hbaseTableFactory,blobStoreAccessFactory,false);
  RecordFactory recordFactory=new RecordFactoryImpl(typeManager,idGenerator);
  repositoryManager=new HBaseRepositoryManager(typeManager,idGenerator,recordFactory,hbaseTableFactory,blobManager){
    @Override protected Repository createRepository(    TenantTableKey key) throws IOException, InterruptedException {
      HBaseRepository repository=(HBaseRepository)super.createRepository(key);
      repository.setRecordUpdateHooks(recordUpdateHooks);
      return repository;
    }
  }
;
  sepModel=new SepModelImpl(new ZooKeeperItfAdapter(zk),hadoopConf);
  eventPublisherManager=new LilyEventPublisherManager(hbaseTableFactory);
  tableManager=new RepositoryTableManagerImpl(hadoopConf,hbaseTableFactory);
  if (!tableManager.tableExists(Table.RECORD.name)) {
    tableManager.createTable(Table.RECORD.name);
  }
  repositoryManagerSetup=true;
}

Fixed version (ground truth):
public void setupRepository() throws Exception {
  if (repositoryManagerSetup) {
    return;
  }
  setupTypeManager();
  blobStoreAccessFactory=createBlobAccess();
  blobManager=new BlobManagerImpl(hbaseTableFactory,blobStoreAccessFactory,false);
  RecordFactory recordFactory=new RecordFactoryImpl(typeManager,idGenerator);
  repositoryManager=new HBaseRepositoryManager(typeManager,idGenerator,recordFactory,hbaseTableFactory,blobManager){
    @Override protected Repository createRepository(    TenantTableKey key) throws IOException, InterruptedException {
      HBaseRepository repository=(HBaseRepository)super.createRepository(key);
      repository.setRecordUpdateHooks(recordUpdateHooks);
      return repository;
    }
  }
;
  sepModel=new SepModelImpl(new ZooKeeperItfAdapter(zk),hadoopConf);
  eventPublisherManager=new LilyEventPublisherManager(hbaseTableFactory);
  tableManager=new RepositoryTableManagerImpl("String_Node_Str",hadoopConf,hbaseTableFactory);
  if (!tableManager.tableExists(Table.RECORD.name)) {
    tableManager.createTable(Table.RECORD.name);
  }
  repositoryManagerSetup=true;
}
Program: 47901
Project: 47901
Buggy source:
@Override public Repository getRepository(String tableName) throws IOException, InterruptedException {
  waitOnRepoManager();
  return delegate.getRepository(tableName);
}

Fixed version (ground truth):
@Override public Repository getRepository(String tenantId) throws IOException, InterruptedException {
  waitOnRepoManager();
  return delegate.getRepository(tenantId);
}
Program: 47902
Project: 47902
Buggy source:
@BeforeClass public static void setUpBeforeClass() throws Exception {
  TestHelper.setupLogging();
  HBASE_PROXY=new HBaseProxy();
  HBASE_PROXY.start();
  IdGenerator idGenerator=new IdGeneratorImpl();
  configuration=HBASE_PROXY.getConf();
  zooKeeper=new StateWatchingZooKeeper(HBASE_PROXY.getZkConnectString(),10000);
  hbaseTableFactory=new HBaseTableFactoryImpl(HBASE_PROXY.getConf());
  typeManager=new HBaseTypeManager(idGenerator,configuration,zooKeeper,hbaseTableFactory);
  DFSBlobStoreAccess dfsBlobStoreAccess=new DFSBlobStoreAccess(HBASE_PROXY.getBlobFS(),new Path("String_Node_Str"));
  List<BlobStoreAccess> blobStoreAccesses=Collections.<BlobStoreAccess>singletonList(dfsBlobStoreAccess);
  BlobStoreAccessConfig blobStoreAccessConfig=new BlobStoreAccessConfig(dfsBlobStoreAccess.getId());
  SizeBasedBlobStoreAccessFactory blobStoreAccessFactory=new SizeBasedBlobStoreAccessFactory(blobStoreAccesses,blobStoreAccessConfig);
  BlobManager blobManager=new BlobManagerImpl(hbaseTableFactory,blobStoreAccessFactory,false);
  repositoryManager=new HBaseRepositoryManager(typeManager,idGenerator,new RecordFactoryImpl(typeManager,idGenerator),hbaseTableFactory,blobManager);
  RepositoryTableManager repoTableManager=new RepositoryTableManagerImpl(configuration,hbaseTableFactory);
  if (!repoTableManager.tableExists(Table.RECORD.name)) {
    repoTableManager.createTable(Table.RECORD.name);
  }
  repository=repositoryManager.getRepository(Table.RECORD.name);
}

Fixed version (ground truth):
@BeforeClass public static void setUpBeforeClass() throws Exception {
  TestHelper.setupLogging();
  HBASE_PROXY=new HBaseProxy();
  HBASE_PROXY.start();
  IdGenerator idGenerator=new IdGeneratorImpl();
  configuration=HBASE_PROXY.getConf();
  zooKeeper=new StateWatchingZooKeeper(HBASE_PROXY.getZkConnectString(),10000);
  hbaseTableFactory=new HBaseTableFactoryImpl(HBASE_PROXY.getConf());
  typeManager=new HBaseTypeManager(idGenerator,configuration,zooKeeper,hbaseTableFactory);
  DFSBlobStoreAccess dfsBlobStoreAccess=new DFSBlobStoreAccess(HBASE_PROXY.getBlobFS(),new Path("String_Node_Str"));
  List<BlobStoreAccess> blobStoreAccesses=Collections.<BlobStoreAccess>singletonList(dfsBlobStoreAccess);
  BlobStoreAccessConfig blobStoreAccessConfig=new BlobStoreAccessConfig(dfsBlobStoreAccess.getId());
  SizeBasedBlobStoreAccessFactory blobStoreAccessFactory=new SizeBasedBlobStoreAccessFactory(blobStoreAccesses,blobStoreAccessConfig);
  BlobManager blobManager=new BlobManagerImpl(hbaseTableFactory,blobStoreAccessFactory,false);
  repositoryManager=new HBaseRepositoryManager(typeManager,idGenerator,new RecordFactoryImpl(typeManager,idGenerator),hbaseTableFactory,blobManager);
  RepositoryTableManager repoTableManager=new RepositoryTableManagerImpl("String_Node_Str",configuration,hbaseTableFactory);
  if (!repoTableManager.tableExists(Table.RECORD.name)) {
    repoTableManager.createTable(Table.RECORD.name);
  }
  repository=repositoryManager.getRepository(Table.RECORD.name);
}
Program: 47903
Project: 47903
Buggy source:
@Override public RepositoryTable createTable(TableCreateDescriptor descriptor) throws InterruptedException, IOException {
  if (tableExists(descriptor.getName())) {
    throw new IllegalArgumentException(String.format("String_Node_Str",descriptor.getName()));
  }
  LilyHBaseSchema.getRecordTable(tableFactory,descriptor.getName(),descriptor.getSplitKeys());
  return new RepositoryTableImpl(descriptor.getName());
}

Fixed version (ground truth):
@Override public RepositoryTable createTable(TableCreateDescriptor descriptor) throws InterruptedException, IOException {
  if (tableExists(descriptor.getName())) {
    throw new IllegalArgumentException(String.format("String_Node_Str",descriptor.getName()));
  }
  String hbaseTableName=RepoUtil.getHBaseTableName(tenantId,descriptor.getName());
  LilyHBaseSchema.getRecordTable(tableFactory,hbaseTableName,descriptor.getSplitKeys());
  return new RepositoryTableImpl(descriptor.getName());
}
Program: 47904
Project: 47904
Buggy source:
@Override public List<RepositoryTable> getTables() throws InterruptedException, IOException {
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  List<RepositoryTable> recordTables=Lists.newArrayList();
  try {
    for (    HTableDescriptor tableDescriptor : hbaseAdmin.listTables()) {
      if (LilyHBaseSchema.isRecordTableDescriptor(tableDescriptor)) {
        recordTables.add(new RepositoryTableImpl(tableDescriptor.getNameAsString()));
      }
    }
  }
  finally {
    hbaseAdmin.close();
  }
  return recordTables;
}

Fixed version (ground truth):
@Override public List<RepositoryTable> getTables() throws InterruptedException, IOException {
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  List<RepositoryTable> recordTables=Lists.newArrayList();
  try {
    for (    HTableDescriptor tableDescriptor : hbaseAdmin.listTables()) {
      if (LilyHBaseSchema.isRecordTableDescriptor(tableDescriptor) && RepoUtil.belongsToTenant(tableDescriptor.getNameAsString(),tenantId)) {
        recordTables.add(new RepositoryTableImpl(tableDescriptor.getNameAsString()));
      }
    }
  }
  finally {
    hbaseAdmin.close();
  }
  return recordTables;
}
Program: 47905
Project: 47905
Buggy source:
public RepositoryTableManagerImpl(Configuration configuration,HBaseTableFactory tableFactory){
  this.configuration=configuration;
  this.tableFactory=tableFactory;
}

Fixed version (ground truth):
public RepositoryTableManagerImpl(String tenantId,Configuration configuration,HBaseTableFactory tableFactory){
  this.tenantId=tenantId;
  this.configuration=configuration;
  this.tableFactory=tableFactory;
}
Program: 47906
Project: 47906
Buggy source:
@Override public boolean tableExists(String tableName) throws InterruptedException, IOException {
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  try {
    return hbaseAdmin.tableExists(tableName);
  }
  finally {
    hbaseAdmin.close();
  }
}

Fixed version (ground truth):
@Override public boolean tableExists(String tableName) throws InterruptedException, IOException {
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  try {
    return hbaseAdmin.tableExists(getHBaseTableName(tableName));
  }
  finally {
    hbaseAdmin.close();
  }
}
Program: 47907
Project: 47907
Buggy source:
@Override public void dropTable(String tableName) throws InterruptedException, IOException {
  if (Table.RECORD.name.equals(tableName)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  try {
    if (hbaseAdmin.tableExists(tableName) && LilyHBaseSchema.isRecordTableDescriptor(hbaseAdmin.getTableDescriptor(Bytes.toBytes(tableName)))) {
      hbaseAdmin.disableTable(tableName);
      hbaseAdmin.deleteTable(tableName);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",tableName));
    }
  }
  finally {
    hbaseAdmin.close();
  }
}

Fixed version (ground truth):
@Override public void dropTable(String tableName) throws InterruptedException, IOException {
  if (Table.RECORD.name.equals(tableName)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  HBaseAdmin hbaseAdmin=new HBaseAdmin(configuration);
  String hbaseTableName=RepoUtil.getHBaseTableName(tenantId,tableName);
  try {
    if (hbaseAdmin.tableExists(hbaseTableName) && LilyHBaseSchema.isRecordTableDescriptor(hbaseAdmin.getTableDescriptor(Bytes.toBytes(hbaseTableName)))) {
      hbaseAdmin.disableTable(tableName);
      hbaseAdmin.deleteTable(tableName);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",tableName,hbaseTableName));
    }
  }
  finally {
    hbaseAdmin.close();
  }
}
Program: 47908
Project: 47908
Buggy source:
public String toHBaseTableName(){
  if (tenantId.equals("String_Node_Str")) {
    return tableName;
  }
 else {
    return tenantId + "String_Node_Str" + tableName;
  }
}

Fixed version (ground truth):
public String toHBaseTableName(){
  return RepoUtil.getHBaseTableName(tenantId,tableName);
}