nus-yam/ex-repair huggingface dataset:
Program: 82750
Project: 82750
Buggy source:
@Override public int hashCode(){
  final int hashCodeForTrue=1231;
  final int hashCodeForFalse=1237;
  return value ? hashCodeForTrue : hashCodeForFalse;
}

Fixed version (ground truth):
@Override public int hashCode(){
  return value ? 1231 : 1237;
}
Program: 82751
Project: 82751
Buggy source:
public int compareTo(Boolean other){
  if (!value) {
    return other.value ? -1 : 0;
  }
 else {
    return other.value ? 0 : 1;
  }
}

Fixed version (ground truth):
public int compareTo(Boolean other){
  return (this.value == other.value) ? 0 : (this.value ? 1 : -1);
}
Program: 82752
Project: 82752
Buggy source:
public Boolean(String s){
  this((s != null) && s.equalsIgnoreCase("String_Node_Str"));
}

Fixed version (ground truth):
public Boolean(String s){
  this(parseBoolean(s));
}
Program: 82753
Project: 82753
Buggy source:
@Override public <T>T[] toArray(T[] a){
  if (a.length < size) {
    a=Array.clonify(a,size);
  }
  for (int i=0; i < size; ++i) {
    a[i]=ArrayList.<T>getImpl(array,i);
  }
  if (a.length > size) {
    a[size]=null;
  }
  return a;
}

Fixed version (ground truth):
@Override public <T>T[] toArray(T[] out){
  if (out.length < size) {
    out=Array.clonify(out,size);
  }
  for (int i=0; i < size; ++i) {
    out[i]=ArrayList.<T>getImpl(array,i);
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}
Program: 82754
Project: 82754
Buggy source:
public static <T>List<T> asList(T... array){
  List<T> accum=new ArrayList<T>();
  for (int i=0; i < array.length; i++) {
    accum.add(array[i]);
  }
  return accum;
}

Fixed version (ground truth):
public static <T>List<T> asList(T... array){
  return new ArrayList<T>(array);
}
Program: 82755
Project: 82755
Buggy source:
/** 
 * Tests   {@link Arrays#asList(Object[])}.
 */
public void testAsList(){
  Object[] test={};
  List result=Arrays.asList(test);
  assertEquals(test,result);
  Object[] test2={new Integer(0),new Integer(1),new Integer(2)};
  List result2=Arrays.asList(test2);
  assertEquals(test2,result2);
  Object[] test3={"String_Node_Str"};
  List result3=Arrays.asList(test3);
  assertEquals(test3,result3);
}

Fixed version (ground truth):
/** 
 * Tests   {@link Arrays#asList(Object[])}.
 */
@SuppressWarnings("String_Node_Str") public void testAsList(){
  Object[] test={};
  List result=Arrays.asList(test);
  assertEquals(test,result);
  Object[] test2={0,1,2};
  List result2=Arrays.asList(test2);
  assertEquals(test2,result2);
  Object[] test3={"String_Node_Str"};
  List result3=Arrays.asList(test3);
  assertEquals(test3,result3);
}
Program: 82756
Project: 82756
Buggy source:
/** 
 * Test Arrays.binarySearch(Object[], Object, Comparator). <pre> Verify the following cases: empty array odd numbers of elements even numbers of elements not found value larger than all elements not found value smaller than all elements Comparator uses natural ordering as a default </pre>
 */
public void testBinarySearchObjectComparator(){
  Comparator inverseSort=new Comparator(){
    public int compare(    Object o1,    Object o2){
      return ((Comparable)o2).compareTo(o1);
    }
  }
;
  Object[] a1={};
  int ret=Arrays.binarySearch(a1,"String_Node_Str",inverseSort);
  assertEquals(-1,ret);
  Object[] a2={"String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a2,"String_Node_Str",inverseSort);
  assertEquals(-3,ret);
  ret=Arrays.binarySearch(a2,"String_Node_Str",inverseSort);
  assertEquals(2,ret);
  Object[] a3={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(-5,ret);
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(-1,ret);
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(0,ret);
  Object[] a4={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a4,"String_Node_Str",null);
  assertEquals(3,ret);
}

Fixed version (ground truth):
/** 
 * Test Arrays.binarySearch(Object[], Object, Comparator). <pre> Verify the following cases: empty array odd numbers of elements even numbers of elements not found value larger than all elements not found value smaller than all elements Comparator uses natural ordering as a default </pre>
 */
@SuppressWarnings("String_Node_Str") public void testBinarySearchObjectComparator(){
  Comparator inverseSort=new Comparator(){
    public int compare(    Object o1,    Object o2){
      return ((Comparable)o2).compareTo(o1);
    }
  }
;
  Object[] a1={};
  int ret=Arrays.binarySearch(a1,"String_Node_Str",inverseSort);
  assertEquals(-1,ret);
  Object[] a2={"String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a2,"String_Node_Str",inverseSort);
  assertEquals(-3,ret);
  ret=Arrays.binarySearch(a2,"String_Node_Str",inverseSort);
  assertEquals(2,ret);
  Object[] a3={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(-5,ret);
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(-1,ret);
  ret=Arrays.binarySearch(a3,"String_Node_Str",inverseSort);
  assertEquals(0,ret);
  Object[] a4={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  ret=Arrays.binarySearch(a4,"String_Node_Str",null);
  assertEquals(3,ret);
}
Program: 82757
Project: 82757
Buggy source:
/** 
 * Tests sorting a subrange of a primitive array.
 */
public void testPrimitiveSubrangeSort(){
  int[] x=new int[]{3,11,2,1,22,3};
  Arrays.sort(x,1,5);
  assertEquals(3,x[0]);
  assertEquals(1,x[1]);
  assertEquals(2,x[2]);
  assertEquals(11,x[3]);
  assertEquals(22,x[4]);
  assertEquals(3,x[5]);
}

Fixed version (ground truth):
/** 
 * Tests sorting a subrange of a primitive array.
 */
public void testPrimitiveSubrangeSort(){
  int[] x={3,11,2,1,22,3};
  Arrays.sort(x,1,5);
  assertEquals(3,x[0]);
  assertEquals(1,x[1]);
  assertEquals(2,x[2]);
  assertEquals(11,x[3]);
  assertEquals(22,x[4]);
  assertEquals(3,x[5]);
}
Program: 82758
Project: 82758
Buggy source:
/** 
 * Verifies that values are sorted numerically rather than as strings.
 */
public void testNumericSort(){
  Integer[] x=new Integer[]{new Integer(3),new Integer(11),new Integer(2),new Integer(1)};
  Arrays.sort(x);
  assertEquals(2,x[1].intValue());
  assertEquals(11,x[3].intValue());
}

Fixed version (ground truth):
/** 
 * Verifies that values are sorted numerically rather than as strings.
 */
public void testNumericSort(){
  Integer[] x={3,11,2,1};
  Arrays.sort(x);
  assertEquals(2,x[1].intValue());
  assertEquals(11,x[3].intValue());
}
Program: 82759
Project: 82759
Buggy source:
/** 
 * Tests sorting primitives.
 */
public void testPrimitiveSort(){
  int[] x=new int[]{3,11,2,1,22,3};
  Arrays.sort(x);
  assertEquals(1,x[0]);
  assertEquals(2,x[1]);
  assertEquals(3,x[2]);
  assertEquals(3,x[3]);
  assertEquals(11,x[4]);
  assertEquals(22,x[5]);
}

Fixed version (ground truth):
/** 
 * Tests sorting primitives.
 */
public void testPrimitiveSort(){
  int[] x={3,11,2,1,22,3};
  Arrays.sort(x);
  assertEquals(1,x[0]);
  assertEquals(2,x[1]);
  assertEquals(3,x[2]);
  assertEquals(3,x[3]);
  assertEquals(11,x[4]);
  assertEquals(22,x[5]);
}
Program: 82760
Project: 82760
Buggy source:
/** 
 * Tests   {@link Arrays#sort(Object[],Comparator)}.
 */
public void testSort(){
  Object[] x={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int hash=x[1].hashCode();
  Arrays.sort(x);
  int hash2=x[1].hashCode();
  assertEquals(hash,hash2);
  Object[] sorted={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertEquals(x,sorted);
  Comparator<Object> t=new Comparator<Object>(){
    public int compare(    Object o1,    Object o2){
      return ((Comparable<Object>)o2).compareTo(o1);
    }
  }
;
  Arrays.sort(x,t);
  int hash3=x[1].hashCode();
  assertEquals(hash,hash3);
  Object[] reverseSorted={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertEquals(x,reverseSorted);
}

Fixed version (ground truth):
/** 
 * Tests   {@link Arrays#sort(Object[],Comparator)}.
 */
public void testSort(){
  Object[] x={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  int hash=x[1].hashCode();
  Arrays.sort(x);
  int hash2=x[1].hashCode();
  assertEquals(hash,hash2);
  Object[] sorted={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertEquals(x,sorted);
  Comparator<Object> t=new Comparator<Object>(){
    @SuppressWarnings("String_Node_Str") public int compare(    Object o1,    Object o2){
      return ((Comparable<Object>)o2).compareTo(o1);
    }
  }
;
  Arrays.sort(x,t);
  int hash3=x[1].hashCode();
  assertEquals(hash,hash3);
  Object[] reverseSorted={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertEquals(x,reverseSorted);
}
Program: 82761
Project: 82761
Buggy source:
/** 
 * Tests simple use cases for   {@link Arrays#sort(Object[])}.
 */
public void testSimpleSort(){
  Object[] test={};
  Arrays.sort(test);
  assertEquals(test.length,0);
  Integer[] test2={new Integer(1)};
  Arrays.sort(test2);
  assertEquals(1,test2[0].intValue());
  Number[] test3={new Integer(3),new Integer(0),new Integer(2),new Integer(4),new Integer(1)};
  Arrays.sort(test3);
  for (int i=0; i < test3.length; i++) {
    assertEquals(i,test3[i].intValue());
  }
}

Fixed version (ground truth):
/** 
 * Tests simple use cases for   {@link Arrays#sort(Object[])}.
 */
public void testSimpleSort(){
  Object[] test={};
  Arrays.sort(test);
  assertEquals(test.length,0);
  Integer[] test2={1};
  Arrays.sort(test2);
  assertEquals(1,test2[0].intValue());
  Number[] test3={3,0,2,4,1};
  Arrays.sort(test3);
  for (int i=0; i < test3.length; i++) {
    assertEquals(i,test3[i].intValue());
  }
}
Program: 82762
Project: 82762
Buggy source:
protected final void rememberDecodedObject(Object o){
  seenArray.add(o);
}

Fixed version (ground truth):
protected final void rememberDecodedObject(int index,Object o){
  seenArray.set(index - 1,o);
}
Program: 82763
Project: 82763
Buggy source:
@Override protected Object deserialize(String typeSignature) throws SerializationException {
  Object instance=serializer.instantiate(this,typeSignature);
  rememberDecodedObject(instance);
  serializer.deserialize(this,instance,typeSignature);
  return instance;
}

Fixed version (ground truth):
@Override protected Object deserialize(String typeSignature) throws SerializationException {
  int id=reserveDecodedObjectIndex();
  Object instance=serializer.instantiate(this,typeSignature);
  rememberDecodedObject(id,instance);
  serializer.deserialize(this,instance,typeSignature);
  return instance;
}
Program: 82764
Project: 82764
Buggy source:
@Override protected Object deserialize(String typeSignature) throws SerializationException {
  Object instance=null;
  SerializedInstanceReference serializedInstRef=SerializabilityUtil.decodeSerializedInstanceReference(typeSignature);
  try {
    Class<?> instanceClass=Class.forName(serializedInstRef.getName(),false,classLoader);
    assert(serializationPolicy != null);
    serializationPolicy.validateDeserialize(instanceClass);
    validateTypeVersions(instanceClass,serializedInstRef);
    Class<?> customSerializer=SerializabilityUtil.hasCustomFieldSerializer(instanceClass);
    instance=instantiate(customSerializer,instanceClass);
    rememberDecodedObject(instance);
    Object replacement=deserializeImpl(customSerializer,instanceClass,instance);
    if (instance != replacement) {
      replaceRememberedObject(instance,replacement);
      instance=replacement;
    }
    return instance;
  }
 catch (  ClassNotFoundException e) {
    throw new SerializationException(e);
  }
catch (  InstantiationException e) {
    throw new SerializationException(e);
  }
catch (  IllegalAccessException e) {
    throw new SerializationException(e);
  }
catch (  IllegalArgumentException e) {
    throw new SerializationException(e);
  }
catch (  InvocationTargetException e) {
    throw new SerializationException(e);
  }
catch (  NoSuchMethodException e) {
    throw new SerializationException(e);
  }
}

Fixed version (ground truth):
@Override protected Object deserialize(String typeSignature) throws SerializationException {
  Object instance=null;
  SerializedInstanceReference serializedInstRef=SerializabilityUtil.decodeSerializedInstanceReference(typeSignature);
  try {
    Class<?> instanceClass=Class.forName(serializedInstRef.getName(),false,classLoader);
    assert(serializationPolicy != null);
    serializationPolicy.validateDeserialize(instanceClass);
    validateTypeVersions(instanceClass,serializedInstRef);
    Class<?> customSerializer=SerializabilityUtil.hasCustomFieldSerializer(instanceClass);
    int index=reserveDecodedObjectIndex();
    instance=instantiate(customSerializer,instanceClass);
    rememberDecodedObject(index,instance);
    Object replacement=deserializeImpl(customSerializer,instanceClass,instance);
    if (instance != replacement) {
      rememberDecodedObject(index,replacement);
      instance=replacement;
    }
    return instance;
  }
 catch (  ClassNotFoundException e) {
    throw new SerializationException(e);
  }
catch (  InstantiationException e) {
    throw new SerializationException(e);
  }
catch (  IllegalAccessException e) {
    throw new SerializationException(e);
  }
catch (  IllegalArgumentException e) {
    throw new SerializationException(e);
  }
catch (  InvocationTargetException e) {
    throw new SerializationException(e);
  }
catch (  NoSuchMethodException e) {
    throw new SerializationException(e);
  }
}
Program: 82765
Project: 82765
Buggy source:
public void onFailure(Throwable caught){
  fail("String_Node_Str");
}

Fixed version (ground truth):
public void onFailure(Throwable caught){
  fail("String_Node_Str" + caught);
}
Program: 82766
Project: 82766
Buggy source:
public void onSuccess(Object result){
  assertNotNull(result);
  assertTrue(CustomFieldSerializerTestSetValidator.isValid((SerializableSubclass)result));
  finishTest();
}

Fixed version (ground truth):
public void onSuccess(Object result){
  assertNotNull(result);
  assertTrue(CustomFieldSerializerTestSetValidator.isValid((ManuallySerializedImmutableClass[])result));
  finishTest();
}
Program: 82767
Project: 82767
Buggy source:
private void generateClassLiterals(JsVars vars){
  for (  JType type : classLits.keySet()) {
    JsName jsName=classLits.get(type);
    JsExpression classObjectAlloc=classObjects.get(jsName);
    JsVar var=new JsVar(jsName);
    var.setInitExpr(classObjectAlloc);
    vars.add(var);
  }
}

Fixed version (ground truth):
private void generateClassLiterals(JsVars vars){
  JClassType objType=program.getTypeJavaLangObject();
  if (classLits.containsKey(objType)) {
    generateClassLiteral(objType,vars);
  }
  for (  JType type : classLits.keySet()) {
    if (type != objType) {
      generateClassLiteral(type,vars);
    }
  }
}
Program: 82768
Project: 82768
Buggy source:
/** 
 * Adds the specified widget to the deck.
 * @param w the widget to be added
 */
@Override public void add(Widget w){
  Element container=DOM.createDiv();
  DOM.appendChild(getElement(),container);
  initChildWidget(w);
  initWidgetContainer(container);
  super.add(w,container);
}

Fixed version (ground truth):
/** 
 * Adds the specified widget to the deck.
 * @param w the widget to be added
 */
@Override public void add(Widget w){
  Element container=createWidgetContainer();
  DOM.appendChild(getElement(),container);
  super.add(w,container);
  finishWidgetInitialization(container,w);
}
Program: 82769
Project: 82769
Buggy source:
/** 
 * Inserts a widget before the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  Element container=DOM.createDiv();
  DOM.insertChild(getElement(),container,beforeIndex);
  initChildWidget(w);
  initWidgetContainer(container);
  super.insert(w,container,beforeIndex,true);
}

Fixed version (ground truth):
/** 
 * Inserts a widget before the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  Element container=createWidgetContainer();
  DOM.insertChild(getElement(),container,beforeIndex);
  super.insert(w,container,beforeIndex,true);
  finishWidgetInitialization(container,w);
}
Program: 82771
Project: 82771
Buggy source:
private boolean computeHasClinitRecursive(JReferenceType type,Set<JReferenceType> computed,Set<JReferenceType> alreadySeen){
  alreadySeen.add(type);
  if (computed.contains(type)) {
    return hasClinitSet.contains(type);
  }
  JMethod method=type.methods.get(0);
  assert(JProgram.isClinit(method));
  CheckClinitVisitor v=new CheckClinitVisitor();
  v.accept(method);
  if (v.hasNonClinitCalls()) {
    return true;
  }
  for (  JReferenceType target : v.getClinitTargets()) {
    if (alreadySeen.contains(target)) {
      continue;
    }
    if (computeHasClinitRecursive(target,computed,alreadySeen)) {
      return true;
    }
 else {
      continue;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean computeHasClinitRecursive(JReferenceType type,Set<JReferenceType> computed,Set<JReferenceType> alreadySeen){
  alreadySeen.add(type);
  if (computed.contains(type)) {
    return hasClinitSet.contains(type);
  }
  JMethod method=type.methods.get(0);
  assert(JProgram.isClinit(method));
  CheckClinitVisitor v=new CheckClinitVisitor();
  v.accept(method);
  if (v.hasLiveCode()) {
    return true;
  }
  for (  JReferenceType target : v.getClinitTargets()) {
    if (alreadySeen.contains(target)) {
      continue;
    }
    if (computeHasClinitRecursive(target,computed,alreadySeen)) {
      return true;
    }
 else {
      continue;
    }
  }
  return false;
}
Program: 82772
Project: 82772
Buggy source:
@Override public boolean visit(JMultiExpression x,Context ctx){
  for (  JExpression expr : x.exprs) {
    if (canContainClinitCalls(expr)) {
      accept(expr);
    }
 else {
      hasNonClinitCalls=true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean visit(JMultiExpression x,Context ctx){
  for (  JExpression expr : x.exprs) {
    if (mightBeDeadCode(expr)) {
      accept(expr);
    }
 else {
      hasLiveCode=true;
    }
  }
  return false;
}
Program: 82773
Project: 82773
Buggy source:
public <T>T[] toArray(T[] a){
  int size=size();
  if (a.length < size) {
    a=Array.clonify(a,size);
  }
  Object[] result=a;
  Iterator<E> it=iterator();
  for (int i=0; i < size; ++i) {
    result[i]=it.next();
  }
  if (a.length > size) {
    a[size]=null;
  }
  return a;
}

Fixed version (ground truth):
public <T>T[] toArray(T[] a){
  int size=size();
  if (a.length < size) {
    a=Array.createFrom(a,size);
  }
  Object[] result=a;
  Iterator<E> it=iterator();
  for (int i=0; i < size; ++i) {
    result[i]=it.next();
  }
  if (a.length > size) {
    a[size]=null;
  }
  return a;
}
Program: 82774
Project: 82774
Buggy source:
@Override public <T>T[] toArray(T[] out){
  if (out.length < size) {
    out=Array.clonify(out,size);
  }
  for (int i=0; i < size; ++i) {
    out[i]=ArrayList.<T>getImpl(array,i);
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}

Fixed version (ground truth):
@Override public <T>T[] toArray(T[] out){
  if (out.length < size) {
    out=Array.createFrom(out,size);
  }
  for (int i=0; i < size; ++i) {
    out[i]=ArrayList.<T>getImpl(array,i);
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}
Program: 82775
Project: 82775
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T>T[] toArray(T[] out){
  int size=size();
  if (out.length < size) {
    out=Array.clonify(out,size);
  }
  for (int i=0; i < size; ++i) {
    out[i]=(T)array[i];
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T>T[] toArray(T[] out){
  int size=size();
  if (out.length < size) {
    out=Array.createFrom(out,size);
  }
  for (int i=0; i < size; ++i) {
    out[i]=(T)array[i];
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}
Program: 82776
Project: 82776
Buggy source:
public Entry<K,V> next(){
  key=it.next();
  return new MapEntryImpl<K,V>(key,values.get(key.ordinal()));
}

Fixed version (ground truth):
public Entry<K,V> next(){
  key=it.next();
  return new MapEntry(key);
}
Program: 82777
Project: 82777
Buggy source:
/** 
 * Returns <code>key</code> as <code>K</code>. Doesn't actually perform any runtime checks. Should only be called when you are sure <code>key</code> is of type <code>K</code>.
 */
@SuppressWarnings("String_Node_Str") private K asKey(Object key){
  return (K)key;
}

Fixed version (ground truth):
/** 
 * Returns <code>key</code> as <code>K</code>. Only runtime checks that key is an Enum, not that it's the particular Enum K. Should only be called when you are sure <code>key</code> is of type <code>K</code>.
 */
@SuppressWarnings("String_Node_Str") private K asKey(Object key){
  return (K)key;
}
Program: 82778
Project: 82778
Buggy source:
private void init(EnumMap<K,? extends V> m){
  allEnums=m.allEnums;
  keySet=m.keySet.clone();
  values=new ArrayList<V>(m.values);
}

Fixed version (ground truth):
private void init(EnumMap<K,? extends V> m){
  keySet=m.keySet.clone();
  values=Array.clone(m.values);
}
Program: 82779
Project: 82779
Buggy source:
@Override public void clear(){
  keySet.clear();
  Collections.fill(values,null);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void clear(){
  keySet.clear();
  values=(V[])new Object[values.length];
}
Program: 82780
Project: 82780
Buggy source:
@Override public V remove(Object key){
  return keySet.remove(key) ? values.set(asKey(key).ordinal(),null) : null;
}

Fixed version (ground truth):
@Override public V remove(Object key){
  return keySet.remove(key) ? set(asOrdinal(key),null) : null;
}
Program: 82781
Project: 82781
Buggy source:
@Override public boolean containsValue(Object value){
  if (value != null) {
    return values.contains(value);
  }
  for (int i=0, n=values.size(); i < n; ++i) {
    V v=values.get(i);
    if (v == null && keySet.contains(allEnums[i])) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean containsValue(Object value){
  for (  K key : keySet) {
    if (Utility.equalsWithNullCheck(value,values[key.ordinal()])) {
      return true;
    }
  }
  return false;
}
Program: 82782
Project: 82782
Buggy source:
@Override public V put(K key,V value){
  keySet.add(key);
  return values.set(key.ordinal(),value);
}

Fixed version (ground truth):
@Override public V put(K key,V value){
  keySet.add(key);
  return set(key.ordinal(),value);
}
Program: 82783
Project: 82783
Buggy source:
public Iterator<Map.Entry<K,V>> iterator(){
  return new Iterator<Entry<K,V>>(){
    Iterator<K> it=keySet.iterator();
    K key;
    public boolean hasNext(){
      return it.hasNext();
    }
    public Entry<K,V> next(){
      key=it.next();
      return new MapEntryImpl<K,V>(key,values.get(key.ordinal()));
    }
    public void remove(){
      if (key == null) {
        throw new IllegalStateException("String_Node_Str");
      }
      EnumMap.this.remove(key);
      key=null;
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Entry<K,V>> iterator(){
  return new EntrySetIterator();
}
Program: 82784
Project: 82784
Buggy source:
@Override public V get(Object k){
  return keySet.contains(k) ? values.get(asKey(k).ordinal()) : null;
}

Fixed version (ground truth):
@Override public V get(Object k){
  return keySet.contains(k) ? values[asOrdinal(k)] : null;
}
Program: 82785
Project: 82785
Buggy source:
private static native void addAllStringEntries(JavaScriptObject stringMap,Collection<?> dest);

Fixed version (ground truth):
private native void addAllStringEntries(Collection<?> dest);
Program: 82786
Project: 82786
Buggy source:
private static native void addAllHashEntries(JavaScriptObject hashCodeMap,Collection<?> dest);

Fixed version (ground truth):
private native void addAllHashEntries(Collection<?> dest);
Program: 82787
Project: 82787
Buggy source:
/** 
 * Constructor for <code>EntrySetIterator</code>.
 */
public EntrySetIterator(){
  List<Map.Entry<K,V>> list=new ArrayList<Map.Entry<K,V>>();
  if (nullSlotLive) {
    MapEntryImpl<K,V> entryImpl=new MapEntryImpl<K,V>(null,nullSlot);
    list.add(entryImpl);
  }
  addAllStringEntries(stringMap,list);
  addAllHashEntries(hashCodeMap,list);
  this.iter=list.iterator();
}

Fixed version (ground truth):
/** 
 * Constructor for <code>EntrySetIterator</code>.
 */
public EntrySetIterator(){
  List<Map.Entry<K,V>> list=new ArrayList<Map.Entry<K,V>>();
  if (nullSlotLive) {
    list.add(new MapEntryNull());
  }
  addAllStringEntries(list);
  addAllHashEntries(list);
  this.iter=list.iterator();
}
Program: 82788
Project: 82788
Buggy source:
/** 
 * Ensure a number is displayed with two digits.
 * @return A two-character representation of the number.
 */
@SuppressWarnings("String_Node_Str") private static String padTwo(int number){
  if (number < 10) {
    return "String_Node_Str" + number;
  }
 else {
    return String.valueOf(number);
  }
}

Fixed version (ground truth):
/** 
 * Ensure a number is displayed with two digits.
 * @return a two-character base 10 representation of the number
 */
protected static String padTwo(int number){
  if (number < 10) {
    return "String_Node_Str" + number;
  }
 else {
    return String.valueOf(number);
  }
}
Program: 82789
Project: 82789
Buggy source:
/** 
 * Evaluates a trusted JSON string and returns its JSONValue representation. CAUTION! For efficiency, this method is implemented using the JavaScript <code>eval()</code> function, which can execute arbitrary script. DO NOT pass an untrusted string into this method.
 * @param jsonString a JSON object to parse
 * @return a JSONValue that has been built by parsing the JSON string
 * @throws NullPointerException if <code>jsonString</code> is<code>null</code>
 * @throws IllegalArgumentException if <code>jsonString</code> is empty
 */
public static JSONValue parse(String jsonString){
  if (jsonString == null) {
    throw new NullPointerException();
  }
  if (jsonString == "String_Node_Str") {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    return evaluate(jsonString);
  }
 catch (  JavaScriptException ex) {
    throw new JSONException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Evaluates a trusted JSON string and returns its JSONValue representation. CAUTION! For efficiency, this method is implemented using the JavaScript <code>eval()</code> function, which can execute arbitrary script. DO NOT pass an untrusted string into this method.
 * @param jsonString a JSON object to parse
 * @return a JSONValue that has been built by parsing the JSON string
 * @throws NullPointerException if <code>jsonString</code> is<code>null</code>
 * @throws IllegalArgumentException if <code>jsonString</code> is empty
 */
public static JSONValue parse(String jsonString){
  if (jsonString == null) {
    throw new NullPointerException();
  }
  if (jsonString.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    return evaluate(jsonString);
  }
 catch (  JavaScriptException ex) {
    throw new JSONException(ex);
  }
}
Program: 82791
Project: 82791
Buggy source:
/** 
 * Open the specified   {@link TreeItem}.
 * @param item the {@link TreeItem} to open
 * @param animate true to animate, false to open instantly
 */
public void setItemState(TreeItem item,boolean animate){
  cancel();
  curItem=item;
  opening=item.open;
  if (animate) {
    run(350);
  }
 else {
    onInstantaneousRun();
  }
}

Fixed version (ground truth):
/** 
 * Open the specified   {@link TreeItem}.
 * @param item the {@link TreeItem} to open
 * @param animate true to animate, false to open instantly
 */
public void setItemState(TreeItem item,boolean animate){
  cancel();
  curItem=item;
  opening=item.open;
  if (animate) {
    run(Math.min(200,75 * curItem.getChildCount()));
  }
 else {
    onInstantaneousRun();
  }
}
Program: 82792
Project: 82792
Buggy source:
@Override public void onStart(){
  onUpdate(0.0);
  if (opening) {
    UIObject.setVisible(curItem.childSpanElem,true);
  }
}

Fixed version (ground truth):
@Override public void onStart(){
  DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str","String_Node_Str");
  onUpdate(0.0);
  if (opening) {
    UIObject.setVisible(curItem.childSpanElem,true);
  }
}
Program: 82793
Project: 82793
Buggy source:
@Override public void onComplete(){
  if (curItem != null) {
    if (opening) {
      UIObject.setVisible(curItem.childSpanElem,true);
      onUpdate(1.0);
      DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str","String_Node_Str");
    }
 else {
      UIObject.setVisible(curItem.childSpanElem,false);
    }
    curItem=null;
  }
}

Fixed version (ground truth):
@Override public void onComplete(){
  if (curItem != null) {
    if (opening) {
      UIObject.setVisible(curItem.childSpanElem,true);
      onUpdate(1.0);
      DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str","String_Node_Str");
    }
 else {
      UIObject.setVisible(curItem.childSpanElem,false);
    }
    DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str","String_Node_Str");
    DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str","String_Node_Str");
    curItem=null;
  }
}
Program: 82794
Project: 82794
Buggy source:
@Override public void onUpdate(double progress){
  int scrollHeight=DOM.getElementPropertyInt(curItem.childSpanElem,"String_Node_Str");
  int height=(int)(progress * scrollHeight);
  if (!opening) {
    height=scrollHeight - height;
  }
  DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str",height + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onUpdate(double progress){
  int scrollHeight=DOM.getElementPropertyInt(curItem.childSpanElem,"String_Node_Str");
  int height=(int)(progress * scrollHeight);
  if (!opening) {
    height=scrollHeight - height;
  }
  DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str",height + "String_Node_Str");
  int scrollWidth=DOM.getElementPropertyInt(curItem.childSpanElem,"String_Node_Str");
  DOM.setStyleAttribute(curItem.childSpanElem,"String_Node_Str",scrollWidth + "String_Node_Str");
}
Program: 82795
Project: 82795
Buggy source:
@Override protected void onTypeRef(SourceTypeBinding referencedType,CompilationUnitDeclaration unitOfReferrer){
  String referencedFn=String.valueOf(referencedType.getFileName());
  CompilationUnitDeclaration referencedCud=cudsByFileName.get(referencedFn);
  if (referencedCud == null) {
    String referrerFn=String.valueOf(unitOfReferrer.getFileName());
    if (cudsByFileName.containsKey(referrerFn) && !pendingRemovals.contains(referrerFn)) {
      TreeLogger branch=logger.branch(TreeLogger.TRACE,"String_Node_Str" + referrerFn + "String_Node_Str",null);
      final String badTypeName=CharOperation.toString(referencedType.compoundName);
      branch.branch(TreeLogger.TRACE,"String_Node_Str" + badTypeName,null);
      pendingRemovals.add(referrerFn);
    }
  }
}

Fixed version (ground truth):
@Override protected void onTypeRef(SourceTypeBinding referencedType,CompilationUnitDeclaration unitOfReferrer){
  String referencedFn=String.valueOf(referencedType.getFileName());
  if (!unchangedCudsByFileName.containsKey(referencedFn) && !changedCudsByFileName.containsKey(referencedFn)) {
    String referrerFn=String.valueOf(unitOfReferrer.getFileName());
    if (changedCudsByFileName.containsKey(referrerFn) && !pendingRemovals.contains(referrerFn)) {
      TreeLogger branch=logger.branch(TreeLogger.TRACE,"String_Node_Str" + referrerFn + "String_Node_Str",null);
      final String badTypeName=CharOperation.toString(referencedType.compoundName);
      branch.branch(TreeLogger.TRACE,"String_Node_Str" + badTypeName,null);
      pendingRemovals.add(referrerFn);
    }
  }
}
Program: 82796
Project: 82796
Buggy source:
private static void removeUnitsWithErrors(TreeLogger logger,Map<String,CompilationUnitDeclaration> cudsByFileName){
  boolean anyRemoved=false;
  for (Iterator<CompilationUnitDeclaration> iter=cudsByFileName.values().iterator(); iter.hasNext(); ) {
    CompilationUnitDeclaration cud=iter.next();
    CompilationResult result=cud.compilationResult;
    IProblem[] errors=result.getErrors();
    if (errors != null && errors.length > 0) {
      anyRemoved=true;
      iter.remove();
      String fileName=CharOperation.charToString(cud.getFileName());
      char[] source=cud.compilationResult.compilationUnit.getContents();
      Util.maybeDumpSource(logger,fileName,source,String.valueOf(cud.getMainTypeName()));
      logger.log(TreeLogger.TRACE,"String_Node_Str" + fileName + "String_Node_Str",null);
    }
  }
  if (anyRemoved) {
    removeInfectedUnits(logger,cudsByFileName);
  }
}

Fixed version (ground truth):
private static void removeUnitsWithErrors(TreeLogger logger,Map<String,CompilationUnitDeclaration> changedCudsByFileName,Map<String,CompilationUnitDeclaration> unchangedCudsByFileName){
  boolean anyRemoved=false;
  for (Iterator<CompilationUnitDeclaration> iter=changedCudsByFileName.values().iterator(); iter.hasNext(); ) {
    CompilationUnitDeclaration cud=iter.next();
    CompilationResult result=cud.compilationResult;
    IProblem[] errors=result.getErrors();
    if (errors != null && errors.length > 0) {
      anyRemoved=true;
      iter.remove();
      String fileName=CharOperation.charToString(cud.getFileName());
      char[] source=cud.compilationResult.compilationUnit.getContents();
      Util.maybeDumpSource(logger,fileName,source,String.valueOf(cud.getMainTypeName()));
      logger.log(TreeLogger.TRACE,"String_Node_Str" + fileName + "String_Node_Str",null);
    }
  }
  if (anyRemoved) {
    removeInfectedUnits(logger,changedCudsByFileName,unchangedCudsByFileName);
  }
}
Program: 82799
Project: 82799
Buggy source:
public String getLocation(){
  return "String_Node_Str" + this.packageName + "String_Node_Str"+ this.typeNames[0];
}

Fixed version (ground truth):
public String getLocation(){
  return "String_Node_Str" + cup.getLocation();
}
Program: 82800
Project: 82800
Buggy source:
public long getLastModified() throws UnableToCompleteException {
  return 0;
}

Fixed version (ground truth):
public long getLastModified() throws UnableToCompleteException {
  return cup.getLastModified();
}
Program: 82801
Project: 82801
Buggy source:
public char[] getSource(){
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString().toCharArray();
}

Fixed version (ground truth):
@Override public char[] getSource(){
  StringBuffer sb=new StringBuffer();
  if (!goBad) {
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    goBad=true;
  }
 else {
    sb.append("String_Node_Str");
  }
  return sb.toString().toCharArray();
}
Program: 82802
Project: 82802
Buggy source:
public String getMainTypeName(){
  return typeNames[0];
}

Fixed version (ground truth):
public String getMainTypeName(){
  return cup.getMainTypeName();
}
Program: 82803
Project: 82803
Buggy source:
public String getPackageName(){
  return packageName;
}

Fixed version (ground truth):
public String getPackageName(){
  return cup.getPackageName();
}
Program: 82804
Project: 82804
Buggy source:
public boolean isTransient(){
  return true;
}

Fixed version (ground truth):
public boolean isTransient(){
  return false;
}
Program: 82805
Project: 82805
Buggy source:
public boolean execImpl(){
  StaticEvalVisitor evalVisitor=new StaticEvalVisitor();
  evalVisitor.accept(program);
  return evalVisitor.didChange();
}

Fixed version (ground truth):
public boolean execImpl(){
  EvalFunctionsAtTopScope fev=new EvalFunctionsAtTopScope();
  fev.accept(program);
  StaticEvalVisitor sev=new StaticEvalVisitor();
  sev.accept(program);
  return fev.didChange() || sev.didChange();
}
Program: 82806
Project: 82806
Buggy source:
/** 
 * Prune while (false) statements.
 */
@Override public void endVisit(JsWhile x,JsContext<JsStatement> ctx){
  JsExpression expr=x.getCondition();
  if (expr instanceof CanBooleanEval) {
    CanBooleanEval cond=(CanBooleanEval)expr;
    if (cond.isBooleanFalse()) {
      ctx.replaceMe(expr.makeStmt());
    }
  }
}

Fixed version (ground truth):
/** 
 * Prune while (false) statements.
 */
@Override public void endVisit(JsWhile x,JsContext<JsStatement> ctx){
  JsExpression expr=x.getCondition();
  if (expr instanceof CanBooleanEval) {
    CanBooleanEval cond=(CanBooleanEval)expr;
    if (cond.isBooleanFalse()) {
      JsBlock block=new JsBlock();
      block.getStatements().add(expr.makeStmt());
      JsStatement decls=ensureDeclarations(x.getBody());
      if (decls != null) {
        block.getStatements().add(decls);
      }
      ctx.replaceMe(accept(block));
    }
  }
}
Program: 82807
Project: 82807
Buggy source:
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(AnnotationsTest.class);
  suite.addTestSuite(AutoboxTest.class);
  suite.addTestSuite(BlankInterfaceTest.class);
  suite.addTestSuite(ClassCastTest.class);
  suite.addTestSuite(ClassObjectTest.class);
  suite.addTestSuite(CompilerTest.class);
  suite.addTestSuite(CoverageTest.class);
  suite.addTestSuite(EnhancedForLoopTest.class);
  suite.addTestSuite(EnumsTest.class);
  suite.addTestSuite(HostedTest.class);
  suite.addTestSuite(InnerClassTest.class);
  suite.addTestSuite(InnerOuterSuperTest.class);
  suite.addTestSuite(JsniConstructorTest.class);
  suite.addTestSuite(JsoTest.class);
  suite.addTestSuite(MemberShadowingTest.class);
  suite.addTestSuite(MethodBindTest.class);
  suite.addTestSuite(MethodCallTest.class);
  suite.addTestSuite(MethodInterfaceTest.class);
  suite.addTestSuite(MiscellaneousTest.class);
  suite.addTestSuite(NativeLongTest.class);
  suite.addTestSuite(VarargsTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(AnnotationsTest.class);
  suite.addTestSuite(AutoboxTest.class);
  suite.addTestSuite(BlankInterfaceTest.class);
  suite.addTestSuite(ClassCastTest.class);
  suite.addTestSuite(ClassObjectTest.class);
  suite.addTestSuite(CompilerTest.class);
  suite.addTestSuite(CoverageTest.class);
  suite.addTestSuite(EnhancedForLoopTest.class);
  suite.addTestSuite(EnumsTest.class);
  suite.addTestSuite(HostedTest.class);
  suite.addTestSuite(InnerClassTest.class);
  suite.addTestSuite(InnerOuterSuperTest.class);
  suite.addTestSuite(JsniConstructorTest.class);
  suite.addTestSuite(JsoTest.class);
  suite.addTestSuite(JsStaticEvalTest.class);
  suite.addTestSuite(MemberShadowingTest.class);
  suite.addTestSuite(MethodBindTest.class);
  suite.addTestSuite(MethodCallTest.class);
  suite.addTestSuite(MethodInterfaceTest.class);
  suite.addTestSuite(MiscellaneousTest.class);
  suite.addTestSuite(NativeLongTest.class);
  suite.addTestSuite(VarargsTest.class);
  return suite;
}
Program: 82808
Project: 82808
Buggy source:
public float invokeNativeFloat(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Float value=JsValueGlue.get(result,null,Float.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.floatValue();
}

Fixed version (ground truth):
public float invokeNativeFloat(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Float value=JsValueGlue.get(result,null,Float.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.floatValue();
}
Program: 82809
Project: 82809
Buggy source:
public short invokeNativeShort(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Short value=JsValueGlue.get(result,null,Short.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.shortValue();
}

Fixed version (ground truth):
public short invokeNativeShort(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Short value=JsValueGlue.get(result,null,Short.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.shortValue();
}
Program: 82810
Project: 82810
Buggy source:
public char invokeNativeChar(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Character value=JsValueGlue.get(result,null,Character.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.charValue();
}

Fixed version (ground truth):
public char invokeNativeChar(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Character value=JsValueGlue.get(result,null,Character.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.charValue();
}
Program: 82811
Project: 82811
Buggy source:
public double invokeNativeDouble(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Double value=JsValueGlue.get(result,null,Double.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.doubleValue();
}

Fixed version (ground truth):
public double invokeNativeDouble(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Double value=JsValueGlue.get(result,null,Double.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.doubleValue();
}
Program: 82812
Project: 82812
Buggy source:
public int invokeNativeInt(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Integer value=JsValueGlue.get(result,null,Integer.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.intValue();
}

Fixed version (ground truth):
public int invokeNativeInt(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Integer value=JsValueGlue.get(result,null,Integer.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.intValue();
}
Program: 82813
Project: 82813
Buggy source:
public byte invokeNativeByte(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Byte value=JsValueGlue.get(result,null,Byte.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.byteValue();
}

Fixed version (ground truth):
public byte invokeNativeByte(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Byte value=JsValueGlue.get(result,null,Byte.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.byteValue();
}
Program: 82814
Project: 82814
Buggy source:
public Object invokeNativeObject(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  return JsValueGlue.get(result,getIsolatedClassLoader(),Object.class,"String_Node_Str" + name + "String_Node_Str");
}

Fixed version (ground truth):
public Object invokeNativeObject(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  return JsValueGlue.get(result,getIsolatedClassLoader(),Object.class,msgPrefix);
}
Program: 82815
Project: 82815
Buggy source:
public boolean invokeNativeBoolean(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Boolean value=JsValueGlue.get(result,getIsolatedClassLoader(),boolean.class,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.booleanValue();
}

Fixed version (ground truth):
public boolean invokeNativeBoolean(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Boolean value=JsValueGlue.get(result,getIsolatedClassLoader(),boolean.class,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.booleanValue();
}
Program: 82816
Project: 82816
Buggy source:
public long invokeNativeLong(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Long value=JsValueGlue.get(result,null,Long.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.longValue();
}

Fixed version (ground truth):
public long invokeNativeLong(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Long value=JsValueGlue.get(result,null,Long.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.longValue();
}
Program: 82817
Project: 82817
Buggy source:
/** 
 * Assert that the given   {@link Element} is compatible with this class andautomatically typecast it.
 */
public static HeadElement as(Element elem){
}

Fixed version (ground truth):
/** 
 * Assert that the given   {@link Element} is compatible with this class andautomatically typecast it.
 */
public static LinkElement as(Element elem){
}
Program: 82818
Project: 82818
Buggy source:
private native void sinkEventsImpl(Element elem,int bits);

Fixed version (ground truth):
protected native void sinkEventsImpl(Element elem,int bits);