nus-yam/ex-repair huggingface dataset:
Program: 77474
Project: 77474
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: 77475
Project: 77475
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: 77476
Project: 77476
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: 77477
Project: 77477
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: 77479
Project: 77479
Buggy source:
/** 
 * Determines whether a class is modifiable by  {@linkplain #retransformClasses retransformation}or   {@linkplain #redefineClasses redefinition}. If a class is modifiable then this method returns <code>true</code>. If a class is not modifiable then this method returns <code>false</code>. <P> For a class to be retransformed,   {@link #isRetransformClassesSupported} must also be true.But the value of <code>isRetransformClassesSupported()</code> does not influence the value returned by this function. For a class to be redefined,  {@link #isRedefineClassesSupported} must also be true.But the value of <code>isRedefineClassesSupported()</code> does not influence the value returned by this function. <P> Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) and array classes are never modifiable.
 * @throws java.lang.NullPointerException if the specified class is <code>null</code>.
 * @see #retransformClasses
 * @see #isRetransformClassesSupported
 * @see #redefineClasses
 * @see #isRedefineClassesSupported
 * @since 1.6
 */
boolean isModifiableClass(Class<?> theClass);

Fixed version (ground truth):
/** 
 * Determines whether a class is modifiable by  {@linkplain #retransformClasses retransformation}or   {@linkplain #redefineClasses redefinition}. If a class is modifiable then this method returns <code>true</code>. If a class is not modifiable then this method returns <code>false</code>. <P> For a class to be retransformed,   {@link #isRetransformClassesSupported} must also be true.But the value of <code>isRetransformClassesSupported()</code> does not influence the value returned by this function. For a class to be redefined,  {@link #isRedefineClassesSupported} must also be true.But the value of <code>isRedefineClassesSupported()</code> does not influence the value returned by this function. <P> Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) and array classes are never modifiable.
 * @param theClass the class to check for being modifiable
 * @return whether or not the argument class is modifiable
 * @throws java.lang.NullPointerException if the specified class is <code>null</code>.
 * @see #retransformClasses
 * @see #isRetransformClassesSupported
 * @see #redefineClasses
 * @see #isRedefineClassesSupported
 * @since 1.6
 */
boolean isModifiableClass(Class<?> theClass);
Program: 77480
Project: 77480
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: 77481
Project: 77481
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: 77482
Project: 77482
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: 77483
Project: 77483
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: 77484
Project: 77484
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: 77485
Project: 77485
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: 77486
Project: 77486
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: 77487
Project: 77487
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: 77491
Project: 77491
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: 77492
Project: 77492
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: 77493
Project: 77493
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: 77495
Project: 77495
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: 77496
Project: 77496
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: 77497
Project: 77497
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: 77498
Project: 77498
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: 77499
Project: 77499
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: 77500
Project: 77500
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: 77501
Project: 77501
Buggy source:
/** 
 * A static method to retrieve the named object. See   {@link #doLookup(Name)} for details.
 * @param name the name of the object to look up
 * @return  the object bound to <tt>name</tt>
 * @throws NamingException if a naming exception is encountered
 * @since 1.6
 */
@SuppressWarnings("String_Node_Str") public static <T>T doLookup(String name) throws NamingException {
  return (T)(new InitialContext()).lookup(name);
}

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

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

Fixed version (ground truth):
/** 
 * Creates a new instance of a control factory.
 */
protected ControlFactory(){
}
Program: 77504
Project: 77504
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: 77505
Project: 77505
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: 77506
Project: 77506
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: 77507
Project: 77507
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: 77508
Project: 77508
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: 77509
Project: 77509
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: 77510
Project: 77510
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: 77511
Project: 77511
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: 77512
Project: 77512
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: 77513
Project: 77513
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();