nus-yam/ex-repair huggingface dataset:
Program: 79228
Project: 79228
Buggy source:
/** 
 * Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt> (if such an element exists). Returns <tt>true</tt> if this deque contained the specified element (or equivalently, if this deque changed as a result of the call).
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if an element was removed as a result of this call
 * @throws ClassCastException if the class of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean removeFirstOccurrence(Object o);

Fixed version (ground truth):
/** 
 * Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element   {@code e} such that<tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt> (if such an element exists). Returns  {@code true} if this deque contained the specified element(or equivalently, if this deque changed as a result of the call).
 * @param o element to be removed from this deque, if present
 * @return {@code true} if an element was removed as a result of this call
 * @throws ClassCastException if the class of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean removeFirstOccurrence(Object o);
Program: 79229
Project: 79229
Buggy source:
/** 
 * Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted deque, it is generally preferable to use method   {@link #offerFirst}.
 * @param e the element to add
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void addFirst(E e);

Fixed version (ground truth):
/** 
 * Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions, throwing an   {@code IllegalStateException} if no space is currentlyavailable.  When using a capacity-restricted deque, it is generally preferable to use method  {@link #offerFirst}.
 * @param e the element to add
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void addFirst(E e);
Program: 79230
Project: 79230
Buggy source:
/** 
 * A static method to retrieve the named object. See   {@link #doLookup(Name)} for details.
 * @param name the name of the object to look up
 * @return  the object bound to <tt>name</tt>
 * @throws NamingException if a naming exception is encountered
 * @since 1.6
 */
@SuppressWarnings("String_Node_Str") public static <T>T doLookup(String name) throws NamingException {
  return (T)(new InitialContext()).lookup(name);
}

Fixed version (ground truth):
/** 
 * A static method to retrieve the named object. See   {@link #doLookup(Name)} for details.
 * @param < T > the type of the returned object
 * @param name the name of the object to look up
 * @return  the object bound to <tt>name</tt>
 * @throws NamingException if a naming exception is encountered
 * @since 1.6
 */
@SuppressWarnings("String_Node_Str") public static <T>T doLookup(String name) throws NamingException {
  return (T)(new InitialContext()).lookup(name);
}
Program: 79231
Project: 79231
Buggy source:
/** 
 * Determines whether obj is equal to this RefAddr. <p> obj is equal to this RefAddr all of these conditions are true <ul> non-null <li> instance of RefAddr <li> obj has the same address type as this RefAddr (using String.compareTo()) <li> both obj and this RefAddr's contents are null or they are equal (using the equals() test). </ul>
 * @param obj possibly null obj to check.
 * @return true if obj is equal to this refaddr; false otherwise.
 * @see #getContent
 * @see #getType
 */
public boolean equals(Object obj){
  if ((obj != null) && (obj instanceof RefAddr)) {
    RefAddr target=(RefAddr)obj;
    if (addrType.compareTo(target.addrType) == 0) {
      Object thisobj=this.getContent();
      Object thatobj=target.getContent();
      if (thisobj == thatobj)       return true;
      if (thisobj != null)       return thisobj.equals(thatobj);
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Determines whether obj is equal to this RefAddr. <p> obj is equal to this RefAddr all of these conditions are true <ul> <li> non-null <li> instance of RefAddr <li> obj has the same address type as this RefAddr (using String.compareTo()) <li> both obj and this RefAddr's contents are null or they are equal (using the equals() test). </ul>
 * @param obj possibly null obj to check.
 * @return true if obj is equal to this refaddr; false otherwise.
 * @see #getContent
 * @see #getType
 */
public boolean equals(Object obj){
  if ((obj != null) && (obj instanceof RefAddr)) {
    RefAddr target=(RefAddr)obj;
    if (addrType.compareTo(target.addrType) == 0) {
      Object thisobj=this.getContent();
      Object thatobj=target.getContent();
      if (thisobj == thatobj)       return true;
      if (thisobj != null)       return thisobj.equals(thatobj);
    }
  }
  return false;
}
Program: 79232
Project: 79232
Buggy source:
protected ControlFactory(){
}

Fixed version (ground truth):
/** 
 * Creates a new instance of a control factory.
 */
protected ControlFactory(){
}
Program: 79233
Project: 79233
Buggy source:
/** 
 * Retrieves the ErrorManager for this Handler.
 * @exception SecurityException  if a security manager exists and ifthe caller does not have <tt>LoggingPermission("control")</tt>.
 */
public ErrorManager getErrorManager(){
  checkPermission();
  return errorManager;
}

Fixed version (ground truth):
/** 
 * Retrieves the ErrorManager for this Handler.
 * @return the ErrorManager for this Handler
 * @exception SecurityException  if a security manager exists and ifthe caller does not have <tt>LoggingPermission("control")</tt>.
 */
public ErrorManager getErrorManager(){
  checkPermission();
  return errorManager;
}
Program: 79234
Project: 79234
Buggy source:
/** 
 * Return the global LogManager object.
 */
public static LogManager getLogManager(){
  if (manager != null) {
    manager.readPrimordialConfiguration();
  }
  return manager;
}

Fixed version (ground truth):
/** 
 * Returns the global LogManager object.
 * @return the global LogManager object
 */
public static LogManager getLogManager(){
  if (manager != null) {
    manager.readPrimordialConfiguration();
  }
  return manager;
}
Program: 79235
Project: 79235
Buggy source:
/** 
 * Get the localization resource bundle name <p> This is the name for the ResourceBundle that should be used to localize the message string before formatting it. The result may be null if the message is not localizable.
 */
public String getResourceBundleName(){
  return resourceBundleName;
}

Fixed version (ground truth):
/** 
 * Get the localization resource bundle name <p> This is the name for the ResourceBundle that should be used to localize the message string before formatting it. The result may be null if the message is not localizable.
 * @return the localization resource bundle name
 */
public String getResourceBundleName(){
  return resourceBundleName;
}
Program: 79236
Project: 79236
Buggy source:
/** 
 * Get the localization resource bundle <p> This is the ResourceBundle that should be used to localize the message string before formatting it.  The result may be null if the message is not localizable, or if no suitable ResourceBundle is available.
 */
public ResourceBundle getResourceBundle(){
  return resourceBundle;
}

Fixed version (ground truth):
/** 
 * Get the localization resource bundle <p> This is the ResourceBundle that should be used to localize the message string before formatting it.  The result may be null if the message is not localizable, or if no suitable ResourceBundle is available.
 * @return the localization resource bundle
 */
public ResourceBundle getResourceBundle(){
  return resourceBundle;
}
Program: 79237
Project: 79237
Buggy source:
/** 
 * Set the sequence number. <p> Sequence numbers are normally assigned in the LogRecord constructor, so it should not normally be necessary to use this method.
 */
public void setSequenceNumber(long seq){
  sequenceNumber=seq;
}

Fixed version (ground truth):
/** 
 * Set the sequence number. <p> Sequence numbers are normally assigned in the LogRecord constructor, so it should not normally be necessary to use this method.
 * @param seq the sequence number
 */
public void setSequenceNumber(long seq){
  sequenceNumber=seq;
}
Program: 79238
Project: 79238
Buggy source:
/** 
 * <p>Returns an object representing the value of OUT parameter  {@code parameterName} and will convert from theSQL type of the parameter to the requested Java data type, if the conversion is supported. If the conversion is not supported  or null is specified for the type, a <code>SQLException</code> is thrown. <p> At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements  {@code SQLData}, or   {@code Struct}. Additional conversions may be supported and are vendor defined.
 * @param parameterName the name of the parameter
 * @param type Class representing the Java data type to convertthe designated parameter to.
 * @return an instance of {@code type} holding the OUT parametervalue
 * @throws SQLException if conversion is not supported, type is null oranother error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
 * @throws SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.7
 */
public <T>T getObject(String parameterName,Class<T> type) throws SQLException ;

Fixed version (ground truth):
/** 
 * <p>Returns an object representing the value of OUT parameter  {@code parameterName} and will convert from theSQL type of the parameter to the requested Java data type, if the conversion is supported. If the conversion is not supported  or null is specified for the type, a <code>SQLException</code> is thrown. <p> At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements  {@code SQLData}, or   {@code Struct}. Additional conversions may be supported and are vendor defined.
 * @param parameterName the name of the parameter
 * @param type Class representing the Java data type to convertthe designated parameter to.
 * @param < T > the type of the class modeled by this Class object
 * @return an instance of {@code type} holding the OUT parametervalue
 * @throws SQLException if conversion is not supported, type is null oranother error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
 * @throws SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.7
 */
public <T>T getObject(String parameterName,Class<T> type) throws SQLException ;
Program: 79239
Project: 79239
Buggy source:
/** 
 * Retrieves whether this database supports the given result set holdability.
 * @param holdability one of the following constants:<code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
 * @return <code>true</code> if so; <code>false</code> otherwise
 * @exception SQLException if a database access error occurs
 * @see Connection
 * @since 1.4
 */
boolean supportsResultSetHoldability(int holdability) throws SQLException ;

Fixed version (ground truth):
/** 
 * Retrieves whether this database supports the given result set holdability.
 * @param holdability one of the following constants:<code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
 * @return <code>true</code> if so; <code>false</code> otherwise
 * @exception SQLException if a database access error occurs
 * @see Connection
 * @since 1.4
 */
boolean supportsResultSetHoldability(int holdability) throws SQLException ;
Program: 79240
Project: 79240
Buggy source:
/** 
 * Return the parent Logger of all the Loggers used by this driver. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this driver. Configuring this Logger will affect all of the log messages generated by the driver. In the worst case, this may be the root Logger.
 * @return the parent Logger for this driver
 * @throws SQLFeatureNotSupportedException if the driver does not use <code>java.util.logging<code>.
 * @since 1.7
 */
public Logger getParentLogger() throws SQLFeatureNotSupportedException ;

Fixed version (ground truth):
/** 
 * Return the parent Logger of all the Loggers used by this driver. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this driver. Configuring this Logger will affect all of the log messages generated by the driver. In the worst case, this may be the root Logger.
 * @return the parent Logger for this driver
 * @throws SQLFeatureNotSupportedException if the driver does not use{@code java.util.logging}.
 * @since 1.7
 */
public Logger getParentLogger() throws SQLFeatureNotSupportedException ;
Program: 79241
Project: 79241
Buggy source:
/** 
 * Reports whether this driver is a genuine JDBC Compliant<sup><font size=-2>TM</font></sup> driver. A driver may only report <code>true</code> here if it passes the JDBC compliance tests; otherwise it is required to return <code>false</code>. <P> JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level.  It is expected that JDBC compliant drivers will be available for all the major commercial databases. <P> This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible.
 * @return <code>true</code> if this driver is JDBC Compliant; <code>false</code>otherwise
 */
boolean jdbcCompliant();

Fixed version (ground truth):
/** 
 * Reports whether this driver is a genuine JDBC Compliant&trade; driver. A driver may only report <code>true</code> here if it passes the JDBC compliance tests; otherwise it is required to return <code>false</code>. <P> JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level.  It is expected that JDBC compliant drivers will be available for all the major commercial databases. <P> This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible.
 * @return <code>true</code> if this driver is JDBC Compliant; <code>false</code>otherwise
 */
boolean jdbcCompliant();
Program: 79242
Project: 79242
Buggy source:
/** 
 * <p>Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported  or null is specified for the type, a <code>SQLException</code> is thrown. <p> At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements   {@code SQLData}, or   {@code Struct}. Additional conversions may be supported and are vendor defined.
 * @param columnLabel the label for the column specified with the SQL AS clause.If the SQL AS clause was not specified, then the label is the name of the column
 * @param type Class representing the Java data type to convert the designatedcolumn to.
 * @return an instance of {@code type} holding the column value
 * @throws SQLException if conversion is not supported, type is null oranother error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
 * @throws SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.7
 */
public <T>T getObject(String columnLabel,Class<T> type) throws SQLException ;

Fixed version (ground truth):
/** 
 * <p>Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported  or null is specified for the type, a <code>SQLException</code> is thrown. <p> At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements   {@code SQLData}, or   {@code Struct}. Additional conversions may be supported and are vendor defined.
 * @param columnLabel the label for the column specified with the SQL AS clause.If the SQL AS clause was not specified, then the label is the name of the column
 * @param type Class representing the Java data type to convert the designatedcolumn to.
 * @param < T > the type of the class modeled by this Class object
 * @return an instance of {@code type} holding the column value
 * @throws SQLException if conversion is not supported, type is null oranother error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
 * @throws SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.7
 */
public <T>T getObject(String columnLabel,Class<T> type) throws SQLException ;
Program: 79243
Project: 79243
Buggy source:
/** 
 * Reads the next attribute in the stream and returns it as an  {@code Object} in the Java programming language. Theactual type of the object returned is determined by the specified Java data type, and any customizations present in this stream's type map. <P>A type map is registered with the stream by the JDBC driver before the stream is passed to the application. <P>When the attribute at the head of the stream is an SQL  {@code NULL}the method returns   {@code null}. If the attribute is an SQL structured or distinct type, it determines the SQL type of the attribute at the head of the stream. If the stream's type map has an entry for that SQL type, the driver constructs an object of the appropriate class and calls the method  {@code SQLData.readSQL} on that object, which reads additional data from thestream, using the protocol described for that method. <p> The default implementation will throw  {@code SQLFeatureNotSupportedException}
 * @param type Class representing the Java data type to convert the attribute to.
 * @return the attribute at the head of the stream as an {@code Object} in theJava programming language; {@code null} if the attribute is SQL {@code NULL}
 * @exception SQLException if a database access error occurs
 * @exception SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.8
 */
default <T>T readObject(Class<T> type) throws SQLException {
  throw new SQLFeatureNotSupportedException();
}

Fixed version (ground truth):
/** 
 * Reads the next attribute in the stream and returns it as an  {@code Object} in the Java programming language. Theactual type of the object returned is determined by the specified Java data type, and any customizations present in this stream's type map. <P>A type map is registered with the stream by the JDBC driver before the stream is passed to the application. <P>When the attribute at the head of the stream is an SQL  {@code NULL}the method returns   {@code null}. If the attribute is an SQL structured or distinct type, it determines the SQL type of the attribute at the head of the stream. If the stream's type map has an entry for that SQL type, the driver constructs an object of the appropriate class and calls the method  {@code SQLData.readSQL} on that object, which reads additional data from thestream, using the protocol described for that method. <p> The default implementation will throw  {@code SQLFeatureNotSupportedException}
 * @param < T > the type of the class modeled by this Class object
 * @param type Class representing the Java data type to convert the attribute to.
 * @return the attribute at the head of the stream as an {@code Object} in theJava programming language; {@code null} if the attribute is SQL {@code NULL}
 * @exception SQLException if a database access error occurs
 * @exception SQLFeatureNotSupportedException if the JDBC driver does not supportthis method
 * @since 1.8
 */
default <T>T readObject(Class<T> type) throws SQLException {
  throw new SQLFeatureNotSupportedException();
}
Program: 79246
Project: 79246
Buggy source:
/** 
 * Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling <code>unwrap</code> recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.
 * @param iface A Class defining an interface that the result must implement.
 * @return an object that implements the interface. May be a proxy for the actual implementing object.
 * @throws java.sql.SQLException If no object found that implements the interface
 * @since 1.6
 */
<T>T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException ;

Fixed version (ground truth):
/** 
 * Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling <code>unwrap</code> recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.
 * @param < T > the type of the class modeled by this Class object
 * @param iface A Class defining an interface that the result must implement.
 * @return an object that implements the interface. May be a proxy for the actual implementing object.
 * @throws java.sql.SQLException If no object found that implements the interface
 * @since 1.6
 */
<T>T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException ;
Program: 79247
Project: 79247
Buggy source:
/** 
 * Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source. Configuring this Logger will affect all of the log messages generated by the data source. In the worst case, this may be the root Logger.
 * @return the parent Logger for this data source
 * @throws SQLFeatureNotSupportedException if the data source does not use <code>java.util.logging<code>.
 * @since 1.7
 */
public Logger getParentLogger() throws SQLFeatureNotSupportedException ;

Fixed version (ground truth):
/** 
 * Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source. Configuring this Logger will affect all of the log messages generated by the data source. In the worst case, this may be the root Logger.
 * @return the parent Logger for this data source
 * @throws SQLFeatureNotSupportedException if the data source does not use{@code java.util.logging}
 * @since 1.7
 */
public Logger getParentLogger() throws SQLFeatureNotSupportedException ;
Program: 79248
Project: 79248
Buggy source:
/** 
 * Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows. The <code>numRows</code> parameter ensures that this event will only be fired every <code>numRow</code>. <p> The source of the event can be retrieved with the method event.getSource.
 * @param event a <code>RowSetEvent</code> object that contains the<code>RowSet</code> object that is the source of the events
 * @param numRows when populating, the number of rows interval on which the<code>CachedRowSet</code> populated should fire; the default value is zero; cannot be less than <code>fetchSize</code> or zero
 */
public void rowSetPopulated(RowSetEvent event,int numRows) throws SQLException ;

Fixed version (ground truth):
/** 
 * Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows. The <code>numRows</code> parameter ensures that this event will only be fired every <code>numRow</code>. <p> The source of the event can be retrieved with the method event.getSource.
 * @param event a <code>RowSetEvent</code> object that contains the<code>RowSet</code> object that is the source of the events
 * @param numRows when populating, the number of rows interval on which the<code>CachedRowSet</code> populated should fire; the default value is zero; cannot be less than <code>fetchSize</code> or zero
 * @throws SQLException {@code numRows < 0 or numRows < getFetchSize() }
 */
public void rowSetPopulated(RowSetEvent event,int numRows) throws SQLException ;
Program: 79250
Project: 79250
Buggy source:
/** 
 * Creates a <code>CachedRowSet</code> object that is an empty copy of this <code>CachedRowSet</code> object.  The copy must not contain any contents but only represent the table structure of the original <code>CachedRowSet</code> object. In addition, primary or foreign key constraints set in the originating <code>CachedRowSet</code> object must be equally enforced in the new empty <code>CachedRowSet</code> object. In contrast to the <code>RowSet</code> object generated from a <code>createShared</code> method call, updates made to a copy of this <code>CachedRowSet</code> object with the <code>createCopySchema</code> method must not be visible to it. <P> Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code> object returned by this method in order to export the <code>RowSet</code> schema definition to XML for future use.
 * @throws SQLException if an error occurs in cloning the structure of this<code>CachedRowSet</code> object
 * @see #createShared
 * @see #createCopySchema
 * @see #createCopyNoConstraints
 * @see javax.sql.RowSetEvent
 * @see javax.sql.RowSetListener
 */
public CachedRowSet createCopySchema() throws SQLException ;

Fixed version (ground truth):
/** 
 * Creates a <code>CachedRowSet</code> object that is an empty copy of this <code>CachedRowSet</code> object.  The copy must not contain any contents but only represent the table structure of the original <code>CachedRowSet</code> object. In addition, primary or foreign key constraints set in the originating <code>CachedRowSet</code> object must be equally enforced in the new empty <code>CachedRowSet</code> object. In contrast to the <code>RowSet</code> object generated from a <code>createShared</code> method call, updates made to a copy of this <code>CachedRowSet</code> object with the <code>createCopySchema</code> method must not be visible to it. <P> Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code> object returned by this method in order to export the <code>RowSet</code> schema definition to XML for future use.
 * @return An empty copy of this {@code CachedRowSet} object
 * @throws SQLException if an error occurs in cloning the structure of this<code>CachedRowSet</code> object
 * @see #createShared
 * @see #createCopySchema
 * @see #createCopyNoConstraints
 * @see javax.sql.RowSetEvent
 * @see javax.sql.RowSetListener
 */
public CachedRowSet createCopySchema() throws SQLException ;
Program: 79251
Project: 79251
Buggy source:
/** 
 * Put the given key-value association into this preference node.  It is guaranteed that <tt>key</tt> and <tt>value</tt> are non-null and of legal length.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for any of these things.) <p>This method is invoked with the lock on this node held.
 */
protected abstract void putSpi(String key,String value);

Fixed version (ground truth):
/** 
 * Put the given key-value association into this preference node.  It is guaranteed that <tt>key</tt> and <tt>value</tt> are non-null and of legal length.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for any of these things.) <p>This method is invoked with the lock on this node held.
 * @param key the key
 * @param value the value
 */
protected abstract void putSpi(String key,String value);
Program: 79252
Project: 79252
Buggy source:
/** 
 * Remove the association (if any) for the specified key at this preference node.  It is guaranteed that <tt>key</tt> is non-null. Also, it is guaranteed that this node has not been removed. (The implementor needn't check for either of these things.) <p>This method is invoked with the lock on this node held.
 */
protected abstract void removeSpi(String key);

Fixed version (ground truth):
/** 
 * Remove the association (if any) for the specified key at this preference node.  It is guaranteed that <tt>key</tt> is non-null. Also, it is guaranteed that this node has not been removed. (The implementor needn't check for either of these things.) <p>This method is invoked with the lock on this node held.
 * @param key the key
 */
protected abstract void removeSpi(String key);
Program: 79253
Project: 79253
Buggy source:
/** 
 * Return the value associated with the specified key at this preference node, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.  It is guaranteed that <tt>key</tt> is non-null.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for either of these things.) <p> Generally speaking, this method should not throw an exception under any circumstances.  If, however, if it does throw an exception, the exception will be intercepted and treated as a <tt>null</tt> return value. <p>This method is invoked with the lock on this node held.
 * @return the value associated with the specified key at this preferencenode, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.
 */
protected abstract String getSpi(String key);

Fixed version (ground truth):
/** 
 * Return the value associated with the specified key at this preference node, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.  It is guaranteed that <tt>key</tt> is non-null.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for either of these things.) <p> Generally speaking, this method should not throw an exception under any circumstances.  If, however, if it does throw an exception, the exception will be intercepted and treated as a <tt>null</tt> return value. <p>This method is invoked with the lock on this node held.
 * @param key the key
 * @return the value associated with the specified key at this preferencenode, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.
 */
protected abstract String getSpi(String key);
Program: 79254
Project: 79254
Buggy source:
/** 
 * Returns the user root preference node corresponding to the calling user.  In a server, the returned value will typically depend on some implicit client-context.
 */
Preferences userRoot();

Fixed version (ground truth):
/** 
 * Returns the user root preference node corresponding to the calling user.  In a server, the returned value will typically depend on some implicit client-context.
 * @return the user root preference node corresponding to the callinguser
 */
Preferences userRoot();
Program: 79255
Project: 79255
Buggy source:
/** 
 * Returns the system root preference node.  (Multiple calls on this method will return the same object reference.)
 */
Preferences systemRoot();

Fixed version (ground truth):
/** 
 * Returns the system root preference node.  (Multiple calls on this method will return the same object reference.)
 * @return the system root preference node
 */
Preferences systemRoot();
Program: 79256
Project: 79256
Buggy source:
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);

Fixed version (ground truth):
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param < T > the type of the interface to return
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);
Program: 79257
Project: 79257
Buggy source:
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;

Fixed version (ground truth):
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param name of the procedure or function to call
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;
Program: 79258
Project: 79258
Buggy source:
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);

Fixed version (ground truth):
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @param scope The scope
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);
Program: 79259
Project: 79259
Buggy source:
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 */
public List<String> getNames();

Fixed version (ground truth):
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 * @return an immutable list of short names
 */
public List<String> getNames();
Program: 79260
Project: 79260
Buggy source:
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}

Fixed version (ground truth):
/** 
 * Create a   {@code SimpleScriptContext}.
 */
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}
Program: 79261
Project: 79261
Buggy source:
/** 
 * Returns the total number of compressed bytes output so far.</p>
 * @return the total (non-negative) number of compressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of compressed bytes output so far.
 * @return the total (non-negative) number of compressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}
Program: 79262
Project: 79262
Buggy source:
/** 
 * Returns the total number of uncompressed bytes input so far.</p>
 * @return the total (non-negative) number of uncompressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of uncompressed bytes input so far.
 * @return the total (non-negative) number of uncompressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}
Program: 79263
Project: 79263
Buggy source:
/** 
 * Returns the total number of uncompressed bytes output so far.</p>
 * @return the total (non-negative) number of uncompressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of uncompressed bytes output so far.
 * @return the total (non-negative) number of uncompressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}
Program: 79264
Project: 79264
Buggy source:
/** 
 * Returns the total number of compressed bytes input so far.</p>
 * @return the total (non-negative) number of compressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of compressed bytes input so far.
 * @return the total (non-negative) number of compressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}
Program: 79265
Project: 79265
Buggy source:
/** 
 * Returns a hash code for a   {@code boolean} value; compatible with{@code Boolean.hashCode()}.
 * @since 1.8
 * @return a hash code value for a {@code boolean} value.
 */
public static int hashCode(boolean value){
  return value ? 1231 : 1237;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for a   {@code boolean} value; compatible with{@code Boolean.hashCode()}.
 * @param value the value to hash
 * @return a hash code value for a {@code boolean} value.
 * @since 1.8
 */
public static int hashCode(boolean value){
  return value ? 1231 : 1237;
}
Program: 79266
Project: 79266
Buggy source:
/** 
 * Returns a hash code for a   {@code byte} value; compatible with{@code Byte.hashCode()}.
 * @since 1.8
 * @return a hash code value for a {@code byte} value.
 */
public static int hashCode(byte value){
  return (int)value;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for a   {@code byte} value; compatible with{@code Byte.hashCode()}.
 * @param value the value to hash
 * @return a hash code value for a {@code byte} value.
 * @since 1.8
 */
public static int hashCode(byte value){
  return (int)value;
}
Program: 79267
Project: 79267
Buggy source:
/** 
 * Casts this   {@code Class} object to represent a subclass of the classrepresented by the specified class object.  Checks that the cast is valid, and throws a  {@code ClassCastException} if it is not.  Ifthis method succeeds, it always returns a reference to this class object. <p>This method is useful when a client needs to "narrow" the type of a  {@code Class} object to pass it to an API that restricts the{@code Class} objects that it is willing to accept.  A cast wouldgenerate a compile-time warning, as the correctness of the cast could not be checked at runtime (because generic types are implemented by erasure).
 * @return this {@code Class} object, cast to represent a subclass ofthe specified class object.
 * @throws ClassCastException if this {@code Class} object does notrepresent a subclass of the specified class (here "subclass" includes the class itself).
 * @since 1.5
 */
@SuppressWarnings("String_Node_Str") public <U>Class<? extends U> asSubclass(Class<U> clazz){
  if (clazz.isAssignableFrom(this))   return (Class<? extends U>)this;
 else   throw new ClassCastException(this.toString());
}

Fixed version (ground truth):
/** 
 * Casts this   {@code Class} object to represent a subclass of the classrepresented by the specified class object.  Checks that the cast is valid, and throws a  {@code ClassCastException} if it is not.  Ifthis method succeeds, it always returns a reference to this class object. <p>This method is useful when a client needs to "narrow" the type of a  {@code Class} object to pass it to an API that restricts the{@code Class} objects that it is willing to accept.  A cast wouldgenerate a compile-time warning, as the correctness of the cast could not be checked at runtime (because generic types are implemented by erasure).
 * @param < U > the type to cast this class object to
 * @param clazz the class of the type to cast this class object to
 * @return this {@code Class} object, cast to represent a subclass ofthe specified class object.
 * @throws ClassCastException if this {@code Class} object does notrepresent a subclass of the specified class (here "subclass" includes the class itself).
 * @since 1.5
 */
@SuppressWarnings("String_Node_Str") public <U>Class<? extends U> asSubclass(Class<U> clazz){
  if (clazz.isAssignableFrom(this))   return (Class<? extends U>)this;
 else   throw new ClassCastException(this.toString());
}
Program: 79268
Project: 79268
Buggy source:
/** 
 * Returns an array of AnnotatedType objects that represent the use of types to specify superinterfaces of the entity represented by this Class. (The <em>use</em> of type Foo to specify a superinterface in '... implements Foo' is distinct from the <em>declaration</em> of type Foo.) If this Class represents a class, the return value is an array containing objects representing the uses of interface types to specify interfaces implemented by the class. The order of the objects in the array corresponds to the order of the interface types used in the 'implements' clause of the declaration of this Class. If this Class represents an interface, the return value is an array containing objects representing the uses of interface types to specify interfaces directly extended by the interface. The order of the objects in the array corresponds to the order of the interface types used in the 'extends' clause of the declaration of this Class. If this Class represents a class or interface whose declaration does not explicitly indicate any annotated superinterfaces, the return value is an array of length 0. If this Class represents either the Object class, an array type, a primitive type, or void, the return value is an array of length 0.
 * @since 1.8
 */
public AnnotatedType[] getAnnotatedInterfaces(){
  return TypeAnnotationParser.buildAnnotatedInterfaces(getRawTypeAnnotations(),getConstantPool(),this);
}

Fixed version (ground truth):
/** 
 * Returns an array of AnnotatedType objects that represent the use of types to specify superinterfaces of the entity represented by this Class. (The <em>use</em> of type Foo to specify a superinterface in '... implements Foo' is distinct from the <em>declaration</em> of type Foo.) If this Class represents a class, the return value is an array containing objects representing the uses of interface types to specify interfaces implemented by the class. The order of the objects in the array corresponds to the order of the interface types used in the 'implements' clause of the declaration of this Class. If this Class represents an interface, the return value is an array containing objects representing the uses of interface types to specify interfaces directly extended by the interface. The order of the objects in the array corresponds to the order of the interface types used in the 'extends' clause of the declaration of this Class. If this Class represents a class or interface whose declaration does not explicitly indicate any annotated superinterfaces, the return value is an array of length 0. If this Class represents either the Object class, an array type, a primitive type, or void, the return value is an array of length 0.
 * @return an array representing the superinterfaces
 * @since 1.8
 */
public AnnotatedType[] getAnnotatedInterfaces(){
  return TypeAnnotationParser.buildAnnotatedInterfaces(getRawTypeAnnotations(),getConstantPool(),this);
}