nus-yam/ex-repair huggingface dataset:
Program: 84680
Project: 84680
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.withElementType(type,elementType,typeContext,markers,context);
  }
  if (Types.ITERABLE.equals(type) || RANGE.isSuperTypeOf(type)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.withElementType(type,iterableType,typeContext,markers,context);
  }
  return type.isSuperTypeOf(this.getType()) ? this : null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (type.isArrayType()) {
    elementType=type.getElementType();
  }
 else   if (type.isSuperClassOf(RANGE)) {
    elementType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
  }
 else {
    return null;
  }
  if (this.isElementType(elementType)) {
    this.elementType=elementType;
    this.type=type;
    return this;
  }
  return null;
}
Program: 84681
Project: 84681
Buggy source:
@Override public boolean isType(IType type){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.isElementType(elementType);
  }
  if (Types.ITERABLE.equals(type) || RANGE.isSuperTypeOf(type)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.isElementType(iterableType);
  }
  return type.isSuperTypeOf(RANGE);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.isElementType(elementType);
  }
  if (type.isSuperClassOf(RANGE)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.isElementType(iterableType);
  }
  return false;
}
Program: 84683
Project: 84683
Buggy source:
private boolean isElementType(IType elementType){
  if (this.elementType != null) {
    return elementType.isSuperTypeOf(this.elementType);
  }
  return this.value1.isType(elementType) && this.value2.isType(elementType);
}

Fixed version (ground truth):
private boolean isElementType(IType elementType){
  if (this.elementType != Types.UNKNOWN) {
    return elementType.isSuperTypeOf(this.elementType);
  }
  return this.firstValue.isType(elementType) && this.lastValue.isType(elementType);
}
Program: 84684
Project: 84684
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value1.checkTypes(markers,context);
  this.value2.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  IValue value1=this.firstValue.withType(elementType,elementType,markers,context);
  if (value1 == null) {
  }
 else {
    this.firstValue=value1;
  }
  IValue value2=this.lastValue.withType(elementType,elementType,markers,context);
  if (value2 == null) {
  }
 else {
    this.lastValue=value2;
  }
  this.firstValue.checkTypes(markers,context);
  this.lastValue.checkTypes(markers,context);
}
Program: 84685
Project: 84685
Buggy source:
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == Types.UNKNOWN) {
      this.elementType=Types.findCommonSuperType(this.value1.getType(),this.value2.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == Types.UNKNOWN) {
      this.elementType=Types.findCommonSuperType(this.firstValue.getType(),this.lastValue.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}
Program: 84686
Project: 84686
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  this.value1.toString(prefix,buffer);
  buffer.append("String_Node_Str");
  this.value2.toString(prefix,buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  this.firstValue.toString(prefix,buffer);
  buffer.append("String_Node_Str");
  this.lastValue.toString(prefix,buffer);
}
Program: 84687
Project: 84687
Buggy source:
public RangeOperator(IValue value1,IValue value2,IType type){
  this.value1=value1;
  this.value2=value2;
  this.elementType=type;
}

Fixed version (ground truth):
public RangeOperator(IValue value1,IValue value2,IType type){
  this.firstValue=value1;
  this.lastValue=value2;
  this.elementType=type;
}
Program: 84688
Project: 84688
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  this.value1.resolveTypes(markers,context);
  this.value2.resolveTypes(markers,context);
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  this.firstValue.resolveTypes(markers,context);
  this.lastValue.resolveTypes(markers,context);
}
Program: 84690
Project: 84690
Buggy source:
@Override public IClass getTheClass(){
  return null;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return Types.OBJECT_CLASS;
}
Program: 84691
Project: 84691
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString(prefix,buffer);
  }
  if (this.genericData != null) {
    if (this.instance != null || this.instance.valueTag() != FIELD_ACCESS) {
      buffer.append("String_Node_Str");
    }
    this.genericData.toString(prefix,buffer);
  }
  this.arguments.toString(prefix,buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString(prefix,buffer);
  }
  if (this.genericData != null) {
    if (this.instance != null && this.instance.valueTag() != FIELD_ACCESS) {
      buffer.append("String_Node_Str");
    }
    this.genericData.toString(prefix,buffer);
  }
  this.arguments.toString(prefix,buffer);
}
Program: 84693
Project: 84693
Buggy source:
@Override public IType resolve(MarkerList markers,IContext context){
  this.resolveTypes(markers,context);
  return this;
}

Fixed version (ground truth):
@Override public IType resolve(MarkerList markers,IContext context){
  if (this.upperBound != null) {
    this.upperBound=this.upperBound.resolve(markers,context);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(markers,context);
  }
  return this;
}
Program: 84694
Project: 84694
Buggy source:
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  if (this.lowerBound != null) {
    this.lowerBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeLDC(this.upperBoundCount);
  writer.writeNewArray("String_Node_Str",1);
  for (int i=0; i < this.upperBoundCount; i++) {
    writer.writeInsn(Opcodes.DUP);
    writer.writeLDC(i);
    this.upperBounds[i].writeTypeExpression(writer);
    writer.writeInsn(Opcodes.AASTORE);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}

Fixed version (ground truth):
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  if (this.lowerBound != null) {
    this.lowerBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  if (this.upperBound != null) {
    this.upperBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}
Program: 84695
Project: 84695
Buggy source:
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else   if (this.upperBoundCount > 0) {
    buffer.append('+');
    this.upperBounds[0].appendSignature(buffer);
  }
 else {
    buffer.append("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else   if (this.upperBound != null) {
    buffer.append('+');
    this.upperBound.appendSignature(buffer);
  }
 else {
    buffer.append('*');
  }
}
Program: 84696
Project: 84696
Buggy source:
@Override public IType getSuperType(){
  return this.upperBoundCount == 0 ? Types.UNKNOWN : this.upperBounds[0];
}

Fixed version (ground truth):
@Override public IType getSuperType(){
  return this.upperBound == null ? Types.UNKNOWN : this.upperBound;
}
Program: 84697
Project: 84697
Buggy source:
@Override public IType getConcreteType(ITypeContext context){
  if (this.lowerBound != null) {
    return this.lowerBound.getConcreteType(context);
  }
  WildcardType type=new WildcardType(this.position);
  type.upperBounds=new IType[this.upperBoundCount];
  type.upperBoundCount=this.upperBoundCount;
  for (int i=0; i < this.upperBoundCount; i++) {
    type.upperBounds[i]=this.upperBounds[i].getConcreteType(context);
  }
  return type;
}

Fixed version (ground truth):
@Override public IType getConcreteType(ITypeContext context){
  if (this.lowerBound != null) {
    return this.lowerBound.getConcreteType(context);
  }
  if (this.upperBound != null) {
    WildcardType copy=new WildcardType(this.position);
    copy.upperBound=this.upperBound.getConcreteType(context);
    return copy;
  }
  return this;
}
Program: 84698
Project: 84698
Buggy source:
@Override public IClass getTheClass(){
  return null;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return this.upperBound != null ? this.upperBound.getTheClass() : Types.OBJECT_CLASS;
}
Program: 84699
Project: 84699
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  for (int i=0; i < this.upperBoundCount; i++) {
    type=this.upperBounds[i].resolveType(typeVar,concrete);
    if (type != null) {
      return type;
    }
  }
  return Types.ANY;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.upperBound != null) {
    return this.upperBound.resolveType(typeVar);
  }
  return Types.ANY;
}
Program: 84700
Project: 84700
Buggy source:
@Override public IDataMember resolveField(Name name){
  for (int i=0; i < this.upperBoundCount; i++) {
    IDataMember f=this.upperBounds[i].resolveField(name);
    if (f != null) {
      return f;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IDataMember resolveField(Name name){
  if (this.upperBound != null) {
    return this.upperBound.resolveField(name);
  }
  return null;
}
Program: 84701
Project: 84701
Buggy source:
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  if (this.upperBoundCount == 0) {
    Types.OBJECT_CLASS.getMethodMatches(list,instance,name,arguments);
    return;
  }
  for (int i=0; i < this.upperBoundCount; i++) {
    this.upperBounds[i].getMethodMatches(list,instance,name,arguments);
  }
}

Fixed version (ground truth):
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  if (this.upperBound != null) {
    this.upperBound.getMethodMatches(list,instance,name,arguments);
  }
}
Program: 84702
Project: 84702
Buggy source:
@Override public String getInternalName(){
  if (this.upperBoundCount > 0) {
    return this.upperBounds[0].getInternalName();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getInternalName(){
  if (this.upperBound != null) {
    return this.upperBound.getInternalName();
  }
  return "String_Node_Str";
}
Program: 84703
Project: 84703
Buggy source:
@Override public boolean equals(IType type){
  if (this.upperBoundCount > 0) {
    for (int i=0; i < this.upperBoundCount; i++) {
      if (!this.upperBounds[i].isSuperTypeOf(type)) {
        return false;
      }
    }
  }
  if (this.lowerBound != null) {
    if (!type.isSuperTypeOf(this.lowerBound)) {
      return false;
    }
  }
  return !type.isPrimitive();
}

Fixed version (ground truth):
@Override public boolean equals(IType type){
  if (this.upperBound != null) {
    if (!this.upperBound.isSuperTypeOf(type)) {
      return false;
    }
  }
  if (this.lowerBound != null) {
    if (!type.isSuperTypeOf(this.lowerBound)) {
      return false;
    }
  }
  return true;
}
Program: 84704
Project: 84704
Buggy source:
@Override public WildcardType clone(){
  WildcardType clone=new WildcardType(this.position);
  clone.lowerBound=this.lowerBound;
  clone.upperBoundCount=this.upperBoundCount;
  clone.upperBounds=this.upperBounds;
  return clone;
}

Fixed version (ground truth):
@Override public WildcardType clone(){
  WildcardType clone=new WildcardType(this.position);
  clone.lowerBound=this.lowerBound;
  clone.upperBound=this.upperBound;
  return clone;
}
Program: 84705
Project: 84705
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append('_');
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBoundCount > 0) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBounds[0].toString(prefix,buffer);
    for (int i=1; i < this.upperBoundCount; i++) {
      buffer.append(Formatting.Type.genericBoundSeperator);
      this.upperBounds[i].toString(prefix,buffer);
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append('_');
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBound != null) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBound.toString(prefix,buffer);
  }
}
Program: 84706
Project: 84706
Buggy source:
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  for (int i=0; i < this.upperBoundCount; i++) {
    this.upperBounds[i].inferTypes(concrete,typeContext);
  }
}

Fixed version (ground truth):
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  if (this.upperBound != null) {
    this.upperBound.inferTypes(concrete,typeContext);
  }
}
Program: 84707
Project: 84707
Buggy source:
@Override public String toString(){
  StringBuilder buf=new StringBuilder();
  this.method.toString("String_Node_Str",buf);
  return buf.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder buf=new StringBuilder();
  Util.methodSignatureToString(this.method,buf);
  return buf.toString();
}
Program: 84708
Project: 84708
Buggy source:
/** 
 * Returns true if   {@code type} is a subtype of this type
 * @param type
 * @return
 */
public default boolean isSuperTypeOf(IType type){
  if (this == type) {
    return true;
  }
  IClass thisClass=this.getTheClass();
  if (thisClass == Types.OBJECT_CLASS) {
    return true;
  }
  if (type.isArrayType()) {
    return false;
  }
  IClass thatClass=type.getTheClass();
  if (thatClass != null) {
    return thatClass == thisClass || thatClass.isSubTypeOf(this);
  }
  return type.equals(this);
}

Fixed version (ground truth):
/** 
 * Returns true if   {@code type} is a subtype of this type
 * @param type
 * @return
 */
public default boolean isSuperTypeOf(IType type){
  if (this == type) {
    return true;
  }
  IClass thisClass=this.getTheClass();
  if (thisClass == Types.OBJECT_CLASS) {
    return true;
  }
  if (type.typeTag() == WILDCARD_TYPE) {
    return type.equals(this);
  }
  if (type.isArrayType()) {
    return false;
  }
  IClass thatClass=type.getTheClass();
  if (thatClass != null) {
    return thatClass == thisClass || thatClass.isSubTypeOf(this);
  }
  return false;
}
Program: 84711
Project: 84711
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.resolve(markers,context);
  }
  IValue v=this.resolveFieldAccess(context);
  if (v != null) {
    return v;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.qualified);
  if (this.instance != null) {
    marker.addInfo("String_Node_Str" + this.instance.getType());
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.resolve(markers,context);
  }
  IValue v=this.resolveFieldAccess(markers,context);
  if (v != null) {
    return v;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.qualified);
  if (this.instance != null) {
    marker.addInfo("String_Node_Str" + this.instance.getType());
  }
  return this;
}
Program: 84712
Project: 84712
Buggy source:
protected IValue resolveFieldAccess(IContext context){
  IDataMember field=ICall.resolveField(context,this.instance,this.name);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.type=field.getType();
      return enumValue;
    }
    this.field=field;
    return this;
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,EmptyArguments.INSTANCE);
  if (method != null) {
    return this.toMethodCall(method);
  }
  if (this.instance == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass != null) {
      return new ClassAccess(this.position,iclass.getType());
    }
  }
  return null;
}

Fixed version (ground truth):
protected IValue resolveFieldAccess(MarkerList markers,IContext context){
  IDataMember field=ICall.resolveField(context,this.instance,this.name);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.type=field.getType();
      return enumValue;
    }
    this.field=field;
    return this;
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,EmptyArguments.INSTANCE);
  if (method != null) {
    AbstractCall mc=this.toMethodCall(method);
    mc.checkArguments(markers,context);
    return mc;
  }
  if (this.instance == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass != null) {
      return new ClassAccess(this.position,iclass.getType());
    }
  }
  return null;
}
Program: 84713
Project: 84713
Buggy source:
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IClass iclass=context.resolveClass(this.name);
    if (iclass == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(iclass,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,new ClassType(iclass));
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}

Fixed version (ground truth):
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(iclass,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,new ClassType(iclass));
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}
Program: 84715
Project: 84715
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.value != null) {
    this.value=this.value.resolve(markers,context);
    if (this.type == Types.UNKNOWN) {
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
      return;
    }
    IValue value1=this.value.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.value.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.value != null) {
    this.value=this.value.resolve(markers,context);
    if (this.type == Types.UNKNOWN) {
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
    }
    IValue value1=this.value.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.value.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}
Program: 84716
Project: 84716
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.value != null) {
    this.value=this.value.resolve(markers,context);
  }
  if (this.type == Types.UNKNOWN) {
    this.type=this.value.getType();
    if (this.type == Types.UNKNOWN) {
      markers.add(this.position,"String_Node_Str",this.name.unqualified);
    }
    return;
  }
  IValue value1=this.value.withType(this.type,null,markers,context);
  if (value1 == null) {
    Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + this.value.getType());
  }
 else {
    this.value=value1;
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.value != null) {
    this.value=this.value.resolve(markers,context);
  }
  if (this.type == Types.UNKNOWN) {
    this.type=this.value.getType();
    if (this.type == Types.UNKNOWN) {
      markers.add(this.position,"String_Node_Str",this.name.unqualified);
    }
  }
  IValue value1=this.value.withType(this.type,null,markers,context);
  if (value1 == null) {
    Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + this.value.getType());
  }
 else {
    this.value=value1;
  }
}
Program: 84717
Project: 84717
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,context);
  }
  if (this.value != null) {
    this.value=this.value.resolve(markers,this);
    if (this.type == Types.UNKNOWN) {
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
      return;
    }
    IValue value1=this.value.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,context);
  }
  if (this.value != null) {
    this.value=this.value.resolve(markers,this);
    if (this.type == Types.UNKNOWN) {
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
    }
    IValue value1=this.value.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}
Program: 84718
Project: 84718
Buggy source:
private void checkTypeVarsInferred(MarkerList markers,ITypeContext typeContext){
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable typeVar=this.generics[i];
    IType type=typeContext.resolveType(typeVar);
    if (type == null || (type.typeTag() == IType.TYPE_VAR_TYPE && ((TypeVarType)type).typeVar == typeVar)) {
      markers.add(position,"String_Node_Str",this.name,typeVar.getName());
      typeContext.addMapping(typeVar,Types.ANY);
    }
  }
}

Fixed version (ground truth):
private void checkTypeVarsInferred(MarkerList markers,ICodePosition position,ITypeContext typeContext){
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable typeVar=this.generics[i];
    IType type=typeContext.resolveType(typeVar);
    if (type == null || (type.typeTag() == IType.TYPE_VAR_TYPE && ((TypeVarType)type).typeVar == typeVar)) {
      markers.add(position,"String_Node_Str",this.name,typeVar.getName());
      typeContext.addMapping(typeVar,Types.ANY);
    }
  }
}
Program: 84720
Project: 84720
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue=this.defaultValue.resolve(markers,context);
    if (this.type == Types.UNKNOWN) {
      this.type=this.defaultValue.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
      return;
    }
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue=this.defaultValue.resolve(markers,context);
    if (this.type == Types.UNKNOWN) {
      this.type=this.defaultValue.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
    }
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}
Program: 84721
Project: 84721
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    context.getThisClass().addCompilable(this);
    this.defaultValue=this.defaultValue.resolve(markers,context);
    if (this.type == Types.UNKNOWN) {
      this.type=this.defaultValue.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
      }
      return;
    }
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    context.getThisClass().addCompilable(this);
    this.defaultValue=this.defaultValue.resolve(markers,context);
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
    }
    return;
  }
}
Program: 84722
Project: 84722
Buggy source:
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  if (this.bound != null) {
    this.bound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}

Fixed version (ground truth):
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  writer.writeFieldInsn(Opcodes.GETSTATIC,"String_Node_Str",this.variance.name(),"String_Node_Str");
  if (this.bound != null) {
    this.bound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}
Program: 84723
Project: 84723
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolve(markers,context,TypePosition.TYPE);
  GenericType generic=new GenericType(Types.CLASS_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolve(markers,context,TypePosition.CLASS);
  GenericType generic=new GenericType(Types.CLASS_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}
Program: 84724
Project: 84724
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolve(markers,context,TypePosition.GENERIC_ARGUMENT);
  GenericType generic=new GenericType(Types.TYPE_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolve(markers,context,TypePosition.TYPE);
  GenericType generic=new GenericType(Types.TYPE_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}
Program: 84725
Project: 84725
Buggy source:
@Override public boolean isSuperTypeOf(IType type){
  IClass iclass=getTupleClass(this.typeCount);
  if (!iclass.isSubTypeOf(type)) {
    return false;
  }
  for (int i=0; i < this.typeCount; i++) {
    ITypeVariable typeVar=iclass.getTypeVariable(i);
    IType type1=type.resolveType(typeVar);
    if (!type1.isSuperTypeOf(this.types[i])) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isSuperTypeOf(IType type){
  IClass iclass=getTupleClass(this.typeCount);
  if (!iclass.isSubTypeOf(type)) {
    return false;
  }
  for (int i=0; i < this.typeCount; i++) {
    ITypeVariable typeVar=iclass.getTypeVariable(i);
    IType type1=type.resolveType(typeVar);
    if (!this.types[i].isSuperTypeOf(type1)) {
      return false;
    }
  }
  return true;
}
Program: 84727
Project: 84727
Buggy source:
@Override public void appendGenericSignature(StringBuilder builder){
  if (this.lowerBound != null) {
    builder.append('-');
    this.lowerBound.appendGenericSignature(builder);
    return;
  }
  if (this.upperBound != null) {
    builder.append('+');
    this.upperBound.appendSignature(builder);
    return;
  }
  builder.append('*');
}

Fixed version (ground truth):
@Override public void appendGenericSignature(StringBuilder builder){
  if (this.bound != null) {
    if (this.variance == Variance.CONTRAVARIANT) {
      builder.append('-');
    }
 else {
      builder.append('+');
    }
    this.bound.appendSignature(builder);
    return;
  }
  builder.append('*');
}
Program: 84728
Project: 84728
Buggy source:
public WildcardType(Type lowerBound,Type upperBounds){
  this.lowerBound=lowerBound;
  this.upperBound=upperBounds;
}

Fixed version (ground truth):
public WildcardType(Variance variance,Type bound){
  this.variance=variance;
  this.bound=bound;
}
Program: 84729
Project: 84729
Buggy source:
public static <T>WildcardType<T> apply(Type lowerBound,Type upperBounds){
  return new WildcardType(lowerBound,upperBounds);
}

Fixed version (ground truth):
public static <T>WildcardType<T> apply(Variance variance,Type upperBounds){
  return new WildcardType(variance,upperBounds);
}
Program: 84730
Project: 84730
Buggy source:
@Override public void appendSignature(StringBuilder builder){
  if (this.lowerBound != null) {
    builder.append("String_Node_Str");
    return;
  }
  if (this.upperBound != null) {
    this.upperBound.appendSignature(builder);
  }
}

Fixed version (ground truth):
@Override public void appendSignature(StringBuilder builder){
  if (this.bound != null && this.variance == Variance.COVARIANT) {
    this.bound.appendSignature(builder);
    return;
  }
  builder.append("String_Node_Str");
}
Program: 84731
Project: 84731
Buggy source:
@Override public void toString(StringBuilder builder){
  builder.append('_');
  if (this.lowerBound != null) {
    builder.append("String_Node_Str");
    this.lowerBound.toString(builder);
  }
  if (this.upperBound != null) {
    builder.append("String_Node_Str");
    this.upperBound.toString(builder);
  }
}

Fixed version (ground truth):
@Override public void toString(StringBuilder builder){
  builder.append('_');
  if (this.bound != null) {
    if (this.variance == Variance.CONTRAVARIANT) {
      builder.append("String_Node_Str");
    }
 else {
      builder.append("String_Node_Str");
    }
    this.bound.toString(builder);
  }
}
Program: 84732
Project: 84732
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  return Types.ANY;
}
Program: 84733
Project: 84733
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  for (int i=0; i < this.upperBoundCount; i++) {
    type=this.upperBounds[i].resolveType(typeVar,concrete);
    if (type != null) {
      return type;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  for (int i=0; i < this.upperBoundCount; i++) {
    type=this.upperBounds[i].resolveType(typeVar,concrete);
    if (type != null) {
      return type;
    }
  }
  return Types.ANY;
}
Program: 84734
Project: 84734
Buggy source:
@Override public void writeInvJump(MethodWriter writer,int varIndex,Label elseLabel) throws BytecodeException {
  if (varIndex >= 0) {
    writer.writeVarInsn(Opcodes.ALOAD,varIndex);
  }
  writer.writeInvokeInsn(Opcodes.INVOKEVIRTUAL,this.boxingMethod.getTheClass().getInternalName(),this.boxingMethod.getName().qualified,this.boxingMethod.getDescriptor(),false);
  this.pattern.writeInvJump(writer,-1,elseLabel);
}

Fixed version (ground truth):
@Override public void writeInvJump(MethodWriter writer,int varIndex,Label elseLabel) throws BytecodeException {
  if (varIndex >= 0) {
    writer.writeVarInsn(Opcodes.ALOAD,varIndex);
  }
  this.boxingMethod.writeInvoke(writer,null,null);
  this.pattern.writeInvJump(writer,-1,elseLabel);
}
Program: 84735
Project: 84735
Buggy source:
@Override public void writeJump(MethodWriter writer,int varIndex,Label elseLabel) throws BytecodeException {
  if (varIndex >= 0) {
    writer.writeVarInsn(Opcodes.ALOAD,varIndex);
  }
  writer.writeInvokeInsn(Opcodes.INVOKEVIRTUAL,this.boxingMethod.getTheClass().getInternalName(),this.boxingMethod.getName().qualified,this.boxingMethod.getDescriptor(),false);
  this.pattern.writeJump(writer,-1,elseLabel);
}

Fixed version (ground truth):
@Override public void writeJump(MethodWriter writer,int varIndex,Label elseLabel) throws BytecodeException {
  if (varIndex >= 0) {
    writer.writeVarInsn(Opcodes.ALOAD,varIndex);
  }
  this.boxingMethod.writeInvoke(writer,null,null);
  this.pattern.writeJump(writer,-1,elseLabel);
}
Program: 84736
Project: 84736
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  return concrete.isArrayType() ? this.type.resolveType(typeVar,concrete.getElementType()) : null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  return concrete.isArrayType() ? this.type.resolveType(typeVar,concrete.getElementType()) : Types.ANY;
}
Program: 84737
Project: 84737
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  if (concrete.typeTag() != GENERIC) {
    return null;
  }
  GenericType gt=(GenericType)concrete;
  if (gt.typeArgumentCount != this.typeArgumentCount) {
    return null;
  }
  for (int i=0; i < this.typeArgumentCount; i++) {
    type=this.typeArguments[i].resolveType(typeVar,gt.typeArguments[i]);
    if (type != null) {
      return type;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  if (concrete.typeTag() != GENERIC) {
    return Types.ANY;
  }
  GenericType gt=(GenericType)concrete;
  if (gt.typeArgumentCount != this.typeArgumentCount) {
    return Types.ANY;
  }
  for (int i=0; i < this.typeArgumentCount; i++) {
    type=this.typeArguments[i].resolveType(typeVar,gt.typeArguments[i]);
    if (type != null) {
      return type;
    }
  }
  return Types.ANY;
}
Program: 84738
Project: 84738
Buggy source:
/** 
 * Returns the type argument in this generic type for the given type variable, where this is the template containing the type variable types and   {@code concrete} contains the concrete types.<p> Example:<br> <pre> GenericType gt1 = type[List].genericType // => List[E] GenericType gt2 = type[List[String]] ITypeVariable tv = type[List].getTypeVariable("E") gt1.resolveType(tv, gt2) // => String </pre>
 */
public default IType resolveType(ITypeVariable typeVar,IType concrete){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the type argument in this generic type for the given type variable, where this is the template containing the type variable types and   {@code concrete} contains the concrete types.<p> Example:<br> <pre> GenericType gt1 = type[List].genericType // => List[E] GenericType gt2 = type[List[String]] ITypeVariable tv = type[List].getTypeVariable("E") gt1.resolveType(tv, gt2) // => String </pre>
 */
public default IType resolveType(ITypeVariable typeVar,IType concrete){
  return Types.ANY;
}
Program: 84739
Project: 84739
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (concrete.typeTag() != LAMBDA) {
    return null;
  }
  LambdaType lambdaType=(LambdaType)concrete;
  if (lambdaType.parameterCount != this.parameterCount) {
    return null;
  }
  for (int i=0; i < this.parameterCount; i++) {
    IType concreteType=lambdaType.parameterTypes[i];
    IType type=this.parameterTypes[i].resolveType(typeVar,concreteType);
    if (type != null) {
      return type;
    }
  }
  return this.returnType.resolveType(typeVar,lambdaType.returnType);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (concrete.typeTag() != LAMBDA) {
    return Types.ANY;
  }
  LambdaType lambdaType=(LambdaType)concrete;
  if (lambdaType.parameterCount != this.parameterCount) {
    return Types.ANY;
  }
  for (int i=0; i < this.parameterCount; i++) {
    IType concreteType=lambdaType.parameterTypes[i];
    IType type=this.parameterTypes[i].resolveType(typeVar,concreteType);
    if (type != null) {
      return type;
    }
  }
  return this.returnType.resolveType(typeVar,lambdaType.returnType);
}
Program: 84740
Project: 84740
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  return null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  return Types.ANY;
}
Program: 84743
Project: 84743
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  this.field.writeGet(writer,this.instance);
  writer.writeInsn(this.field.getType().getReturnOpcode());
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  this.writeExpression(writer);
  writer.writeInsn(this.field.getType().getReturnOpcode());
}
Program: 84744
Project: 84744
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.field == null) {
    return 0;
  }
  IType type1=this.field.getType();
  if (type.equals(type1)) {
    return 3;
  }
  if (type.isSuperTypeOf(type1)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.field == null) {
    return 0;
  }
  IType type1=this.getType();
  if (type.equals(type1)) {
    return 3;
  }
  if (type.isSuperTypeOf(type1)) {
    return 2;
  }
  return 0;
}
Program: 84745
Project: 84745
Buggy source:
@Override public boolean isType(IType type){
  return this.field == null ? false : type.isSuperTypeOf(this.field.getType());
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  return this.field == null ? false : type.isSuperTypeOf(this.getType());
}
Program: 84746
Project: 84746
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.field.writeGet(writer,this.instance);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.field.writeGet(writer,this.instance);
  if (!this.type.isSuperTypeOf(this.field.getType())) {
    writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
  }
}
Program: 84747
Project: 84747
Buggy source:
@Override public IType getType(){
  return this.field == null ? Types.UNKNOWN : this.field.getType();
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.type == null) {
    if (this.field == null) {
      return Types.UNKNOWN;
    }
    if (this.instance == null) {
      return this.type=this.field.getType();
    }
    return this.type=this.field.getType().getConcreteType(this.instance.getType());
  }
  return this.type;
}
Program: 84748
Project: 84748
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  return Types.ANY;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != Types.ANY) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != Types.ANY) {
      return type.getConcreteType(concrete);
    }
  }
  return Types.ANY;
}
Program: 84749
Project: 84749
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.BOOLEAN) {
    return this;
  }
  if (type.isSuperTypeOf(Types.BOOLEAN)) {
    return new BoxedValue(this,Types.BOOLEAN.boxMethod);
  }
  if (type.getTheClass().getAnnotation(BOOLEAN_CONVERTIBLE) != null) {
    return new LiteralExpression(type,this);
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.BOOLEAN) {
    return this;
  }
  if (type.isSuperTypeOf(Types.BOOLEAN)) {
    return new BoxedValue(this,Types.BOOLEAN.boxMethod);
  }
  if (type.getTheClass().getAnnotation(BOOLEAN_CONVERTIBLE) != null) {
    return new LiteralExpression(this).withType(type,typeContext,markers,context);
  }
  return null;
}