nus-yam/ex-repair huggingface dataset:
Program: 79187
Project: 79187
Buggy source:
/** 
 * Gets an unmodifiable list of Strings representing the OBJECT IDENTIFIERs of the   {@code ExtKeyUsageSyntax} field of theextended key usage extension, (OID = 2.5.29.37).  It indicates one or more purposes for which the certified public key may be used, in addition to or in place of the basic purposes indicated in the key usage extension field.  The ASN.1 definition for this is: <pre> ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId<p> KeyPurposeId ::= OBJECT IDENTIFIER<p> </pre> Key purposes may be defined by any organization with a need. Object identifiers used to identify key purposes shall be assigned in accordance with IANA or ITU-T Rec. X.660 | ISO/IEC/ITU 9834-1. <p> This method was added to version 1.4 of the Java 2 Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method is not  {@code abstract}and it provides a default implementation. Subclasses should override this method with a correct implementation.
 * @return the ExtendedKeyUsage extension of this certificate,as an unmodifiable list of object identifiers represented as Strings. Returns null if this certificate does not contain an ExtendedKeyUsage extension.
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public List<String> getExtendedKeyUsage() throws CertificateParsingException {
  return X509CertImpl.getExtendedKeyUsage(this);
}

Fixed version (ground truth):
/** 
 * Gets an unmodifiable list of Strings representing the OBJECT IDENTIFIERs of the   {@code ExtKeyUsageSyntax} field of theextended key usage extension, (OID = 2.5.29.37).  It indicates one or more purposes for which the certified public key may be used, in addition to or in place of the basic purposes indicated in the key usage extension field.  The ASN.1 definition for this is: <pre> ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId KeyPurposeId ::= OBJECT IDENTIFIER </pre> Key purposes may be defined by any organization with a need. Object identifiers used to identify key purposes shall be assigned in accordance with IANA or ITU-T Rec. X.660 | ISO/IEC/ITU 9834-1. <p> This method was added to version 1.4 of the Java 2 Platform Standard Edition. In order to maintain backwards compatibility with existing service providers, this method is not  {@code abstract}and it provides a default implementation. Subclasses should override this method with a correct implementation.
 * @return the ExtendedKeyUsage extension of this certificate,as an unmodifiable list of object identifiers represented as Strings. Returns null if this certificate does not contain an ExtendedKeyUsage extension.
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public List<String> getExtendedKeyUsage() throws CertificateParsingException {
  return X509CertImpl.getExtendedKeyUsage(this);
}
Program: 79188
Project: 79188
Buggy source:
/** 
 * Gets the   {@code notBefore} date from the validity period ofthe certificate. The relevant ASN.1 definitions are: <pre> validity             Validity<p> Validity ::= SEQUENCE { notBefore      CertificateValidityDate, notAfter       CertificateValidityDate }<p> CertificateValidityDate ::= CHOICE { utcTime        UTCTime, generalTime    GeneralizedTime } </pre>
 * @return the start date of the validity period.
 * @see #checkValidity
 */
public abstract Date getNotBefore();

Fixed version (ground truth):
/** 
 * Gets the   {@code notBefore} date from the validity period ofthe certificate. The relevant ASN.1 definitions are: <pre> validity             Validity Validity ::= SEQUENCE { notBefore      CertificateValidityDate, notAfter       CertificateValidityDate } CertificateValidityDate ::= CHOICE { utcTime        UTCTime, generalTime    GeneralizedTime } </pre>
 * @return the start date of the validity period.
 * @see #checkValidity
 */
public abstract Date getNotBefore();
Program: 79189
Project: 79189
Buggy source:
/** 
 * Gets the signature algorithm name for the certificate signature algorithm. An example is the string "SHA256withRSA". The ASN.1 definition for this is: <pre> signatureAlgorithm   AlgorithmIdentifier<p> AlgorithmIdentifier  ::=  SEQUENCE  { algorithm               OBJECT IDENTIFIER, parameters              ANY DEFINED BY algorithm OPTIONAL  } -- contains a value of the type -- registered for use with the -- algorithm object identifier value </pre> <p>The algorithm name is determined from the   {@code algorithm}OID string.
 * @return the signature algorithm name.
 */
public abstract String getSigAlgName();

Fixed version (ground truth):
/** 
 * Gets the signature algorithm name for the certificate signature algorithm. An example is the string "SHA256withRSA". The ASN.1 definition for this is: <pre> signatureAlgorithm   AlgorithmIdentifier AlgorithmIdentifier  ::=  SEQUENCE  { algorithm               OBJECT IDENTIFIER, parameters              ANY DEFINED BY algorithm OPTIONAL  } -- contains a value of the type -- registered for use with the -- algorithm object identifier value </pre> <p>The algorithm name is determined from the   {@code algorithm}OID string.
 * @return the signature algorithm name.
 */
public abstract String getSigAlgName();
Program: 79190
Project: 79190
Buggy source:
/** 
 * Gets the   {@code subjectUniqueID} value from the certificate.<p>The ASN.1 definition for this is: <pre> subjectUniqueID  [2]  IMPLICIT UniqueIdentifier OPTIONAL<p> UniqueIdentifier  ::=  BIT STRING </pre>
 * @return the subject unique identifier or null if it is notpresent in the certificate.
 */
public abstract boolean[] getSubjectUniqueID();

Fixed version (ground truth):
/** 
 * Gets the   {@code subjectUniqueID} value from the certificate.<p>The ASN.1 definition for this is: <pre> subjectUniqueID  [2]  IMPLICIT UniqueIdentifier OPTIONAL UniqueIdentifier  ::=  BIT STRING </pre>
 * @return the subject unique identifier or null if it is notpresent in the certificate.
 */
public abstract boolean[] getSubjectUniqueID();
Program: 79192
Project: 79192
Buggy source:
/** 
 * <p> If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container. </p> <p> Conformant implementations shall: <ol> <li> Associate the newly instantiated Applet with the appropriate AppletContext. <li> Instantiate an AppletStub() and associate that AppletStub with the Applet via an invocation of setStub(). <li> If BeanContext parameter is null, then it shall associate the Applet with its appropriate Container by adding that Applet to its Container via an invocation of add(). If the BeanContext parameter is non-null, then it is the responsibility of the BeanContext to associate the Applet with its Container during the subsequent invocation of its addChildren() method. </ol> </p>
 * @param newAppletBean  The newly instantiated JavaBean
 * @param bCtxt          The BeanContext intended for this Applet, ornull.
 */
void initialize(Applet newAppletBean,BeanContext bCtxt);

Fixed version (ground truth):
/** 
 * <p> If passed to the appropriate variant of java.beans.Beans.instantiate this method will be called in order to associate the newly instantiated Applet (JavaBean) with its AppletContext, AppletStub, and Container. </p> <p> Conformant implementations shall: <ol> <li> Associate the newly instantiated Applet with the appropriate AppletContext. <li> Instantiate an AppletStub() and associate that AppletStub with the Applet via an invocation of setStub(). <li> If BeanContext parameter is null, then it shall associate the Applet with its appropriate Container by adding that Applet to its Container via an invocation of add(). If the BeanContext parameter is non-null, then it is the responsibility of the BeanContext to associate the Applet with its Container during the subsequent invocation of its addChildren() method. </ol>
 * @param newAppletBean  The newly instantiated JavaBean
 * @param bCtxt          The BeanContext intended for this Applet, ornull.
 */
void initialize(Applet newAppletBean,BeanContext bCtxt);
Program: 79193
Project: 79193
Buggy source:
/** 
 * From a given bean, obtain an object representing a specified type view of that source object. <p> The result may be the same object or a different object.  If the requested target view isn't available then the given bean is returned. <p> This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
 * @param bean        Object from which we want to obtain a view.
 * @param targetType  The type of view we'd like to get.
 */
public static Object getInstanceOf(Object bean,Class<?> targetType){
  return bean;
}

Fixed version (ground truth):
/** 
 * From a given bean, obtain an object representing a specified type view of that source object. <p> The result may be the same object or a different object.  If the requested target view isn't available then the given bean is returned. <p> This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
 * @return an object representing a specified type view of thesource object
 * @param bean        Object from which we want to obtain a view.
 * @param targetType  The type of view we'd like to get.
 */
public static Object getInstanceOf(Object bean,Class<?> targetType){
  return bean;
}
Program: 79197
Project: 79197
Buggy source:
/** 
 * If the value property of this instance is not already set, this method dynamically finds the method with the specified methodName on this target with these arguments and calls it. The result of the method invocation is first copied into the value property of this expression and then returned as the result of <code>getValue</code>. If the value property was already set, either by a call to <code>setValue</code> or a previous call to <code>getValue</code> then the value property is returned without either looking up or calling the method. <p> The value property of an <code>Expression</code> is set to a unique private (non-<code>null</code>) value by default and this value is used as an internal indication that the method has not yet been called. A return value of <code>null</code> replaces this default value in the same way that any other value would, ensuring that expressions are never evaluated more than once. <p> See the <code>excecute</code> method for details on how methods are chosen using the dynamic types of the target and arguments.
 * @see Statement#execute
 * @see #setValue
 * @return The result of applying this method to these arguments.
 */
public Object getValue() throws Exception {
  if (value == unbound) {
    setValue(invoke());
  }
  return value;
}

Fixed version (ground truth):
/** 
 * If the value property of this instance is not already set, this method dynamically finds the method with the specified methodName on this target with these arguments and calls it. The result of the method invocation is first copied into the value property of this expression and then returned as the result of <code>getValue</code>. If the value property was already set, either by a call to <code>setValue</code> or a previous call to <code>getValue</code> then the value property is returned without either looking up or calling the method. <p> The value property of an <code>Expression</code> is set to a unique private (non-<code>null</code>) value by default and this value is used as an internal indication that the method has not yet been called. A return value of <code>null</code> replaces this default value in the same way that any other value would, ensuring that expressions are never evaluated more than once. <p> See the <code>execute</code> method for details on how methods are chosen using the dynamic types of the target and arguments.
 * @see Statement#execute
 * @see #setValue
 * @return The result of applying this method to these arguments.
 * @throws Exception if the method with the specified methodNamethrows an exception
 */
public Object getValue() throws Exception {
  if (value == unbound) {
    setValue(invoke());
  }
  return value;
}
Program: 79198
Project: 79198
Buggy source:
/** 
 * Sets the method that should be used to read an indexed property value.
 * @param readMethod The new indexed read method.
 */
public synchronized void setIndexedReadMethod(Method readMethod) throws IntrospectionException {
  setIndexedPropertyType(findIndexedPropertyType(readMethod,getIndexedWriteMethod0()));
  setIndexedReadMethod0(readMethod);
}

Fixed version (ground truth):
/** 
 * Sets the method that should be used to read an indexed property value.
 * @param readMethod The new indexed read method.
 * @throws IntrospectionException if an exception occurs duringintrospection.
 */
public synchronized void setIndexedReadMethod(Method readMethod) throws IntrospectionException {
  setIndexedPropertyType(findIndexedPropertyType(readMethod,getIndexedWriteMethod0()));
  setIndexedReadMethod0(readMethod);
}
Program: 79199
Project: 79199
Buggy source:
/** 
 * Sets the method that should be used to write an indexed property value.
 * @param writeMethod The new indexed write method.
 */
public synchronized void setIndexedWriteMethod(Method writeMethod) throws IntrospectionException {
  Class<?> type=findIndexedPropertyType(getIndexedReadMethod(),writeMethod);
  setIndexedPropertyType(type);
  setIndexedWriteMethod0(writeMethod);
}

Fixed version (ground truth):
/** 
 * Sets the method that should be used to write an indexed property value.
 * @param writeMethod The new indexed write method.
 * @throws IntrospectionException if an exception occurs duringintrospection.
 */
public synchronized void setIndexedWriteMethod(Method writeMethod) throws IntrospectionException {
  Class<?> type=findIndexedPropertyType(getIndexedReadMethod(),writeMethod);
  setIndexedPropertyType(type);
  setIndexedWriteMethod0(writeMethod);
}
Program: 79201
Project: 79201
Buggy source:
/** 
 * Sets the method that should be used to write the property value.
 * @param writeMethod The new write method.
 */
public synchronized void setWriteMethod(Method writeMethod) throws IntrospectionException {
  if (writeMethod == null) {
    writeMethodName=null;
    writeMethodRef=null;
    return;
  }
  setPropertyType(findPropertyType(getReadMethod(),writeMethod));
  setClass0(writeMethod.getDeclaringClass());
  writeMethodName=writeMethod.getName();
  this.writeMethodRef=getSoftReference(writeMethod);
  setTransient(writeMethod.getAnnotation(Transient.class));
}

Fixed version (ground truth):
/** 
 * Sets the method that should be used to write the property value.
 * @param writeMethod The new write method.
 * @throws IntrospectionException if the write method is invalid
 */
public synchronized void setWriteMethod(Method writeMethod) throws IntrospectionException {
  if (writeMethod == null) {
    writeMethodName=null;
    writeMethodRef=null;
    return;
  }
  setPropertyType(findPropertyType(getReadMethod(),writeMethod));
  setClass0(writeMethod.getDeclaringClass());
  writeMethodName=writeMethod.getName();
  this.writeMethodRef=getSoftReference(writeMethod);
  setTransient(writeMethod.getAnnotation(Transient.class));
}
Program: 79202
Project: 79202
Buggy source:
/** 
 * Sets the method that should be used to read the property value.
 * @param readMethod The new read method.
 */
public synchronized void setReadMethod(Method readMethod) throws IntrospectionException {
  if (readMethod == null) {
    readMethodName=null;
    readMethodRef=null;
    return;
  }
  setPropertyType(findPropertyType(readMethod,getWriteMethod0()));
  setClass0(readMethod.getDeclaringClass());
  readMethodName=readMethod.getName();
  this.readMethodRef=getSoftReference(readMethod);
  setTransient(readMethod.getAnnotation(Transient.class));
}

Fixed version (ground truth):
/** 
 * Sets the method that should be used to read the property value.
 * @param readMethod The new read method.
 * @throws IntrospectionException if the read method is invalid
 */
public synchronized void setReadMethod(Method readMethod) throws IntrospectionException {
  if (readMethod == null) {
    readMethodName=null;
    readMethodRef=null;
    return;
  }
  setPropertyType(findPropertyType(readMethod,getWriteMethod0()));
  setClass0(readMethod.getDeclaringClass());
  readMethodName=readMethod.getName();
  this.readMethodRef=getSoftReference(readMethod);
  setTransient(readMethod.getAnnotation(Transient.class));
}
Program: 79203
Project: 79203
Buggy source:
/** 
 * Analagous to <code>java.lang.ClassLoader.getResource()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoader</code>.
 * @param name the resource name
 * @param bcc the specified child
 * @return a <code>URL</code> for the namedresource for the specified child
 * @throws <code>IllegalArgumentException</code>if the resource is not valid
 */
URL getResource(String name,BeanContextChild bcc) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Analagous to <code>java.lang.ClassLoader.getResource()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoader</code>.
 * @param name the resource name
 * @param bcc the specified child
 * @return a <code>URL</code> for the namedresource for the specified child
 * @throws IllegalArgumentException if the resource is not valid
 */
URL getResource(String name,BeanContextChild bcc) throws IllegalArgumentException ;
Program: 79204
Project: 79204
Buggy source:
/** 
 * Adds the specified <code>BeanContextMembershipListener</code> to receive <code>BeanContextMembershipEvents</code> from this <code>BeanContext</code> whenever it adds or removes a child <code>Component</code>(s).
 * @param bcml the <code>BeanContextMembershipListener</code> to be added
 */
void addBeanContextMembershipListener(BeanContextMembershipListener bcml);

Fixed version (ground truth):
/** 
 * Adds the specified <code>BeanContextMembershipListener</code> to receive <code>BeanContextMembershipEvents</code> from this <code>BeanContext</code> whenever it adds or removes a child <code>Component</code>(s).
 * @param bcml the BeanContextMembershipListener to be added
 */
void addBeanContextMembershipListener(BeanContextMembershipListener bcml);
Program: 79205
Project: 79205
Buggy source:
/** 
 * Analagous to <code>java.lang.ClassLoader.getResourceAsStream()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoader</code>.
 * @param name the resource name
 * @param bcc the specified child
 * @return an <code>InputStream</code> for reading the resource,or <code>null</code> if the resource could not be found.
 * @throws <code>IllegalArgumentException</code> ifthe resource is not valid
 */
InputStream getResourceAsStream(String name,BeanContextChild bcc) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Analagous to <code>java.lang.ClassLoader.getResourceAsStream()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoader</code>.
 * @param name the resource name
 * @param bcc the specified child
 * @return an <code>InputStream</code> for reading the resource,or <code>null</code> if the resource could not be found.
 * @throws IllegalArgumentException ifthe resource is not valid
 */
InputStream getResourceAsStream(String name,BeanContextChild bcc) throws IllegalArgumentException ;
Program: 79206
Project: 79206
Buggy source:
/** 
 * Instantiate the javaBean named as a child of this <code>BeanContext</code>. The implementation of the JavaBean is derived from the value of the beanName parameter, and is defined by the <code>java.beans.Beans.instantiate()</code> method.
 * @param beanName The name of the JavaBean to instantiateas a child of this <code>BeanContext</code>
 * @throws <code>IOException</code>
 * @throws <code>ClassNotFoundException</code> if the class identifiedby the beanName parameter is not found
 */
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException ;

Fixed version (ground truth):
/** 
 * Instantiate the javaBean named as a child of this <code>BeanContext</code>. The implementation of the JavaBean is derived from the value of the beanName parameter, and is defined by the <code>java.beans.Beans.instantiate()</code> method.
 * @return a javaBean named as a child of this<code>BeanContext</code>
 * @param beanName The name of the JavaBean to instantiateas a child of this <code>BeanContext</code>
 * @throws IOException if an IO problem occurs
 * @throws ClassNotFoundException if the class identifiedby the beanName parameter is not found
 */
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException ;
Program: 79207
Project: 79207
Buggy source:
/** 
 * Returns a   {@link BinaryOperator} which returns the greater of two elementsaccording to the specified  {@code Comparator}
 * @param comparator a {@code Comparator} for comparing the two values
 * @return a {@code BinaryOperator} which returns the greater of its operands,according to the supplied  {@code Comparator}
 * @throws NullPointerException if the argument is null
 */
public static <T>BinaryOperator<T> maxBy(Comparator<? super T> comparator){
  Objects.requireNonNull(comparator);
  return (a,b) -> comparator.compare(a,b) >= 0 ? a : b;
}

Fixed version (ground truth):
/** 
 * Returns a   {@link BinaryOperator} which returns the greater of two elementsaccording to the specified  {@code Comparator}
 * @param < T > the type of values to be compared and returned
 * @param comparator a {@code Comparator} for comparing the two values
 * @return a {@code BinaryOperator} which returns the greater of its operands,according to the supplied  {@code Comparator}
 * @throws NullPointerException if the argument is null
 */
public static <T>BinaryOperator<T> maxBy(Comparator<? super T> comparator){
  Objects.requireNonNull(comparator);
  return (a,b) -> comparator.compare(a,b) >= 0 ? a : b;
}
Program: 79208
Project: 79208
Buggy source:
/** 
 * Returns a   {@link BinaryOperator} which returns the lesser of two elementsaccording to the specified  {@code Comparator}
 * @param comparator a {@code Comparator} for comparing the two values
 * @return a {@code BinaryOperator} which returns the lesser of its operands,according to the supplied  {@code Comparator}
 * @throws NullPointerException if the argument is null
 */
public static <T>BinaryOperator<T> minBy(Comparator<? super T> comparator){
  Objects.requireNonNull(comparator);
  return (a,b) -> comparator.compare(a,b) <= 0 ? a : b;
}

Fixed version (ground truth):
/** 
 * Returns a   {@link BinaryOperator} which returns the lesser of two elementsaccording to the specified  {@code Comparator}
 * @param < T > the type of values to be compared and returned
 * @param comparator a {@code Comparator} for comparing the two values
 * @return a {@code BinaryOperator} which returns the lesser of its operands,according to the supplied  {@code Comparator}
 * @throws NullPointerException if the argument is null
 */
public static <T>BinaryOperator<T> minBy(Comparator<? super T> comparator){
  Objects.requireNonNull(comparator);
  return (a,b) -> comparator.compare(a,b) <= 0 ? a : b;
}
Program: 79209
Project: 79209
Buggy source:
/** 
 * Returns a   {@code Function} whose {@code apply} method returns its input.
 * @param < T > the type of the input and output objects to the function
 */
static <T>Function<T,T> identity(){
  return t -> t;
}

Fixed version (ground truth):
/** 
 * Returns a   {@code Function} whose {@code apply} method returns its input.
 * @param < T > the type of the input and output objects to the function
 * @return a {@code Function} whose {@code apply} method returns its input
 */
static <T>Function<T,T> identity(){
  return t -> t;
}
Program: 79210
Project: 79210
Buggy source:
/** 
 * Returns a unary operator that provides its input value as the result.
 * @return a unary operator that provides its input value as the result
 */
static <T>UnaryOperator<T> identity(){
  return t -> t;
}

Fixed version (ground truth):
/** 
 * Returns a unary operator that provides its input value as the result.
 * @param < T > the type of the input and output objects to the function
 * @return a unary operator that provides its input value as the result
 */
static <T>UnaryOperator<T> identity(){
  return t -> t;
}
Program: 79211
Project: 79211
Buggy source:
/** 
 * Obtain new instance of a class that implements Packer. <li><p>If the system property <tt>java.util.jar.Pack200.Packer</tt> is defined, then the value is taken to be the fully-qualified name of a concrete implementation class, which must implement Packer. This class is loaded and instantiated.  If this process fails then an unspecified error is thrown.</p></li> <li><p>If an implementation has not been specified with the system property, then the system-default implementation class is instantiated, and the result is returned.</p></li> <p>Note:  The returned object is not guaranteed to operate correctly if multiple threads use it at the same time. A multi-threaded application should either allocate multiple packer engines, or else serialize use of one engine with a lock.
 * @return  A newly allocated Packer engine.
 */
public synchronized static Packer newPacker(){
  return (Packer)newInstance(PACK_PROVIDER);
}

Fixed version (ground truth):
/** 
 * Obtain new instance of a class that implements Packer. <ul> <li><p>If the system property <tt>java.util.jar.Pack200.Packer</tt> is defined, then the value is taken to be the fully-qualified name of a concrete implementation class, which must implement Packer. This class is loaded and instantiated.  If this process fails then an unspecified error is thrown.</p></li> <li><p>If an implementation has not been specified with the system property, then the system-default implementation class is instantiated, and the result is returned.</p></li> </ul> <p>Note:  The returned object is not guaranteed to operate correctly if multiple threads use it at the same time. A multi-threaded application should either allocate multiple packer engines, or else serialize use of one engine with a lock.
 * @return  A newly allocated Packer engine.
 */
public synchronized static Packer newPacker(){
  return (Packer)newInstance(PACK_PROVIDER);
}
Program: 79212
Project: 79212
Buggy source:
/** 
 * Obtain new instance of a class that implements Unpacker. <li><p>If the system property <tt>java.util.jar.Pack200.Unpacker</tt> is defined, then the value is taken to be the fully-qualified name of a concrete implementation class, which must implement Unpacker. The class is loaded and instantiated.  If this process fails then an unspecified error is thrown.</p></li> <li><p>If an implementation has not been specified with the system property, then the system-default implementation class is instantiated, and the result is returned.</p></li> <p>Note:  The returned object is not guaranteed to operate correctly if multiple threads use it at the same time. A multi-threaded application should either allocate multiple unpacker engines, or else serialize use of one engine with a lock.
 * @return  A newly allocated Unpacker engine.
 */
public static Unpacker newUnpacker(){
  return (Unpacker)newInstance(UNPACK_PROVIDER);
}

Fixed version (ground truth):
/** 
 * Obtain new instance of a class that implements Unpacker. <ul> <li><p>If the system property <tt>java.util.jar.Pack200.Unpacker</tt> is defined, then the value is taken to be the fully-qualified name of a concrete implementation class, which must implement Unpacker. The class is loaded and instantiated.  If this process fails then an unspecified error is thrown.</p></li> <li><p>If an implementation has not been specified with the system property, then the system-default implementation class is instantiated, and the result is returned.</p></li> </ul> <p>Note:  The returned object is not guaranteed to operate correctly if multiple threads use it at the same time. A multi-threaded application should either allocate multiple unpacker engines, or else serialize use of one engine with a lock.
 * @return  A newly allocated Unpacker engine.
 */
public static Unpacker newUnpacker(){
  return (Unpacker)newInstance(UNPACK_PROVIDER);
}
Program: 79213
Project: 79213
Buggy source:
/** 
 * Inserts the specified element at the front of this deque unless it would violate capacity restrictions.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #addFirst} method,which can fail to insert an element only by throwing an exception.
 * @param e the element to add
 * @return <tt>true</tt> if the element was added to this deque, else<tt>false</tt>
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offerFirst(E e);

Fixed version (ground truth):
/** 
 * Inserts the specified element at the front of this deque unless it would violate capacity restrictions.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #addFirst} method,which can fail to insert an element only by throwing an exception.
 * @param e the element to add
 * @return {@code true} if the element was added to this deque, else{@code false}
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offerFirst(E e);
Program: 79214
Project: 79214
Buggy source:
/** 
 * Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns <tt>null</tt> if this deque is empty. <p>This method is equivalent to   {@link #pollFirst()}.
 * @return the first element of this deque, or <tt>null</tt> ifthis deque is empty
 */
E poll();

Fixed version (ground truth):
/** 
 * Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns  {@code null} if this deque is empty.<p>This method is equivalent to  {@link #pollFirst()}.
 * @return the first element of this deque, or {@code null} ifthis deque is empty
 */
E poll();
Program: 79215
Project: 79215
Buggy source:
/** 
 * Retrieves and removes the last element of this deque, or returns <tt>null</tt> if this deque is empty.
 * @return the tail of this deque, or <tt>null</tt> if this deque is empty
 */
E pollLast();

Fixed version (ground truth):
/** 
 * Retrieves and removes the last element of this deque, or returns   {@code null} if this deque is empty.
 * @return the tail of this deque, or {@code null} if this deque is empty
 */
E pollLast();
Program: 79216
Project: 79216
Buggy source:
/** 
 * Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt> (if such an element exists). Returns <tt>true</tt> if this deque contained the specified element (or equivalently, if this deque changed as a result of the call). <p>This method is equivalent to   {@link #removeFirstOccurrence}.
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if an element was removed as a result of this call
 * @throws ClassCastException if the class of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean remove(Object o);

Fixed version (ground truth):
/** 
 * Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element   {@code e} such that<tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt> (if such an element exists). Returns  {@code true} if this deque contained the specified element(or equivalently, if this deque changed as a result of the call). <p>This method is equivalent to  {@link #removeFirstOccurrence(Object)}.
 * @param o element to be removed from this deque, if present
 * @return {@code true} if an element was removed as a result of this call
 * @throws ClassCastException if the class of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean remove(Object o);
Program: 79217
Project: 79217
Buggy source:
/** 
 * Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning <tt>true</tt> upon success and <tt>false</tt> if no space is currently available.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #add} method, which can fail toinsert an element only by throwing an exception. <p>This method is equivalent to  {@link #offerLast}.
 * @param e the element to add
 * @return <tt>true</tt> if the element was added to this deque, else<tt>false</tt>
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offer(E e);

Fixed version (ground truth):
/** 
 * Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning  {@code true} upon success and {@code false} if no space is currentlyavailable.  When using a capacity-restricted deque, this method is generally preferable to the  {@link #add} method, which can fail toinsert an element only by throwing an exception. <p>This method is equivalent to  {@link #offerLast}.
 * @param e the element to add
 * @return {@code true} if the element was added to this deque, else{@code false}
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offer(E e);
Program: 79218
Project: 79218
Buggy source:
/** 
 * Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted deque, it is generally preferable to use method   {@link #offerLast}. <p>This method is equivalent to   {@link #add}.
 * @param e the element to add
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void addLast(E e);

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

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

Fixed version (ground truth):
/** 
 * Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning  {@code true} upon success and throwing an{@code IllegalStateException} if no space is currently available.When using a capacity-restricted deque, it is generally preferable to use  {@link #offer(Object) offer}. <p>This method is equivalent to   {@link #addLast}.
 * @param e the element to add
 * @return {@code true} (as specified by {@link Collection#add})
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean add(E e);
Program: 79221
Project: 79221
Buggy source:
/** 
 * Retrieves, but does not remove, the first element of this deque, or returns <tt>null</tt> if this deque is empty.
 * @return the head of this deque, or <tt>null</tt> if this deque is empty
 */
E peekFirst();

Fixed version (ground truth):
/** 
 * Retrieves, but does not remove, the first element of this deque, or returns   {@code null} if this deque is empty.
 * @return the head of this deque, or {@code null} if this deque is empty
 */
E peekFirst();
Program: 79222
Project: 79222
Buggy source:
/** 
 * Retrieves, but does not remove, the last element of this deque, or returns <tt>null</tt> if this deque is empty.
 * @return the tail of this deque, or <tt>null</tt> if this deque is empty
 */
E peekLast();

Fixed version (ground truth):
/** 
 * Retrieves, but does not remove, the last element of this deque, or returns   {@code null} if this deque is empty.
 * @return the tail of this deque, or {@code null} if this deque is empty
 */
E peekLast();
Program: 79223
Project: 79223
Buggy source:
/** 
 * Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, returning <tt>true</tt> upon success and throwing an <tt>IllegalStateException</tt> if no space is currently available. <p>This method is equivalent to   {@link #addFirst}.
 * @param e the element to push
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void push(E e);

Fixed version (ground truth):
/** 
 * Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, throwing an  {@code IllegalStateException} if no space is currently available.<p>This method is equivalent to  {@link #addFirst}.
 * @param e the element to push
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void push(E e);
Program: 79224
Project: 79224
Buggy source:
/** 
 * Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque), or returns <tt>null</tt> if this deque is empty. <p>This method is equivalent to   {@link #peekFirst()}.
 * @return the head of the queue represented by this deque, or<tt>null</tt> if this deque is empty
 */
E peek();

Fixed version (ground truth):
/** 
 * Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque), or returns   {@code null} if this deque is empty.<p>This method is equivalent to  {@link #peekFirst()}.
 * @return the head of the queue represented by this deque, or{@code null} if this deque is empty
 */
E peek();
Program: 79225
Project: 79225
Buggy source:
/** 
 * Inserts the specified element at the end of this deque unless it would violate capacity restrictions.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #addLast} method,which can fail to insert an element only by throwing an exception.
 * @param e the element to add
 * @return <tt>true</tt> if the element was added to this deque, else<tt>false</tt>
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offerLast(E e);

Fixed version (ground truth):
/** 
 * Inserts the specified element at the end of this deque unless it would violate capacity restrictions.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #addLast} method,which can fail to insert an element only by throwing an exception.
 * @param e the element to add
 * @return {@code true} if the element was added to this deque, else{@code false}
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offerLast(E e);
Program: 79226
Project: 79226
Buggy source:
/** 
 * Returns <tt>true</tt> if this deque contains the specified element. More formally, returns <tt>true</tt> if and only if this deque contains at least one element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
 * @param o element whose presence in this deque is to be tested
 * @return <tt>true</tt> if this deque contains the specified element
 * @throws ClassCastException if the type of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean contains(Object o);

Fixed version (ground truth):
/** 
 * Returns   {@code true} if this deque contains the specified element.More formally, returns  {@code true} if and only if this deque containsat least one element  {@code e} such that<tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
 * @param o element whose presence in this deque is to be tested
 * @return {@code true} if this deque contains the specified element
 * @throws ClassCastException if the type of the specified elementis incompatible with this deque (<a href="Collection.html#optional-restrictions">optional</a>)
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements (<a href="Collection.html#optional-restrictions">optional</a>)
 */
boolean contains(Object o);
Program: 79227
Project: 79227
Buggy source:
/** 
 * Retrieves and removes the first element of this deque, or returns <tt>null</tt> if this deque is empty.
 * @return the head of this deque, or <tt>null</tt> if this deque is empty
 */
E pollFirst();

Fixed version (ground truth):
/** 
 * Retrieves and removes the first element of this deque, or returns   {@code null} if this deque is empty.
 * @return the head of this deque, or {@code null} if this deque is empty
 */
E pollFirst();