nus-yam/ex-repair huggingface dataset:
Program: 36878
Project: 36878
Buggy source:
/** 
 * Inserts the specified element at the front of this deque unless it would violate capacity restrictions.  When using a capacity-restricted deque, this method is generally preferable to the   {@link #addFirst} method,which can fail to insert an element only by throwing an exception.
 * @param e the element to add
 * @return <tt>true</tt> if the element was added to this deque, else<tt>false</tt>
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
boolean offerFirst(E e);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixed version (ground truth):
/** 
 * Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions, throwing an   {@code IllegalStateException} if no space is currentlyavailable.  When using a capacity-restricted deque, it is generally preferable to use method  {@link #offerFirst}.
 * @param e the element to add
 * @throws IllegalStateException if the element cannot be added at thistime due to capacity restrictions
 * @throws ClassCastException if the class of the specified elementprevents it from being added to this deque
 * @throws NullPointerException if the specified element is null and thisdeque does not permit null elements
 * @throws IllegalArgumentException if some property of the specifiedelement prevents it from being added to this deque
 */
void addFirst(E e);
Program: 36895
Project: 36895
Buggy source:
/** 
 * A static method to retrieve the named object. See   {@link #doLookup(Name)} for details.
 * @param name the name of the object to look up
 * @return  the object bound to <tt>name</tt>
 * @throws NamingException if a naming exception is encountered
 * @since 1.6
 */
@SuppressWarnings("String_Node_Str") public static <T>T doLookup(String name) throws NamingException {
  return (T)(new InitialContext()).lookup(name);
}

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

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

Fixed version (ground truth):
/** 
 * Creates a new instance of a control factory.
 */
protected ControlFactory(){
}
Program: 36898
Project: 36898
Buggy source:
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);

Fixed version (ground truth):
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param < T > the type of the interface to return
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);
Program: 36899
Project: 36899
Buggy source:
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;

Fixed version (ground truth):
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param name of the procedure or function to call
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;
Program: 36900
Project: 36900
Buggy source:
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);

Fixed version (ground truth):
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @param scope The scope
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);
Program: 36901
Project: 36901
Buggy source:
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 */
public List<String> getNames();

Fixed version (ground truth):
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 * @return an immutable list of short names
 */
public List<String> getNames();
Program: 36902
Project: 36902
Buggy source:
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}

Fixed version (ground truth):
/** 
 * Create a   {@code SimpleScriptContext}.
 */
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}
Program: 36903
Project: 36903
Buggy source:
/** 
 * Put the given key-value association into this preference node.  It is guaranteed that <tt>key</tt> and <tt>value</tt> are non-null and of legal length.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for any of these things.) <p>This method is invoked with the lock on this node held.
 */
protected abstract void putSpi(String key,String value);

Fixed version (ground truth):
/** 
 * Put the given key-value association into this preference node.  It is guaranteed that <tt>key</tt> and <tt>value</tt> are non-null and of legal length.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for any of these things.) <p>This method is invoked with the lock on this node held.
 * @param key the key
 * @param value the value
 */
protected abstract void putSpi(String key,String value);
Program: 36904
Project: 36904
Buggy source:
/** 
 * Remove the association (if any) for the specified key at this preference node.  It is guaranteed that <tt>key</tt> is non-null. Also, it is guaranteed that this node has not been removed. (The implementor needn't check for either of these things.) <p>This method is invoked with the lock on this node held.
 */
protected abstract void removeSpi(String key);

Fixed version (ground truth):
/** 
 * Remove the association (if any) for the specified key at this preference node.  It is guaranteed that <tt>key</tt> is non-null. Also, it is guaranteed that this node has not been removed. (The implementor needn't check for either of these things.) <p>This method is invoked with the lock on this node held.
 * @param key the key
 */
protected abstract void removeSpi(String key);
Program: 36905
Project: 36905
Buggy source:
/** 
 * Return the value associated with the specified key at this preference node, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.  It is guaranteed that <tt>key</tt> is non-null.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for either of these things.) <p> Generally speaking, this method should not throw an exception under any circumstances.  If, however, if it does throw an exception, the exception will be intercepted and treated as a <tt>null</tt> return value. <p>This method is invoked with the lock on this node held.
 * @return the value associated with the specified key at this preferencenode, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.
 */
protected abstract String getSpi(String key);

Fixed version (ground truth):
/** 
 * Return the value associated with the specified key at this preference node, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.  It is guaranteed that <tt>key</tt> is non-null.  Also, it is guaranteed that this node has not been removed.  (The implementor needn't check for either of these things.) <p> Generally speaking, this method should not throw an exception under any circumstances.  If, however, if it does throw an exception, the exception will be intercepted and treated as a <tt>null</tt> return value. <p>This method is invoked with the lock on this node held.
 * @param key the key
 * @return the value associated with the specified key at this preferencenode, or <tt>null</tt> if there is no association for this key, or the association cannot be determined at this time.
 */
protected abstract String getSpi(String key);
Program: 36906
Project: 36906
Buggy source:
/** 
 * Returns the user root preference node corresponding to the calling user.  In a server, the returned value will typically depend on some implicit client-context.
 */
Preferences userRoot();

Fixed version (ground truth):
/** 
 * Returns the user root preference node corresponding to the calling user.  In a server, the returned value will typically depend on some implicit client-context.
 * @return the user root preference node corresponding to the callinguser
 */
Preferences userRoot();
Program: 36907
Project: 36907
Buggy source:
/** 
 * Returns the system root preference node.  (Multiple calls on this method will return the same object reference.)
 */
Preferences systemRoot();

Fixed version (ground truth):
/** 
 * Returns the system root preference node.  (Multiple calls on this method will return the same object reference.)
 * @return the system root preference node
 */
Preferences systemRoot();
Program: 36908
Project: 36908
Buggy source:
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);

Fixed version (ground truth):
/** 
 * Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. The methods of the interface may be implemented using the <code>invokeMethod</code> method.
 * @param < T > the type of the interface to return
 * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
 * @param clasz The <code>Class</code> object of the interface to return.
 * @return An instance of requested interface - null if the requested interface is unavailable,i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching the ones in the requested interface.
 * @throws IllegalArgumentException if the specified <code>Class</code> objectis null or is not an interface, or if the specified Object is null or does not represent a scripting object.
 */
public <T>T getInterface(Object thiz,Class<T> clasz);
Program: 36909
Project: 36909
Buggy source:
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;

Fixed version (ground truth):
/** 
 * Used to call top-level procedures and functions defined in scripts.
 * @param name of the procedure or function to call
 * @param args Arguments to pass to the procedure or function
 * @return The value returned by the procedure or function
 * @throws ScriptException if an error occurrs during invocation of the method.
 * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
 * @throws NullPointerException if method name is null.
 */
public Object invokeFunction(String name,Object... args) throws ScriptException, NoSuchMethodException ;
Program: 36910
Project: 36910
Buggy source:
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);

Fixed version (ground truth):
/** 
 * Gets the <code>Bindings</code>  associated with the given scope in this <code>ScriptContext</code>.
 * @return The associated <code>Bindings</code>.  Returns <code>null</code> if it has notbeen set.
 * @param scope The scope
 * @throws IllegalArgumentException If no <code>Bindings</code> is defined for thespecified scope value in <code>ScriptContext</code> of this type.
 */
public Bindings getBindings(int scope);
Program: 36911
Project: 36911
Buggy source:
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 */
public List<String> getNames();

Fixed version (ground truth):
/** 
 * Returns an immutable list of  short names for the <code>ScriptEngine</code>, which may be used to identify the <code>ScriptEngine</code> by the <code>ScriptEngineManager</code>. For instance, an implementation based on the Mozilla Rhino Javascript engine might return list containing {&quot;javascript&quot;, &quot;rhino&quot;}.
 * @return an immutable list of short names
 */
public List<String> getNames();
Program: 36912
Project: 36912
Buggy source:
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}

Fixed version (ground truth):
/** 
 * Create a   {@code SimpleScriptContext}.
 */
public SimpleScriptContext(){
  engineScope=new SimpleBindings();
  globalScope=null;
  reader=new InputStreamReader(System.in);
  writer=new PrintWriter(System.out,true);
  errorWriter=new PrintWriter(System.err,true);
}
Program: 36913
Project: 36913
Buggy source:
/** 
 * Returns a BigDecimal whose numerical value is equal to (  {@code this} * 10<sup>n</sup>).  The scale ofthe result is  {@code (this.scale() - n)}.
 * @throws ArithmeticException if the scale would beoutside the range of a 32-bit integer.
 * @since 1.5
 */
public BigDecimal scaleByPowerOfTen(int n){
  return new BigDecimal(intVal,intCompact,checkScale((long)scale - n),precision);
}

Fixed version (ground truth):
/** 
 * Returns a BigDecimal whose numerical value is equal to (  {@code this} * 10<sup>n</sup>).  The scale ofthe result is  {@code (this.scale() - n)}.
 * @param n the exponent power of ten to scale by
 * @return a BigDecimal whose numerical value is equal to( {@code this} * 10<sup>n</sup>)
 * @throws ArithmeticException if the scale would beoutside the range of a 32-bit integer.
 * @since 1.5
 */
public BigDecimal scaleByPowerOfTen(int n){
  return new BigDecimal(intVal,intCompact,checkScale((long)scale - n),precision);
}
Program: 36914
Project: 36914
Buggy source:
/** 
 * Returns the total number of compressed bytes output so far.</p>
 * @return the total (non-negative) number of compressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of compressed bytes output so far.
 * @return the total (non-negative) number of compressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}
Program: 36915
Project: 36915
Buggy source:
/** 
 * Returns the total number of uncompressed bytes input so far.</p>
 * @return the total (non-negative) number of uncompressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of uncompressed bytes input so far.
 * @return the total (non-negative) number of uncompressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}
Program: 36916
Project: 36916
Buggy source:
/** 
 * Returns the total number of uncompressed bytes output so far.</p>
 * @return the total (non-negative) number of uncompressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of uncompressed bytes output so far.
 * @return the total (non-negative) number of uncompressed bytes output so far
 * @since 1.5
 */
public long getBytesWritten(){
synchronized (zsRef) {
    ensureOpen();
    return bytesWritten;
  }
}
Program: 36917
Project: 36917
Buggy source:
/** 
 * Returns the total number of compressed bytes input so far.</p>
 * @return the total (non-negative) number of compressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}

Fixed version (ground truth):
/** 
 * Returns the total number of compressed bytes input so far.
 * @return the total (non-negative) number of compressed bytes input so far
 * @since 1.5
 */
public long getBytesRead(){
synchronized (zsRef) {
    ensureOpen();
    return bytesRead;
  }
}
Program: 36918
Project: 36918
Buggy source:
/** 
 * Returns a hash code for a   {@code boolean} value; compatible with{@code Boolean.hashCode()}.
 * @since 1.8
 * @return a hash code value for a {@code boolean} value.
 */
public static int hashCode(boolean value){
  return value ? 1231 : 1237;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for a   {@code boolean} value; compatible with{@code Boolean.hashCode()}.
 * @param value the value to hash
 * @return a hash code value for a {@code boolean} value.
 * @since 1.8
 */
public static int hashCode(boolean value){
  return value ? 1231 : 1237;
}
Program: 36919
Project: 36919
Buggy source:
/** 
 * Returns a hash code for a   {@code byte} value; compatible with{@code Byte.hashCode()}.
 * @since 1.8
 * @return a hash code value for a {@code byte} value.
 */
public static int hashCode(byte value){
  return (int)value;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for a   {@code byte} value; compatible with{@code Byte.hashCode()}.
 * @param value the value to hash
 * @return a hash code value for a {@code byte} value.
 * @since 1.8
 */
public static int hashCode(byte value){
  return (int)value;
}