nus-yam/ex-repair huggingface dataset:
Program: 77342
Project: 77342
Buggy source:
/** 
 * Returns a specification (key material) of the given key object.  {@code keySpec} identifies the specification class in whichthe key material should be returned. It could, for example, be {@code DSAPublicKeySpec.class}, to indicate that the key material should be returned in an instance of the  {@code DSAPublicKeySpec} class.
 * @param key the key.
 * @param keySpec the specification class in whichthe key material should be returned.
 * @return the underlying key specification (key material) in an instanceof the requested specification class.
 * @exception InvalidKeySpecException if the requested key specification isinappropriate for the given key, or the given key cannot be dealt with (e.g., the given key has an unrecognized format).
 */
protected abstract <T extends KeySpec>T engineGetKeySpec(Key key,Class<T> keySpec) throws InvalidKeySpecException ;

Fixed version (ground truth):
/** 
 * Returns a specification (key material) of the given key object.  {@code keySpec} identifies the specification class in whichthe key material should be returned. It could, for example, be {@code DSAPublicKeySpec.class}, to indicate that the key material should be returned in an instance of the  {@code DSAPublicKeySpec} class.
 * @param < T > the type of the key specification to be returned
 * @param key the key.
 * @param keySpec the specification class in whichthe key material should be returned.
 * @return the underlying key specification (key material) in an instanceof the requested specification class.
 * @exception InvalidKeySpecException if the requested key specification isinappropriate for the given key, or the given key cannot be dealt with (e.g., the given key has an unrecognized format).
 */
protected abstract <T extends KeySpec>T engineGetKeySpec(Key key,Class<T> keySpec) throws InvalidKeySpecException ;
Program: 77343
Project: 77343
Buggy source:
/** 
 * Returns true if the specified subject is implied by this principal. <p>The default implementation of this method returns true if  {@code subject} is non-null and contains at least one principal thatis equal to this principal. <p>Subclasses may override this with a different implementation, if necessary.
 * @return true if {@code subject} is non-null and isimplied by this principal, or false otherwise.
 * @since 1.8
 */
public default boolean implies(Subject subject){
  if (subject == null)   return false;
  return subject.getPrincipals().contains(this);
}

Fixed version (ground truth):
/** 
 * Returns true if the specified subject is implied by this principal. <p>The default implementation of this method returns true if  {@code subject} is non-null and contains at least one principal thatis equal to this principal. <p>Subclasses may override this with a different implementation, if necessary.
 * @param subject the {@code Subject}
 * @return true if {@code subject} is non-null and isimplied by this principal, or false otherwise.
 * @since 1.8
 */
public default boolean implies(Subject subject){
  if (subject == null)   return false;
  return subject.getPrincipals().contains(this);
}
Program: 77344
Project: 77344
Buggy source:
/** 
 * Returns a   {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates. A PKIX implementation returns objects of type  {@code PKIXRevocationChecker}. <p>The primary purpose of this method is to allow callers to specify additional input parameters and options specific to revocation checking. See the class description of   {@code CertPathBuilder} for an example.<p>This method was added to version 1.8 of the Java Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method cannot be abstract and by default throws an  {@code UnsupportedOperationException}.
 * @throws UnsupportedOperationException if this method is not supported
 * @since 1.8
 */
public CertPathChecker engineGetRevocationChecker(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
/** 
 * Returns a   {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates. A PKIX implementation returns objects of type  {@code PKIXRevocationChecker}. <p>The primary purpose of this method is to allow callers to specify additional input parameters and options specific to revocation checking. See the class description of   {@code CertPathBuilder} for an example.<p>This method was added to version 1.8 of the Java Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method cannot be abstract and by default throws an  {@code UnsupportedOperationException}.
 * @return a {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates
 * @throws UnsupportedOperationException if this method is not supported
 * @since 1.8
 */
public CertPathChecker engineGetRevocationChecker(){
  throw new UnsupportedOperationException();
}
Program: 77345
Project: 77345
Buggy source:
/** 
 * Returns a   {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates. A PKIX implementation returns objects of type  {@code PKIXRevocationChecker}. <p>The primary purpose of this method is to allow callers to specify additional input parameters and options specific to revocation checking. See the class description of   {@code CertPathValidator} for an example.<p>This method was added to version 1.8 of the Java Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method cannot be abstract and by default throws an  {@code UnsupportedOperationException}.
 * @throws UnsupportedOperationException if this method is not supported
 * @since 1.8
 */
public CertPathChecker engineGetRevocationChecker(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
/** 
 * Returns a   {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates. A PKIX implementation returns objects of type  {@code PKIXRevocationChecker}. <p>The primary purpose of this method is to allow callers to specify additional input parameters and options specific to revocation checking. See the class description of   {@code CertPathValidator} for an example.<p>This method was added to version 1.8 of the Java Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method cannot be abstract and by default throws an  {@code UnsupportedOperationException}.
 * @return a {@code CertPathChecker} that this implementation uses tocheck the revocation status of certificates
 * @throws UnsupportedOperationException if this method is not supported
 * @since 1.8
 */
public CertPathChecker engineGetRevocationChecker(){
  throw new UnsupportedOperationException();
}
Program: 77346
Project: 77346
Buggy source:
protected PKIXRevocationChecker(){
}

Fixed version (ground truth):
/** 
 * Default constructor.
 */
protected PKIXRevocationChecker(){
}
Program: 77347
Project: 77347
Buggy source:
/** 
 * Creates an   {@link SNIMatcher} object for {@code SNIHostName}s. <P> This method can be used by a server to verify the acceptable  {@code SNIHostName}s.  For example, <pre> SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.com"); </pre> will accept the hostname "www.example.com". <pre> SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.(com|org)"); </pre> will accept hostnames "www.example.com" and "www.example.org".
 * @param regex the <a href=" {@docRoot}/java/util/regex/Pattern.html#sum"> regular expression pattern</a> representing the hostname(s) to match
 * @throws NullPointerException if {@code regex} is{@code null}
 * @throws java.util.regex.PatternSyntaxException if the regular expression'ssyntax is invalid
 */
public static SNIMatcher createSNIMatcher(String regex){
  if (regex == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new SNIHostNameMatcher(regex);
}

Fixed version (ground truth):
/** 
 * Creates an   {@link SNIMatcher} object for {@code SNIHostName}s. <P> This method can be used by a server to verify the acceptable  {@code SNIHostName}s.  For example, <pre> SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.com"); </pre> will accept the hostname "www.example.com". <pre> SNIMatcher matcher = SNIHostName.createSNIMatcher("www\\.example\\.(com|org)"); </pre> will accept hostnames "www.example.com" and "www.example.org".
 * @param regex the <a href=" {@docRoot}/java/util/regex/Pattern.html#sum"> regular expression pattern</a> representing the hostname(s) to match
 * @return a {@code SNIMatcher} object for {@code SNIHostName}s
 * @throws NullPointerException if {@code regex} is{@code null}
 * @throws java.util.regex.PatternSyntaxException if the regular expression'ssyntax is invalid
 */
public static SNIMatcher createSNIMatcher(String regex){
  if (regex == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new SNIHostNameMatcher(regex);
}
Program: 77348
Project: 77348
Buggy source:
/** 
 * Returns the last access time of the entry. <p> The last access time is from the extended timestamp fields of entry's   {@code optional extra data} when read from a ZIP fileor ZIP file formatted stream.
 * @return The last access time of the entry, null if not specified
 * @see #setLastAccessTime(long)
 * @since 1.8
 */
public FileTime getLastAccessTime(){
  return atime;
}

Fixed version (ground truth):
/** 
 * Returns the last access time of the entry. <p> The last access time is from the extended timestamp fields of entry's   {@code optional extra data} when read from a ZIP fileor ZIP file formatted stream.
 * @return The last access time of the entry, null if not specified
 * @see #setLastAccessTime(FileTime)
 * @since 1.8
 */
public FileTime getLastAccessTime(){
  return atime;
}
Program: 77349
Project: 77349
Buggy source:
/** 
 * Returns the AccessibleContext associated with this object.  In most cases, the return value should not be null if the object implements interface Accessible.  If a component developer creates a subclass of an object that implements Accessible, and that subclass is not Accessible, the developer should override the getAccessibleContext method to return null.
 */
public AccessibleContext getAccessibleContext();

Fixed version (ground truth):
/** 
 * Returns the AccessibleContext associated with this object.  In most cases, the return value should not be null if the object implements interface Accessible.  If a component developer creates a subclass of an object that implements Accessible, and that subclass is not Accessible, the developer should override the getAccessibleContext method to return null.
 * @return the AccessibleContext associated with this object
 */
public AccessibleContext getAccessibleContext();
Program: 77350
Project: 77350
Buggy source:
public AccessibleBundle(){
}

Fixed version (ground truth):
/** 
 * Construct an   {@code AccessibleBundle}.
 */
public AccessibleBundle(){
}
Program: 77351
Project: 77351
Buggy source:
public int getAccessibleIndex(int r,int c);

Fixed version (ground truth):
/** 
 * Returns the index at a row and column in the table.
 * @param r zero-based row of the table
 * @param c zero-based column of the table
 * @return the zero-based index in the table if one exists;otherwise -1.  The index is  the table cell offset from row == 0 and column == 0.
 */
public int getAccessibleIndex(int r,int c);
Program: 77352
Project: 77352
Buggy source:
/** 
 * Returns the number of relations in the relation set.
 */
public int size(){
  if (relations == null) {
    return 0;
  }
 else {
    return relations.size();
  }
}

Fixed version (ground truth):
/** 
 * Returns the number of relations in the relation set.
 * @return the number of relations in the relation set
 */
public int size(){
  if (relations == null) {
    return 0;
  }
 else {
    return relations.size();
  }
}
Program: 77353
Project: 77353
Buggy source:
/** 
 * Returns the number of rows occupied by the Accessible at a specified row and column in the table.
 * @return the number of rows occupied by the Accessible at agiven specified (row, column)
 */
public int getAccessibleRowExtentAt(int r,int c);

Fixed version (ground truth):
/** 
 * Returns the number of rows occupied by the Accessible at a specified row and column in the table.
 * @param r zero-based row of the table
 * @param c zero-based column of the table
 * @return the number of rows occupied by the Accessible at agiven specified (row, column)
 */
public int getAccessibleRowExtentAt(int r,int c);
Program: 77354
Project: 77354
Buggy source:
/** 
 * Returns the number of columns occupied by the Accessible at a specified row and column in the table.
 * @return the number of columns occupied by the Accessible at agiven specified row and column
 */
public int getAccessibleColumnExtentAt(int r,int c);

Fixed version (ground truth):
/** 
 * Returns the number of columns occupied by the Accessible at a specified row and column in the table.
 * @param r zero-based row of the table
 * @param c zero-based column of the table
 * @return the number of columns occupied by the Accessible at agiven specified row and column
 */
public int getAccessibleColumnExtentAt(int r,int c);
Program: 77355
Project: 77355
Buggy source:
/** 
 * Returns the last row that changed.
 */
public int getLastRow();

Fixed version (ground truth):
/** 
 * Returns the last row that changed.
 * @return the last row that changed
 */
public int getLastRow();
Program: 77356
Project: 77356
Buggy source:
/** 
 * Returns the first row that changed.
 */
public int getFirstRow();

Fixed version (ground truth):
/** 
 * Returns the first row that changed.
 * @return the first row that changed
 */
public int getFirstRow();
Program: 77357
Project: 77357
Buggy source:
/** 
 * Returns the type of event
 * @see #INSERT
 * @see #UPDATE
 * @see #DELETE
 */
public int getType();

Fixed version (ground truth):
/** 
 * Returns the type of event.
 * @return the type of event
 * @see #INSERT
 * @see #UPDATE
 * @see #DELETE
 */
public int getType();
Program: 77358
Project: 77358
Buggy source:
/** 
 * Returns the last column that changed.
 */
public int getLastColumn();

Fixed version (ground truth):
/** 
 * Returns the last column that changed.
 * @return the last column that changed
 */
public int getLastColumn();
Program: 77359
Project: 77359
Buggy source:
/** 
 * Returns the first column that changed.
 */
public int getFirstColumn();

Fixed version (ground truth):
/** 
 * Returns the first column that changed.
 * @return the first column that changed
 */
public int getFirstColumn();
Program: 77360
Project: 77360
Buggy source:
/** 
 * Set the value of this object as a Number.
 * @return True if the value was set; else False
 * @see #getCurrentAccessibleValue
 */
public boolean setCurrentAccessibleValue(Number n);

Fixed version (ground truth):
/** 
 * Set the value of this object as a Number.
 * @param n the number to use for the value
 * @return True if the value was set; else False
 * @see #getCurrentAccessibleValue
 */
public boolean setCurrentAccessibleValue(Number n);
Program: 77361
Project: 77361
Buggy source:
public MalformedInputException(int inputLength){
  this.inputLength=inputLength;
}

Fixed version (ground truth):
/** 
 * Constructs an   {@code MalformedInputException} with the givenlength.
 * @param inputLength the length of the input
 */
public MalformedInputException(int inputLength){
  this.inputLength=inputLength;
}
Program: 77362
Project: 77362
Buggy source:
public int getInputLength(){
  return inputLength;
}

Fixed version (ground truth):
/** 
 * Returns the length of the input.
 * @return the length of the input
 */
public int getInputLength(){
  return inputLength;
}
Program: 77363
Project: 77363
Buggy source:
public String getMessage(){
  return "String_Node_Str" + inputLength;
}

Fixed version (ground truth):
/** 
 * Returns the message.
 * @return the message
 */
public String getMessage(){
  return "String_Node_Str" + inputLength;
}
Program: 77364
Project: 77364
Buggy source:
public UnmappableCharacterException(int inputLength){
  this.inputLength=inputLength;
}

Fixed version (ground truth):
/** 
 * Constructs an   {@code UnmappableCharacterException} with thegiven length.
 * @param inputLength the length of the input
 */
public UnmappableCharacterException(int inputLength){
  this.inputLength=inputLength;
}
Program: 77365
Project: 77365
Buggy source:
public int getInputLength(){
  return inputLength;
}

Fixed version (ground truth):
/** 
 * Returns the length of the input.
 * @return the length of the input
 */
public int getInputLength(){
  return inputLength;
}
Program: 77366
Project: 77366
Buggy source:
public String getMessage(){
  return "String_Node_Str" + inputLength;
}

Fixed version (ground truth):
/** 
 * Returns the message.
 * @return the message
 */
public String getMessage(){
  return "String_Node_Str" + inputLength;
}
Program: 77367
Project: 77367
Buggy source:
/** 
 * Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream. <p>If there is a security manager installed, this method first calls the security manager's <code>checkPermission</code> method with the <code>SerializablePermission("enableSubclassImplementation")</code> permission to ensure it's ok to enable subclassing.
 * @throws SecurityException if a security manager exists and its<code>checkPermission</code> method denies enabling subclassing.
 * @see SecurityManager#checkPermission
 * @see java.io.SerializablePermission
 */
protected ObjectInputStream() throws IOException, SecurityException {
  SecurityManager sm=System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  }
  bin=null;
  handles=null;
  vlist=null;
  enableOverride=true;
}

Fixed version (ground truth):
/** 
 * Provide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream. <p>If there is a security manager installed, this method first calls the security manager's <code>checkPermission</code> method with the <code>SerializablePermission("enableSubclassImplementation")</code> permission to ensure it's ok to enable subclassing.
 * @throws SecurityException if a security manager exists and its<code>checkPermission</code> method denies enabling subclassing.
 * @throws IOException if an I/O error occurs while creating this stream
 * @see SecurityManager#checkPermission
 * @see java.io.SerializablePermission
 */
protected ObjectInputStream() throws IOException, SecurityException {
  SecurityManager sm=System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  }
  bin=null;
  handles=null;
  vlist=null;
  enableOverride=true;
}
Program: 77368
Project: 77368
Buggy source:
/** 
 * Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream. <p>If there is a security manager installed, this method first calls the security manager's <code>checkPermission</code> method with a <code>SerializablePermission("enableSubclassImplementation")</code> permission to ensure it's ok to enable subclassing.
 * @throws SecurityException if a security manager exists and its<code>checkPermission</code> method denies enabling subclassing.
 * @see SecurityManager#checkPermission
 * @see java.io.SerializablePermission
 */
protected ObjectOutputStream() throws IOException, SecurityException {
  SecurityManager sm=System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  }
  bout=null;
  handles=null;
  subs=null;
  enableOverride=true;
  debugInfoStack=null;
}

Fixed version (ground truth):
/** 
 * Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream. <p>If there is a security manager installed, this method first calls the security manager's <code>checkPermission</code> method with a <code>SerializablePermission("enableSubclassImplementation")</code> permission to ensure it's ok to enable subclassing.
 * @throws SecurityException if a security manager exists and its<code>checkPermission</code> method denies enabling subclassing.
 * @throws IOException if an I/O error occurs while creating this stream
 * @see SecurityManager#checkPermission
 * @see java.io.SerializablePermission
 */
protected ObjectOutputStream() throws IOException, SecurityException {
  SecurityManager sm=System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  }
  bout=null;
  handles=null;
  subs=null;
  enableOverride=true;
  debugInfoStack=null;
}
Program: 77369
Project: 77369
Buggy source:
/** 
 * Returns the <code>Manifest</code> <code>Attributes</code> for this entry, or <code>null</code> if none.
 * @return the <code>Manifest</code> <code>Attributes</code> for thisentry, or <code>null</code> if none
 */
public Attributes getAttributes() throws IOException {
  return attr;
}

Fixed version (ground truth):
/** 
 * Returns the <code>Manifest</code> <code>Attributes</code> for this entry, or <code>null</code> if none.
 * @return the <code>Manifest</code> <code>Attributes</code> for thisentry, or <code>null</code> if none
 * @throws IOException  if an I/O error has occurred
 */
public Attributes getAttributes() throws IOException {
  return attr;
}
Program: 77370
Project: 77370
Buggy source:
/** 
 * Returns the jar file manifest, or <code>null</code> if none.
 * @return the jar file manifest, or <code>null</code> if none
 * @throws IllegalStateException may be thrown if the jar file has been closed
 */
public Manifest getManifest() throws IOException {
  return getManifestFromReference();
}

Fixed version (ground truth):
/** 
 * Returns the jar file manifest, or <code>null</code> if none.
 * @return the jar file manifest, or <code>null</code> if none
 * @throws IllegalStateException may be thrown if the jar file has been closed
 * @throws IOException  if an I/O error has occurred
 */
public Manifest getManifest() throws IOException {
  return getManifestFromReference();
}
Program: 77372
Project: 77372
Buggy source:
/** 
 * Returns a   {@code RunnableFuture} for the given callable task.
 * @param callable the callable task being wrapped
 * @return a {@code RunnableFuture} which, when run, will call theunderlying callable and which, as a  {@code Future}, will yield the callable's result as its result and provide for cancellation of the underlying task
 * @since 1.6
 */
protected <T>RunnableFuture<T> newTaskFor(Callable<T> callable){
  return new FutureTask<T>(callable);
}

Fixed version (ground truth):
/** 
 * Returns a   {@code RunnableFuture} for the given callable task.
 * @param callable the callable task being wrapped
 * @param < T > the type of the callable's result
 * @return a {@code RunnableFuture} which, when run, will call theunderlying callable and which, as a  {@code Future}, will yield the callable's result as its result and provide for cancellation of the underlying task
 * @since 1.6
 */
protected <T>RunnableFuture<T> newTaskFor(Callable<T> callable){
  return new FutureTask<T>(callable);
}
Program: 77373
Project: 77373
Buggy source:
/** 
 * Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.  {@link Future#isDone} is {@code true} for eachelement of the returned list. Upon return, tasks that have not completed are cancelled. Note that a <em>completed</em> task could have terminated either normally or by throwing an exception. The results of this method are undefined if the given collection is modified while this operation is in progress.
 * @param tasks the collection of tasks
 * @param timeout the maximum time to wait
 * @param unit the time unit of the timeout argument
 * @return a list of Futures representing the tasks, in the samesequential order as produced by the iterator for the given task list. If the operation did not time out, each task will have completed. If it did time out, some of these tasks will not have completed.
 * @throws InterruptedException if interrupted while waiting, inwhich case unfinished tasks are cancelled
 * @throws NullPointerException if tasks, any of its elements, orunit are  {@code null}
 * @throws RejectedExecutionException if any task cannot be scheduledfor execution
 */
<T>List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,long timeout,TimeUnit unit) throws InterruptedException ;

Fixed version (ground truth):
/** 
 * Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.  {@link Future#isDone} is {@code true} for eachelement of the returned list. Upon return, tasks that have not completed are cancelled. Note that a <em>completed</em> task could have terminated either normally or by throwing an exception. The results of this method are undefined if the given collection is modified while this operation is in progress.
 * @param tasks the collection of tasks
 * @param timeout the maximum time to wait
 * @param unit the time unit of the timeout argument
 * @param < T > the type of the values returned from the tasks
 * @return a list of Futures representing the tasks, in the samesequential order as produced by the iterator for the given task list. If the operation did not time out, each task will have completed. If it did time out, some of these tasks will not have completed.
 * @throws InterruptedException if interrupted while waiting, inwhich case unfinished tasks are cancelled
 * @throws NullPointerException if tasks, any of its elements, orunit are  {@code null}
 * @throws RejectedExecutionException if any task cannot be scheduledfor execution
 */
<T>List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks,long timeout,TimeUnit unit) throws InterruptedException ;
Program: 77374
Project: 77374
Buggy source:
/** 
 * Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses. Upon normal or exceptional return, tasks that have not completed are cancelled. The results of this method are undefined if the given collection is modified while this operation is in progress.
 * @param tasks the collection of tasks
 * @param timeout the maximum time to wait
 * @param unit the time unit of the timeout argument
 * @return the result returned by one of the tasks
 * @throws InterruptedException if interrupted while waiting
 * @throws NullPointerException if tasks, or unit, or any elementtask subject to execution is  {@code null}
 * @throws TimeoutException if the given timeout elapses beforeany task successfully completes
 * @throws ExecutionException if no task successfully completes
 * @throws RejectedExecutionException if tasks cannot be scheduledfor execution
 */
<T>T invokeAny(Collection<? extends Callable<T>> tasks,long timeout,TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException ;

Fixed version (ground truth):
/** 
 * Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses. Upon normal or exceptional return, tasks that have not completed are cancelled. The results of this method are undefined if the given collection is modified while this operation is in progress.
 * @param tasks the collection of tasks
 * @param timeout the maximum time to wait
 * @param unit the time unit of the timeout argument
 * @param < T > the type of the values returned from the tasks
 * @return the result returned by one of the tasks
 * @throws InterruptedException if interrupted while waiting
 * @throws NullPointerException if tasks, or unit, or any elementtask subject to execution is  {@code null}
 * @throws TimeoutException if the given timeout elapses beforeany task successfully completes
 * @throws ExecutionException if no task successfully completes
 * @throws RejectedExecutionException if tasks cannot be scheduledfor execution
 */
<T>T invokeAny(Collection<? extends Callable<T>> tasks,long timeout,TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException ;
Program: 77375
Project: 77375
Buggy source:
/** 
 * Returns a   {@link Callable} object that will, when called,execute the given  {@code callable} under the current accesscontrol context, with the current context class loader as the context class loader. This method should normally be invoked within an {@link AccessController#doPrivileged AccessController.doPrivileged}action to create callables that will, if possible, execute under the selected permission settings holding within that action; or if not possible, throw an associated   {@link AccessControlException}.
 * @param callable the underlying task
 * @return a callable object
 * @throws NullPointerException if callable null
 * @throws AccessControlException if the current access controlcontext does not have permission to both set and get context class loader
 */
public static <T>Callable<T> privilegedCallableUsingCurrentClassLoader(Callable<T> callable){
  if (callable == null)   throw new NullPointerException();
  return new PrivilegedCallableUsingCurrentClassLoader<T>(callable);
}

Fixed version (ground truth):
/** 
 * Returns a   {@link Callable} object that will, when called,execute the given  {@code callable} under the current accesscontrol context, with the current context class loader as the context class loader. This method should normally be invoked within an {@link AccessController#doPrivileged AccessController.doPrivileged}action to create callables that will, if possible, execute under the selected permission settings holding within that action; or if not possible, throw an associated   {@link AccessControlException}.
 * @param callable the underlying task
 * @param < T > the type of the callable's result
 * @return a callable object
 * @throws NullPointerException if callable null
 * @throws AccessControlException if the current access controlcontext does not have permission to both set and get context class loader
 */
public static <T>Callable<T> privilegedCallableUsingCurrentClassLoader(Callable<T> callable){
  if (callable == null)   throw new NullPointerException();
  return new PrivilegedCallableUsingCurrentClassLoader<T>(callable);
}
Program: 77376
Project: 77376
Buggy source:
/** 
 * Returns a   {@link Callable} object that will, when called,execute the given  {@code callable} under the current accesscontrol context. This method should normally be invoked within an  {@link AccessController#doPrivileged AccessController.doPrivileged}action to create callables that will, if possible, execute under the selected permission settings holding within that action; or if not possible, throw an associated   {@link AccessControlException}.
 * @param callable the underlying task
 * @return a callable object
 * @throws NullPointerException if callable null
 */
public static <T>Callable<T> privilegedCallable(Callable<T> callable){
  if (callable == null)   throw new NullPointerException();
  return new PrivilegedCallable<T>(callable);
}

Fixed version (ground truth):
/** 
 * Returns a   {@link Callable} object that will, when called,execute the given  {@code callable} under the current accesscontrol context. This method should normally be invoked within an  {@link AccessController#doPrivileged AccessController.doPrivileged}action to create callables that will, if possible, execute under the selected permission settings holding within that action; or if not possible, throw an associated   {@link AccessControlException}.
 * @param callable the underlying task
 * @param < T > the type of the callable's result
 * @return a callable object
 * @throws NullPointerException if callable null
 */
public static <T>Callable<T> privilegedCallable(Callable<T> callable){
  if (callable == null)   throw new NullPointerException();
  return new PrivilegedCallable<T>(callable);
}
Program: 77377
Project: 77377
Buggy source:
/** 
 * Performs the given task, returning its result upon completion. If the computation encounters an unchecked Exception or Error, it is rethrown as the outcome of this invocation.  Rethrown exceptions behave in the same way as regular exceptions, but, when possible, contain stack traces (as displayed for example using   {@code ex.printStackTrace()}) of both the current thread as well as the thread actually encountering the exception; minimally only the latter.
 * @param task the task
 * @return the task's result
 * @throws NullPointerException if the task is null
 * @throws RejectedExecutionException if the task cannot bescheduled for execution
 */
public <T>T invoke(ForkJoinTask<T> task){
  if (task == null)   throw new NullPointerException();
  externalPush(task);
  return task.join();
}

Fixed version (ground truth):
/** 
 * Performs the given task, returning its result upon completion. If the computation encounters an unchecked Exception or Error, it is rethrown as the outcome of this invocation.  Rethrown exceptions behave in the same way as regular exceptions, but, when possible, contain stack traces (as displayed for example using   {@code ex.printStackTrace()}) of both the current thread as well as the thread actually encountering the exception; minimally only the latter.
 * @param task the task
 * @param < T > the type of the task's result
 * @return the task's result
 * @throws NullPointerException if the task is null
 * @throws RejectedExecutionException if the task cannot bescheduled for execution
 */
public <T>T invoke(ForkJoinTask<T> task){
  if (task == null)   throw new NullPointerException();
  externalPush(task);
  return task.join();
}
Program: 77378
Project: 77378
Buggy source:
/** 
 * Saves this task to a stream (that is, serializes it).
 * @serialData the current run status and the exception thrownduring execution, or  {@code null} if none
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  s.writeObject(getException());
}

Fixed version (ground truth):
/** 
 * Saves this task to a stream (that is, serializes it).
 * @param s the stream
 * @throws java.io.IOException if an I/O error occurs
 * @serialData the current run status and the exception thrownduring execution, or  {@code null} if none
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  s.writeObject(getException());
}
Program: 77379
Project: 77379
Buggy source:
/** 
 * Returns a new   {@code ForkJoinTask} that performs the {@code call}method of the given   {@code Callable} as its action, and returnsits result upon  {@link #join}, translating any checked exceptions encountered into   {@code RuntimeException}.
 * @param callable the callable action
 * @return the task
 */
public static <T>ForkJoinTask<T> adapt(Callable<? extends T> callable){
  return new AdaptedCallable<T>(callable);
}

Fixed version (ground truth):
/** 
 * Returns a new   {@code ForkJoinTask} that performs the {@code call}method of the given   {@code Callable} as its action, and returnsits result upon  {@link #join}, translating any checked exceptions encountered into   {@code RuntimeException}.
 * @param callable the callable action
 * @param < T > the type of the callable's result
 * @return the task
 */
public static <T>ForkJoinTask<T> adapt(Callable<? extends T> callable){
  return new AdaptedCallable<T>(callable);
}
Program: 77380
Project: 77380
Buggy source:
/** 
 * Reconstitutes this task from a stream (that is, deserializes it).
 */
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  Object ex=s.readObject();
  if (ex != null)   setExceptionalCompletion((Throwable)ex);
}

Fixed version (ground truth):
/** 
 * Reconstitutes this task from a stream (that is, deserializes it).
 * @param s the stream
 * @throws ClassNotFoundException if the class of a serialized objectcould not be found
 * @throws java.io.IOException if an I/O error occurs
 */
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  Object ex=s.readObject();
  if (ex != null)   setExceptionalCompletion((Throwable)ex);
}
Program: 77382
Project: 77382
Buggy source:
/** 
 * Creates and executes a ScheduledFuture that becomes enabled after the given delay.
 * @param callable the function to execute
 * @param delay the time from now to delay execution
 * @param unit the time unit of the delay parameter
 * @return a ScheduledFuture that can be used to extract result or cancel
 * @throws RejectedExecutionException if the task cannot bescheduled for execution
 * @throws NullPointerException if callable is null
 */
public <V>ScheduledFuture<V> schedule(Callable<V> callable,long delay,TimeUnit unit);

Fixed version (ground truth):
/** 
 * Creates and executes a ScheduledFuture that becomes enabled after the given delay.
 * @param callable the function to execute
 * @param delay the time from now to delay execution
 * @param unit the time unit of the delay parameter
 * @param < V > the type of the callable's result
 * @return a ScheduledFuture that can be used to extract result or cancel
 * @throws RejectedExecutionException if the task cannot bescheduled for execution
 * @throws NullPointerException if callable is null
 */
public <V>ScheduledFuture<V> schedule(Callable<V> callable,long delay,TimeUnit unit);
Program: 77383
Project: 77383
Buggy source:
/** 
 * Modifies or replaces the task used to execute a callable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.
 * @param callable the submitted Callable
 * @param task the task created to execute the callable
 * @return a task that can execute the callable
 * @since 1.6
 */
protected <V>RunnableScheduledFuture<V> decorateTask(Callable<V> callable,RunnableScheduledFuture<V> task){
  return task;
}

Fixed version (ground truth):
/** 
 * Modifies or replaces the task used to execute a callable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.
 * @param callable the submitted Callable
 * @param task the task created to execute the callable
 * @param < V > the type of the task's result
 * @return a task that can execute the callable
 * @since 1.6
 */
protected <V>RunnableScheduledFuture<V> decorateTask(Callable<V> callable,RunnableScheduledFuture<V> task){
  return task;
}
Program: 77384
Project: 77384
Buggy source:
/** 
 * Creates and returns an updater for objects with the given field. The Class argument is needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param fieldName the name of the field to be updated
 * @return the updater
 * @throws IllegalArgumentException if the field is not avolatile integer type
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U>AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass,String fieldName){
  return new AtomicIntegerFieldUpdaterImpl<U>(tclass,fieldName,Reflection.getCallerClass());
}

Fixed version (ground truth):
/** 
 * Creates and returns an updater for objects with the given field. The Class argument is needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param fieldName the name of the field to be updated
 * @param < U > the type of instances of tclass
 * @return the updater
 * @throws IllegalArgumentException if the field is not avolatile integer type
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U>AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass,String fieldName){
  return new AtomicIntegerFieldUpdaterImpl<U>(tclass,fieldName,Reflection.getCallerClass());
}
Program: 77385
Project: 77385
Buggy source:
/** 
 * Creates and returns an updater for objects with the given field. The Class argument is needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param fieldName the name of the field to be updated
 * @return the updater
 * @throws IllegalArgumentException if the field is not avolatile long type
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U>AtomicLongFieldUpdater<U> newUpdater(Class<U> tclass,String fieldName){
  Class<?> caller=Reflection.getCallerClass();
  if (AtomicLong.VM_SUPPORTS_LONG_CAS)   return new CASUpdater<U>(tclass,fieldName,caller);
 else   return new LockedUpdater<U>(tclass,fieldName,caller);
}

Fixed version (ground truth):
/** 
 * Creates and returns an updater for objects with the given field. The Class argument is needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param fieldName the name of the field to be updated
 * @param < U > the type of instances of tclass
 * @return the updater
 * @throws IllegalArgumentException if the field is not avolatile long type
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U>AtomicLongFieldUpdater<U> newUpdater(Class<U> tclass,String fieldName){
  Class<?> caller=Reflection.getCallerClass();
  if (AtomicLong.VM_SUPPORTS_LONG_CAS)   return new CASUpdater<U>(tclass,fieldName,caller);
 else   return new LockedUpdater<U>(tclass,fieldName,caller);
}
Program: 77386
Project: 77386
Buggy source:
/** 
 * Creates and returns an updater for objects with the given field. The Class arguments are needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param vclass the class of the field
 * @param fieldName the name of the field to be updated
 * @return the updater
 * @throws ClassCastException if the field is of the wrong type
 * @throws IllegalArgumentException if the field is not volatile
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U,W>AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass,Class<W> vclass,String fieldName){
  return new AtomicReferenceFieldUpdaterImpl<U,W>(tclass,vclass,fieldName,Reflection.getCallerClass());
}

Fixed version (ground truth):
/** 
 * Creates and returns an updater for objects with the given field. The Class arguments are needed to check that reflective types and generic types match.
 * @param tclass the class of the objects holding the field
 * @param vclass the class of the field
 * @param fieldName the name of the field to be updated
 * @param < U > the type of instances of tclass
 * @param < W > the type of instances of vclass
 * @return the updater
 * @throws ClassCastException if the field is of the wrong type
 * @throws IllegalArgumentException if the field is not volatile
 * @throws RuntimeException with a nested reflection-basedexception if the class does not hold field or is the wrong type, or the field is inaccessible to the caller according to Java language access control
 */
@CallerSensitive public static <U,W>AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass,Class<W> vclass,String fieldName){
  return new AtomicReferenceFieldUpdaterImpl<U,W>(tclass,vclass,fieldName,Reflection.getCallerClass());
}
Program: 77387
Project: 77387
Buggy source:
/** 
 * Returns boolean value indicating whether or not the serializable field represented by this ObjectStreamField instance is unshared.
 * @since 1.4
 */
public boolean isUnshared(){
  return unshared;
}

Fixed version (ground truth):
/** 
 * Returns boolean value indicating whether or not the serializable field represented by this ObjectStreamField instance is unshared.
 * @return {@code true} if this field is unshared
 * @since 1.4
 */
public boolean isUnshared(){
  return unshared;
}
Program: 77389
Project: 77389
Buggy source:
/** 
 * Returns   {@code true} if this Spliterator's {@link #characteristics} contain all of the given characteristics.
 * @implSpec The default implementation returns true if the corresponding bits of the given characteristics are set.
 * @return {@code true} if all the specified characteristics are present,else  {@code false}
 */
default boolean hasCharacteristics(int characteristics){
  return (characteristics() & characteristics) == characteristics;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if this Spliterator's {@link #characteristics} contain all of the given characteristics.
 * @implSpec The default implementation returns true if the corresponding bits of the given characteristics are set.
 * @param characteristics the characteristics to check for
 * @return {@code true} if all the specified characteristics are present,else  {@code false}
 */
default boolean hasCharacteristics(int characteristics){
  return (characteristics() & characteristics) == characteristics;
}
Program: 77390
Project: 77390
Buggy source:
/** 
 * Returns a   {@code LockInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must contain the following attributes:<blockquote> <table border> <tr> <th align=left>Attribute Name</th> <th align=left>Type</th> </tr> <tr> <td>className</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>identityHashCode</td> <td><tt>java.lang.Integer</tt></td> </tr> </table> </blockquote>
 * @param cd {@code CompositeData} representing a {@code LockInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code LockInfo} with the attributes describedabove.
 * @return a {@code LockInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 * @since 1.8
 */
public static LockInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof LockInfoCompositeData) {
    return ((LockInfoCompositeData)cd).getLockInfo();
  }
 else {
    return LockInfoCompositeData.toLockInfo(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a   {@code LockInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must contain the following attributes:<blockquote> <table border summary="The attributes and the types the given CompositeData contains"> <tr> <th align=left>Attribute Name</th> <th align=left>Type</th> </tr> <tr> <td>className</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>identityHashCode</td> <td><tt>java.lang.Integer</tt></td> </tr> </table> </blockquote>
 * @param cd {@code CompositeData} representing a {@code LockInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code LockInfo} with the attributes describedabove.
 * @return a {@code LockInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 * @since 1.8
 */
public static LockInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof LockInfoCompositeData) {
    return ((LockInfoCompositeData)cd).getLockInfo();
  }
 else {
    return LockInfoCompositeData.toLockInfo(cd);
  }
}