nus-yam/ex-repair huggingface dataset:
Program: 53372
Project: 53372
Buggy source:
public void testFileUpload(){
  new TestFileUpload();
  if (!GWT.isScript()) {
    try {
      new BrokenFileUpload();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testFileUpload(){
  new TestFileUpload();
  if (!GWT.isScript()) {
    try {
      new BrokenFileUpload();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53373
Project: 53373
Buggy source:
public void testPasswordTextBox(){
  new TestPasswordTextBox();
  if (!GWT.isScript()) {
    try {
      new BrokenPasswordTextBox();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testPasswordTextBox(){
  new TestPasswordTextBox();
  if (!GWT.isScript()) {
    try {
      new BrokenPasswordTextBox();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53374
Project: 53374
Buggy source:
public void testButton(){
  new TestButton();
  if (!GWT.isScript()) {
    try {
      new BrokenButton();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testButton(){
  new TestButton();
  if (!GWT.isScript()) {
    try {
      new BrokenButton();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53375
Project: 53375
Buggy source:
public void testTextBox(){
  new TestTextBox();
  if (!GWT.isScript()) {
    try {
      new BrokenTextBox();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testTextBox(){
  new TestTextBox();
  if (!GWT.isScript()) {
    try {
      new BrokenTextBox();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53376
Project: 53376
Buggy source:
public void testSimpleCheckBox(){
  new TestSimpleCheckBox();
  if (!GWT.isScript()) {
    try {
      new BrokenSimpleCheckBox();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testSimpleCheckBox(){
  new TestSimpleCheckBox();
  if (!GWT.isScript()) {
    try {
      new BrokenSimpleCheckBox();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53377
Project: 53377
Buggy source:
public void testAssertThrowsNpe(){
  final SimpleEventBus eventBus=new SimpleEventBus();
  try {
    assertThrowsNpe(new Command(){
      @Override public void execute(){
        FooEvent.register(eventBus,fooHandler1);
      }
    }
);
    fail("String_Node_Str");
  }
 catch (  AssertionFailedError e) {
  }
}

Fixed version (ground truth):
public void testAssertThrowsNpe(){
  final SimpleEventBus eventBus=new SimpleEventBus();
  try {
    assertThrowsNpe(new Command(){
      @Override public void execute(){
        FooEvent.register(eventBus,fooHandler1);
      }
    }
);
    throw new Error("String_Node_Str");
  }
 catch (  AssertionFailedError e) {
  }
}
Program: 53378
Project: 53378
Buggy source:
public static long highestOneBit(long i){
  int high=(int)(i >> 32);
  if (high != 0) {
    return ((long)Integer.highestOneBit(high)) << 32;
  }
 else {
    return Integer.highestOneBit((int)i);
  }
}

Fixed version (ground truth):
public static long highestOneBit(long i){
  int high=(int)(i >> 32);
  if (high != 0) {
    return ((long)Integer.highestOneBit(high)) << 32;
  }
 else {
    return Integer.highestOneBit((int)i) & 0xFFFFFFFFL;
  }
}
Program: 53379
Project: 53379
Buggy source:
public void testHighestOneBit(){
  assertEquals(0,Long.highestOneBit(0));
  assertEquals(Long.MIN_VALUE,Long.highestOneBit(-1));
  assertEquals(Long.MIN_VALUE,Long.highestOneBit(-256));
  assertEquals(1,Long.highestOneBit(1));
  assertEquals(0x80,Long.highestOneBit(0x88));
  assertEquals(0x4000000000000000L,Long.highestOneBit(Long.MAX_VALUE));
}

Fixed version (ground truth):
public void testHighestOneBit(){
  assertEquals(0,Long.highestOneBit(0));
  assertEquals(Long.MIN_VALUE,Long.highestOneBit(-1));
  assertEquals(Long.MIN_VALUE,Long.highestOneBit(-256));
  assertEquals(1,Long.highestOneBit(1));
  assertEquals(0x80,Long.highestOneBit(0x88));
  assertEquals(1L << 31,Long.highestOneBit(1L << 31));
  assertEquals(0x4000000000000000L,Long.highestOneBit(Long.MAX_VALUE));
}
Program: 53380
Project: 53380
Buggy source:
@Override public boolean canBeImplementedExternally(){
  return getLeafType().canBeImplementedExternally();
}

Fixed version (ground truth):
@Override public boolean canBeImplementedExternally(){
  return getLeafType().canBeImplementedExternally() || isJavaScriptObject(getElementType());
}
Program: 53382
Project: 53382
Buggy source:
/** 
 * Returns an instantiation expression for   {@code type} using the default constructor,Returns  {@code null} if {@code type} does not have a default constructor.
 */
public static JExpression createDefaultConstructorInstantiation(SourceInfo info,JClassType type){
  JConstructor noArgCtor=(JConstructor)FluentIterable.from(type.getMethods()).firstMatch(new Predicate<JMethod>(){
    @Override public boolean apply(    JMethod method){
      return method instanceof JConstructor && method.getOriginalParamTypes().size() == 0;
    }
  }
).get();
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor);
}

Fixed version (ground truth):
/** 
 * Returns an instantiation expression for   {@code type} using the default constructor,Returns  {@code null} if {@code type} does not have a default constructor.
 */
public static JExpression createDefaultConstructorInstantiation(SourceInfo info,JClassType type){
  JConstructor noArgCtor=(JConstructor)FluentIterable.from(type.getMethods()).firstMatch(new Predicate<JMethod>(){
    @Override public boolean apply(    JMethod method){
      return method instanceof JConstructor && method.getOriginalParamTypes().size() == 0;
    }
  }
).orNull();
  if (noArgCtor == null) {
    return null;
  }
  return new JNewInstance(info,noArgCtor);
}
Program: 53384
Project: 53384
Buggy source:
@Override public int compareTo(LogEntry that){
  return ComparisonChain.start().compare(this.msg,that.msg,AbstractTreeLogger.LOG_LINE_COMPARATOR).compare(this.type,that.type).result();
}

Fixed version (ground truth):
@Override public int compareTo(LogEntry that){
  return ComparisonChain.start().compare(this.getMessageOrPattern(),that.getMessageOrPattern(),AbstractTreeLogger.LOG_LINE_COMPARATOR).compare(this.type,that.type).result();
}
Program: 53385
Project: 53385
Buggy source:
/** 
 * True if the type can be casted across different Java types that are unrelated.
 */
private boolean canCrossCastLikeJso(JType type){
  if (legacyJsInterop) {
    return canBeJavaScriptObject(type) || isNativeJsType(type) || isNonNativeJsTypeInterface(type);
  }
  return canBeJavaScriptObject(type) || type.isJsNative();
}

Fixed version (ground truth):
/** 
 * True if the type can be casted across different Java types that are unrelated.
 */
private boolean canCrossCastLikeJso(JType type){
  if (legacyJsInterop) {
    return canBeJavaScriptObject(type) || isNativeJsTypeClass(type) || isNonNativeJsTypeInterface(type);
  }
  return canBeJavaScriptObject(type);
}
Program: 53387
Project: 53387
Buggy source:
public void testCast_crossCastJavaInstance(){
  Object o=alwaysTrue() ? new MyJsFunctionInterfaceImpl() : new Object();
  assertEquals(11,((MyOtherJsFunctionInterface)o).bar(10));
  assertSame((MyJsFunctionInterface)o,(MyOtherJsFunctionInterface)o);
}

Fixed version (ground truth):
public void testCast_crossCastJavaInstance(){
  Object o=new MyJsFunctionInterfaceImpl();
  assertEquals(11,((MyOtherJsFunctionInterface)o).bar(10));
  assertSame((MyJsFunctionInterface)o,(MyOtherJsFunctionInterface)o);
}
Program: 53388
Project: 53388
Buggy source:
public void testInstanceOf_javaInstance(){
  Object object=alwaysTrue() ? new MyJsFunctionInterfaceImpl() : new Object();
  assertTrue(object instanceof MyJsFunctionInterface);
  assertTrue(object instanceof MyJsFunctionInterfaceImpl);
  assertTrue(object instanceof MyJsFunctionIdentityInterface);
  assertTrue(object instanceof MyJsFunctionWithOnlyInstanceofReference);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
}

Fixed version (ground truth):
public void testInstanceOf_javaInstance(){
  Object object=new MyJsFunctionInterfaceImpl();
  assertTrue(object instanceof MyJsFunctionInterface);
  assertTrue(object instanceof MyJsFunctionInterfaceImpl);
  assertTrue(object instanceof MyJsFunctionIdentityInterface);
  assertTrue(object instanceof MyJsFunctionWithOnlyInstanceofReference);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
}
Program: 53389
Project: 53389
Buggy source:
public void testCast_inJava(){
  Object object=alwaysTrue() ? new MyJsFunctionInterfaceImpl() : new Object();
  MyJsFunctionInterface c1=(MyJsFunctionInterface)object;
  assertNotNull(c1);
  MyJsFunctionInterfaceImpl c2=(MyJsFunctionInterfaceImpl)c1;
  assertEquals(10,c2.publicField);
  MyJsFunctionInterfaceImpl c3=(MyJsFunctionInterfaceImpl)object;
  assertNotNull(c3);
  MyJsFunctionIdentityInterface c4=(MyJsFunctionIdentityInterface)object;
  assertNotNull(c4);
  ElementLikeNativeInterface c5=(ElementLikeNativeInterface)object;
  assertNotNull(c5);
  try {
    HTMLElementConcreteNativeJsType c6=(HTMLElementConcreteNativeJsType)object;
    assertNotNull(c6);
    fail("String_Node_Str");
  }
 catch (  ClassCastException cce) {
  }
}

Fixed version (ground truth):
public void testCast_inJava(){
  Object object=new MyJsFunctionInterfaceImpl();
  MyJsFunctionInterface c1=(MyJsFunctionInterface)object;
  assertNotNull(c1);
  MyJsFunctionInterfaceImpl c2=(MyJsFunctionInterfaceImpl)c1;
  assertEquals(10,c2.publicField);
  MyJsFunctionInterfaceImpl c3=(MyJsFunctionInterfaceImpl)object;
  assertNotNull(c3);
  MyJsFunctionIdentityInterface c4=(MyJsFunctionIdentityInterface)object;
  assertNotNull(c4);
  ElementLikeNativeInterface c5=(ElementLikeNativeInterface)object;
  assertNotNull(c5);
  try {
    HTMLElementConcreteNativeJsType c6=(HTMLElementConcreteNativeJsType)object;
    assertNotNull(c6);
    fail("String_Node_Str");
  }
 catch (  ClassCastException cce) {
  }
}
Program: 53390
Project: 53390
Buggy source:
public void testInstanceOf_implementsJsTypeWithPrototype(){
  Object object=alwaysTrue() ? new MyNativeJsTypeInterfaceImpl() : new Object();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertTrue(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}

Fixed version (ground truth):
public void testInstanceOf_implementsJsTypeWithPrototype(){
  Object object=new MyNativeJsTypeInterfaceImpl();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertTrue(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}
Program: 53391
Project: 53391
Buggy source:
public void testInstanceOf_concreteJsType(){
  Object object=alwaysTrue() ? new ConcreteJsType() : new Object();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertTrue(object instanceof ConcreteJsType);
}

Fixed version (ground truth):
public void testInstanceOf_concreteJsType(){
  Object object=new ConcreteJsType();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertTrue(object instanceof ConcreteJsType);
}
Program: 53392
Project: 53392
Buggy source:
public void testVirtualUpRefs(){
  ListImpl listWithExport=new ListImpl();
  FooImpl listNoExport=new FooImpl();
  Collection collectionWithExport=alwaysTrue() ? listWithExport : listNoExport;
  collectionWithExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listWithExport.x);
  Collection collectionNoExport=alwaysTrue() ? listNoExport : listWithExport;
  collectionNoExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listNoExport.x);
  listNoExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listNoExport.x);
  listWithExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listWithExport.x);
}

Fixed version (ground truth):
public void testVirtualUpRefs(){
  ListImpl listWithExport=new ListImpl();
  FooImpl listNoExport=new FooImpl();
  Collection collectionWithExport=listWithExport;
  collectionWithExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listWithExport.x);
  Collection collectionNoExport=listNoExport;
  collectionNoExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listNoExport.x);
  listNoExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listNoExport.x);
  listWithExport.add("String_Node_Str");
  assertEquals("String_Node_Str",listWithExport.x);
}
Program: 53393
Project: 53393
Buggy source:
public void testInstanceOf_implementsJsType(){
  Object object=alwaysTrue() ? new ElementLikeNativeInterfaceImpl() : new Object();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertTrue(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}

Fixed version (ground truth):
public void testInstanceOf_implementsJsType(){
  Object object=new ElementLikeNativeInterfaceImpl();
  assertTrue(object instanceof Object);
  assertFalse(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertFalse(object instanceof HTMLButtonElement);
  assertFalse(object instanceof HTMLElementConcreteNativeJsType);
  assertFalse(object instanceof Iterator);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertTrue(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}
Program: 53394
Project: 53394
Buggy source:
public void testRevealedOverrideJsType(){
  PlainParentType plainParentType=new PlainParentType();
  RevealedOverrideSubType revealedOverrideSubType=new RevealedOverrideSubType();
  assertFalse(hasField(plainParentType,"String_Node_Str"));
  assertTrue(hasField(revealedOverrideSubType,"String_Node_Str"));
  ConcreteJsTypeJsSubclass subclass=new ConcreteJsTypeJsSubclass();
  assertEquals(100,subclass.publicMethodAlsoExposedAsNonJsMethod());
  SubclassInterface subclassInterface=alwaysTrue() ? subclass : new SubclassInterface(){
    @Override public int publicMethodAlsoExposedAsNonJsMethod(){
      return 0;
    }
  }
;
  assertEquals(100,subclassInterface.publicMethodAlsoExposedAsNonJsMethod());
}

Fixed version (ground truth):
public void testRevealedOverrideJsType(){
  PlainParentType plainParentType=new PlainParentType();
  RevealedOverrideSubType revealedOverrideSubType=new RevealedOverrideSubType();
  assertFalse(hasField(plainParentType,"String_Node_Str"));
  assertTrue(hasField(revealedOverrideSubType,"String_Node_Str"));
  ConcreteJsTypeJsSubclass subclass=new ConcreteJsTypeJsSubclass();
  assertEquals(100,subclass.publicMethodAlsoExposedAsNonJsMethod());
  SubclassInterface subclassInterface=subclass;
  assertEquals(100,subclassInterface.publicMethodAlsoExposedAsNonJsMethod());
}
Program: 53395
Project: 53395
Buggy source:
public void testInstanceOf_extendsJsTypeWithProto(){
  Object object=alwaysTrue() ? new MyCustomHtmlButtonWithIterator() : new Object();
  assertTrue(object instanceof Object);
  assertTrue(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertTrue(object instanceof HTMLButtonElement);
  assertTrue(object instanceof HTMLElementConcreteNativeJsType);
  assertTrue(object instanceof Iterable);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}

Fixed version (ground truth):
public void testInstanceOf_extendsJsTypeWithProto(){
  Object object=new MyCustomHtmlButtonWithIterator();
  assertTrue(object instanceof Object);
  assertTrue(object instanceof HTMLElementAnotherConcreteNativeJsType);
  assertTrue(object instanceof HTMLButtonElement);
  assertTrue(object instanceof HTMLElementConcreteNativeJsType);
  assertTrue(object instanceof Iterable);
  assertTrue(object instanceof MyNativeJsTypeInterface);
  assertFalse(object instanceof MyNativeJsTypeInterfaceImpl);
  assertTrue(object instanceof ElementLikeNativeInterface);
  assertFalse(object instanceof ElementLikeNativeInterfaceImpl);
  assertFalse(object instanceof MyJsInterfaceWithOnlyInstanceofReference);
  assertTrue(object instanceof MyNativeJsTypeInterfaceAndOnlyInstanceofReference);
  assertFalse(object instanceof AliasToMyNativeJsTypeWithOnlyInstanceofReference);
  assertFalse(object instanceof ConcreteJsType);
}
Program: 53396
Project: 53396
Buggy source:
public InliningVisitor(JsProgram program,Set<JsNode> whitelist){
  this.whitelist=whitelist;
  invocationCountingVisitor.accept(program);
  JsName defineClass=getFunctionName(program,"String_Node_Str");
  safeToInlineAtTopLevel=defineClass != null ? ImmutableSet.of(defineClass) : ImmutableSet.<JsName>of();
}

Fixed version (ground truth):
public InliningVisitor(JsProgram program,Set<JsNode> whitelist){
  this.whitelist=whitelist;
  invocationCountingVisitor.accept(program);
}
Program: 53398
Project: 53398
Buggy source:
private static boolean isTooComplexToInline(List<JExpression> bodyAsExpressionList,boolean ignoringReturn){
  if (ignoringReturn) {
    return bodyAsExpressionList.size() > 2;
  }
  if (bodyAsExpressionList.size() == 3 && bodyAsExpressionList.get(2).hasSideEffects()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private static boolean isTooComplexToInline(List<JExpression> bodyAsExpressionList,boolean ignoringReturn){
  if (bodyAsExpressionList.size() > 3) {
    return true;
  }
  if (bodyAsExpressionList.size() == 3 && (!ignoringReturn || bodyAsExpressionList.get(2).hasSideEffects())) {
    return true;
  }
  return false;
}
Program: 53400
Project: 53400
Buggy source:
@Override public void remove(){
  checkState(lastEntry != null);
  InternalHashCodeMap.this.remove(lastEntry.getKey());
  if (chain == lastChain && chain.length != 1) {
    itemIndex--;
  }
  lastEntry=null;
}

Fixed version (ground truth):
@Override public void remove(){
  checkState(lastEntry != null);
  boolean isLastChain=itemIndex == lastChain.length;
  InternalHashCodeMap.this.remove(lastEntry.getKey());
  if (!isLastChain) {
    itemIndex--;
  }
  lastEntry=null;
}
Program: 53401
Project: 53401
Buggy source:
@Override public Iterator<Entry<K,V>> iterator(){
  return new Iterator<Map.Entry<K,V>>(){
    final InternalJsIterator<Object> chains=backingMap.entries();
    int itemIndex=0;
    Entry<K,V>[] chain=newEntryChain();
    Entry<K,V>[] lastChain=null;
    Entry<K,V> lastEntry=null;
    @Override public boolean hasNext(){
      if (itemIndex < chain.length) {
        return true;
      }
      InternalJsIteratorEntry<Object> current=chains.next();
      if (!current.done()) {
        chain=unsafeCastToArray(current.getValue());
        itemIndex=0;
        return true;
      }
      return false;
    }
    @Override public Entry<K,V> next(){
      checkElement(hasNext());
      lastChain=chain;
      lastEntry=chain[itemIndex++];
      return lastEntry;
    }
    @Override public void remove(){
      checkState(lastEntry != null);
      InternalHashCodeMap.this.remove(lastEntry.getKey());
      if (chain == lastChain && chain.length != 1) {
        itemIndex--;
      }
      lastEntry=null;
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Entry<K,V>> iterator(){
  return new Iterator<Map.Entry<K,V>>(){
    final InternalJsIterator<Object> chains=backingMap.entries();
    int itemIndex=0;
    Entry<K,V>[] chain=newEntryChain();
    Entry<K,V>[] lastChain=null;
    Entry<K,V> lastEntry=null;
    @Override public boolean hasNext(){
      if (itemIndex < chain.length) {
        return true;
      }
      InternalJsIteratorEntry<Object> current=chains.next();
      if (!current.done()) {
        chain=unsafeCastToArray(current.getValue());
        itemIndex=0;
        return true;
      }
      return false;
    }
    @Override public Entry<K,V> next(){
      checkElement(hasNext());
      lastChain=chain;
      lastEntry=chain[itemIndex++];
      return lastEntry;
    }
    @Override public void remove(){
      checkState(lastEntry != null);
      boolean isLastChain=itemIndex == lastChain.length;
      InternalHashCodeMap.this.remove(lastEntry.getKey());
      if (!isLastChain) {
        itemIndex--;
      }
      lastEntry=null;
    }
  }
;
}
Program: 53402
Project: 53402
Buggy source:
@Override public int hashCode(){
  return 0;
}

Fixed version (ground truth):
@Override public int hashCode(){
  return hashCode;
}
Program: 53403
Project: 53403
Buggy source:
@Override public Entry<K,V> next(){
  checkElement(hasNext());
  lastChain=chain;
  lastEntry=chain[itemIndex++];
  return lastEntry;
}

Fixed version (ground truth):
@Override public Entry<K,V> next(){
  checkElement(hasNext());
  lastEntry=chain[itemIndex++];
  return lastEntry;
}
Program: 53404
Project: 53404
Buggy source:
@Override public void remove(){
  checkState(lastEntry != null);
  boolean isLastChain=itemIndex == lastChain.length;
  InternalHashCodeMap.this.remove(lastEntry.getKey());
  if (!isLastChain) {
    itemIndex--;
  }
  lastEntry=null;
}

Fixed version (ground truth):
@Override public void remove(){
  checkState(lastEntry != null);
  InternalHashCodeMap.this.remove(lastEntry.getKey());
  if (itemIndex != 0) {
    itemIndex--;
  }
  lastEntry=null;
}
Program: 53405
Project: 53405
Buggy source:
@Override public Iterator<Entry<K,V>> iterator(){
  return new Iterator<Map.Entry<K,V>>(){
    final InternalJsIterator<Object> chains=backingMap.entries();
    int itemIndex=0;
    Entry<K,V>[] chain=newEntryChain();
    Entry<K,V>[] lastChain=null;
    Entry<K,V> lastEntry=null;
    @Override public boolean hasNext(){
      if (itemIndex < chain.length) {
        return true;
      }
      InternalJsIteratorEntry<Object> current=chains.next();
      if (!current.done()) {
        chain=unsafeCastToArray(current.getValue());
        itemIndex=0;
        return true;
      }
      return false;
    }
    @Override public Entry<K,V> next(){
      checkElement(hasNext());
      lastChain=chain;
      lastEntry=chain[itemIndex++];
      return lastEntry;
    }
    @Override public void remove(){
      checkState(lastEntry != null);
      boolean isLastChain=itemIndex == lastChain.length;
      InternalHashCodeMap.this.remove(lastEntry.getKey());
      if (!isLastChain) {
        itemIndex--;
      }
      lastEntry=null;
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Entry<K,V>> iterator(){
  return new Iterator<Map.Entry<K,V>>(){
    final InternalJsIterator<Object> chains=backingMap.entries();
    int itemIndex=0;
    Entry<K,V>[] chain=newEntryChain();
    Entry<K,V> lastEntry=null;
    @Override public boolean hasNext(){
      if (itemIndex < chain.length) {
        return true;
      }
      InternalJsIteratorEntry<Object> current=chains.next();
      if (!current.done()) {
        chain=unsafeCastToArray(current.getValue());
        itemIndex=0;
        return true;
      }
      return false;
    }
    @Override public Entry<K,V> next(){
      checkElement(hasNext());
      lastEntry=chain[itemIndex++];
      return lastEntry;
    }
    @Override public void remove(){
      checkState(lastEntry != null);
      InternalHashCodeMap.this.remove(lastEntry.getKey());
      if (itemIndex != 0) {
        itemIndex--;
      }
      lastEntry=null;
    }
  }
;
}
Program: 53406
Project: 53406
Buggy source:
private void replaceLambdaWithInnerClassAllocation(LambdaExpression x,SourceInfo info,JClassType innerLambdaClass,JConstructor ctor,SyntheticArgumentBinding[] synthArgs){
}

Fixed version (ground truth):
private void replaceLambdaWithInnerClassAllocation(LambdaExpression x,final SourceInfo info,JClassType innerLambdaClass,JConstructor ctor,SyntheticArgumentBinding[] synthArgs){
}
Program: 53407
Project: 53407
Buggy source:
@Override public Integer run(int j,int k){
  int t=x;
  int s=local;
  return t + s + a+ b;
}

Fixed version (ground truth):
public void run(){
  Lambda<Integer> l=(a,b) -> x[0]=x[0] + a + b+ arg+ fA+ fB+ fI;
  l.run(1,2);
}
Program: 53408
Project: 53408
Buggy source:
int foo();

Fixed version (ground truth):
public int foo(Integer arg){
  x1[0]=x1[0] + 1;
  x[0]=x[0] + 1;
  return x2[0]=x2[0] + rA + rB+ a+ b;
}
Program: 53409
Project: 53409
Buggy source:
/** 
 * True if the type is a JSO or interface implemented by JSO or a JsType without prototype.
 */
public boolean canCrossCastLikeJso(JType type){
  JDeclaredType dtype=getNearestJsType(type,false);
  return canBeJavaScriptObject(type) || (dtype instanceof JInterfaceType && isOrExtendsJsType(type,false) && !isOrExtendsJsType(type,true));
}

Fixed version (ground truth):
/** 
 * True if the type is a JSO or interface implemented by JSO or a JsType without prototype.
 */
public boolean canCrossCastLikeJso(JType type){
  return canBeJavaScriptObject(type) || isJsTypeInterfaceWithoutPrototype(type);
}
Program: 53410
Project: 53410
Buggy source:
private JRuntimeTypeReference getElementRuntimeTypeReference(SourceInfo sourceInfo,JArrayType arrayType){
  JType elementType=arrayType.getElementType();
  if (!(elementType instanceof JReferenceType)) {
    elementType=JReferenceType.NULL_TYPE;
  }
  if (program.typeOracle.willCrossCastLikeJso(elementType)) {
    elementType=program.getJavaScriptObject();
  }
 else {
    elementType=elementType.getUnderlyingType();
  }
  elementType=program.normalizeJsoType(elementType);
  return new JRuntimeTypeReference(sourceInfo,program.getTypeJavaLangObject(),(JReferenceType)elementType);
}

Fixed version (ground truth):
private JRuntimeTypeReference getElementRuntimeTypeReference(SourceInfo sourceInfo,JArrayType arrayType){
  JType elementType=arrayType.getElementType();
  if (!(elementType instanceof JReferenceType)) {
    elementType=JReferenceType.NULL_TYPE;
  }
  if (program.typeOracle.isEffectivelyJavaScriptObject(elementType)) {
    elementType=program.getJavaScriptObject();
  }
 else {
    elementType=elementType.getUnderlyingType();
  }
  elementType=program.normalizeJsoType(elementType);
  return new JRuntimeTypeReference(sourceInfo,program.getTypeJavaLangObject(),(JReferenceType)elementType);
}
Program: 53411
Project: 53411
Buggy source:
@Override public void endVisit(JInstanceOf x,Context ctx){
  JReferenceType argType=(JReferenceType)x.getExpr().getType();
  JReferenceType toType=x.getTestType();
  assert(toType == toType.getUnderlyingType());
  if (toType instanceof JArrayType) {
    toType=(JReferenceType)program.normalizeJsoType(toType);
  }
  boolean isTrivialCast=program.typeOracle.castSucceedsTrivially(argType,toType) || (program.typeOracle.willCrossCastLikeJso(argType) && program.typeOracle.willCrossCastLikeJso(toType));
  if (pruneTrivialCasts && isTrivialCast) {
    JBinaryOperation eq=new JBinaryOperation(x.getSourceInfo(),program.getTypePrimitiveBoolean(),JBinaryOperator.NEQ,x.getExpr(),program.getLiteralNull());
    ctx.replaceMe(eq);
  }
 else {
    ctx.replaceMe(implementCastOrInstanceOfOperation(x.getSourceInfo(),x.getExpr(),toType,instanceOfMethodsByTargetTypeCategory,false));
  }
}

Fixed version (ground truth):
@Override public void endVisit(JInstanceOf x,Context ctx){
  JReferenceType argType=(JReferenceType)x.getExpr().getType();
  JReferenceType toType=x.getTestType();
  assert(toType == toType.getUnderlyingType());
  if (toType instanceof JArrayType) {
    toType=(JReferenceType)program.normalizeJsoType(toType);
  }
  boolean isTrivialCast=program.typeOracle.castSucceedsTrivially(argType,toType) || (program.typeOracle.isEffectivelyJavaScriptObject(argType) && program.typeOracle.isEffectivelyJavaScriptObject(toType));
  if (pruneTrivialCasts && isTrivialCast) {
    JBinaryOperation eq=new JBinaryOperation(x.getSourceInfo(),program.getTypePrimitiveBoolean(),JBinaryOperator.NEQ,x.getExpr(),program.getLiteralNull());
    ctx.replaceMe(eq);
  }
 else {
    ctx.replaceMe(implementCastOrInstanceOfOperation(x.getSourceInfo(),x.getExpr(),toType,instanceOfMethodsByTargetTypeCategory,false));
  }
}
Program: 53414
Project: 53414
Buggy source:
private void assertCrossCasts(JClassType thisType,JClassType thatType){
  assertShouldNotFailTrivially(thisType,thatType);
  assertShouldNotFailTrivially(thatType,thisType);
  assertTrue(typeOracle.canCrossCastLikeJso(thisType));
  assertTrue(typeOracle.canCrossCastLikeJso(thatType));
}

Fixed version (ground truth):
private void assertCrossCasts(JClassType thisType,JClassType thatType){
  assertShouldNotFailTrivially(thisType,thatType);
  assertShouldNotFailTrivially(thatType,thisType);
  assertTrue(typeOracle.canBeJavaScriptObject(thisType));
  assertTrue(typeOracle.canBeJavaScriptObject(thatType));
}
Program: 53415
Project: 53415
Buggy source:
@Override public String getJavahSignatureName(){
  return "String_Node_Str" + name.replaceAll("String_Node_Str","String_Node_Str").replace('.','_') + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getJavahSignatureName(){
  return JjsUtils.javahSignatureFromName(name);
}
Program: 53416
Project: 53416
Buggy source:
String mangleName(JField x){
  String s=JjsUtils.mangledNameString(x.getEnclosingType()) + '_' + JjsUtils.mangledNameString(x);
  return s;
}

Fixed version (ground truth):
String mangleName(JField x){
  return JjsUtils.mangleMemberName(x.getEnclosingType().getName(),x.getName());
}
Program: 53417
Project: 53417
Buggy source:
String mangleNameForGlobal(JMethod x){
  String s=JjsUtils.mangledNameString(x.getEnclosingType()) + '_' + JjsUtils.mangledNameString(x)+ "String_Node_Str";
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    s+=type.getJavahSignatureName();
  }
  s+=x.getOriginalReturnType().getJavahSignatureName();
  return StringInterner.get().intern(s);
}

Fixed version (ground truth):
String mangleNameForGlobal(JMethod x){
  String s=JjsUtils.mangleMemberName(x.getEnclosingType().getName(),x.getName()) + "String_Node_Str";
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    s+=type.getJavahSignatureName();
  }
  s+=x.getOriginalReturnType().getJavahSignatureName();
  return StringInterner.get().intern(s);
}
Program: 53418
Project: 53418
Buggy source:
public JExpressionStatement makeStatement(){
  return new JExpressionStatement(getSourceInfo(),this);
}

Fixed version (ground truth):
/** 
 * Returns a statement that executes this expression.
 */
public final JExpressionStatement makeStatement(){
  return new JExpressionStatement(getSourceInfo(),this);
}
Program: 53419
Project: 53419
Buggy source:
String mangleName(JField x){
  String s=JjsUtils.getNameString(x.getEnclosingType()) + '_' + JjsUtils.getNameString(x);
  return s;
}

Fixed version (ground truth):
String mangleName(JField x){
  String s=JjsUtils.mangledNameString(x.getEnclosingType()) + '_' + JjsUtils.mangledNameString(x);
  return s;
}
Program: 53420
Project: 53420
Buggy source:
String mangleNameForGlobal(JMethod x){
  String s=JjsUtils.getNameString(x.getEnclosingType()) + '_' + JjsUtils.getNameString(x)+ "String_Node_Str";
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    s+=type.getJavahSignatureName();
  }
  s+=x.getOriginalReturnType().getJavahSignatureName();
  return StringInterner.get().intern(s);
}

Fixed version (ground truth):
String mangleNameForGlobal(JMethod x){
  String s=JjsUtils.mangledNameString(x.getEnclosingType()) + '_' + JjsUtils.mangledNameString(x)+ "String_Node_Str";
  for (int i=0; i < x.getOriginalParamTypes().size(); ++i) {
    JType type=x.getOriginalParamTypes().get(i);
    s+=type.getJavahSignatureName();
  }
  s+=x.getOriginalReturnType().getJavahSignatureName();
  return StringInterner.get().intern(s);
}
Program: 53421
Project: 53421
Buggy source:
private JsName declareSynthesizedClosureConstructor(JDeclaredType x,List<JsStatement> globalStmts){
  SourceInfo sourceInfo=x.getSourceInfo();
  JsName classVar=topScope.declareName(JjsUtils.getNameString(x));
  JsFunction closureCtor=JsUtils.createEmptyFunctionLiteral(sourceInfo,topScope,classVar);
  JsExprStmt statement=closureCtor.makeStmt();
  globalStmts.add(statement);
  names.put(x,classVar);
  if (x instanceof JClassType) {
    typeForStatMap.put(statement,(JClassType)x);
  }
  return classVar;
}

Fixed version (ground truth):
private JsName declareSynthesizedClosureConstructor(JDeclaredType x,List<JsStatement> globalStmts){
  SourceInfo sourceInfo=x.getSourceInfo();
  JsName classVar=topScope.declareName(JjsUtils.mangledNameString(x));
  JsFunction closureCtor=JsUtils.createEmptyFunctionLiteral(sourceInfo,topScope,classVar);
  JsExprStmt statement=closureCtor.makeStmt();
  globalStmts.add(statement);
  names.put(x,classVar);
  if (x instanceof JClassType) {
    typeForStatMap.put(statement,(JClassType)x);
  }
  return classVar;
}
Program: 53424
Project: 53424
Buggy source:
private Set<JDeclaredType> generatePreamble(JProgram program,List<JsStatement> globalStmts){
  JsVars vars=new JsVars(jsProgram.getSourceInfo());
  vars.add(new JsVar(jsProgram.getSourceInfo(),globalTemp));
  globalStmts.add(vars);
  generateImmortalTypes(vars);
  Set<JDeclaredType> alreadyProcessed=Sets.<JDeclaredType>newLinkedHashSet(program.immortalCodeGenTypes);
  alreadyProcessed.add(program.getTypeClassLiteralHolder());
  List<JDeclaredType> classLiteralSupportClasses=computeClassLiteralsSupportClasses(program,alreadyProcessed);
  classLiteralSupportClasses.removeAll(alreadyProcessed);
  for (  JDeclaredType type : classLiteralSupportClasses) {
    accept(type);
  }
  generateClassLiterals(globalStmts,classLiteralSupportClasses);
  Set<JDeclaredType> preambleTypes=Sets.newLinkedHashSet(alreadyProcessed);
  preambleTypes.addAll(classLiteralSupportClasses);
  return preambleTypes;
}

Fixed version (ground truth):
private Set<JDeclaredType> generatePreamble(JProgram program,List<JsStatement> globalStmts){
  JsVars vars=new JsVars(jsProgram.getSourceInfo());
  vars.add(new JsVar(jsProgram.getSourceInfo(),globalTemp));
  globalStmts.add(vars);
  generateImmortalTypes(vars);
  Set<JDeclaredType> alreadyProcessed=Sets.<JDeclaredType>newLinkedHashSet(program.immortalCodeGenTypes);
  alreadyProcessed.add(program.getTypeClassLiteralHolder());
  alreadyRan.addAll(alreadyProcessed);
  List<JDeclaredType> classLiteralSupportClasses=computeClassLiteralsSupportClasses(program,alreadyProcessed);
  classLiteralSupportClasses.removeAll(alreadyProcessed);
  for (  JDeclaredType type : classLiteralSupportClasses) {
    accept(type);
  }
  generateClassLiterals(globalStmts,classLiteralSupportClasses);
  Set<JDeclaredType> preambleTypes=Sets.newLinkedHashSet(alreadyProcessed);
  preambleTypes.addAll(classLiteralSupportClasses);
  return preambleTypes;
}
Program: 53425
Project: 53425
Buggy source:
private void execImpl(){
  NormalizeVisitor visitor=new NormalizeVisitor();
  visitor.accept(program);
  program.recordClassLiteralFields(classLiteralFields);
}

Fixed version (ground truth):
private void execImpl(){
  if (!shouldOptimize) {
    for (    JPrimitiveType type : JPrimitiveType.types) {
      resolveClassLiteralField(type);
    }
    for (    JType type : program.getDeclaredTypes()) {
      resolveClassLiteralField(type);
    }
  }
  NormalizeVisitor visitor=new NormalizeVisitor();
  visitor.accept(program);
  program.recordClassLiteralFields(classLiteralFields);
}
Program: 53426
Project: 53426
Buggy source:
private void ImplementClassLiteralsAsFields(JProgram program){
}

Fixed version (ground truth):
private void ImplementClassLiteralsAsFields(JProgram program,boolean shouldOptimize){
}
Program: 53427
Project: 53427
Buggy source:
public static void exec(JProgram program){
  Event normalizerEvent=SpeedTracerLogger.start(CompilerEventType.NORMALIZER);
  new ImplementClassLiteralsAsFields(program).execImpl();
  normalizerEvent.end();
}

Fixed version (ground truth):
public static void exec(JProgram program,boolean shouldOptimize){
  Event normalizerEvent=SpeedTracerLogger.start(CompilerEventType.NORMALIZER);
  new ImplementClassLiteralsAsFields(program,shouldOptimize).execImpl();
  normalizerEvent.end();
}
Program: 53428
Project: 53428
Buggy source:
@SuppressWarnings("String_Node_Str") public void testAnnotatedMessages(){
  TestAnnotatedMessages m=GWT.create(TestAnnotatedMessages.class);
  assertEquals("String_Node_Str",m.basicText());
  assertEquals("String_Node_Str",m.withMeaning());
  assertEquals("String_Node_Str",m.oneArgument("String_Node_Str"));
  assertEquals("String_Node_Str",m.optionalArgument("String_Node_Str"));
  assertEquals("String_Node_Str",m.invertedArguments("String_Node_Str","String_Node_Str"));
  assertEquals("String_Node_Str",m.quotedText());
  assertEquals("String_Node_Str",m.quotedArg());
  assertEquals("String_Node_Str",m.currencyFormat(11305.01));
  assertEquals("String_Node_Str",m.defaultNumberFormat(1017.1));
  assertEquals("String_Node_Str",m.getTimeDate(new Date(107,11,1,12,1,2)));
  assertEquals("String_Node_Str",m.pluralWidgetsOther(13));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void testAnnotatedMessages(){
  TestAnnotatedMessages m=GWT.create(TestAnnotatedMessages.class);
  assertEquals("String_Node_Str",m.basicText());
  assertEquals("String_Node_Str",m.withMeaning());
  assertEquals("String_Node_Str",m.oneArgument("String_Node_Str"));
  assertEquals("String_Node_Str",m.optionalArgument("String_Node_Str"));
  assertEquals("String_Node_Str",m.invertedArguments("String_Node_Str","String_Node_Str"));
  assertEquals("String_Node_Str",m.quotedText());
  assertEquals("String_Node_Str",m.quotedArg());
  assertEquals("String_Node_Str",m.currencyFormat(11305.01));
  assertEquals("String_Node_Str",m.defaultNumberFormat(1017.1));
  assertEquals("String_Node_Str",m.defaultNumberFormattedAsInteger(1017.1));
  assertEquals("String_Node_Str",m.getTimeDate(new Date(107,11,1,12,1,2)));
  assertEquals("String_Node_Str",m.pluralWidgetsOther(13));
}
Program: 53430
Project: 53430
Buggy source:
private void postNormalizationOptimizeJava(){
  Event event=SpeedTracerLogger.start(CompilerEventType.JAVA_POST_NORMALIZER_OPTIMIZERS);
  try {
    if (shouldOptimize()) {
      RemoveSpecializations.exec(jprogram);
      Pruner.exec(jprogram,false);
    }
    ReplaceGetClassOverrides.exec(jprogram);
  }
  finally {
    event.end();
  }
}

Fixed version (ground truth):
private void postNormalizationOptimizeJava(){
  Event event=SpeedTracerLogger.start(CompilerEventType.JAVA_POST_NORMALIZER_OPTIMIZERS);
  try {
    if (shouldOptimize()) {
      RemoveSpecializations.exec(jprogram);
      Pruner.exec(jprogram,false);
      jprogram.typeOracle.recomputeAfterOptimizations(jprogram.getDeclaredTypes());
    }
    ReplaceGetClassOverrides.exec(jprogram);
  }
  finally {
    event.end();
  }
}
Program: 53431
Project: 53431
Buggy source:
/** 
 * Construct a bare-bones deserialized external class.
 */
JClassType(String name){
  super(SourceOrigin.UNKNOWN,name);
  isAbstract=false;
  isFinal=false;
  setExternal(true);
}

Fixed version (ground truth):
/** 
 * Construct a bare-bones deserialized external class.
 */
JClassType(String name){
  super(SourceOrigin.UNKNOWN,name);
  isAbstract=false;
  isFinal=false;
  isJso=name.equals(JProgram.JAVASCRIPTOBJECT);
  setExternal(true);
}
Program: 53432
Project: 53432
Buggy source:
/** 
 * Sets this type's super class.
 */
public final void setSuperClass(JClassType superClass){
  this.superClass=superClass;
}

Fixed version (ground truth):
/** 
 * Sets this type's super class.
 */
public final void setSuperClass(JClassType superClass){
}
Program: 53433
Project: 53433
Buggy source:
/** 
 * If the type is a JSO or an array of JSOs it returns cggcc.JavaScriptObject or an array of cggcc.JavaScriptObject respectively; otherwise returns   {@code type}.
 */
public JType normalizeJsoType(JType type){
  type=type.getUnderlyingType();
  if (type instanceof JArrayType) {
    return getOrCreateArrayType(normalizeJsoType(((JArrayType)type).getLeafType()),((JArrayType)type).getDims());
  }
  if (typeOracle.isJavaScriptObject(type)) {
    return getJavaScriptObject();
  }
  return type;
}

Fixed version (ground truth):
/** 
 * If the type is a JSO or an array of JSOs it returns cggcc.JavaScriptObject or an array of cggcc.JavaScriptObject respectively; otherwise returns   {@code type}.
 */
public JType normalizeJsoType(JType type){
  type=type.getUnderlyingType();
  if (type instanceof JArrayType) {
    return getOrCreateArrayType(normalizeJsoType(((JArrayType)type).getLeafType()),((JArrayType)type).getDims());
  }
  if (type.isJsoType()) {
    return getJavaScriptObject();
  }
  return type;
}
Program: 53434
Project: 53434
Buggy source:
public JField getClassLiteralField(JType type){
  return classLiteralFieldsByType.get(typeOracle.isJavaScriptObject(type) ? getJavaScriptObject() : type);
}

Fixed version (ground truth):
public JField getClassLiteralField(JType type){
  return classLiteralFieldsByType.get(type.isJsoType() ? getJavaScriptObject() : type);
}
Program: 53435
Project: 53435
Buggy source:
AnalysisResult getAnalysisResult(){
  if (isFinal()) {
    return AnalysisResult.NULLABLE_EXACT;
  }
  return AnalysisResult.NULLABLE_NOT_EXACT;
}

Fixed version (ground truth):
AnalysisResult getAnalysisResult(){
  if (isFinal() && !isJsoType()) {
    return AnalysisResult.NULLABLE_EXACT;
  }
  return AnalysisResult.NULLABLE_NOT_EXACT;
}
Program: 53436
Project: 53436
Buggy source:
/** 
 * If this type is a non-null type, returns the underlying (original) type.
 */
public JReferenceType getUnderlyingType(){
  return this;
}

Fixed version (ground truth):
/** 
 * If this type is a non-null type, returns the underlying (original) type.
 */
@Override public JReferenceType getUnderlyingType(){
  return this;
}
Program: 53437
Project: 53437
Buggy source:
/** 
 * This method should be called after altering the types that are live in the associated JProgram.
 */
public void recomputeAfterOptimizations(Collection<JDeclaredType> declaredTypes){
  Set<JDeclaredType> computed=Sets.newIdentityHashSet();
  if (hasWholeWorldKnowledge) {
    if (optimize) {
      for (      JDeclaredType type : declaredTypes) {
        computeClinitTarget(type,computed);
      }
    }
    nextDual:     for (Iterator<String> it=dualImplInterfaces.iterator(); it.hasNext(); ) {
      String dualIntf=it.next();
      for (      String implementorName : classesByImplementingInterface.get(dualIntf)) {
        JClassType implementor=(JClassType)referenceTypesByName.get(implementorName);
        if (isInstantiatedType(implementor) && !isJavaScriptObject(implementor)) {
          continue nextDual;
        }
      }
      it.remove();
    }
    Iterator<Entry<String,String>> jit=jsoByInterface.entrySet().iterator();
    while (jit.hasNext()) {
      Entry<String,String> jsoSingleImplEntry=jit.next();
      JClassType clazz=(JClassType)referenceTypesByName.get(jsoSingleImplEntry.getValue());
      if (isInstantiatedType(clazz)) {
        continue;
      }
      dualImplInterfaces.remove(jsoSingleImplEntry.getKey());
      jit.remove();
    }
  }
}

Fixed version (ground truth):
/** 
 * This method should be called after altering the types that are live in the associated JProgram.
 */
public void recomputeAfterOptimizations(Collection<JDeclaredType> declaredTypes){
}
Program: 53438
Project: 53438
Buggy source:
/** 
 * True if either a JSO, or is an interface that is ONLY implemented by a JSO.
 */
public boolean isEffectivelyJavaScriptObject(JType type){
  if (type instanceof JReferenceType) {
    JReferenceType refType=(JReferenceType)type;
    return isJavaScriptObject(refType) || (isSingleJsoImpl(refType) && !isDualJsoInterface(refType));
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * True if either a JSO, or is an interface that is ONLY implemented by a JSO.
 */
public boolean isEffectivelyJavaScriptObject(JType type){
  return type.isJsoType() || (isSingleJsoImpl(type) && !isDualJsoInterface(type));
}
Program: 53439
Project: 53439
Buggy source:
/** 
 * True if the type is a JSO or interface implemented by JSO or a JsType without prototype.
 */
public boolean canBeJavaScriptObject(JType type){
  type=type.getUnderlyingType();
  return isJavaScriptObject(type) || isSingleJsoImpl(type);
}

Fixed version (ground truth):
/** 
 * True if the type is a JSO or interface implemented by JSO or a JsType without prototype.
 */
public boolean canBeJavaScriptObject(JType type){
  type=type.getUnderlyingType();
  return type.isJsoType() || isSingleJsoImpl(type);
}