nus-yam/ex-repair huggingface dataset:
Program: 71939
Project: 71939
Buggy source:
/** 
 * Gets the   {@code version} (version number) value from the CRL.The ASN.1 definition for this is: <pre> version    Version OPTIONAL, -- if present, must be v2<p> Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  } -- v3 does not apply to CRLs but appears for consistency -- with definition of Version for certs </pre>
 * @return the version number, i.e. 1 or 2.
 */
public abstract int getVersion();

Fixed version (ground truth):
/** 
 * Gets the   {@code version} (version number) value from the CRL.The ASN.1 definition for this is: <pre> version    Version OPTIONAL, -- if present, must be v2 Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  } -- v3 does not apply to CRLs but appears for consistency -- with definition of Version for certs </pre>
 * @return the version number, i.e. 1 or 2.
 */
public abstract int getVersion();
Program: 71940
Project: 71940
Buggy source:
/** 
 * Gets the signature algorithm name for the CRL 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 CRL 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: 71941
Project: 71941
Buggy source:
/** 
 * Gets the   {@code version} (version number) value from thecertificate. The ASN.1 definition for this is: <pre> version  [0] EXPLICIT Version DEFAULT v1<p> Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  } </pre>
 * @return the version number, i.e. 1, 2 or 3.
 */
public abstract int getVersion();

Fixed version (ground truth):
/** 
 * Gets the   {@code version} (version number) value from thecertificate. The ASN.1 definition for this is: <pre> version  [0] EXPLICIT Version DEFAULT v1 Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  } </pre>
 * @return the version number, i.e. 1, 2 or 3.
 */
public abstract int getVersion();
Program: 71942
Project: 71942
Buggy source:
/** 
 * Gets the   {@code serialNumber} value from the certificate.The serial number is an integer assigned by the certification authority to each certificate. It must be unique for each certificate issued by a given CA (i.e., the issuer name and serial number identify a unique certificate). The ASN.1 definition for this is: <pre> serialNumber     CertificateSerialNumber<p> CertificateSerialNumber  ::=  INTEGER </pre>
 * @return the serial number.
 */
public abstract BigInteger getSerialNumber();

Fixed version (ground truth):
/** 
 * Gets the   {@code serialNumber} value from the certificate.The serial number is an integer assigned by the certification authority to each certificate. It must be unique for each certificate issued by a given CA (i.e., the issuer name and serial number identify a unique certificate). The ASN.1 definition for this is: <pre> serialNumber     CertificateSerialNumber CertificateSerialNumber  ::=  INTEGER </pre>
 * @return the serial number.
 */
public abstract BigInteger getSerialNumber();
Program: 71943
Project: 71943
Buggy source:
/** 
 * Gets the   {@code issuerUniqueID} value from the certificate.The issuer unique identifier is present in the certificate to handle the possibility of reuse of issuer names over time. RFC 3280 recommends that names not be reused and that conforming certificates not make use of unique identifiers. Applications conforming to that profile should be capable of parsing unique identifiers and making comparisons. <p>The ASN.1 definition for this is: <pre> issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL<p> UniqueIdentifier  ::=  BIT STRING </pre>
 * @return the issuer unique identifier or null if it is notpresent in the certificate.
 */
public abstract boolean[] getIssuerUniqueID();

Fixed version (ground truth):
/** 
 * Gets the   {@code issuerUniqueID} value from the certificate.The issuer unique identifier is present in the certificate to handle the possibility of reuse of issuer names over time. RFC 3280 recommends that names not be reused and that conforming certificates not make use of unique identifiers. Applications conforming to that profile should be capable of parsing unique identifiers and making comparisons. <p>The ASN.1 definition for this is: <pre> issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL UniqueIdentifier  ::=  BIT STRING </pre>
 * @return the issuer unique identifier or null if it is notpresent in the certificate.
 */
public abstract boolean[] getIssuerUniqueID();
Program: 71944
Project: 71944
Buggy source:
/** 
 * <strong>Denigrated</strong>, replaced by   {@linkplain #getIssuerX500Principal()}. This method returns the   {@code issuer}as an implementation specific Principal object, which should not be relied upon by portable code. <p> Gets the   {@code issuer} (issuer distinguished name) value fromthe certificate. The issuer name identifies the entity that signed (and issued) the certificate. <p>The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is: <pre> issuer    Name<p> Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET OF AttributeValueAssertion AttributeValueAssertion ::= SEQUENCE { AttributeType, AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY </pre> The  {@code Name} describes a hierarchical name composed ofattributes, such as country name, and corresponding values, such as US. The type of the  {@code AttributeValue} component is determined bythe  {@code AttributeType}; in general it will be a  {@code directoryString}. A   {@code directoryString} is usuallyone of  {@code PrintableString},  {@code TeletexString} or {@code UniversalString}.
 * @return a Principal whose name is the issuer distinguished name.
 */
public abstract Principal getIssuerDN();

Fixed version (ground truth):
/** 
 * <strong>Denigrated</strong>, replaced by   {@linkplain #getIssuerX500Principal()}. This method returns the   {@code issuer}as an implementation specific Principal object, which should not be relied upon by portable code. <p> Gets the   {@code issuer} (issuer distinguished name) value fromthe certificate. The issuer name identifies the entity that signed (and issued) the certificate. <p>The issuer name field contains an X.500 distinguished name (DN). The ASN.1 definition for this is: <pre> issuer    Name Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET OF AttributeValueAssertion AttributeValueAssertion ::= SEQUENCE { AttributeType, AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY </pre> The  {@code Name} describes a hierarchical name composed ofattributes, such as country name, and corresponding values, such as US. The type of the  {@code AttributeValue} component is determined bythe  {@code AttributeType}; in general it will be a  {@code directoryString}. A   {@code directoryString} is usuallyone of  {@code PrintableString},  {@code TeletexString} or {@code UniversalString}.
 * @return a Principal whose name is the issuer distinguished name.
 */
public abstract Principal getIssuerDN();
Program: 71945
Project: 71945
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: 71946
Project: 71946
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: 71947
Project: 71947
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: 71948
Project: 71948
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: 71950
Project: 71950
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: 71951
Project: 71951
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: 71952
Project: 71952
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: 71953
Project: 71953
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: 71954
Project: 71954
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: 71955
Project: 71955
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: 71956
Project: 71956
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: 71957
Project: 71957
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: 71961
Project: 71961
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: 71962
Project: 71962
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: 71963
Project: 71963
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: 71965
Project: 71965
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: 71966
Project: 71966
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: 71967
Project: 71967
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: 71968
Project: 71968
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: 71969
Project: 71969
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: 71970
Project: 71970
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: 71971
Project: 71971
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: 71972
Project: 71972
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: 71973
Project: 71973
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: 71974
Project: 71974
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: 71975
Project: 71975
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: 71976
Project: 71976
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: 71977
Project: 71977
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);