nus-yam/ex-repair huggingface dataset:
Program: 36954
Project: 36954
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: 36955
Project: 36955
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: 36956
Project: 36956
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: 36959
Project: 36959
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: 36960
Project: 36960
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: 36961
Project: 36961
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: 36963
Project: 36963
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: 36964
Project: 36964
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: 36965
Project: 36965
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: 36966
Project: 36966
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: 36967
Project: 36967
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: 36968
Project: 36968
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: 36969
Project: 36969
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: 36970
Project: 36970
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: 36971
Project: 36971
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: 36972
Project: 36972
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: 36973
Project: 36973
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: 36974
Project: 36974
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: 36975
Project: 36975
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: 36976
Project: 36976
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: 36977
Project: 36977
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: 36978
Project: 36978
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: 36979
Project: 36979
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: 36980
Project: 36980
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: 36981
Project: 36981
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: 36982
Project: 36982
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: 36983
Project: 36983
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: 36986
Project: 36986
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: 36987
Project: 36987
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: 36988
Project: 36988
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: 36990
Project: 36990
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: 36991
Project: 36991
Buggy source:
/** 
 * Returns a BigDecimal whose numerical value is equal to (  {@code this} * 10<sup>n</sup>).  The scale ofthe result is  {@code (this.scale() - n)}.
 * @throws ArithmeticException if the scale would beoutside the range of a 32-bit integer.
 * @since 1.5
 */
public BigDecimal scaleByPowerOfTen(int n){
  return new BigDecimal(intVal,intCompact,checkScale((long)scale - n),precision);
}

Fixed version (ground truth):
/** 
 * Returns a BigDecimal whose numerical value is equal to (  {@code this} * 10<sup>n</sup>).  The scale ofthe result is  {@code (this.scale() - n)}.
 * @param n the exponent power of ten to scale by
 * @return a BigDecimal whose numerical value is equal to( {@code this} * 10<sup>n</sup>)
 * @throws ArithmeticException if the scale would beoutside the range of a 32-bit integer.
 * @since 1.5
 */
public BigDecimal scaleByPowerOfTen(int n){
  return new BigDecimal(intVal,intCompact,checkScale((long)scale - n),precision);
}
Program: 36992
Project: 36992
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: 36993
Project: 36993
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;
}