nus-yam/ex-repair huggingface dataset:
Program: 36674
Project: 36674
Buggy source:
/** 
 * Returns a map of names and values of all system properties. This method calls   {@link System#getProperties} to get allsystem properties.  Properties whose name or value is not a <tt>String</tt> are omitted. <p> <b>MBeanServer access</b>:<br> The mapped type of  {@code Map<String,String>} is{@link javax.management.openmbean.TabularData TabularData}with two items in each row as follows: <blockquote> <table border> <tr> <th>Item Name</th> <th>Item Type</th> </tr> <tr> <td><tt>key</tt></td> <td><tt>String</tt></td> </tr> <tr> <td><tt>value</tt></td> <td><tt>String</tt></td> </tr> </table> </blockquote>
 * @return a map of names and values of all system properties.
 * @throws java.lang.SecurityException if a security manager exists and its <code>checkPropertiesAccess</code> method doesn't allow access to the system properties.
 */
public java.util.Map<String,String> getSystemProperties();

Fixed version (ground truth):
/** 
 * Returns a map of names and values of all system properties. This method calls   {@link System#getProperties} to get allsystem properties.  Properties whose name or value is not a <tt>String</tt> are omitted. <p> <b>MBeanServer access</b>:<br> The mapped type of  {@code Map<String,String>} is{@link javax.management.openmbean.TabularData TabularData}with two items in each row as follows: <blockquote> <table border summary="Name and Type for each item"> <tr> <th>Item Name</th> <th>Item Type</th> </tr> <tr> <td><tt>key</tt></td> <td><tt>String</tt></td> </tr> <tr> <td><tt>value</tt></td> <td><tt>String</tt></td> </tr> </table> </blockquote>
 * @return a map of names and values of all system properties.
 * @throws java.lang.SecurityException if a security manager exists and its <code>checkPropertiesAccess</code> method doesn't allow access to the system properties.
 */
public java.util.Map<String,String> getSystemProperties();
Program: 36676
Project: 36676
Buggy source:
/** 
 * Skips <code>n</code> bytes of input from the bytes that can be read from this input stream without blocking. <p>Fewer bytes than requested might be skipped. The actual number of bytes skipped is equal to <code>n</code> or the result of a call to  {@link #available() <code>available</code>}, whichever is smaller. If <code>n</code> is less than zero, no bytes are skipped. <p>The actual number of bytes skipped is returned.
 * @param n the number of bytes to be skipped.
 * @return     the actual number of bytes skipped.
 * @exception IOException  if an I/O error occurs.
 * @since JCE1.2
 */
public long skip(long n) throws IOException {
  int available=ofinish - ostart;
  if (n > available) {
    n=available;
  }
  if (n < 0) {
    return 0;
  }
  ostart+=n;
  return n;
}

Fixed version (ground truth):
/** 
 * Skips <code>n</code> bytes of input from the bytes that can be read from this input stream without blocking. <p>Fewer bytes than requested might be skipped. The actual number of bytes skipped is equal to <code>n</code> or the result of a call to  {@link #available() available}, whichever is smaller. If <code>n</code> is less than zero, no bytes are skipped. <p>The actual number of bytes skipped is returned.
 * @param n the number of bytes to be skipped.
 * @return     the actual number of bytes skipped.
 * @exception IOException  if an I/O error occurs.
 * @since JCE1.2
 */
public long skip(long n) throws IOException {
  int available=ofinish - ostart;
  if (n > available) {
    n=available;
  }
  if (n < 0) {
    return 0;
  }
  ostart+=n;
  return n;
}
Program: 36677
Project: 36677
Buggy source:
/** 
 * Returns an <code>ExemptionMechanism</code> object that implements the specified exemption mechanism algorithm. <p> A new ExemptionMechanism object encapsulating the ExemptionMechanismSpi implementation from the specified Provider object is returned.  Note that the specified Provider object does not have to be registered in the provider list.
 * @param algorithm the standard name of the requested exemption mechanism.See the ExemptionMechanism section in the <a href= "{docRoot}/../technotes/guides/security/StandardNames.html#Exemption"> Java Cryptography Architecture Standard Algorithm Name Documentation</a> for information about standard exemption mechanism names.
 * @param provider the provider.
 * @return the new <code>ExemptionMechanism</code> object.
 * @exception NullPointerException if <code>algorithm</code>is null.
 * @exception NoSuchAlgorithmException if an ExemptionMechanismSpiimplementation for the specified algorithm is not available from the specified Provider object.
 * @exception IllegalArgumentException if the <code>provider</code>is null.
 * @see java.security.Provider
 */
public static final ExemptionMechanism getInstance(String algorithm,Provider provider) throws NoSuchAlgorithmException {
  Instance instance=JceSecurity.getInstance("String_Node_Str",ExemptionMechanismSpi.class,algorithm,provider);
  return new ExemptionMechanism((ExemptionMechanismSpi)instance.impl,instance.provider,algorithm);
}

Fixed version (ground truth):
/** 
 * Returns an <code>ExemptionMechanism</code> object that implements the specified exemption mechanism algorithm. <p> A new ExemptionMechanism object encapsulating the ExemptionMechanismSpi implementation from the specified Provider object is returned.  Note that the specified Provider object does not have to be registered in the provider list.
 * @param algorithm the standard name of the requested exemption mechanism.See the ExemptionMechanism section in the <a href= " {@docRoot}/../technotes/guides/security/StandardNames.html#Exemption"> Java Cryptography Architecture Standard Algorithm Name Documentation</a> for information about standard exemption mechanism names.
 * @param provider the provider.
 * @return the new <code>ExemptionMechanism</code> object.
 * @exception NullPointerException if <code>algorithm</code>is null.
 * @exception NoSuchAlgorithmException if an ExemptionMechanismSpiimplementation for the specified algorithm is not available from the specified Provider object.
 * @exception IllegalArgumentException if the <code>provider</code>is null.
 * @see java.security.Provider
 */
public static final ExemptionMechanism getInstance(String algorithm,Provider provider) throws NoSuchAlgorithmException {
  Instance instance=JceSecurity.getInstance("String_Node_Str",ExemptionMechanismSpi.class,algorithm,provider);
  return new ExemptionMechanism((ExemptionMechanismSpi)instance.impl,instance.provider,algorithm);
}
Program: 36678
Project: 36678
Buggy source:
/** 
 * Returns a <code>KeyAgreement</code> object that implements the specified key agreement algorithm. <p> A new KeyAgreement object encapsulating the KeyAgreementSpi implementation from the specified Provider object is returned.  Note that the specified Provider object does not have to be registered in the provider list.
 * @param algorithm the standard name of the requested key agreementalgorithm. See the KeyAgreement section in the <a href= " {@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement"> Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard algorithm names.
 * @param provider the provider.
 * @return the new <code>KeyAgreement</code> object.
 * @exception NullPointerException if the specified algorithmis null.
 * @exception NoSuchAlgorithmException if a KeyAgreementSpiimplementation for the specified algorithm is not available from the specified Provider object.
 * @exception IllegalArgumentException if the <code>provider</code>is null.
 * @see java.security.Provider
 */
public static final KeyAgreement getInstance(String algorithm,Provider provider) throws NoSuchAlgorithmException {
  Instance instance=JceSecurity.getInstance("String_Node_Str",KeyAgreementSpi.class,algorithm,provider);
  return new KeyAgreement((KeyAgreementSpi)instance.impl,instance.provider,algorithm);
}

Fixed version (ground truth):
/** 
 * Returns a <code>KeyAgreement</code> object that implements the specified key agreement algorithm. <p> A new KeyAgreement object encapsulating the KeyAgreementSpi implementation from the specified Provider object is returned.  Note that the specified Provider object does not have to be registered in the provider list.
 * @param algorithm the standard name of the requested key agreementalgorithm. See the KeyAgreement section in the <a href= " {@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement"> Java Cryptography Architecture Standard Algorithm Name Documentation</a> for information about standard algorithm names.
 * @param provider the provider.
 * @return the new <code>KeyAgreement</code> object.
 * @exception NullPointerException if the specified algorithmis null.
 * @exception NoSuchAlgorithmException if a KeyAgreementSpiimplementation for the specified algorithm is not available from the specified Provider object.
 * @exception IllegalArgumentException if the <code>provider</code>is null.
 * @see java.security.Provider
 */
public static final KeyAgreement getInstance(String algorithm,Provider provider) throws NoSuchAlgorithmException {
  Instance instance=JceSecurity.getInstance("String_Node_Str",KeyAgreementSpi.class,algorithm,provider);
  return new KeyAgreement((KeyAgreementSpi)instance.impl,instance.provider,algorithm);
}
Program: 36679
Project: 36679
Buggy source:
public NullCipher(){
  super(new NullCipherSpi(),null);
}

Fixed version (ground truth):
/** 
 * Creates a NullCipher object.
 */
public NullCipher(){
  super(new NullCipherSpi(),null);
}
Program: 36680
Project: 36680
Buggy source:
/** 
 * Return a <code>Set</code> of private credentials associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The caller must have permission to access all of the requested Credentials, or a <code>SecurityException</code> will be thrown. <p> The returned <code>Set</code> is not backed by this Subject's internal private Credential <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal private Credential <code>Set</code>. <p>
 * @param c the returned <code>Set</code> of private credentials will all beinstances of this class.
 * @return a <code>Set</code> of private credentials that are instancesof the  specified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T>Set<T> getPrivateCredentials(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PRIV_CREDENTIAL_SET,c);
}

Fixed version (ground truth):
/** 
 * Return a <code>Set</code> of private credentials associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The caller must have permission to access all of the requested Credentials, or a <code>SecurityException</code> will be thrown. <p> The returned <code>Set</code> is not backed by this Subject's internal private Credential <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal private Credential <code>Set</code>. <p>
 * @param < T > the type of the class modeled by {@code c}
 * @param c the returned <code>Set</code> of private credentials will all beinstances of this class.
 * @return a <code>Set</code> of private credentials that are instancesof the  specified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T>Set<T> getPrivateCredentials(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PRIV_CREDENTIAL_SET,c);
}
Program: 36681
Project: 36681
Buggy source:
/** 
 * Return a <code>Set</code> of public credentials associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The returned <code>Set</code> is not backed by this Subject's internal public Credential <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal public Credential <code>Set</code>. <p>
 * @param c the returned <code>Set</code> of public credentials will all beinstances of this class.
 * @return a <code>Set</code> of public credentials that are instancesof the  specified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T>Set<T> getPublicCredentials(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PUB_CREDENTIAL_SET,c);
}

Fixed version (ground truth):
/** 
 * Return a <code>Set</code> of public credentials associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The returned <code>Set</code> is not backed by this Subject's internal public Credential <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal public Credential <code>Set</code>. <p>
 * @param < T > the type of the class modeled by {@code c}
 * @param c the returned <code>Set</code> of public credentials will all beinstances of this class.
 * @return a <code>Set</code> of public credentials that are instancesof the  specified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T>Set<T> getPublicCredentials(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PUB_CREDENTIAL_SET,c);
}
Program: 36682
Project: 36682
Buggy source:
/** 
 * Return a <code>Set</code> of Principals associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The returned <code>Set</code> is not backed by this Subject's internal <code>Principal</code> <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal <code>Principal</code> <code>Set</code>. <p>
 * @param c the returned <code>Set</code> of Principals will all beinstances of this class.
 * @return a <code>Set</code> of Principals that are instances of thespecified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T extends Principal>Set<T> getPrincipals(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PRINCIPAL_SET,c);
}

Fixed version (ground truth):
/** 
 * Return a <code>Set</code> of Principals associated with this <code>Subject</code> that are instances or subclasses of the specified <code>Class</code>. <p> The returned <code>Set</code> is not backed by this Subject's internal <code>Principal</code> <code>Set</code>.  A new <code>Set</code> is created and returned for each method invocation. Modifications to the returned <code>Set</code> will not affect the internal <code>Principal</code> <code>Set</code>. <p>
 * @param < T > the type of the class modeled by {@code c}
 * @param c the returned <code>Set</code> of Principals will all beinstances of this class.
 * @return a <code>Set</code> of Principals that are instances of thespecified <code>Class</code>.
 * @exception NullPointerException if the specified <code>Class</code>is <code>null</code>.
 */
public <T extends Principal>Set<T> getPrincipals(Class<T> c){
  if (c == null)   throw new NullPointerException(ResourcesMgr.getString("String_Node_Str"));
  return new ClassSet<T>(PRINCIPAL_SET,c);
}
Program: 36685
Project: 36685
Buggy source:
/** 
 * Gets the <code>version</code> (version number) value from the certificate. 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 from the ASN.1 encoding, i.e. 0, 1 or 2.
 */
public abstract int getVersion();

Fixed version (ground truth):
/** 
 * Gets the <code>version</code> (version number) value from the certificate. 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 from the ASN.1 encoding, i.e. 0, 1 or 2.
 */
public abstract int getVersion();
Program: 36686
Project: 36686
Buggy source:
/** 
 * Gets the <code>serialNumber</code> 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</code> 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: 36687
Project: 36687
Buggy source:
/** 
 * Gets the <code>issuer</code> (issuer distinguished name) value from the 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</code> describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the <code>AttributeValue</code> component is determined by the <code>AttributeType</code>; in general it will be a <code>directoryString</code>. A <code>directoryString</code> is usually one of <code>PrintableString</code>, <code>TeletexString</code> or <code>UniversalString</code>.
 * @return a Principal whose name is the issuer distinguished name.
 */
public abstract Principal getIssuerDN();

Fixed version (ground truth):
/** 
 * Gets the <code>issuer</code> (issuer distinguished name) value from the 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</code> describes a hierarchical name composed of attributes, such as country name, and corresponding values, such as US. The type of the <code>AttributeValue</code> component is determined by the <code>AttributeType</code>; in general it will be a <code>directoryString</code>. A <code>directoryString</code> is usually one of <code>PrintableString</code>, <code>TeletexString</code> or <code>UniversalString</code>.
 * @return a Principal whose name is the issuer distinguished name.
 */
public abstract Principal getIssuerDN();
Program: 36688
Project: 36688
Buggy source:
/** 
 * Gets the <code>notBefore</code> date from the validity period of the 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</code> date from the validity period of the 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: 36689
Project: 36689
Buggy source:
/** 
 * Gets the signature algorithm name for the certificate signature algorithm. An example is the string "SHA-1/DSA". 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</code> 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 "SHA-1/DSA". 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</code> OID string.
 * @return the signature algorithm name.
 */
public abstract String getSigAlgName();
Program: 36690
Project: 36690
Buggy source:
/** 
 * Instantiates an X509Certificate object, and initializes it with the specified byte array. The implementation (X509Certificate is an abstract class) is provided by the class specified as the value of the  {@code cert.provider.x509v1} security property.<p>Note: All X509Certificate subclasses must provide a constructor of the form: <code><pre> public &lt;subClass&gt;(InputStream inStream) ... </pre></code>
 * @param certData a byte array containing the DER-encodedcertificate.
 * @return an X509Certificate object initialized with the datafrom <code>certData</code>.
 * @exception CertificateException if a class initializationor certificate parsing error occurs.
 */
public static final X509Certificate getInstance(byte[] certData) throws CertificateException {
  return getInst((Object)certData);
}

Fixed version (ground truth):
/** 
 * Instantiates an X509Certificate object, and initializes it with the specified byte array. The implementation (X509Certificate is an abstract class) is provided by the class specified as the value of the  {@code cert.provider.x509v1} security property.<p>Note: All X509Certificate subclasses must provide a constructor of the form: <pre> {@code public <subClass>(InputStream inStream) ...}</pre>
 * @param certData a byte array containing the DER-encodedcertificate.
 * @return an X509Certificate object initialized with the datafrom <code>certData</code>.
 * @exception CertificateException if a class initializationor certificate parsing error occurs.
 */
public static final X509Certificate getInstance(byte[] certData) throws CertificateException {
  return getInst((Object)certData);
}
Program: 36691
Project: 36691
Buggy source:
/** 
 * Returns   {@code true} if this Spliterator's {@link #characteristics} contain all of the given characteristics.
 * @implSpec The default implementation returns true if the corresponding bits of the given characteristics are set.
 * @return {@code true} if all the specified characteristics are present,else  {@code false}
 */
default boolean hasCharacteristics(int characteristics){
  return (characteristics() & characteristics) == characteristics;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if this Spliterator's {@link #characteristics} contain all of the given characteristics.
 * @implSpec The default implementation returns true if the corresponding bits of the given characteristics are set.
 * @param characteristics the characteristics to check for
 * @return {@code true} if all the specified characteristics are present,else  {@code false}
 */
default boolean hasCharacteristics(int characteristics){
  return (characteristics() & characteristics) == characteristics;
}
Program: 36692
Project: 36692
Buggy source:
/** 
 * Retrieve cookies associated with given URI, or whose domain matches the given URI. Only cookies that have not expired are returned. This is called for every outgoing HTTP request.
 * @return          an immutable list of HttpCookie,return empty list if no cookies match the given URI
 * @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
 * @see #add
 */
public List<HttpCookie> get(URI uri);

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

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

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

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

Fixed version (ground truth):
/** 
 * Returns the type of the socket option value.
 * @return the type of the socket option value
 */
Class<T> type();
Program: 36698
Project: 36698
Buggy source:
/** 
 * Returns the length of this character sequence.  The length is the number of 16-bit <code>char</code>s in the sequence.</p>
 * @return  the number of <code>char</code>s in this sequence
 */
int length();

Fixed version (ground truth):
/** 
 * Returns the length of this character sequence.  The length is the number of 16-bit <code>char</code>s in the sequence.
 * @return  the number of <code>char</code>s in this sequence
 */
int length();
Program: 36699
Project: 36699
Buggy source:
/** 
 * Returns a string containing the characters in this sequence in the same order as this sequence.  The length of the string will be the length of this sequence. </p>
 * @return  a string consisting of exactly this sequence of characters
 */
public String toString();

Fixed version (ground truth):
/** 
 * Returns a string containing the characters in this sequence in the same order as this sequence.  The length of the string will be the length of this sequence.
 * @return  a string consisting of exactly this sequence of characters
 */
public String toString();
Program: 36700
Project: 36700
Buggy source:
/** 
 * Returns a new <code>CharSequence</code> that is a subsequence of this sequence. The subsequence starts with the <code>char</code> value at the specified index and ends with the <code>char</code> value at index <tt>end - 1</tt>.  The length (in <code>char</code>s) of the returned sequence is <tt>end - start</tt>, so if <tt>start == end</tt> then an empty sequence is returned. </p>
 * @param start   the start index, inclusive
 * @param end     the end index, exclusive
 * @return  the specified subsequence
 * @throws IndexOutOfBoundsException if <tt>start</tt> or <tt>end</tt> are negative, if <tt>end</tt> is greater than <tt>length()</tt>, or if <tt>start</tt> is greater than <tt>end</tt>
 */
CharSequence subSequence(int start,int end);

Fixed version (ground truth):
/** 
 * Returns a new <code>CharSequence</code> that is a subsequence of this sequence. The subsequence starts with the <code>char</code> value at the specified index and ends with the <code>char</code> value at index <tt>end - 1</tt>.  The length (in <code>char</code>s) of the returned sequence is <tt>end - start</tt>, so if <tt>start == end</tt> then an empty sequence is returned.
 * @param start   the start index, inclusive
 * @param end     the end index, exclusive
 * @return  the specified subsequence
 * @throws IndexOutOfBoundsException if <tt>start</tt> or <tt>end</tt> are negative, if <tt>end</tt> is greater than <tt>length()</tt>, or if <tt>start</tt> is greater than <tt>end</tt>
 */
CharSequence subSequence(int start,int end);
Program: 36701
Project: 36701
Buggy source:
/** 
 * Returns the <code>char</code> value at the specified index.  An index ranges from zero to <tt>length() - 1</tt>.  The first <code>char</code> value of the sequence is at index zero, the next at index one, and so on, as for array indexing. </p> <p>If the <code>char</code> value specified by the index is a <a href="  {@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate value is returned.
 * @param index   the index of the <code>char</code> value to be returned
 * @return  the specified <code>char</code> value
 * @throws IndexOutOfBoundsException if the <tt>index</tt> argument is negative or not less than <tt>length()</tt>
 */
char charAt(int index);

Fixed version (ground truth):
/** 
 * Returns the <code>char</code> value at the specified index.  An index ranges from zero to <tt>length() - 1</tt>.  The first <code>char</code> value of the sequence is at index zero, the next at index one, and so on, as for array indexing. <p>If the <code>char</code> value specified by the index is a <a href="  {@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate value is returned.
 * @param index   the index of the <code>char</code> value to be returned
 * @return  the specified <code>char</code> value
 * @throws IndexOutOfBoundsException if the <tt>index</tt> argument is negative or not less than <tt>length()</tt>
 */
char charAt(int index);
Program: 36702
Project: 36702
Buggy source:
/** 
 * Determines if the specified character is ISO-LATIN-1 white space. This method returns   {@code true} for the following fivecharacters only: <table> <tr><td> {@code '\t'}</td>            <td>  {@code U+0009}</td> <td>  {@code HORIZONTAL TABULATION}</td></tr> <tr><td>  {@code '\n'}</td>            <td>  {@code U+000A}</td> <td>  {@code NEW LINE}</td></tr> <tr><td>  {@code '\f'}</td>            <td>  {@code U+000C}</td> <td>  {@code FORM FEED}</td></tr> <tr><td>  {@code '\r'}</td>            <td>  {@code U+000D}</td> <td>  {@code CARRIAGE RETURN}</td></tr> <tr><td>  {@code '&nbsp;'}</td>  <td>  {@code U+0020}</td> <td>  {@code SPACE}</td></tr> </table>
 * @param ch   the character to be tested.
 * @return     {@code true} if the character is ISO-LATIN-1 whitespace;  {@code false} otherwise.
 * @see Character#isSpaceChar(char)
 * @see Character#isWhitespace(char)
 * @deprecated Replaced by isWhitespace(char).
 */
@Deprecated public static boolean isSpace(char ch){
  return (ch <= 0x0020) && (((((1L << 0x0009) | (1L << 0x000A) | (1L << 0x000C)| (1L << 0x000D)| (1L << 0x0020)) >> ch) & 1L) != 0);
}

Fixed version (ground truth):
/** 
 * Determines if the specified character is ISO-LATIN-1 white space. This method returns   {@code true} for the following fivecharacters only: <table summary="truechars"> <tr><td> {@code '\t'}</td>            <td>  {@code U+0009}</td> <td>  {@code HORIZONTAL TABULATION}</td></tr> <tr><td>  {@code '\n'}</td>            <td>  {@code U+000A}</td> <td>  {@code NEW LINE}</td></tr> <tr><td>  {@code '\f'}</td>            <td>  {@code U+000C}</td> <td>  {@code FORM FEED}</td></tr> <tr><td>  {@code '\r'}</td>            <td>  {@code U+000D}</td> <td>  {@code CARRIAGE RETURN}</td></tr> <tr><td>  {@code '&nbsp;'}</td>  <td>  {@code U+0020}</td> <td>  {@code SPACE}</td></tr> </table>
 * @param ch   the character to be tested.
 * @return     {@code true} if the character is ISO-LATIN-1 whitespace;  {@code false} otherwise.
 * @see Character#isSpaceChar(char)
 * @see Character#isWhitespace(char)
 * @deprecated Replaced by isWhitespace(char).
 */
@Deprecated public static boolean isSpace(char ch){
  return (ch <= 0x0020) && (((((1L << 0x0009) | (1L << 0x000A) | (1L << 0x000C)| (1L << 0x000D)| (1L << 0x0020)) >> ch) & 1L) != 0);
}
Program: 36703
Project: 36703
Buggy source:
/** 
 * Returns the value obtained by reversing the order of the bytes in the specified <tt>char</tt> value.
 * @return the value obtained by reversing (or, equivalently, swapping)the bytes in the specified <tt>char</tt> value.
 * @since 1.5
 */
public static char reverseBytes(char ch){
  return (char)(((ch & 0xFF00) >> 8) | (ch << 8));
}

Fixed version (ground truth):
/** 
 * Returns the value obtained by reversing the order of the bytes in the specified <tt>char</tt> value.
 * @param ch The {@code char} of which to reverse the byte order.
 * @return the value obtained by reversing (or, equivalently, swapping)the bytes in the specified <tt>char</tt> value.
 * @since 1.5
 */
public static char reverseBytes(char ch){
  return (char)(((ch & 0xFF00) >> 8) | (ch << 8));
}
Program: 36704
Project: 36704
Buggy source:
/** 
 * Returns a hash code for a   {@code char} value; compatible with{@code Character.hashCode()}.
 * @since 1.8
 * @return a hash code value for a {@code char} value.
 */
public static int hashCode(char value){
  return (int)value;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for a   {@code char} value; compatible with{@code Character.hashCode()}.
 * @since 1.8
 * @param value The {@code char} for which to return a hash code.
 * @return a hash code value for a {@code char} value.
 */
public static int hashCode(char value){
  return (int)value;
}
Program: 36705
Project: 36705
Buggy source:
/** 
 * Finds the resource with the given name. Class loader implementations should override this method to specify where to find resources.  </p>
 * @param name The resource name
 * @return  A <tt>URL</tt> object for reading the resource, or<tt>null</tt> if the resource could not be found
 * @since  1.2
 */
protected URL findResource(String name){
  return null;
}

Fixed version (ground truth):
/** 
 * Finds the resource with the given name. Class loader implementations should override this method to specify where to find resources.
 * @param name The resource name
 * @return  A <tt>URL</tt> object for reading the resource, or<tt>null</tt> if the resource could not be found
 * @since  1.2
 */
protected URL findResource(String name){
  return null;
}
Program: 36706
Project: 36706
Buggy source:
/** 
 * Sets the default assertion status for this class loader to <tt>false</tt> and discards any package defaults or class assertion status settings associated with the class loader.  This method is provided so that class loaders can be made to ignore any command line or persistent assertion status settings and "start with a clean slate." </p>
 * @since  1.4
 */
public void clearAssertionStatus(){
synchronized (assertionLock) {
    classAssertionStatus=new HashMap<>();
    packageAssertionStatus=new HashMap<>();
    defaultAssertionStatus=false;
  }
}

Fixed version (ground truth):
/** 
 * Sets the default assertion status for this class loader to <tt>false</tt> and discards any package defaults or class assertion status settings associated with the class loader.  This method is provided so that class loaders can be made to ignore any command line or persistent assertion status settings and "start with a clean slate."
 * @since  1.4
 */
public void clearAssertionStatus(){
synchronized (assertionLock) {
    classAssertionStatus=new HashMap<>();
    packageAssertionStatus=new HashMap<>();
    defaultAssertionStatus=false;
  }
}
Program: 36707
Project: 36707
Buggy source:
/** 
 * Registers the caller as parallel capable.</p> The registration succeeds if and only if all of the following conditions are met: <br> 1. no instance of the caller has been created</p> 2. all of the super classes (except class Object) of the caller are registered as parallel capable</p> Note that once a class loader is registered as parallel capable, there is no way to change it back. </p>
 * @return  true if the caller is successfully registered asparallel capable and false if otherwise.
 * @since   1.7
 */
@CallerSensitive protected static boolean registerAsParallelCapable(){
  Class<? extends ClassLoader> callerClass=Reflection.getCallerClass().asSubclass(ClassLoader.class);
  return ParallelLoaders.register(callerClass);
}

Fixed version (ground truth):
/** 
 * Registers the caller as parallel capable. The registration succeeds if and only if all of the following conditions are met: <ol> <li> no instance of the caller has been created</li> <li> all of the super classes (except class Object) of the caller are registered as parallel capable</li> </ol> <p>Note that once a class loader is registered as parallel capable, there is no way to change it back.</p>
 * @return  true if the caller is successfully registered asparallel capable and false if otherwise.
 * @since   1.7
 */
@CallerSensitive protected static boolean registerAsParallelCapable(){
  Class<? extends ClassLoader> callerClass=Reflection.getCallerClass().asSubclass(ClassLoader.class);
  return ParallelLoaders.register(callerClass);
}
Program: 36708
Project: 36708
Buggy source:
/** 
 * Returns a <tt>Package</tt> that has been defined by this class loader or any of its ancestors.  </p>
 * @param name The package name
 * @return  The <tt>Package</tt> corresponding to the given name, or<tt>null</tt> if not found
 * @since  1.2
 */
protected Package getPackage(String name){
  Package pkg;
synchronized (packages) {
    pkg=packages.get(name);
  }
  if (pkg == null) {
    if (parent != null) {
      pkg=parent.getPackage(name);
    }
 else {
      pkg=Package.getSystemPackage(name);
    }
    if (pkg != null) {
synchronized (packages) {
        Package pkg2=packages.get(name);
        if (pkg2 == null) {
          packages.put(name,pkg);
        }
 else {
          pkg=pkg2;
        }
      }
    }
  }
  return pkg;
}

Fixed version (ground truth):
/** 
 * Returns a <tt>Package</tt> that has been defined by this class loader or any of its ancestors.
 * @param name The package name
 * @return  The <tt>Package</tt> corresponding to the given name, or<tt>null</tt> if not found
 * @since  1.2
 */
protected Package getPackage(String name){
  Package pkg;
synchronized (packages) {
    pkg=packages.get(name);
  }
  if (pkg == null) {
    if (parent != null) {
      pkg=parent.getPackage(name);
    }
 else {
      pkg=Package.getSystemPackage(name);
    }
    if (pkg != null) {
synchronized (packages) {
        Package pkg2=packages.get(name);
        if (pkg2 == null) {
          packages.put(name,pkg);
        }
 else {
          pkg=pkg2;
        }
      }
    }
  }
  return pkg;
}
Program: 36709
Project: 36709
Buggy source:
/** 
 * Returns an enumeration of   {@link java.net.URL <tt>URL</tt>} objectsrepresenting all the resources with the given name. Class loader implementations should override this method to specify where to load resources from.  </p>
 * @param name The resource name
 * @return  An enumeration of {@link java.net.URL <tt>URL</tt>} objects forthe resources
 * @throws IOException If I/O errors occur
 * @since  1.2
 */
protected Enumeration<URL> findResources(String name) throws IOException {
  return java.util.Collections.emptyEnumeration();
}

Fixed version (ground truth):
/** 
 * Returns an enumeration of   {@link java.net.URL <tt>URL</tt>} objectsrepresenting all the resources with the given name. Class loader implementations should override this method to specify where to load resources from.
 * @param name The resource name
 * @return  An enumeration of {@link java.net.URL <tt>URL</tt>} objects forthe resources
 * @throws IOException If I/O errors occur
 * @since  1.2
 */
protected Enumeration<URL> findResources(String name) throws IOException {
  return java.util.Collections.emptyEnumeration();
}
Program: 36710
Project: 36710
Buggy source:
/** 
 * Finds the class with the specified <a href="#name">binary name</a>. This method should be overridden by class loader implementations that follow the delegation model for loading classes, and will be invoked by the   {@link #loadClass <tt>loadClass</tt>} method after checking theparent class loader for the requested class.  The default implementation throws a <tt>ClassNotFoundException</tt>.  </p>
 * @param name The <a href="#name">binary name</a> of the class
 * @return  The resulting <tt>Class</tt> object
 * @throws ClassNotFoundException If the class could not be found
 * @since  1.2
 */
protected Class<?> findClass(String name) throws ClassNotFoundException {
  throw new ClassNotFoundException(name);
}

Fixed version (ground truth):
/** 
 * Finds the class with the specified <a href="#name">binary name</a>. This method should be overridden by class loader implementations that follow the delegation model for loading classes, and will be invoked by the   {@link #loadClass <tt>loadClass</tt>} method after checking theparent class loader for the requested class.  The default implementation throws a <tt>ClassNotFoundException</tt>.
 * @param name The <a href="#name">binary name</a> of the class
 * @return  The resulting <tt>Class</tt> object
 * @throws ClassNotFoundException If the class could not be found
 * @since  1.2
 */
protected Class<?> findClass(String name) throws ClassNotFoundException {
  throw new ClassNotFoundException(name);
}
Program: 36711
Project: 36711
Buggy source:
/** 
 * Open for reading, a resource of the specified name from the search path used to load classes.  This method locates the resource through the system class loader (see   {@link #getSystemClassLoader()}).  </p>
 * @param name The resource name
 * @return  An input stream for reading the resource, or <tt>null</tt>if the resource could not be found
 * @since  1.1
 */
public static InputStream getSystemResourceAsStream(String name){
  URL url=getSystemResource(name);
  try {
    return url != null ? url.openStream() : null;
  }
 catch (  IOException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Open for reading, a resource of the specified name from the search path used to load classes.  This method locates the resource through the system class loader (see   {@link #getSystemClassLoader()}).
 * @param name The resource name
 * @return  An input stream for reading the resource, or <tt>null</tt>if the resource could not be found
 * @since  1.1
 */
public static InputStream getSystemResourceAsStream(String name){
  URL url=getSystemResource(name);
  try {
    return url != null ? url.openStream() : null;
  }
 catch (  IOException e) {
    return null;
  }
}
Program: 36712
Project: 36712
Buggy source:
/** 
 * Links the specified class.  This (misleadingly named) method may be used by a class loader to link a class.  If the class <tt>c</tt> has already been linked, then this method simply returns. Otherwise, the class is linked as described in the "Execution" chapter of <cite>The Java&trade; Language Specification</cite>. </p>
 * @param c The class to link
 * @throws NullPointerException If <tt>c</tt> is <tt>null</tt>.
 * @see #defineClass(String,byte[],int,int)
 */
protected final void resolveClass(Class<?> c){
  resolveClass0(c);
}

Fixed version (ground truth):
/** 
 * Links the specified class.  This (misleadingly named) method may be used by a class loader to link a class.  If the class <tt>c</tt> has already been linked, then this method simply returns. Otherwise, the class is linked as described in the "Execution" chapter of <cite>The Java&trade; Language Specification</cite>.
 * @param c The class to link
 * @throws NullPointerException If <tt>c</tt> is <tt>null</tt>.
 * @see #defineClass(String,byte[],int,int)
 */
protected final void resolveClass(Class<?> c){
  resolveClass0(c);
}
Program: 36713
Project: 36713
Buggy source:
/** 
 * Sets the default assertion status for this class loader.  This setting determines whether classes loaded by this class loader and initialized in the future will have assertions enabled or disabled by default. This setting may be overridden on a per-package or per-class basis by invoking   {@link #setPackageAssertionStatus(String,boolean)} or {@link #setClassAssertionStatus(String,boolean)}.  </p>
 * @param enabled <tt>true</tt> if classes loaded by this class loader will henceforth have assertions enabled by default, <tt>false</tt> if they will have assertions disabled by default.
 * @since  1.4
 */
public void setDefaultAssertionStatus(boolean enabled){
synchronized (assertionLock) {
    if (classAssertionStatus == null)     initializeJavaAssertionMaps();
    defaultAssertionStatus=enabled;
  }
}

Fixed version (ground truth):
/** 
 * Sets the default assertion status for this class loader.  This setting determines whether classes loaded by this class loader and initialized in the future will have assertions enabled or disabled by default. This setting may be overridden on a per-package or per-class basis by invoking   {@link #setPackageAssertionStatus(String,boolean)} or {@link #setClassAssertionStatus(String,boolean)}.
 * @param enabled <tt>true</tt> if classes loaded by this class loader will henceforth have assertions enabled by default, <tt>false</tt> if they will have assertions disabled by default.
 * @since  1.4
 */
public void setDefaultAssertionStatus(boolean enabled){
synchronized (assertionLock) {
    if (classAssertionStatus == null)     initializeJavaAssertionMaps();
    defaultAssertionStatus=enabled;
  }
}