nus-yam/ex-repair huggingface dataset:
Program: 36632
Project: 36632
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: 36633
Project: 36633
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: 36634
Project: 36634
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: 36635
Project: 36635
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: 36636
Project: 36636
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: 36637
Project: 36637
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: 36638
Project: 36638
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: 36639
Project: 36639
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: 36640
Project: 36640
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: 36642
Project: 36642
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: 36644
Project: 36644
Buggy source:
/** 
 * Retrieve cookies associated with given URI, or whose domain matches the given URI. Only cookies that have not expired are returned. This is called for every outgoing HTTP request.
 * @return          an immutable list of HttpCookie,return empty list if no cookies match the given URI
 * @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
 * @see #add
 */
public List<HttpCookie> get(URI uri);

Fixed version (ground truth):
/** 
 * Retrieve cookies associated with given URI, or whose domain matches the given URI. Only cookies that have not expired are returned. This is called for every outgoing HTTP request.
 * @return          an immutable list of HttpCookie,return empty list if no cookies match the given URI
 * @param uri       the uri associated with the cookies to be returned
 * @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
 * @see #add
 */
public List<HttpCookie> get(URI uri);
Program: 36646
Project: 36646
Buggy source:
/** 
 * Creates a HttpURLPermission with the given url string and unrestricted methods and request headers by invoking the two argument constructor as follows: HttpURLPermission(url, "*:*")
 * @throws IllegalArgumentException if url does not result in a valid {@link URI}
 */
public HttpURLPermission(String url){
  this(url,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Creates a HttpURLPermission with the given url string and unrestricted methods and request headers by invoking the two argument constructor as follows: HttpURLPermission(url, "*:*")
 * @param url the url string
 * @throws IllegalArgumentException if url does not result in a valid {@link URI}
 */
public HttpURLPermission(String url){
  this(url,"String_Node_Str");
}
Program: 36647
Project: 36647
Buggy source:
/** 
 * Returns the name of the protocol family.
 */
String name();

Fixed version (ground truth):
/** 
 * Returns the name of the protocol family.
 * @return the name of the protocol family
 */
String name();
Program: 36648
Project: 36648
Buggy source:
/** 
 * Returns the name of the socket option.
 */
String name();

Fixed version (ground truth):
/** 
 * Returns the name of the socket option.
 * @return the name of the socket option
 */
String name();
Program: 36649
Project: 36649
Buggy source:
/** 
 * Returns the type of the socket option value.
 */
Class<T> type();

Fixed version (ground truth):
/** 
 * Returns the type of the socket option value.
 * @return the type of the socket option value
 */
Class<T> type();
Program: 36650
Project: 36650
Buggy source:
/** 
 * Creates an InputStreamReader that uses the given charset decoder.  </p>
 * @param in       An InputStream
 * @param dec      A charset decoder
 * @since 1.4
 * @spec JSR-51
 */
public InputStreamReader(InputStream in,CharsetDecoder dec){
  super(in);
  if (dec == null)   throw new NullPointerException("String_Node_Str");
  sd=StreamDecoder.forInputStreamReader(in,this,dec);
}

Fixed version (ground truth):
/** 
 * Creates an InputStreamReader that uses the given charset decoder.
 * @param in       An InputStream
 * @param dec      A charset decoder
 * @since 1.4
 * @spec JSR-51
 */
public InputStreamReader(InputStream in,CharsetDecoder dec){
  super(in);
  if (dec == null)   throw new NullPointerException("String_Node_Str");
  sd=StreamDecoder.forInputStreamReader(in,this,dec);
}
Program: 36651
Project: 36651
Buggy source:
/** 
 * Creates an OutputStreamWriter that uses the given charset encoder.  </p>
 * @param out An OutputStream
 * @param enc A charset encoder
 * @since 1.4
 * @spec JSR-51
 */
public OutputStreamWriter(OutputStream out,CharsetEncoder enc){
  super(out);
  if (enc == null)   throw new NullPointerException("String_Node_Str");
  se=StreamEncoder.forOutputStreamWriter(out,this,enc);
}

Fixed version (ground truth):
/** 
 * Creates an OutputStreamWriter that uses the given charset encoder.
 * @param out An OutputStream
 * @param enc A charset encoder
 * @since 1.4
 * @spec JSR-51
 */
public OutputStreamWriter(OutputStream out,CharsetEncoder enc){
  super(out);
  if (enc == null)   throw new NullPointerException("String_Node_Str");
  se=StreamEncoder.forOutputStreamWriter(out,this,enc);
}
Program: 36652
Project: 36652
Buggy source:
/** 
 * Receives data into an array of bytes.  This method will block until some input is available.
 * @param b the buffer into which the data is received
 * @param off the start offset of the data
 * @param len the maximum number of bytes received
 * @exception IOException If the pipe is <a href=#BROKEN> broken</a>,{@link #connect(java.io.PipedOutputStream) unconnected}, closed,or if an I/O error occurs.
 */
synchronized void receive(byte b[],int off,int len) throws IOException {
  checkStateForReceive();
  writeSide=Thread.currentThread();
  int bytesToTransfer=len;
  while (bytesToTransfer > 0) {
    if (in == out)     awaitSpace();
    int nextTransferAmount=0;
    if (out < in) {
      nextTransferAmount=buffer.length - in;
    }
 else     if (in < out) {
      if (in == -1) {
        in=out=0;
        nextTransferAmount=buffer.length - in;
      }
 else {
        nextTransferAmount=out - in;
      }
    }
    if (nextTransferAmount > bytesToTransfer)     nextTransferAmount=bytesToTransfer;
    assert(nextTransferAmount > 0);
    System.arraycopy(b,off,buffer,in,nextTransferAmount);
    bytesToTransfer-=nextTransferAmount;
    off+=nextTransferAmount;
    in+=nextTransferAmount;
    if (in >= buffer.length) {
      in=0;
    }
  }
}

Fixed version (ground truth):
/** 
 * Receives data into an array of bytes.  This method will block until some input is available.
 * @param b the buffer into which the data is received
 * @param off the start offset of the data
 * @param len the maximum number of bytes received
 * @exception IOException If the pipe is <a href="#BROKEN"> broken</a>,{@link #connect(java.io.PipedOutputStream) unconnected}, closed,or if an I/O error occurs.
 */
synchronized void receive(byte b[],int off,int len) throws IOException {
  checkStateForReceive();
  writeSide=Thread.currentThread();
  int bytesToTransfer=len;
  while (bytesToTransfer > 0) {
    if (in == out)     awaitSpace();
    int nextTransferAmount=0;
    if (out < in) {
      nextTransferAmount=buffer.length - in;
    }
 else     if (in < out) {
      if (in == -1) {
        in=out=0;
        nextTransferAmount=buffer.length - in;
      }
 else {
        nextTransferAmount=out - in;
      }
    }
    if (nextTransferAmount > bytesToTransfer)     nextTransferAmount=bytesToTransfer;
    assert(nextTransferAmount > 0);
    System.arraycopy(b,off,buffer,in,nextTransferAmount);
    bytesToTransfer-=nextTransferAmount;
    off+=nextTransferAmount;
    in+=nextTransferAmount;
    if (in >= buffer.length) {
      in=0;
    }
  }
}
Program: 36654
Project: 36654
Buggy source:
/** 
 * Returns the number of bytes that can be read from this input stream without blocking.
 * @return the number of bytes that can be read from this input streamwithout blocking, or  {@code 0} if this input stream has beenclosed by invoking its  {@link #close()} method, or if the pipeis  {@link #connect(java.io.PipedOutputStream) unconnected}, or <a href=#BROKEN> <code>broken</code></a>.
 * @exception IOException  if an I/O error occurs.
 * @since   JDK1.0.2
 */
public synchronized int available() throws IOException {
  if (in < 0)   return 0;
 else   if (in == out)   return buffer.length;
 else   if (in > out)   return in - out;
 else   return in + buffer.length - out;
}

Fixed version (ground truth):
/** 
 * Returns the number of bytes that can be read from this input stream without blocking.
 * @return the number of bytes that can be read from this input streamwithout blocking, or  {@code 0} if this input stream has beenclosed by invoking its  {@link #close()} method, or if the pipeis  {@link #connect(java.io.PipedOutputStream) unconnected}, or <a href="#BROKEN"> <code>broken</code></a>.
 * @exception IOException  if an I/O error occurs.
 * @since   JDK1.0.2
 */
public synchronized int available() throws IOException {
  if (in < 0)   return 0;
 else   if (in == out)   return buffer.length;
 else   if (in > out)   return in - out;
 else   return in + buffer.length - out;
}
Program: 36655
Project: 36655
Buggy source:
/** 
 * Returns the opaque file descriptor object associated with this stream. </p>
 * @return     the file descriptor object associated with this stream.
 * @exception IOException  if an I/O error occurs.
 * @see java.io.FileDescriptor
 */
public final FileDescriptor getFD() throws IOException {
  if (fd != null) {
    return fd;
  }
  throw new IOException();
}

Fixed version (ground truth):
/** 
 * Returns the opaque file descriptor object associated with this stream.
 * @return     the file descriptor object associated with this stream.
 * @exception IOException  if an I/O error occurs.
 * @see java.io.FileDescriptor
 */
public final FileDescriptor getFD() throws IOException {
  if (fd != null) {
    return fd;
  }
  throw new IOException();
}
Program: 36657
Project: 36657
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: 36658
Project: 36658
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);
  }
}
Program: 36659
Project: 36659
Buggy source:
/** 
 * Returns the list of the platform MXBean proxies for forwarding the method calls of the   {@code mxbeanInterface}through the given   {@code MBeanServerConnection}. The returned list may contain zero, one, or more instances. The number of instances in the returned list is defined in the specification of the given management interface. The order is undefined and there is no guarantee that the list returned is in the same order as previous invocations.
 * @param connection the {@code MBeanServerConnection} to forward to.
 * @param mxbeanInterface a management interface for a platformMXBean
 * @return the list of platform MXBean proxies forforwarding the method calls of the  {@code mxbeanInterface}through the given   {@code MBeanServerConnection}.
 * @throws IllegalArgumentException if {@code mxbeanInterface}is not a platform management interface.
 * @throws java.io.IOException if a communication problemoccurred when accessing the  {@code MBeanServerConnection}.
 * @see #newPlatformMXBeanProxy
 * @since 1.7
 */
public static <T extends PlatformManagedObject>List<T> getPlatformMXBeans(MBeanServerConnection connection,Class<T> mxbeanInterface) throws java.io.IOException {
  PlatformComponent pc=PlatformComponent.getPlatformComponent(mxbeanInterface);
  if (pc == null) {
    throw new IllegalArgumentException(mxbeanInterface.getName() + "String_Node_Str");
  }
  return Collections.unmodifiableList(pc.getMXBeans(connection,mxbeanInterface));
}

Fixed version (ground truth):
/** 
 * Returns the list of the platform MXBean proxies for forwarding the method calls of the   {@code mxbeanInterface}through the given   {@code MBeanServerConnection}. The returned list may contain zero, one, or more instances. The number of instances in the returned list is defined in the specification of the given management interface. The order is undefined and there is no guarantee that the list returned is in the same order as previous invocations.
 * @param connection the {@code MBeanServerConnection} to forward to.
 * @param mxbeanInterface a management interface for a platformMXBean
 * @param < T > an {@code mxbeanInterface} type parameter
 * @return the list of platform MXBean proxies forforwarding the method calls of the  {@code mxbeanInterface}through the given   {@code MBeanServerConnection}.
 * @throws IllegalArgumentException if {@code mxbeanInterface}is not a platform management interface.
 * @throws java.io.IOException if a communication problemoccurred when accessing the  {@code MBeanServerConnection}.
 * @see #newPlatformMXBeanProxy
 * @since 1.7
 */
public static <T extends PlatformManagedObject>List<T> getPlatformMXBeans(MBeanServerConnection connection,Class<T> mxbeanInterface) throws java.io.IOException {
  PlatformComponent pc=PlatformComponent.getPlatformComponent(mxbeanInterface);
  if (pc == null) {
    throw new IllegalArgumentException(mxbeanInterface.getName() + "String_Node_Str");
  }
  return Collections.unmodifiableList(pc.getMXBeans(connection,mxbeanInterface));
}
Program: 36662
Project: 36662
Buggy source:
/** 
 * Returns a <tt>MemoryNotificationInfo</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> must contain the following attributes: <blockquote> <table border> <tr> <th align=left>Attribute Name</th> <th align=left>Type</th> </tr> <tr> <td>poolName</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>usage</td> <td><tt>javax.management.openmbean.CompositeData</tt></td> </tr> <tr> <td>count</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a<tt>MemoryNotificationInfo</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryNotificationInfo</tt> object.
 * @return a <tt>MemoryNotificationInfo</tt> object representedby <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a <tt>MemoryNotificationInfo</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> 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>poolName</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>usage</td> <td><tt>javax.management.openmbean.CompositeData</tt></td> </tr> <tr> <td>count</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a<tt>MemoryNotificationInfo</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryNotificationInfo</tt> object.
 * @return a <tt>MemoryNotificationInfo</tt> object representedby <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}
Program: 36663
Project: 36663
Buggy source:
/** 
 * Returns the input arguments passed to the Java virtual machine which does not include the arguments to the <tt>main</tt> method. This method returns an empty list if there is no input argument to the Java virtual machine. <p> Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc. <p> Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options. <p> <b>MBeanServer access</b>:<br> The mapped type of <tt>List<String></tt> is <tt>String[]</tt>.
 * @return a list of <tt>String</tt> objects; each elementis an argument passed to the Java virtual machine.
 * @throws java.lang.SecurityException if a security manager exists and the caller does not have ManagementPermission("monitor").
 */
public java.util.List<String> getInputArguments();

Fixed version (ground truth):
/** 
 * Returns the input arguments passed to the Java virtual machine which does not include the arguments to the <tt>main</tt> method. This method returns an empty list if there is no input argument to the Java virtual machine. <p> Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc. <p> Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options. <p> <b>MBeanServer access</b>:<br> The mapped type of   {@code List<String>} is <tt>String[]</tt>.
 * @return a list of <tt>String</tt> objects; each elementis an argument passed to the Java virtual machine.
 * @throws java.lang.SecurityException if a security manager exists and the caller does not have ManagementPermission("monitor").
 */
public java.util.List<String> getInputArguments();
Program: 36664
Project: 36664
Buggy source:
/** 
 * Returns a map of names and values of all system properties. This method calls   {@link System#getProperties} to get allsystem properties.  Properties whose name or value is not a <tt>String</tt> are omitted. <p> <b>MBeanServer access</b>:<br> The mapped type of  {@code Map<String,String>} is{@link javax.management.openmbean.TabularData TabularData}with two items in each row as follows: <blockquote> <table border> <tr> <th>Item Name</th> <th>Item Type</th> </tr> <tr> <td><tt>key</tt></td> <td><tt>String</tt></td> </tr> <tr> <td><tt>value</tt></td> <td><tt>String</tt></td> </tr> </table> </blockquote>
 * @return a map of names and values of all system properties.
 * @throws java.lang.SecurityException if a security manager exists and its <code>checkPropertiesAccess</code> method doesn't allow access to the system properties.
 */
public java.util.Map<String,String> getSystemProperties();

Fixed version (ground truth):
/** 
 * Returns a map of names and values of all system properties. This method calls   {@link System#getProperties} to get allsystem properties.  Properties whose name or value is not a <tt>String</tt> are omitted. <p> <b>MBeanServer access</b>:<br> The mapped type of  {@code Map<String,String>} is{@link javax.management.openmbean.TabularData TabularData}with two items in each row as follows: <blockquote> <table border summary="Name and Type for each item"> <tr> <th>Item Name</th> <th>Item Type</th> </tr> <tr> <td><tt>key</tt></td> <td><tt>String</tt></td> </tr> <tr> <td><tt>value</tt></td> <td><tt>String</tt></td> </tr> </table> </blockquote>
 * @return a map of names and values of all system properties.
 * @throws java.lang.SecurityException if a security manager exists and its <code>checkPropertiesAccess</code> method doesn't allow access to the system properties.
 */
public java.util.Map<String,String> getSystemProperties();
Program: 36666
Project: 36666
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);
  }
}
Program: 36667
Project: 36667
Buggy source:
/** 
 * Returns the list of the platform MXBean proxies for forwarding the method calls of the   {@code mxbeanInterface}through the given   {@code MBeanServerConnection}. The returned list may contain zero, one, or more instances. The number of instances in the returned list is defined in the specification of the given management interface. The order is undefined and there is no guarantee that the list returned is in the same order as previous invocations.
 * @param connection the {@code MBeanServerConnection} to forward to.
 * @param mxbeanInterface a management interface for a platformMXBean
 * @return the list of platform MXBean proxies forforwarding the method calls of the  {@code mxbeanInterface}through the given   {@code MBeanServerConnection}.
 * @throws IllegalArgumentException if {@code mxbeanInterface}is not a platform management interface.
 * @throws java.io.IOException if a communication problemoccurred when accessing the  {@code MBeanServerConnection}.
 * @see #newPlatformMXBeanProxy
 * @since 1.7
 */
public static <T extends PlatformManagedObject>List<T> getPlatformMXBeans(MBeanServerConnection connection,Class<T> mxbeanInterface) throws java.io.IOException {
  PlatformComponent pc=PlatformComponent.getPlatformComponent(mxbeanInterface);
  if (pc == null) {
    throw new IllegalArgumentException(mxbeanInterface.getName() + "String_Node_Str");
  }
  return Collections.unmodifiableList(pc.getMXBeans(connection,mxbeanInterface));
}

Fixed version (ground truth):
/** 
 * Returns the list of the platform MXBean proxies for forwarding the method calls of the   {@code mxbeanInterface}through the given   {@code MBeanServerConnection}. The returned list may contain zero, one, or more instances. The number of instances in the returned list is defined in the specification of the given management interface. The order is undefined and there is no guarantee that the list returned is in the same order as previous invocations.
 * @param connection the {@code MBeanServerConnection} to forward to.
 * @param mxbeanInterface a management interface for a platformMXBean
 * @param < T > an {@code mxbeanInterface} type parameter
 * @return the list of platform MXBean proxies forforwarding the method calls of the  {@code mxbeanInterface}through the given   {@code MBeanServerConnection}.
 * @throws IllegalArgumentException if {@code mxbeanInterface}is not a platform management interface.
 * @throws java.io.IOException if a communication problemoccurred when accessing the  {@code MBeanServerConnection}.
 * @see #newPlatformMXBeanProxy
 * @since 1.7
 */
public static <T extends PlatformManagedObject>List<T> getPlatformMXBeans(MBeanServerConnection connection,Class<T> mxbeanInterface) throws java.io.IOException {
  PlatformComponent pc=PlatformComponent.getPlatformComponent(mxbeanInterface);
  if (pc == null) {
    throw new IllegalArgumentException(mxbeanInterface.getName() + "String_Node_Str");
  }
  return Collections.unmodifiableList(pc.getMXBeans(connection,mxbeanInterface));
}
Program: 36670
Project: 36670
Buggy source:
/** 
 * Returns a <tt>MemoryNotificationInfo</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> must contain the following attributes: <blockquote> <table border> <tr> <th align=left>Attribute Name</th> <th align=left>Type</th> </tr> <tr> <td>poolName</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>usage</td> <td><tt>javax.management.openmbean.CompositeData</tt></td> </tr> <tr> <td>count</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a<tt>MemoryNotificationInfo</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryNotificationInfo</tt> object.
 * @return a <tt>MemoryNotificationInfo</tt> object representedby <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a <tt>MemoryNotificationInfo</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> 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>poolName</td> <td><tt>java.lang.String</tt></td> </tr> <tr> <td>usage</td> <td><tt>javax.management.openmbean.CompositeData</tt></td> </tr> <tr> <td>count</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a<tt>MemoryNotificationInfo</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryNotificationInfo</tt> object.
 * @return a <tt>MemoryNotificationInfo</tt> object representedby <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}
Program: 36671
Project: 36671
Buggy source:
/** 
 * Returns a <tt>MemoryUsage</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> must contain the following attributes: <p> <blockquote> <table border> <tr> <th align=left>Attribute Name</th> <th align=left>Type</th> </tr> <tr> <td>init</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>used</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>committed</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>max</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a <tt>MemoryUsage</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryUsage</tt> with the attributes described above.
 * @return a <tt>MemoryUsage</tt> object represented by <tt>cd</tt>if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryUsage from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryUsageCompositeData) {
    return ((MemoryUsageCompositeData)cd).getMemoryUsage();
  }
 else {
    return new MemoryUsage(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a <tt>MemoryUsage</tt> object represented by the given <tt>CompositeData</tt>. The given <tt>CompositeData</tt> must contain the following attributes: <p> <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>init</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>used</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>committed</td> <td><tt>java.lang.Long</tt></td> </tr> <tr> <td>max</td> <td><tt>java.lang.Long</tt></td> </tr> </table> </blockquote>
 * @param cd <tt>CompositeData</tt> representing a <tt>MemoryUsage</tt>
 * @throws IllegalArgumentException if <tt>cd</tt> does notrepresent a <tt>MemoryUsage</tt> with the attributes described above.
 * @return a <tt>MemoryUsage</tt> object represented by <tt>cd</tt>if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
 */
public static MemoryUsage from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryUsageCompositeData) {
    return ((MemoryUsageCompositeData)cd).getMemoryUsage();
  }
 else {
    return new MemoryUsage(cd);
  }
}
Program: 36673
Project: 36673
Buggy source:
/** 
 * Returns the input arguments passed to the Java virtual machine which does not include the arguments to the <tt>main</tt> method. This method returns an empty list if there is no input argument to the Java virtual machine. <p> Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc. <p> Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options. <p> <b>MBeanServer access</b>:<br> The mapped type of <tt>List<String></tt> is <tt>String[]</tt>.
 * @return a list of <tt>String</tt> objects; each elementis an argument passed to the Java virtual machine.
 * @throws java.lang.SecurityException if a security manager exists and the caller does not have ManagementPermission("monitor").
 */
public java.util.List<String> getInputArguments();

Fixed version (ground truth):
/** 
 * Returns the input arguments passed to the Java virtual machine which does not include the arguments to the <tt>main</tt> method. This method returns an empty list if there is no input argument to the Java virtual machine. <p> Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc. <p> Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options. <p> <b>MBeanServer access</b>:<br> The mapped type of   {@code List<String>} is <tt>String[]</tt>.
 * @return a list of <tt>String</tt> objects; each elementis an argument passed to the Java virtual machine.
 * @throws java.lang.SecurityException if a security manager exists and the caller does not have ManagementPermission("monitor").
 */
public java.util.List<String> getInputArguments();