nus-yam/ex-repair huggingface dataset:
Program: 79147
Project: 79147
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: 79148
Project: 79148
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: 79149
Project: 79149
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: 79150
Project: 79150
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: 79151
Project: 79151
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: 79152
Project: 79152
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: 79153
Project: 79153
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: 79154
Project: 79154
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: 79155
Project: 79155
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: 79156
Project: 79156
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: 79157
Project: 79157
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;
  }
}
Program: 79158
Project: 79158
Buggy source:
/** 
 * Defines a package by name in this <tt>ClassLoader</tt>.  This allows class loaders to define the packages for their classes. Packages must be created before the class is defined, and package names must be unique within a class loader and cannot be redefined or changed once created.  </p>
 * @param name The package name
 * @param specTitle The specification title
 * @param specVersion The specification version
 * @param specVendor The specification vendor
 * @param implTitle The implementation title
 * @param implVersion The implementation version
 * @param implVendor The implementation vendor
 * @param sealBase If not <tt>null</tt>, then this package is sealed with respect to the given code source  {@link java.net.URL <tt>URL</tt>}  object.  Otherwise, the package is not sealed.
 * @return  The newly defined <tt>Package</tt> object
 * @throws IllegalArgumentException If package name duplicates an existing package either in this class loader or one of its ancestors
 * @since  1.2
 */
protected Package definePackage(String name,String specTitle,String specVersion,String specVendor,String implTitle,String implVersion,String implVendor,URL sealBase) throws IllegalArgumentException {
synchronized (packages) {
    Package pkg=getPackage(name);
    if (pkg != null) {
      throw new IllegalArgumentException(name);
    }
    pkg=new Package(name,specTitle,specVersion,specVendor,implTitle,implVersion,implVendor,sealBase,this);
    packages.put(name,pkg);
    return pkg;
  }
}

Fixed version (ground truth):
/** 
 * Defines a package by name in this <tt>ClassLoader</tt>.  This allows class loaders to define the packages for their classes. Packages must be created before the class is defined, and package names must be unique within a class loader and cannot be redefined or changed once created.
 * @param name The package name
 * @param specTitle The specification title
 * @param specVersion The specification version
 * @param specVendor The specification vendor
 * @param implTitle The implementation title
 * @param implVersion The implementation version
 * @param implVendor The implementation vendor
 * @param sealBase If not <tt>null</tt>, then this package is sealed with respect to the given code source  {@link java.net.URL <tt>URL</tt>}  object.  Otherwise, the package is not sealed.
 * @return  The newly defined <tt>Package</tt> object
 * @throws IllegalArgumentException If package name duplicates an existing package either in this class loader or one of its ancestors
 * @since  1.2
 */
protected Package definePackage(String name,String specTitle,String specVersion,String specVendor,String implTitle,String implVersion,String implVendor,URL sealBase) throws IllegalArgumentException {
synchronized (packages) {
    Package pkg=getPackage(name);
    if (pkg != null) {
      throw new IllegalArgumentException(name);
    }
    pkg=new Package(name,specTitle,specVersion,specVendor,implTitle,implVersion,implVendor,sealBase,this);
    packages.put(name,pkg);
    return pkg;
  }
}
Program: 79160
Project: 79160
Buggy source:
/** 
 * Returns the class with the given <a href="#name">binary name</a> if this loader has been recorded by the Java virtual machine as an initiating loader of a class with that <a href="#name">binary name</a>.  Otherwise <tt>null</tt> is returned.  </p>
 * @param name The <a href="#name">binary name</a> of the class
 * @return  The <tt>Class</tt> object, or <tt>null</tt> if the class hasnot been loaded
 * @since  1.1
 */
protected final Class<?> findLoadedClass(String name){
  if (!checkName(name))   return null;
  return findLoadedClass0(name);
}

Fixed version (ground truth):
/** 
 * Returns the class with the given <a href="#name">binary name</a> if this loader has been recorded by the Java virtual machine as an initiating loader of a class with that <a href="#name">binary name</a>.  Otherwise <tt>null</tt> is returned.
 * @param name The <a href="#name">binary name</a> of the class
 * @return  The <tt>Class</tt> object, or <tt>null</tt> if the class hasnot been loaded
 * @since  1.1
 */
protected final Class<?> findLoadedClass(String name){
  if (!checkName(name))   return null;
  return findLoadedClass0(name);
}
Program: 79161
Project: 79161
Buggy source:
/** 
 * Find 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  A {@link java.net.URL <tt>URL</tt>} object for reading theresource, or <tt>null</tt> if the resource could not be found
 * @since  1.1
 */
public static URL getSystemResource(String name){
  ClassLoader system=getSystemClassLoader();
  if (system == null) {
    return getBootstrapResource(name);
  }
  return system.getResource(name);
}

Fixed version (ground truth):
/** 
 * Find 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  A {@link java.net.URL <tt>URL</tt>} object for reading theresource, or <tt>null</tt> if the resource could not be found
 * @since  1.1
 */
public static URL getSystemResource(String name){
  ClassLoader system=getSystemClassLoader();
  if (system == null) {
    return getBootstrapResource(name);
  }
  return system.getResource(name);
}
Program: 79162
Project: 79162
Buggy source:
/** 
 * Sets the signers of a class.  This should be invoked after defining a class.  </p>
 * @param c The <tt>Class</tt> object
 * @param signers The signers for the class
 * @since  1.1
 */
protected final void setSigners(Class<?> c,Object[] signers){
  c.setSigners(signers);
}

Fixed version (ground truth):
/** 
 * Sets the signers of a class.  This should be invoked after defining a class.
 * @param c The <tt>Class</tt> object
 * @param signers The signers for the class
 * @since  1.1
 */
protected final void setSigners(Class<?> c,Object[] signers){
  c.setSigners(signers);
}
Program: 79163
Project: 79163
Buggy source:
/** 
 * Returns all of the <tt>Packages</tt> defined by this class loader and its ancestors.  </p>
 * @return  The array of <tt>Package</tt> objects defined by this<tt>ClassLoader</tt>
 * @since  1.2
 */
protected Package[] getPackages(){
  Map<String,Package> map;
synchronized (packages) {
    map=new HashMap<>(packages);
  }
  Package[] pkgs;
  if (parent != null) {
    pkgs=parent.getPackages();
  }
 else {
    pkgs=Package.getSystemPackages();
  }
  if (pkgs != null) {
    for (int i=0; i < pkgs.length; i++) {
      String pkgName=pkgs[i].getName();
      if (map.get(pkgName) == null) {
        map.put(pkgName,pkgs[i]);
      }
    }
  }
  return map.values().toArray(new Package[map.size()]);
}

Fixed version (ground truth):
/** 
 * Returns all of the <tt>Packages</tt> defined by this class loader and its ancestors.
 * @return  The array of <tt>Package</tt> objects defined by this<tt>ClassLoader</tt>
 * @since  1.2
 */
protected Package[] getPackages(){
  Map<String,Package> map;
synchronized (packages) {
    map=new HashMap<>(packages);
  }
  Package[] pkgs;
  if (parent != null) {
    pkgs=parent.getPackages();
  }
 else {
    pkgs=Package.getSystemPackages();
  }
  if (pkgs != null) {
    for (int i=0; i < pkgs.length; i++) {
      String pkgName=pkgs[i].getName();
      if (map.get(pkgName) == null) {
        map.put(pkgName,pkgs[i]);
      }
    }
  }
  return map.values().toArray(new Package[map.size()]);
}
Program: 79164
Project: 79164
Buggy source:
/** 
 * Returns the lock object for class loading operations. For backward compatibility, the default implementation of this method behaves as follows. If this ClassLoader object is registered as parallel capable, the method returns a dedicated object associated with the specified class name. Otherwise, the method returns this ClassLoader object. </p>
 * @param className The name of the to-be-loaded class
 * @return the lock for class loading operations
 * @throws NullPointerException If registered as parallel capable and <tt>className</tt> is null
 * @see #loadClass(String,boolean)
 * @since  1.7
 */
protected Object getClassLoadingLock(String className){
  Object lock=this;
  if (parallelLockMap != null) {
    Object newLock=new Object();
    lock=parallelLockMap.putIfAbsent(className,newLock);
    if (lock == null) {
      lock=newLock;
    }
  }
  return lock;
}

Fixed version (ground truth):
/** 
 * Returns the lock object for class loading operations. For backward compatibility, the default implementation of this method behaves as follows. If this ClassLoader object is registered as parallel capable, the method returns a dedicated object associated with the specified class name. Otherwise, the method returns this ClassLoader object.
 * @param className The name of the to-be-loaded class
 * @return the lock for class loading operations
 * @throws NullPointerException If registered as parallel capable and <tt>className</tt> is null
 * @see #loadClass(String,boolean)
 * @since  1.7
 */
protected Object getClassLoadingLock(String className){
  Object lock=this;
  if (parallelLockMap != null) {
    Object newLock=new Object();
    lock=parallelLockMap.putIfAbsent(className,newLock);
    if (lock == null) {
      lock=newLock;
    }
  }
  return lock;
}
Program: 79165
Project: 79165
Buggy source:
/** 
 * Returns the absolute path name of a native library.  The VM invokes this method to locate the native libraries that belong to classes loaded with this class loader. If this method returns <tt>null</tt>, the VM searches the library along the path specified as the "<tt>java.library.path</tt>" property.  </p>
 * @param libname The library name
 * @return  The absolute path of the native library
 * @see System#loadLibrary(String)
 * @see System#mapLibraryName(String)
 * @since  1.2
 */
protected String findLibrary(String libname){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the absolute path name of a native library.  The VM invokes this method to locate the native libraries that belong to classes loaded with this class loader. If this method returns <tt>null</tt>, the VM searches the library along the path specified as the "<tt>java.library.path</tt>" property.
 * @param libname The library name
 * @return  The absolute path of the native library
 * @see System#loadLibrary(String)
 * @see System#mapLibraryName(String)
 * @since  1.2
 */
protected String findLibrary(String libname){
  return null;
}
Program: 79168
Project: 79168
Buggy source:
/** 
 * Returns a redirect to append to the specified file. Each write operation first advances the position to the end of the file and then writes the requested data. Whether the advancement of the position and the writing of the data are done in a single atomic operation is system-dependent and therefore unspecified. <p>It will always be true that <pre>   {@code Redirect.appendTo(file).file() == file && Redirect.appendTo(file).type() == Redirect.Type.APPEND}</pre>
 * @throws NullPointerException if the specified file is null
 * @return a redirect to append to the specified file
 */
public static Redirect appendTo(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.APPEND;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
    boolean append(){
      return true;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Returns a redirect to append to the specified file. Each write operation first advances the position to the end of the file and then writes the requested data. Whether the advancement of the position and the writing of the data are done in a single atomic operation is system-dependent and therefore unspecified. <p>It will always be true that <pre>   {@code Redirect.appendTo(file).file() == file && Redirect.appendTo(file).type() == Redirect.Type.APPEND}</pre>
 * @param file The {@code File} for the {@code Redirect}.
 * @throws NullPointerException if the specified file is null
 * @return a redirect to append to the specified file
 */
public static Redirect appendTo(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.APPEND;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
    boolean append(){
      return true;
    }
  }
;
}
Program: 79169
Project: 79169
Buggy source:
/** 
 * Returns a redirect to read from the specified file. <p>It will always be true that <pre>   {@code Redirect.from(file).file() == file && Redirect.from(file).type() == Redirect.Type.READ}</pre>
 * @throws NullPointerException if the specified file is null
 * @return a redirect to read from the specified file
 */
public static Redirect from(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.READ;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Returns a redirect to read from the specified file. <p>It will always be true that <pre>   {@code Redirect.from(file).file() == file && Redirect.from(file).type() == Redirect.Type.READ}</pre>
 * @param file The {@code File} for the {@code Redirect}.
 * @throws NullPointerException if the specified file is null
 * @return a redirect to read from the specified file
 */
public static Redirect from(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.READ;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
  }
;
}
Program: 79170
Project: 79170
Buggy source:
/** 
 * Returns a redirect to write to the specified file. If the specified file exists when the subprocess is started, its previous contents will be discarded. <p>It will always be true that <pre>   {@code Redirect.to(file).file() == file && Redirect.to(file).type() == Redirect.Type.WRITE}</pre>
 * @throws NullPointerException if the specified file is null
 * @return a redirect to write to the specified file
 */
public static Redirect to(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.WRITE;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
    boolean append(){
      return false;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Returns a redirect to write to the specified file. If the specified file exists when the subprocess is started, its previous contents will be discarded. <p>It will always be true that <pre>   {@code Redirect.to(file).file() == file && Redirect.to(file).type() == Redirect.Type.WRITE}</pre>
 * @param file The {@code File} for the {@code Redirect}.
 * @throws NullPointerException if the specified file is null
 * @return a redirect to write to the specified file
 */
public static Redirect to(final File file){
  if (file == null)   throw new NullPointerException();
  return new Redirect(){
    public Type type(){
      return Type.WRITE;
    }
    public File file(){
      return file;
    }
    public String toString(){
      return "String_Node_Str" + file + "String_Node_Str";
    }
    boolean append(){
      return false;
    }
  }
;
}
Program: 79171
Project: 79171
Buggy source:
/** 
 * Returns the maximum amount of memory that the Java virtual machine will attempt to use.  If there is no inherent limit then the value   {@link java.lang.Long#MAX_VALUE} will be returned. </p>
 * @return  the maximum amount of memory that the virtual machine willattempt to use, measured in bytes
 * @since 1.4
 */
public native long maxMemory();

Fixed version (ground truth):
/** 
 * Returns the maximum amount of memory that the Java virtual machine will attempt to use.  If there is no inherent limit then the value   {@link java.lang.Long#MAX_VALUE} will be returned.
 * @return  the maximum amount of memory that the virtual machine willattempt to use, measured in bytes
 * @since 1.4
 */
public native long maxMemory();
Program: 79173
Project: 79173
Buggy source:
/** 
 * Returns the default handler invoked when a thread abruptly terminates due to an uncaught exception. If the returned value is <tt>null</tt>, there is no default.
 * @since 1.5
 * @see #setDefaultUncaughtExceptionHandler
 */
public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler(){
  return defaultUncaughtExceptionHandler;
}

Fixed version (ground truth):
/** 
 * Returns the default handler invoked when a thread abruptly terminates due to an uncaught exception. If the returned value is <tt>null</tt>, there is no default.
 * @since 1.5
 * @see #setDefaultUncaughtExceptionHandler
 * @return the default uncaught exception handler for all threads
 */
public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler(){
  return defaultUncaughtExceptionHandler;
}
Program: 79174
Project: 79174
Buggy source:
/** 
 * Returns the handler invoked when this thread abruptly terminates due to an uncaught exception. If this thread has not had an uncaught exception handler explicitly set then this thread's <tt>ThreadGroup</tt> object is returned, unless this thread has terminated, in which case <tt>null</tt> is returned.
 * @since 1.5
 */
public UncaughtExceptionHandler getUncaughtExceptionHandler(){
  return uncaughtExceptionHandler != null ? uncaughtExceptionHandler : group;
}

Fixed version (ground truth):
/** 
 * Returns the handler invoked when this thread abruptly terminates due to an uncaught exception. If this thread has not had an uncaught exception handler explicitly set then this thread's <tt>ThreadGroup</tt> object is returned, unless this thread has terminated, in which case <tt>null</tt> is returned.
 * @since 1.5
 * @return the uncaught exception handler for this thread
 */
public UncaughtExceptionHandler getUncaughtExceptionHandler(){
  return uncaughtExceptionHandler != null ? uncaughtExceptionHandler : group;
}
Program: 79175
Project: 79175
Buggy source:
/** 
 * Creates a thread local variable. The initial value of the variable is determined by invoking the   {@code get} method on the {@code Supplier}.
 * @param supplier the supplier to be used to determine the initial value
 * @return a new thread local variable
 * @throws NullPointerException if the specified supplier is null
 * @since 1.8
 */
public static <T>ThreadLocal<T> withInitial(Supplier<? extends T> supplier){
  return new SuppliedThreadLocal<>(supplier);
}

Fixed version (ground truth):
/** 
 * Creates a thread local variable. The initial value of the variable is determined by invoking the   {@code get} method on the {@code Supplier}.
 * @param < S > the type of the thread local's value
 * @param supplier the supplier to be used to determine the initial value
 * @return a new thread local variable
 * @throws NullPointerException if the specified supplier is null
 * @since 1.8
 */
public static <S>ThreadLocal<S> withInitial(Supplier<? extends S> supplier){
  return new SuppliedThreadLocal<>(supplier);
}
Program: 79177
Project: 79177
Buggy source:
/** 
 * Determines whether a class is modifiable by  {@linkplain #retransformClasses retransformation}or   {@linkplain #redefineClasses redefinition}. If a class is modifiable then this method returns <code>true</code>. If a class is not modifiable then this method returns <code>false</code>. <P> For a class to be retransformed,   {@link #isRetransformClassesSupported} must also be true.But the value of <code>isRetransformClassesSupported()</code> does not influence the value returned by this function. For a class to be redefined,  {@link #isRedefineClassesSupported} must also be true.But the value of <code>isRedefineClassesSupported()</code> does not influence the value returned by this function. <P> Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) and array classes are never modifiable.
 * @throws java.lang.NullPointerException if the specified class is <code>null</code>.
 * @see #retransformClasses
 * @see #isRetransformClassesSupported
 * @see #redefineClasses
 * @see #isRedefineClassesSupported
 * @since 1.6
 */
boolean isModifiableClass(Class<?> theClass);

Fixed version (ground truth):
/** 
 * Determines whether a class is modifiable by  {@linkplain #retransformClasses retransformation}or   {@linkplain #redefineClasses redefinition}. If a class is modifiable then this method returns <code>true</code>. If a class is not modifiable then this method returns <code>false</code>. <P> For a class to be retransformed,   {@link #isRetransformClassesSupported} must also be true.But the value of <code>isRetransformClassesSupported()</code> does not influence the value returned by this function. For a class to be redefined,  {@link #isRedefineClassesSupported} must also be true.But the value of <code>isRedefineClassesSupported()</code> does not influence the value returned by this function. <P> Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) and array classes are never modifiable.
 * @param theClass the class to check for being modifiable
 * @return whether or not the argument class is modifiable
 * @throws java.lang.NullPointerException if the specified class is <code>null</code>.
 * @see #retransformClasses
 * @see #isRetransformClassesSupported
 * @see #redefineClasses
 * @see #isRedefineClassesSupported
 * @since 1.6
 */
boolean isModifiableClass(Class<?> theClass);
Program: 79178
Project: 79178
Buggy source:
/** 
 * A query that provides access to whether a leap-second was parsed. <p> This returns a singleton   {@linkplain TemporalQuery query} that providesaccess to additional information from the parse. The query always returns a non-null boolean, true if parsing saw a leap-second, false if not. <p> Instant parsing handles the special "leap second" time of '23:59:60'. Leap seconds occur at '23:59:60' in the UTC time-zone, but at other local times in different time-zones. To avoid this potential ambiguity, the handling of leap-seconds is limited to {@link DateTimeFormatterBuilder#appendInstant()}, as that method always parses the instant with the UTC zone offset. <p> If the time '23:59:60' is received, then a simple conversion is applied, replacing the second-of-minute of 60 with 59. This query can be used on the parse result to determine if the leap-second adjustment was made. The query will return one second of excess if it did adjust to remove the leap-second, and zero if not. Note that applying a leap-second smoothing mechanism, such as UTC-SLS, is the responsibility of the application, as follows: <pre> TemporalAccessor parsed = formatter.parse(str); Instant instant = parsed.query(Instant::from); if (parsed.query(DateTimeFormatter.parsedLeapSecond())) { // validate leap-second is correct and apply correct smoothing } </pre>
 */
public static final TemporalQuery<Boolean> parsedLeapSecond(){
  return PARSED_LEAP_SECOND;
}

Fixed version (ground truth):
/** 
 * A query that provides access to whether a leap-second was parsed. <p> This returns a singleton   {@linkplain TemporalQuery query} that providesaccess to additional information from the parse. The query always returns a non-null boolean, true if parsing saw a leap-second, false if not. <p> Instant parsing handles the special "leap second" time of '23:59:60'. Leap seconds occur at '23:59:60' in the UTC time-zone, but at other local times in different time-zones. To avoid this potential ambiguity, the handling of leap-seconds is limited to {@link DateTimeFormatterBuilder#appendInstant()}, as that method always parses the instant with the UTC zone offset. <p> If the time '23:59:60' is received, then a simple conversion is applied, replacing the second-of-minute of 60 with 59. This query can be used on the parse result to determine if the leap-second adjustment was made. The query will return one second of excess if it did adjust to remove the leap-second, and zero if not. Note that applying a leap-second smoothing mechanism, such as UTC-SLS, is the responsibility of the application, as follows: <pre> TemporalAccessor parsed = formatter.parse(str); Instant instant = parsed.query(Instant::from); if (parsed.query(DateTimeFormatter.parsedLeapSecond())) { // validate leap-second is correct and apply correct smoothing } </pre>
 * @return a query that provides access to whether a leap-second was parsed
 */
public static final TemporalQuery<Boolean> parsedLeapSecond(){
  return PARSED_LEAP_SECOND;
}
Program: 79181
Project: 79181
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: 79182
Project: 79182
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: 79183
Project: 79183
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: 79184
Project: 79184
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: 79185
Project: 79185
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: 79186
Project: 79186
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();