nus-yam/ex-repair huggingface dataset:
Program: 60053
Project: 60053
Buggy source:
/** 
 * Returns the contained instance, which must be present. If the instance might be absent, use  {@link #or(Object)} or {@link #orNull} instead.<p><b>Comparison to  {@code java.util.Optional}:</b> when the value is absent, this method throws   {@link IllegalStateException}, whereas the Java 8 counterpart throws  {@link NoSuchElementException}.
 * @throws IllegalStateException if the instance is absent ({@link #isPresent} returns{@code false}); depending on this <i>specific</i> exception type (over the more general  {@link RuntimeException}) is discouraged
 */
public abstract T get();

Fixed version (ground truth):
/** 
 * Returns the contained instance, which must be present. If the instance might be absent, use  {@link #or(Object)} or {@link #orNull} instead.<p><b>Comparison to  {@code java.util.Optional}:</b> when the value is absent, this method throws   {@link IllegalStateException}, whereas the Java 8 counterpart throws  {@link java.util.NoSuchElementException NoSuchElementException}.
 * @throws IllegalStateException if the instance is absent ({@link #isPresent} returns{@code false}); depending on this <i>specific</i> exception type (over the more general  {@link RuntimeException}) is discouraged
 */
public abstract T get();
Program: 60054
Project: 60054
Buggy source:
/** 
 * Returns a collection that applies   {@code function} to each element of{@code fromCollection}. The returned collection is a live view of   {@code fromCollection}; changes to one affect the other. <p>The returned collection's   {@code add()} and {@code addAll()} methodsthrow an  {@link UnsupportedOperationException}. All other collection methods are supported, as long as   {@code fromCollection} supports them.<p>The returned collection isn't threadsafe or serializable, even if {@code fromCollection} is.<p>When a live view is <i>not</i> needed, it may be faster to copy the transformed collection and use the copy. <p>If the input  {@code Collection} is known to be a {@code List}, consider  {@link Lists#transform}. If only an   {@code Iterable} is available, use{@link Iterables#transform}. <p><b>  {@code Stream} equivalent:</b> {@link Stream#map}.
 */
public static <F,T>Collection<T> transform(Collection<F> fromCollection,Function<? super F,T> function){
  return new TransformedCollection<F,T>(fromCollection,function);
}

Fixed version (ground truth):
/** 
 * Returns a collection that applies   {@code function} to each element of{@code fromCollection}. The returned collection is a live view of   {@code fromCollection}; changes to one affect the other. <p>The returned collection's   {@code add()} and {@code addAll()} methodsthrow an  {@link UnsupportedOperationException}. All other collection methods are supported, as long as   {@code fromCollection} supports them.<p>The returned collection isn't threadsafe or serializable, even if {@code fromCollection} is.<p>When a live view is <i>not</i> needed, it may be faster to copy the transformed collection and use the copy. <p>If the input  {@code Collection} is known to be a {@code List}, consider  {@link Lists#transform}. If only an   {@code Iterable} is available, use{@link Iterables#transform}. <p><b>  {@code Stream} equivalent:</b> {@link java.util.stream.Stream#map Stream.map}.
 */
public static <F,T>Collection<T> transform(Collection<F> fromCollection,Function<? super F,T> function){
  return new TransformedCollection<F,T>(fromCollection,function);
}
Program: 60056
Project: 60056
Buggy source:
/** 
 * Returns a fluent iterable containing the specified elements in order. <p><b>  {@code Stream} equivalent:</b> {@link Stream#of(T)}.
 * @since 20.0
 */
@Beta public static <E>FluentIterable<E> of(@Nullable E element,E... elements){
  return from(Lists.asList(element,elements));
}

Fixed version (ground truth):
/** 
 * Returns a fluent iterable containing the specified elements in order. <p><b>  {@code Stream} equivalent:</b> {@link java.util.stream.Stream#of(Object[]) Stream.of(T...)}.
 * @since 20.0
 */
@Beta public static <E>FluentIterable<E> of(@Nullable E element,E... elements){
  return from(Lists.asList(element,elements));
}
Program: 60057
Project: 60057
Buggy source:
/** 
 * Returns the number of elements in the specified iterable that equal the specified object. This implementation avoids a full iteration when the iterable is a   {@link Multiset} or {@link Set}. <p><b>Java 8 users:</b> In most cases, the   {@code Stream} equivalent of this method is {@code stream.filter(element::equals).count()}. If   {@code element} might be null, use {@code stream.filter(Predicate.isEqual(element)).count()} instead.
 * @see Collections#frequency
 */
public static int frequency(Iterable<?> iterable,@Nullable Object element){
  if ((iterable instanceof Multiset)) {
    return ((Multiset<?>)iterable).count(element);
  }
 else   if ((iterable instanceof Set)) {
    return ((Set<?>)iterable).contains(element) ? 1 : 0;
  }
  return Iterators.frequency(iterable.iterator(),element);
}

Fixed version (ground truth):
/** 
 * Returns the number of elements in the specified iterable that equal the specified object. This implementation avoids a full iteration when the iterable is a   {@link Multiset} or {@link Set}. <p><b>Java 8 users:</b> In most cases, the   {@code Stream} equivalent of this method is {@code stream.filter(element::equals).count()}. If   {@code element} might be null, use {@code stream.filter(Predicate.isEqual(element)).count()} instead.
 * @see java.util.Collections#frequency(Collection,Object) Collections.frequency(Collection,Object)
 */
public static int frequency(Iterable<?> iterable,@Nullable Object element){
  if ((iterable instanceof Multiset)) {
    return ((Multiset<?>)iterable).count(element);
  }
 else   if ((iterable instanceof Set)) {
    return ((Set<?>)iterable).contains(element) ? 1 : 0;
  }
  return Iterators.frequency(iterable.iterator(),element);
}
Program: 60058
Project: 60058
Buggy source:
/** 
 * Returns   {@code true} if each element in {@code iterable} after the first is greater than orequal to the element that preceded it, according to this ordering. Note that this is always true when the iterable has fewer than two elements. <p><b>Java 8 users:</b> Use the equivalent  {@link Comparators#isInOrder(Iterable)} instead,since the rest of  {@code Ordering} is mostly obsolete (as explained in the classdocumentation).
 */
public boolean isOrdered(Iterable<? extends T> iterable){
  Iterator<? extends T> it=iterable.iterator();
  if (it.hasNext()) {
    T prev=it.next();
    while (it.hasNext()) {
      T next=it.next();
      if (compare(prev,next) > 0) {
        return false;
      }
      prev=next;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if each element in {@code iterable} after the first is greater than orequal to the element that preceded it, according to this ordering. Note that this is always true when the iterable has fewer than two elements. <p><b>Java 8 users:</b> Use the equivalent  {@link Comparators#isInOrder(Iterable,Comparator)}instead, since the rest of   {@code Ordering} is mostly obsolete (as explained in the classdocumentation).
 */
public boolean isOrdered(Iterable<? extends T> iterable){
  Iterator<? extends T> it=iterable.iterator();
  if (it.hasNext()) {
    T prev=it.next();
    while (it.hasNext()) {
      T next=it.next();
      if (compare(prev,next) > 0) {
        return false;
      }
      prev=next;
    }
  }
  return true;
}
Program: 60059
Project: 60059
Buggy source:
/** 
 * Returns   {@code true} if each element in {@code iterable} after the first is <i>strictly</i>greater than the element that preceded it, according to this ordering. Note that this is always true when the iterable has fewer than two elements. <p><b>Java 8 users:</b> Use the equivalent  {@link Comparators#isInStrictOrder(Iterable)}instead, since the rest of   {@code Ordering} is mostly obsolete (as explained in the classdocumentation).
 */
public boolean isStrictlyOrdered(Iterable<? extends T> iterable){
  Iterator<? extends T> it=iterable.iterator();
  if (it.hasNext()) {
    T prev=it.next();
    while (it.hasNext()) {
      T next=it.next();
      if (compare(prev,next) >= 0) {
        return false;
      }
      prev=next;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if each element in {@code iterable} after the first is <i>strictly</i>greater than the element that preceded it, according to this ordering. Note that this is always true when the iterable has fewer than two elements. <p><b>Java 8 users:</b> Use the equivalent  {@link Comparators#isInStrictOrder(Iterable,Comparator)} instead, since the rest of {@code Ordering} is mostly obsolete (as explained inthe class documentation).
 */
public boolean isStrictlyOrdered(Iterable<? extends T> iterable){
  Iterator<? extends T> it=iterable.iterator();
  if (it.hasNext()) {
    T prev=it.next();
    while (it.hasNext()) {
      T next=it.next();
      if (compare(prev,next) >= 0) {
        return false;
      }
      prev=next;
    }
  }
  return true;
}
Program: 60060
Project: 60060
Buggy source:
/** 
 * Load 4 bytes from the provided array at the indicated offset.
 * @param input the input bytes
 * @param offset the offset into the array at which to start
 * @return the value found in the array in the form of a long
 */
static int load32(byte[] source,int offset){
  return (source[offset] & 0xFF) | ((source[offset + 1] & 0xFF) << 8) | ((source[offset + 2] & 0xFF) << 16)| ((source[offset + 3] & 0xFF) << 24);
}

Fixed version (ground truth):
/** 
 * Load 4 bytes from the provided array at the indicated offset.
 * @param source the input bytes
 * @param offset the offset into the array at which to start
 * @return the value found in the array in the form of a long
 */
static int load32(byte[] source,int offset){
  return (source[offset] & 0xFF) | ((source[offset + 1] & 0xFF) << 8) | ((source[offset + 2] & 0xFF) << 16)| ((source[offset + 3] & 0xFF) << 24);
}
Program: 60061
Project: 60061
Buggy source:
/** 
 * Attempts to skip up to   {@code n} bytes from the given input stream, but not more than{@code in.available()} bytes. This prevents {@code FileInputStream} from skipping more bytesthan actually remain in the file, something that it  {@linkplain FileInputStream#skip(long) specifies} it can do in its Javadoc despite the fact that it is violating the contract of{@code InputStream.skip()}.
 */
private static long skipSafely(InputStream in,long n) throws IOException {
  int available=in.available();
  return available == 0 ? 0 : in.skip(Math.min(available,n));
}

Fixed version (ground truth):
/** 
 * Attempts to skip up to   {@code n} bytes from the given input stream, but not more than{@code in.available()} bytes. This prevents {@code FileInputStream} from skipping more bytesthan actually remain in the file, something that it  {@linkplain java.io.FileInputStream#skip(long) specifies} it can do in its Javadoc despite the fact thatit is violating the contract of  {@code InputStream.skip()}.
 */
private static long skipSafely(InputStream in,long n) throws IOException {
  int available=in.available();
  return available == 0 ? 0 : in.skip(Math.min(available,n));
}
Program: 60062
Project: 60062
Buggy source:
/** 
 * Returns the unsigned   {@code long} value represented by a string with the given radix.
 * @param s the string containing the unsigned {@code long} representation to be parsed.
 * @param radix the radix to use while parsing {@code string}
 * @throws NumberFormatException if the string does not contain a valid unsigned {@code long} withthe given radix, or if  {@code radix} is not between {@link Character#MIN_RADIX} and{@link Character#MAX_RADIX}.
 * @throws NullPointerException if {@code string} is null (in contrast to{@link Long#parseLong(String)})
 */
@CanIgnoreReturnValue public static long parseUnsignedLong(String string,int radix){
  checkNotNull(string);
  if (string.length() == 0) {
    throw new NumberFormatException("String_Node_Str");
  }
  if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
    throw new NumberFormatException("String_Node_Str" + radix);
  }
  int maxSafePos=maxSafeDigits[radix] - 1;
  long value=0;
  for (int pos=0; pos < string.length(); pos++) {
    int digit=Character.digit(string.charAt(pos),radix);
    if (digit == -1) {
      throw new NumberFormatException(string);
    }
    if (pos > maxSafePos && overflowInParse(value,digit,radix)) {
      throw new NumberFormatException("String_Node_Str" + string);
    }
    value=(value * radix) + digit;
  }
  return value;
}

Fixed version (ground truth):
/** 
 * Returns the unsigned   {@code long} value represented by a string with the given radix.
 * @param string the string containing the unsigned {@code long} representation to be parsed.
 * @param radix the radix to use while parsing {@code string}
 * @throws NumberFormatException if the string does not contain a valid unsigned {@code long} withthe given radix, or if  {@code radix} is not between {@link Character#MIN_RADIX} and{@link Character#MAX_RADIX}.
 * @throws NullPointerException if {@code string} is null (in contrast to{@link Long#parseLong(String)})
 */
@CanIgnoreReturnValue public static long parseUnsignedLong(String string,int radix){
  checkNotNull(string);
  if (string.length() == 0) {
    throw new NumberFormatException("String_Node_Str");
  }
  if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
    throw new NumberFormatException("String_Node_Str" + radix);
  }
  int maxSafePos=maxSafeDigits[radix] - 1;
  long value=0;
  for (int pos=0; pos < string.length(); pos++) {
    int digit=Character.digit(string.charAt(pos),radix);
    if (digit == -1) {
      throw new NumberFormatException(string);
    }
    if (pos > maxSafePos && overflowInParse(value,digit,radix)) {
      throw new NumberFormatException("String_Node_Str" + string);
    }
    value=(value * radix) + digit;
  }
  return value;
}
Program: 60063
Project: 60063
Buggy source:
/** 
 * If the class is parameterized, such as   {@link ArrayList}, this returns   {@code ArrayList<E>}.
 */
@Override Type getGenericReturnType(){
  Class<?> declaringClass=getDeclaringClass();
  TypeVariable<?>[] typeParams=declaringClass.getTypeParameters();
  if (typeParams.length > 0) {
    return Types.newParameterizedType(declaringClass,typeParams);
  }
 else {
    return declaringClass;
  }
}

Fixed version (ground truth):
/** 
 * If the class is parameterized, such as   {@link java.util.ArrayList ArrayList}, this returns  {@code ArrayList<E>}.
 */
@Override Type getGenericReturnType(){
  Class<?> declaringClass=getDeclaringClass();
  TypeVariable<?>[] typeParams=declaringClass.getTypeParameters();
  if (typeParams.length > 0) {
    return Types.newParameterizedType(declaringClass,typeParams);
  }
 else {
    return declaringClass;
  }
}
Program: 60064
Project: 60064
Buggy source:
/** 
 * Returns the result of the input   {@code Future}, which must have already completed. <p>The benefits of this method are twofold. First, the name "getDone" suggests to readers that the   {@code Future} is already done. Second, if buggy code calls {@code getDone} on a {@code Future} that is still pending, the program will throw instead of block. This can be importantfor APIs like  {@link whenAllComplete whenAllComplete(...)}{@code .}{@link FutureCombiner#call(Callable) call(...)}, where it is easy to use a new input from the   {@code call} implementation but forget to add it to the arguments of {@code whenAllComplete}. <p>If you are looking for a method to determine whether a given   {@code Future} is done, use theinstance method  {@link Future#isDone()}.
 * @throws ExecutionException if the {@code Future} failed with an exception
 * @throws CancellationException if the {@code Future} was cancelled
 * @throws IllegalStateException if the {@code Future} is not done
 * @since 20.0
 */
@CanIgnoreReturnValue public static <V>V getDone(Future<V> future) throws ExecutionException {
  checkState(future.isDone(),"String_Node_Str",future);
  return getUninterruptibly(future);
}

Fixed version (ground truth):
/** 
 * Returns the result of the input   {@code Future}, which must have already completed. <p>The benefits of this method are twofold. First, the name "getDone" suggests to readers that the   {@code Future} is already done. Second, if buggy code calls {@code getDone} on a {@code Future} that is still pending, the program will throw instead of block. This can be importantfor APIs like  {@link #whenAllComplete whenAllComplete(...)}{@code .}{@link FutureCombiner#call(Callable) call(...)}, where it is easy to use a new input from the   {@code call} implementation but forget to add it to the arguments of {@code whenAllComplete}. <p>If you are looking for a method to determine whether a given   {@code Future} is done, use theinstance method  {@link Future#isDone()}.
 * @throws ExecutionException if the {@code Future} failed with an exception
 * @throws CancellationException if the {@code Future} was cancelled
 * @throws IllegalStateException if the {@code Future} is not done
 * @since 20.0
 */
@CanIgnoreReturnValue public static <V>V getDone(Future<V> future) throws ExecutionException {
  checkState(future.isDone(),"String_Node_Str",future);
  return getUninterruptibly(future);
}
Program: 60065
Project: 60065
Buggy source:
/** 
 * This tests a special case where removeAt has to trickle an element first down one level from a min to a max level, then up one level above the index of the removed element. It also tests that skipMe in the iterator plays nicely with forgetMeNot.
 */
public void testIteratorInvalidatingIteratorRemove2(){
  MinMaxPriorityQueue<Integer> mmHeap=MinMaxPriorityQueue.create();
  mmHeap.addAll(Lists.newArrayList(1,20,1000,2,3,30,40,10,11,12,13,200,300,500,400));
  assertTrue("String_Node_Str",mmHeap.isIntact());
  Iterator<Integer> it=mmHeap.iterator();
  assertEquals((Integer)1,it.next());
  assertEquals((Integer)20,it.next());
  assertEquals((Integer)1000,it.next());
  assertEquals((Integer)2,it.next());
  it.remove();
  assertTrue("String_Node_Str",mmHeap.isIntact());
  assertEquals((Integer)10,it.next());
  assertEquals((Integer)3,it.next());
  it.remove();
  assertTrue("String_Node_Str",mmHeap.isIntact());
  assertEquals((Integer)12,it.next());
  assertEquals((Integer)30,it.next());
  assertEquals((Integer)40,it.next());
  assertEquals((Integer)11,it.next());
  assertEquals((Integer)13,it.next());
  assertEquals((Integer)200,it.next());
  assertEquals((Integer)300,it.next());
  assertEquals((Integer)400,it.next());
  assertEquals((Integer)500,it.next());
}

Fixed version (ground truth):
/** 
 * This tests a special case where removeAt has to trickle an element first down one level from a min to a max level, then up one level above the index of the removed element. It also tests that skipMe in the iterator plays nicely with forgetMeNot.
 */
public void testIteratorInvalidatingIteratorRemove2(){
  MinMaxPriorityQueue<Integer> mmHeap=MinMaxPriorityQueue.create();
  mmHeap.addAll(Lists.newArrayList(1,20,1000,2,3,30,40,10,11,12,13,200,300,500,400));
  assertTrue("String_Node_Str",mmHeap.isIntact());
  Iterator<Integer> it=mmHeap.iterator();
  assertEquals((Integer)1,it.next());
  assertEquals((Integer)20,it.next());
  assertEquals((Integer)1000,it.next());
  assertEquals((Integer)2,it.next());
  it.remove();
  assertTrue("String_Node_Str",mmHeap.isIntact());
  assertEquals((Integer)10,it.next());
  assertEquals((Integer)3,it.next());
  it.remove();
  assertTrue("String_Node_Str",mmHeap.isIntact());
  assertEquals((Integer)12,it.next());
  assertEquals((Integer)30,it.next());
  assertEquals((Integer)40,it.next());
  assertEquals((Integer)11,it.next());
  assertEquals((Integer)400,it.next());
  assertEquals((Integer)13,it.next());
  assertEquals((Integer)200,it.next());
  assertEquals((Integer)300,it.next());
  assertEquals((Integer)500,it.next());
}
Program: 60066
Project: 60066
Buggy source:
@Override public boolean hasNext(){
  checkModCount();
  return (nextNotInSkipMe(cursor + 1) < size()) || ((forgetMeNot != null) && !forgetMeNot.isEmpty());
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  checkModCount();
  nextNotInSkipMe(cursor + 1);
  return (nextCursor < size()) || ((forgetMeNot != null) && !forgetMeNot.isEmpty());
}
Program: 60067
Project: 60067
Buggy source:
@Override public E next(){
  checkModCount();
  int tempCursor=nextNotInSkipMe(cursor + 1);
  if (tempCursor < size()) {
    cursor=tempCursor;
    canRemove=true;
    return elementData(cursor);
  }
 else   if (forgetMeNot != null) {
    cursor=size();
    lastFromForgetMeNot=forgetMeNot.poll();
    if (lastFromForgetMeNot != null) {
      canRemove=true;
      return lastFromForgetMeNot;
    }
  }
  throw new NoSuchElementException("String_Node_Str");
}

Fixed version (ground truth):
@Override public E next(){
  checkModCount();
  nextNotInSkipMe(cursor + 1);
  if (nextCursor < size()) {
    cursor=nextCursor;
    canRemove=true;
    return elementData(cursor);
  }
 else   if (forgetMeNot != null) {
    cursor=size();
    lastFromForgetMeNot=forgetMeNot.poll();
    if (lastFromForgetMeNot != null) {
      canRemove=true;
      return lastFromForgetMeNot;
    }
  }
  throw new NoSuchElementException("String_Node_Str");
}
Program: 60068
Project: 60068
Buggy source:
@Override public void remove(){
  checkRemove(canRemove);
  checkModCount();
  canRemove=false;
  expectedModCount++;
  if (cursor < size()) {
    MoveDesc<E> moved=removeAt(cursor);
    if (moved != null) {
      if (forgetMeNot == null) {
        forgetMeNot=new ArrayDeque<E>();
        skipMe=new ArrayList<E>(3);
      }
      if (!containsExact(skipMe,moved.toTrickle)) {
        forgetMeNot.add(moved.toTrickle);
      }
      skipMe.add(moved.replaced);
    }
    cursor--;
  }
 else {
    checkState(removeExact(lastFromForgetMeNot));
    lastFromForgetMeNot=null;
  }
}

Fixed version (ground truth):
@Override public void remove(){
  checkRemove(canRemove);
  checkModCount();
  canRemove=false;
  expectedModCount++;
  if (cursor < size()) {
    MoveDesc<E> moved=removeAt(cursor);
    if (moved != null) {
      if (forgetMeNot == null) {
        forgetMeNot=new ArrayDeque<E>();
        skipMe=new ArrayList<E>(3);
      }
      if (!foundAndRemovedExactReference(skipMe,moved.toTrickle)) {
        forgetMeNot.add(moved.toTrickle);
      }
      if (!foundAndRemovedExactReference(forgetMeNot,moved.replaced)) {
        skipMe.add(moved.replaced);
      }
    }
    cursor--;
    nextCursor--;
  }
 else {
    checkState(removeExact(lastFromForgetMeNot));
    lastFromForgetMeNot=null;
  }
}
Program: 60069
Project: 60069
Buggy source:
boolean removeExact(Object target){
  for (int i=0; i < size; i++) {
    if (queue[i] == target) {
      removeAt(i);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Removes only this exact instance, not others that are equals() 
 */
private boolean removeExact(Object target){
  for (int i=0; i < size; i++) {
    if (queue[i] == target) {
      removeAt(i);
      return true;
    }
  }
  return false;
}
Program: 60070
Project: 60070
Buggy source:
/** 
 * Returns the index of the first element after   {@code c} that is not in{@code skipMe} and returns {@code size()} if there is no such element.
 */
private int nextNotInSkipMe(int c){
  if (skipMe != null) {
    while (c < size() && containsExact(skipMe,elementData(c))) {
      c++;
    }
  }
  return c;
}

Fixed version (ground truth):
/** 
 * Advances nextCursor to the index of the first element after   {@code c} that is not in{@code skipMe} and returns {@code size()} if there is no such element.
 */
private void nextNotInSkipMe(int c){
  if (nextCursor < c) {
    if (skipMe != null) {
      while (c < size() && foundAndRemovedExactReference(skipMe,elementData(c))) {
        c++;
      }
    }
    nextCursor=c;
  }
}
Program: 60071
Project: 60071
Buggy source:
void checkModCount(){
  if (modCount != expectedModCount) {
    throw new ConcurrentModificationException();
  }
}

Fixed version (ground truth):
private void checkModCount(){
  if (modCount != expectedModCount) {
    throw new ConcurrentModificationException();
  }
}
Program: 60072
Project: 60072
Buggy source:
public static void serialize(SerializationStreamWriter writer,RegularImmutableAsList<?> instance) throws SerializationException {
  writer.writeObject(instance.delegateCollection());
  writer.writeObject(instance.delegateList());
}

Fixed version (ground truth):
public static void serialize(SerializationStreamWriter writer,RegularImmutableAsList<?> instance) throws SerializationException {
  Collection_CustomFieldSerializerBase.serialize(writer,instance);
}
Program: 60073
Project: 60073
Buggy source:
public static RegularImmutableAsList<Object> instantiate(SerializationStreamReader reader) throws SerializationException {
  @SuppressWarnings("String_Node_Str") ImmutableCollection<Object> delegateCollection=(ImmutableCollection)reader.readObject();
  ImmutableList<?> delegateList=(ImmutableList<?>)reader.readObject();
  return new RegularImmutableAsList<Object>(delegateCollection,delegateList);
}

Fixed version (ground truth):
public static RegularImmutableAsList<Object> instantiate(SerializationStreamReader reader) throws SerializationException {
  ArrayList<Object> elements=new ArrayList<Object>();
  Collection_CustomFieldSerializerBase.deserialize(reader,elements);
  ImmutableList<Object> delegate=ImmutableList.copyOf(elements);
  return new RegularImmutableAsList<Object>(delegate,delegate);
}
Program: 60074
Project: 60074
Buggy source:
@Override public ImmutableSortedMap<K,V> descendingMap(){
  ImmutableSortedMap<K,V> result=descendingMap;
  if (result == null) {
    if (isEmpty()) {
      return result=emptyMap(Ordering.from(comparator()).reverse());
    }
 else {
      return result=new ImmutableSortedMap<K,V>((RegularImmutableSortedSet<K>)keySet.descendingSet(),valueList.reverse(),this);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public ImmutableSortedMap<K,V> descendingMap(){
  ImmutableSortedMap<K,V> result=descendingMap;
  if (result == null) {
    if (isEmpty()) {
      return result=emptyMap(Ordering.from(comparator()).<K>reverse());
    }
 else {
      return result=new ImmutableSortedMap<K,V>((RegularImmutableSortedSet<K>)keySet.descendingSet(),valueList.reverse(),this);
    }
  }
  return result;
}
Program: 60075
Project: 60075
Buggy source:
@Override public ImmutableSortedMultiset<E> descendingMultiset(){
  ImmutableSortedMultiset<E> result=descendingMultiset;
  if (result == null) {
    return descendingMultiset=this.isEmpty() ? emptyMultiset(Ordering.from(comparator()).reverse()) : new DescendingImmutableSortedMultiset<E>(this);
  }
  return result;
}

Fixed version (ground truth):
@Override public ImmutableSortedMultiset<E> descendingMultiset(){
  ImmutableSortedMultiset<E> result=descendingMultiset;
  if (result == null) {
    return descendingMultiset=this.isEmpty() ? emptyMultiset(Ordering.from(comparator()).<E>reverse()) : new DescendingImmutableSortedMultiset<E>(this);
  }
  return result;
}
Program: 60076
Project: 60076
Buggy source:
/** 
 * Asserts that all pairs of   {@code T} values within {@code valuesInExpectedOrder} are orderedconsistently between their order within  {@code valuesInExpectedOrder} and the order implied bythe given  {@code comparator}. <p>In detail, this method asserts <ul> <li><i>reflexivity</i>:   {@code comparator.compare(t, t) = 0} for all {@code t} in{@code valuesInExpectedOrder}; and <li><i>consistency</i>:   {@code comparator.compare(ti, tj) < 0} and{@code comparator.compare(tj, ti) > 0} for {@code i < j}, where  {@code ti = valuesInExpectedOrder.get(i)} and {@code tj = valuesInExpectedOrder.get(j)}.
 */
public static <T>void testComparator(Comparator<? super T> comparator,List<T> valuesInExpectedOrder){
  for (int i=0; i < valuesInExpectedOrder.size(); i++) {
    T t=valuesInExpectedOrder.get(i);
    for (int j=0; j < i; j++) {
      T lesser=valuesInExpectedOrder.get(j);
      assertTrue(comparator + "String_Node_Str" + lesser+ "String_Node_Str"+ t+ "String_Node_Str",comparator.compare(lesser,t) < 0);
    }
    assertEquals(comparator + "String_Node_Str" + t+ "String_Node_Str"+ t+ "String_Node_Str",0,comparator.compare(t,t));
    for (int j=i + 1; j < valuesInExpectedOrder.size(); j++) {
      T greater=valuesInExpectedOrder.get(j);
      assertTrue(comparator + "String_Node_Str" + greater+ "String_Node_Str"+ t+ "String_Node_Str",comparator.compare(greater,t) > 0);
    }
  }
}

Fixed version (ground truth):
/** 
 * Asserts that all pairs of   {@code T} values within {@code valuesInExpectedOrder} are orderedconsistently between their order within  {@code valuesInExpectedOrder} and the order implied bythe given  {@code comparator}. <p>In detail, this method asserts <ul> <li><i>reflexivity</i>:   {@code comparator.compare(t, t) = 0} for all {@code t} in {@code valuesInExpectedOrder}; and <li><i>consistency</i>:   {@code comparator.compare(ti, tj) < 0} and {@code comparator.compare(tj, ti) > 0} for {@code i < j}, where   {@code ti =valuesInExpectedOrder.get(i)} and {@code tj = valuesInExpectedOrder.get(j)}. </ul>
 */
public static <T>void testComparator(Comparator<? super T> comparator,List<T> valuesInExpectedOrder){
  for (int i=0; i < valuesInExpectedOrder.size(); i++) {
    T t=valuesInExpectedOrder.get(i);
    for (int j=0; j < i; j++) {
      T lesser=valuesInExpectedOrder.get(j);
      assertTrue(comparator + "String_Node_Str" + lesser+ "String_Node_Str"+ t+ "String_Node_Str",comparator.compare(lesser,t) < 0);
    }
    assertEquals(comparator + "String_Node_Str" + t+ "String_Node_Str"+ t+ "String_Node_Str",0,comparator.compare(t,t));
    for (int j=i + 1; j < valuesInExpectedOrder.size(); j++) {
      T greater=valuesInExpectedOrder.get(j);
      assertTrue(comparator + "String_Node_Str" + greater+ "String_Node_Str"+ t+ "String_Node_Str",comparator.compare(greater,t) > 0);
    }
  }
}
Program: 60077
Project: 60077
Buggy source:
/** 
 * Trigger the other.size() >= this.size() case in AbstractSet.removeAll().
 */
@CollectionFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(absent=ZERO) public void testRemoveAll_somePresentLargeCollectionToRemove(){
  assertTrue("String_Node_Str",collection.removeAll(MinimalCollection.of(e0(),e0(),e0(),e3(),e3(),e3())));
  expectMissing(e0());
}

Fixed version (ground truth):
/** 
 * Trigger the   {@code other.size() >= this.size()} case in {@link AbstractSet#removeAll()}. 
 */
@CollectionFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(absent=ZERO) public void testRemoveAll_somePresentLargeCollectionToRemove(){
  assertTrue("String_Node_Str",collection.removeAll(MinimalCollection.of(e0(),e0(),e0(),e3(),e3(),e3())));
  expectMissing(e0());
}
Program: 60078
Project: 60078
Buggy source:
/** 
 * Asserts that an escaper behaves correctly with respect to null inputs.
 * @param escaper the non-null escaper to test
 * @throws IOException
 */
public static void assertBasic(Escaper escaper) throws IOException {
  Assert.assertEquals("String_Node_Str",escaper.escape("String_Node_Str"));
  try {
    escaper.escape((String)null);
    Assert.fail("String_Node_Str");
  }
 catch (  NullPointerException e) {
  }
}

Fixed version (ground truth):
/** 
 * Asserts that an escaper behaves correctly with respect to null inputs.
 * @param escaper the non-null escaper to test
 */
public static void assertBasic(Escaper escaper) throws IOException {
  Assert.assertEquals("String_Node_Str",escaper.escape("String_Node_Str"));
  try {
    escaper.escape((String)null);
    Assert.fail("String_Node_Str");
  }
 catch (  NullPointerException e) {
  }
}
Program: 60079
Project: 60079
Buggy source:
/** 
 * Returns true if the the given member is a method that overrides   {@link Object#equals(Object)}. <p>The documentation for   {@link Object#equals} says it should accept null, so don't require anexplicit  {@link @Nullable} annotation (see <ahref="https://github.com/google/guava/issues/1819">#1819</a>). <p>It is not necessary to consider visibility, return type, or type parameter declarations. The declaration of a method with the same name and formal parameters as  {@link Object#equals} thatis not public and boolean-returning, or that declares any type parameters, would be rejected at compile-time.
 */
private static boolean isEquals(Member member){
  if (!(member instanceof Method)) {
    return false;
  }
  Method method=(Method)member;
  if (!method.getName().contentEquals("String_Node_Str")) {
    return false;
  }
  Class<?>[] parameters=method.getParameterTypes();
  if (parameters.length != 1) {
    return false;
  }
  if (!parameters[0].equals(Object.class)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if the the given member is a method that overrides   {@link Object#equals(Object)}. <p>The documentation for   {@link Object#equals} says it should accept null, so don't require anexplicit  {@code @Nullable} annotation (see <ahref="https://github.com/google/guava/issues/1819">#1819</a>). <p>It is not necessary to consider visibility, return type, or type parameter declarations. The declaration of a method with the same name and formal parameters as  {@link Object#equals} thatis not public and boolean-returning, or that declares any type parameters, would be rejected at compile-time.
 */
private static boolean isEquals(Member member){
  if (!(member instanceof Method)) {
    return false;
  }
  Method method=(Method)member;
  if (!method.getName().contentEquals("String_Node_Str")) {
    return false;
  }
  Class<?>[] parameters=method.getParameterTypes();
  if (parameters.length != 1) {
    return false;
  }
  if (!parameters[0].equals(Object.class)) {
    return false;
  }
  return true;
}
Program: 60080
Project: 60080
Buggy source:
/** 
 * Returns an array size suitable for the backing array of a hash table that uses open addressing with linear probing in its implementation.  The returned size is the smallest power of two that can hold setSize elements with the desired load factor. <p>Do not call this method with setSize < 2.
 */
@VisibleForTesting static int chooseTableSize(int setSize){
  if (setSize < CUTOFF) {
    int tableSize=Integer.highestOneBit(setSize - 1) << 1;
    while (tableSize * DESIRED_LOAD_FACTOR < setSize) {
      tableSize<<=1;
    }
    return tableSize;
  }
  checkArgument(setSize < MAX_TABLE_SIZE,"String_Node_Str");
  return MAX_TABLE_SIZE;
}

Fixed version (ground truth):
/** 
 * Returns an array size suitable for the backing array of a hash table that uses open addressing with linear probing in its implementation. The returned size is the smallest power of two that can hold setSize elements with the desired load factor. <p>Do not call this method with setSize less than 2.
 */
@VisibleForTesting static int chooseTableSize(int setSize){
  if (setSize < CUTOFF) {
    int tableSize=Integer.highestOneBit(setSize - 1) << 1;
    while (tableSize * DESIRED_LOAD_FACTOR < setSize) {
      tableSize<<=1;
    }
    return tableSize;
  }
  checkArgument(setSize < MAX_TABLE_SIZE,"String_Node_Str");
  return MAX_TABLE_SIZE;
}
Program: 60081
Project: 60081
Buggy source:
/** 
 * Returns a new builder. The generated builder is equivalent to the builder created by the   {@link Builder#Builder()} constructor.
 */
public static <R,C,V>Builder<R,C,V> builder(){
  return new Builder<R,C,V>();
}

Fixed version (ground truth):
/** 
 * Returns a new builder. The generated builder is equivalent to the builder created by the   {@link Builder#Builder() ImmutableTable.Builder()} constructor.
 */
public static <R,C,V>Builder<R,C,V> builder(){
  return new Builder<R,C,V>();
}
Program: 60082
Project: 60082
Buggy source:
/** 
 * @param map
 * @param initialCapacity
 * @param maxSegmentSize
 */
StrongKeyWeakValueSegment(MapMakerInternalMap<K,V,StrongKeyWeakValueEntry<K,V>,StrongKeyWeakValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}

Fixed version (ground truth):
StrongKeyWeakValueSegment(MapMakerInternalMap<K,V,StrongKeyWeakValueEntry<K,V>,StrongKeyWeakValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}
Program: 60083
Project: 60083
Buggy source:
/** 
 * @param map
 * @param initialCapacity
 * @param maxSegmentSize
 */
WeakKeyStrongValueSegment(MapMakerInternalMap<K,V,WeakKeyStrongValueEntry<K,V>,WeakKeyStrongValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}

Fixed version (ground truth):
WeakKeyStrongValueSegment(MapMakerInternalMap<K,V,WeakKeyStrongValueEntry<K,V>,WeakKeyStrongValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}
Program: 60084
Project: 60084
Buggy source:
/** 
 * @param map
 * @param initialCapacity
 * @param maxSegmentSize
 */
WeakKeyWeakValueSegment(MapMakerInternalMap<K,V,WeakKeyWeakValueEntry<K,V>,WeakKeyWeakValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}

Fixed version (ground truth):
WeakKeyWeakValueSegment(MapMakerInternalMap<K,V,WeakKeyWeakValueEntry<K,V>,WeakKeyWeakValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}
Program: 60085
Project: 60085
Buggy source:
/** 
 * @param map
 * @param initialCapacity
 * @param maxSegmentSize
 */
StrongKeyStrongValueSegment(MapMakerInternalMap<K,V,StrongKeyStrongValueEntry<K,V>,StrongKeyStrongValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}

Fixed version (ground truth):
StrongKeyStrongValueSegment(MapMakerInternalMap<K,V,StrongKeyStrongValueEntry<K,V>,StrongKeyStrongValueSegment<K,V>> map,int initialCapacity,int maxSegmentSize){
  super(map,initialCapacity,maxSegmentSize);
}
Program: 60086
Project: 60086
Buggy source:
/** 
 * Returns a capacity that is sufficient to keep the map from being resized as long as it grows no larger than expectedSize and the load factor is >= its default (0.75).
 */
static int capacity(int expectedSize){
  if (expectedSize < 3) {
    checkNonnegative(expectedSize,"String_Node_Str");
    return expectedSize + 1;
  }
  if (expectedSize < Ints.MAX_POWER_OF_TWO) {
    return (int)((float)expectedSize / 0.75F + 1.0F);
  }
  return Integer.MAX_VALUE;
}

Fixed version (ground truth):
/** 
 * Returns a capacity that is sufficient to keep the map from being resized as long as it grows no larger than expectedSize and the load factor is ≥ its default (0.75).
 */
static int capacity(int expectedSize){
  if (expectedSize < 3) {
    checkNonnegative(expectedSize,"String_Node_Str");
    return expectedSize + 1;
  }
  if (expectedSize < Ints.MAX_POWER_OF_TWO) {
    return (int)((float)expectedSize / 0.75F + 1.0F);
  }
  return Integer.MAX_VALUE;
}
Program: 60087
Project: 60087
Buggy source:
/** 
 * Returns an unmodifiable view of the specified table. This method allows modules to provide users with "read-only" access to internal tables. Query operations on the returned table "read through" to the specified table, and attempts to modify the returned table, whether direct or via its collection views, result in an   {@code UnsupportedOperationException}. <p>The returned table will be serializable if the specified table is serializable. <p>Consider using an   {@link ImmutableTable}, which is guaranteed never to change.
 * @param table the table for which an unmodifiable view is to be returned
 * @return an unmodifiable view of the specified table
 * @since 11.0
 */
public static <R,C,V>Table<R,C,V> unmodifiableTable(Table<? extends R,? extends C,? extends V> table){
  return new UnmodifiableTable<R,C,V>(table);
}

Fixed version (ground truth):
/** 
 * Returns an unmodifiable view of the specified table. This method allows modules to provide users with "read-only" access to internal tables. Query operations on the returned table "read through" to the specified table, and attempts to modify the returned table, whether direct or via its collection views, result in an   {@code UnsupportedOperationException}. <p>The returned table will be serializable if the specified table is serializable. <p>Consider using an   {@link ImmutableTable}, which is guaranteed never to change.
 * @since 11.0
 */
public static <R,C,V>Table<R,C,V> unmodifiableTable(Table<? extends R,? extends C,? extends V> table){
  return new UnmodifiableTable<R,C,V>(table);
}
Program: 60088
Project: 60088
Buggy source:
/** 
 * Partitions the contents of buffer in the range [left, right] around the pivot element previously stored in buffer[pivotValue]. Returns the new index of the pivot element, pivotNewIndex, so that everything in [left, pivotNewIndex] is <= pivotValue and everything in (pivotNewIndex, right] is > pivotValue.
 */
private int partition(int left,int right,int pivotIndex){
  T pivotValue=buffer[pivotIndex];
  buffer[pivotIndex]=buffer[right];
  int pivotNewIndex=left;
  for (int i=left; i < right; i++) {
    if (comparator.compare(buffer[i],pivotValue) < 0) {
      swap(pivotNewIndex,i);
      pivotNewIndex++;
    }
  }
  buffer[right]=buffer[pivotNewIndex];
  buffer[pivotNewIndex]=pivotValue;
  return pivotNewIndex;
}

Fixed version (ground truth):
/** 
 * Partitions the contents of buffer in the range [left, right] around the pivot element previously stored in buffer[pivotValue]. Returns the new index of the pivot element, pivotNewIndex, so that everything in [left, pivotNewIndex] is ≤ pivotValue and everything in (pivotNewIndex, right] is greater than pivotValue.
 */
private int partition(int left,int right,int pivotIndex){
  T pivotValue=buffer[pivotIndex];
  buffer[pivotIndex]=buffer[right];
  int pivotNewIndex=left;
  for (int i=left; i < right; i++) {
    if (comparator.compare(buffer[i],pivotValue) < 0) {
      swap(pivotNewIndex,i);
      pivotNewIndex++;
    }
  }
  buffer[right]=buffer[pivotNewIndex];
  buffer[pivotNewIndex]=pivotValue;
  return pivotNewIndex;
}
Program: 60089
Project: 60089
Buggy source:
private static boolean isEmpty(Iterable<?> iterable){
  return iterable instanceof Collection ? ((Collection<?>)iterable).isEmpty() : iterable.iterator().hasNext();
}

Fixed version (ground truth):
private static boolean isEmpty(Iterable<?> iterable){
  return iterable instanceof Collection ? ((Collection<?>)iterable).isEmpty() : !iterable.iterator().hasNext();
}
Program: 60090
Project: 60090
Buggy source:
public void testIsEmpty_iterable(){
  List<Object> list=new ArrayList<Object>();
  Helpers.assertEmpty(list);
  list.add("String_Node_Str");
  try {
    Helpers.assertEmpty(list);
    throw new Error();
  }
 catch (  AssertionFailedError expected) {
  }
}

Fixed version (ground truth):
public void testIsEmpty_iterable(){
  List<Object> list=new ArrayList<Object>();
  Helpers.assertEmpty(list);
  Helpers.assertEmpty(new Iterable<Object>(){
    @Override public Iterator<Object> iterator(){
      return Collections.emptyList().iterator();
    }
  }
);
  list.add("String_Node_Str");
  try {
    Helpers.assertEmpty(list);
    throw new Error();
  }
 catch (  AssertionFailedError expected) {
  }
  try {
    Helpers.assertEmpty(new Iterable<String>(){
      @Override public Iterator<String> iterator(){
        return Collections.singleton("String_Node_Str").iterator();
      }
    }
);
    throw new Error();
  }
 catch (  AssertionFailedError expected) {
  }
}
Program: 60091
Project: 60091
Buggy source:
@GwtIncompatible public void testRoundFractionalDoubleToInt(){
  for (  double d : FRACTIONAL_DOUBLE_CANDIDATES) {
    for (    RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
      BigDecimal expected=new BigDecimal(d).setScale(0,mode);
      boolean isInBounds=expected.compareTo(MAX_INT_AS_BIG_DECIMAL) <= 0 & expected.compareTo(MIN_INT_AS_BIG_DECIMAL) >= 0;
      try {
        assertEquals(expected.intValue(),DoubleMath.roundToInt(d,mode));
        assertTrue(isInBounds);
      }
 catch (      ArithmeticException e) {
        assertFalse(isInBounds);
      }
    }
  }
}

Fixed version (ground truth):
@GwtIncompatible public void testRoundFractionalDoubleToInt(){
  for (  double d : FRACTIONAL_DOUBLE_CANDIDATES) {
    for (    RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
      BigDecimal expected=new BigDecimal(d).setScale(0,mode);
      boolean isInBounds=expected.compareTo(MAX_INT_AS_BIG_DECIMAL) <= 0 & expected.compareTo(MIN_INT_AS_BIG_DECIMAL) >= 0;
      try {
        assertEquals("String_Node_Str" + d + "String_Node_Str"+ mode,expected.intValue(),DoubleMath.roundToInt(d,mode));
        assertTrue(isInBounds);
      }
 catch (      ArithmeticException e) {
        assertFalse(isInBounds);
      }
    }
  }
}
Program: 60092
Project: 60092
Buggy source:
@GwtIncompatible static double roundIntermediate(double x,RoundingMode mode){
  if (!isFinite(x)) {
    throw new ArithmeticException("String_Node_Str");
  }
switch (mode) {
case UNNECESSARY:
    checkRoundingUnnecessary(isMathematicalInteger(x));
  return x;
case FLOOR:
if (x >= 0.0 || isMathematicalInteger(x)) {
  return x;
}
 else {
  return x - 1.0;
}
case CEILING:
if (x <= 0.0 || isMathematicalInteger(x)) {
return x;
}
 else {
return x + 1.0;
}
case DOWN:
return x;
case UP:
if (isMathematicalInteger(x)) {
return x;
}
 else {
return x + Math.copySign(1.0,x);
}
case HALF_EVEN:
return rint(x);
case HALF_UP:
{
double z=rint(x);
if (abs(x - z) == 0.5) {
return x + copySign(0.5,x);
}
 else {
return z;
}
}
case HALF_DOWN:
{
double z=rint(x);
if (abs(x - z) == 0.5) {
return x;
}
 else {
return z;
}
}
default :
throw new AssertionError();
}
}

Fixed version (ground truth):
@GwtIncompatible static double roundIntermediate(double x,RoundingMode mode){
  if (!isFinite(x)) {
    throw new ArithmeticException("String_Node_Str");
  }
switch (mode) {
case UNNECESSARY:
    checkRoundingUnnecessary(isMathematicalInteger(x));
  return x;
case FLOOR:
if (x >= 0.0 || isMathematicalInteger(x)) {
  return x;
}
 else {
  return (long)x - 1;
}
case CEILING:
if (x <= 0.0 || isMathematicalInteger(x)) {
return x;
}
 else {
return (long)x + 1;
}
case DOWN:
return x;
case UP:
if (isMathematicalInteger(x)) {
return x;
}
 else {
return (long)x + (x > 0 ? 1 : -1);
}
case HALF_EVEN:
return rint(x);
case HALF_UP:
{
double z=rint(x);
if (abs(x - z) == 0.5) {
return x + copySign(0.5,x);
}
 else {
return z;
}
}
case HALF_DOWN:
{
double z=rint(x);
if (abs(x - z) == 0.5) {
return x;
}
 else {
return z;
}
}
default :
throw new AssertionError();
}
}
Program: 60093
Project: 60093
Buggy source:
boolean isPermitted(RuntimeException exception){
  for (  Class<? extends RuntimeException> clazz : exceptionClasses) {
    if (Platform.checkIsInstance(clazz,exception)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
abstract boolean isPermitted(RuntimeException exception);
Program: 60094
Project: 60094
Buggy source:
private PermittedMetaException(Class<? extends RuntimeException> exceptionClass){
  this(Collections.singleton(exceptionClass));
}

Fixed version (ground truth):
private PermittedMetaException(String message){
  super(message);
}
Program: 60095
Project: 60095
Buggy source:
private static void assertFailure(IteratorTester<?> tester){
  try {
    tester.test();
    fail();
  }
 catch (  AssertionFailedError expected) {
  }
}

Fixed version (ground truth):
private static void assertFailure(IteratorTester<?> tester){
  try {
    tester.test();
  }
 catch (  AssertionFailedError expected) {
    return;
  }
  fail();
}
Program: 60096
Project: 60096
Buggy source:
@Override public void invalidate(Object key){
  key=checkNotNull(key);
  localCache.remove(key);
}

Fixed version (ground truth):
@Override public void invalidate(Object key){
  checkNotNull(key);
  localCache.remove(key);
}