nus-yam/ex-repair huggingface dataset:
Program: 84415
Project: 84415
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  if (this.theClass == null) {
    return;
  }
  if (this.retention == null) {
    IAnnotation retention=this.theClass.getAnnotation(Types.RETENTION_CLASS);
    if (retention != null) {
      INamed value=(INamed)retention.getArguments().getValue(0,Annotation.VALUE);
      this.retention=RetentionPolicy.valueOf(value.getName().qualified);
    }
  }
  if (this.targets != null) {
    return;
  }
  IAnnotation target=this.theClass.getAnnotation(Types.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=new TreeSet();
  IValueList values=(IValueList)target.getArguments().getValue(0,Annotation.VALUE);
  if (values == null) {
    return;
  }
  int count=values.valueCount();
  for (int i=0; i < count; i++) {
    INamed value=(INamed)values.getValue(i);
    this.targets.add(ElementType.valueOf(value.getName().qualified));
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  if (this.theClass == null) {
    return;
  }
  if (this.retention == null) {
    IAnnotation retention=this.theClass.getAnnotation(Annotation.Types.RETENTION_CLASS);
    if (retention != null) {
      INamed value=(INamed)retention.getArguments().getValue(0,Annotation.VALUE);
      this.retention=RetentionPolicy.valueOf(value.getName().qualified);
    }
  }
  if (this.targets != null) {
    return;
  }
  IAnnotation target=this.theClass.getAnnotation(Annotation.Types.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=new TreeSet();
  IValueList values=(IValueList)target.getArguments().getValue(0,Annotation.VALUE);
  if (values == null) {
    return;
  }
  int count=values.valueCount();
  for (int i=0; i < count; i++) {
    INamed value=(INamed)values.getValue(i);
    this.targets.add(ElementType.valueOf(value.getName().qualified));
  }
}
Program: 84416
Project: 84416
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.UNKNOWN) {
    return this;
  }
  if (type.isArrayType()) {
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralExpression.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == dyvil.tools.compiler.ast.type.Types.UNKNOWN) {
    return this;
  }
  if (type.isArrayType()) {
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralExpression.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  return null;
}
Program: 84417
Project: 84417
Buggy source:
@Override public IType getType(){
  return this.requiredType == null ? Types.UNKNOWN : this.requiredType;
}

Fixed version (ground truth):
@Override public IType getType(){
  return this.requiredType == null ? dyvil.tools.compiler.ast.type.Types.UNKNOWN : this.requiredType;
}
Program: 84418
Project: 84418
Buggy source:
@Override public IValue withType(IType arrayType,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (!arrayType.isArrayType()) {
    IClass iclass=arrayType.getTheClass();
    IAnnotation annotation;
    if ((annotation=iclass.getAnnotation(Types.ARRAY_CONVERTIBLE)) != null) {
      return new LiteralExpression(this,annotation).withType(arrayType,typeContext,markers,context);
    }
    if (arrayType.classEquals(Types.ITERABLE)) {
      return new LiteralExpression(this,getArrayToIterable()).withType(arrayType,typeContext,markers,context);
    }
 else     if (iclass != Types.OBJECT_CLASS) {
      return null;
    }
 else {
      elementType=this.getElementType();
    }
  }
 else {
    elementType=arrayType.getElementType();
  }
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(elementType)) {
      return null;
    }
  }
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.requiredType);
      marker.addInfo("String_Node_Str" + value.getType());
    }
 else {
      value=value1;
      this.values[i]=value1;
    }
  }
  this.elementType=elementType;
  this.requiredType=arrayType;
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType arrayType,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (!arrayType.isArrayType()) {
    IClass iclass=arrayType.getTheClass();
    IAnnotation annotation;
    if ((annotation=iclass.getAnnotation(Types.ARRAY_CONVERTIBLE)) != null) {
      return new LiteralExpression(this,annotation).withType(arrayType,typeContext,markers,context);
    }
    if (arrayType.classEquals(dyvil.tools.compiler.ast.type.Types.ITERABLE)) {
      return new LiteralExpression(this,getArrayToIterable()).withType(arrayType,typeContext,markers,context);
    }
 else     if (iclass != dyvil.tools.compiler.ast.type.Types.OBJECT_CLASS) {
      return null;
    }
 else {
      elementType=this.getElementType();
    }
  }
 else {
    elementType=arrayType.getElementType();
  }
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(elementType)) {
      return null;
    }
  }
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.requiredType);
      marker.addInfo("String_Node_Str" + value.getType());
    }
 else {
      value=value1;
      this.values[i]=value1;
    }
  }
  this.elementType=elementType;
  this.requiredType=arrayType;
  return this;
}
Program: 84419
Project: 84419
Buggy source:
public static IType getCommonType(IValue[] values,int valueCount){
  if (valueCount == 0) {
    return Types.ANY;
  }
  IType t=values[0].getType();
  for (int i=1; i < valueCount; i++) {
    IType t1=values[i].getType();
    t=Types.combine(t,t1);
    if (t == null) {
      return Types.ANY;
    }
  }
  return t;
}

Fixed version (ground truth):
public static IType getCommonType(IValue[] values,int valueCount){
  if (valueCount == 0) {
    return dyvil.tools.compiler.ast.type.Types.ANY;
  }
  IType t=values[0].getType();
  for (int i=1; i < valueCount; i++) {
    IType t1=values[i].getType();
    t=dyvil.tools.compiler.ast.type.Types.combine(t,t1);
    if (t == null) {
      return dyvil.tools.compiler.ast.type.Types.ANY;
    }
  }
  return t;
}
Program: 84420
Project: 84420
Buggy source:
private boolean isConvertibleFrom(IType type){
  IClass iclass=type.getTheClass();
  return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(Types.ARRAY_CONVERTIBLE) != null || Types.ITERABLE.isSuperClassOf(type);
}

Fixed version (ground truth):
private boolean isConvertibleFrom(IType type){
  IClass iclass=type.getTheClass();
  return iclass == dyvil.tools.compiler.ast.type.Types.OBJECT_CLASS || iclass.getAnnotation(Types.ARRAY_CONVERTIBLE) != null || dyvil.tools.compiler.ast.type.Types.ITERABLE.isSuperClassOf(type);
}
Program: 84421
Project: 84421
Buggy source:
private static IMethod getArrayToIterable(){
  if (ARRAY_TO_ITERABLE != null) {
    return ARRAY_TO_ITERABLE;
  }
  return ARRAY_TO_ITERABLE=Types.getObjectArray().getBody().getMethod(Name.getQualified("String_Node_Str"));
}

Fixed version (ground truth):
private static IMethod getArrayToIterable(){
  if (ARRAY_TO_ITERABLE != null) {
    return ARRAY_TO_ITERABLE;
  }
  return ARRAY_TO_ITERABLE=dyvil.tools.compiler.ast.type.Types.getObjectArray().getBody().getMethod(Name.getQualified("String_Node_Str"));
}
Program: 84422
Project: 84422
Buggy source:
@Override public float getTypeMatch(IType type){
  float distance=type.getSubTypeDistance(Types.STRING);
  if (distance != 0) {
    return distance;
  }
  return this.isConvertible(type) ? CONVERSION_MATCH : 0;
}

Fixed version (ground truth):
@Override public float getTypeMatch(IType type){
  float distance=type.getSubTypeDistance(dyvil.tools.compiler.ast.type.Types.STRING);
  if (distance != 0) {
    return distance;
  }
  return this.isConvertible(type) ? CONVERSION_MATCH : 0;
}
Program: 84423
Project: 84423
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  int len=this.count / 2;
  for (int i=0; i < len; i++) {
    IValue v=this.values[i];
    v.check(markers,context);
    if (v.getType() == Types.VOID) {
      markers.add(v.getPosition(),"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  int len=this.count / 2;
  for (int i=0; i < len; i++) {
    IValue v=this.values[i];
    v.check(markers,context);
    if (v.getType() == dyvil.tools.compiler.ast.type.Types.VOID) {
      markers.add(v.getPosition(),"String_Node_Str");
    }
  }
}
Program: 84424
Project: 84424
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isSuperTypeOf(Types.STRING)) {
    return this;
  }
  IClass iclass=type.getTheClass();
  if (iclass.getAnnotation(Types.STRING_CONVERTIBLE_CLASS) != null) {
    return new LiteralExpression(this).withType(type,typeContext,markers,context);
  }
  if (iclass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null) {
    StringValue string;
    int len=this.count / 2;
    if (len > 0) {
      StringBuilder builder=new StringBuilder();
      builder.append(this.strings[0]);
      for (int i=1; i <= len; i++) {
        builder.append('\\').append(i);
        builder.append(this.strings[i]);
      }
      string=new StringValue(this.position,builder.toString());
    }
 else {
      string=new StringValue("String_Node_Str");
    }
    ArgumentList list=new ArgumentList(1 + len);
    list.addValue(string);
    for (int i=0; i < len; i++) {
      list.addValue(this.values[i]);
    }
    return new LiteralExpression(this,list).withType(type,typeContext,markers,context);
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isSuperTypeOf(dyvil.tools.compiler.ast.type.Types.STRING)) {
    return this;
  }
  IClass iclass=type.getTheClass();
  if (iclass.getAnnotation(dyvil.tools.compiler.ast.type.Types.STRING_CONVERTIBLE_CLASS) != null) {
    return new LiteralExpression(this).withType(type,typeContext,markers,context);
  }
  if (iclass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null) {
    StringValue string;
    int len=this.count / 2;
    if (len > 0) {
      StringBuilder builder=new StringBuilder();
      builder.append(this.strings[0]);
      for (int i=1; i <= len; i++) {
        builder.append('\\').append(i);
        builder.append(this.strings[i]);
      }
      string=new StringValue(this.position,builder.toString());
    }
 else {
      string=new StringValue("String_Node_Str");
    }
    ArgumentList list=new ArgumentList(1 + len);
    list.addValue(string);
    for (int i=0; i < len; i++) {
      list.addValue(this.values[i]);
    }
    return new LiteralExpression(this,list).withType(type,typeContext,markers,context);
  }
  return null;
}
Program: 84425
Project: 84425
Buggy source:
@Override public boolean isType(IType type){
  if (type.isSuperTypeOf(Types.STRING)) {
    return true;
  }
  return this.isConvertible(type);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type.isSuperTypeOf(dyvil.tools.compiler.ast.type.Types.STRING)) {
    return true;
  }
  return this.isConvertible(type);
}
Program: 84426
Project: 84426
Buggy source:
@Override public IType getType(){
  return Types.STRING;
}

Fixed version (ground truth):
@Override public IType getType(){
  return dyvil.tools.compiler.ast.type.Types.STRING;
}
Program: 84427
Project: 84427
Buggy source:
private boolean isConvertible(IType type){
  IClass theClass=type.getTheClass();
  return theClass.getAnnotation(Types.STRING_CONVERTIBLE_CLASS) != null || theClass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null;
}

Fixed version (ground truth):
private boolean isConvertible(IType type){
  IClass theClass=type.getTheClass();
  return theClass.getAnnotation(dyvil.tools.compiler.ast.type.Types.STRING_CONVERTIBLE_CLASS) != null || theClass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null;
}
Program: 84428
Project: 84428
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType,this.getLineNumber());
    return;
  }
  String internal=this.tupleType.getInternalName();
  writer.writeTypeInsn(Opcodes.NEW,internal);
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    value.writeExpression(writer,Types.OBJECT);
  }
  String owner=internal;
  String desc=TupleType.getConstructorDescriptor(this.valueCount);
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType,this.getLineNumber());
    return;
  }
  String internal=this.tupleType.getInternalName();
  writer.writeTypeInsn(Opcodes.NEW,internal);
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    value.writeExpression(writer,dyvil.tools.compiler.ast.type.Types.OBJECT);
  }
  String owner=internal;
  String desc=TupleType.getConstructorDescriptor(this.valueCount);
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}
Program: 84429
Project: 84429
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.resolveType(markers,context);
  ClassGenericType generic=new ClassGenericType(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=dyvil.tools.compiler.ast.type.Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolveType(markers,context);
  ClassGenericType generic=new ClassGenericType(Types.CLASS_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}
Program: 84430
Project: 84430
Buggy source:
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int args=this.arguments.size();
  if (args == 1) {
    IValue op;
    if (this.instance != null) {
      op=Operators.getPriority(this.instance,this.name,this.arguments.getFirstValue());
    }
 else {
      op=Operators.getPriority(this.name,this.arguments.getFirstValue());
    }
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    this.checkArguments(markers,context);
    return this;
  }
  if (args == 1 && this.instance != null) {
    String qualified=this.name.qualified;
    if (qualified.endsWith("String_Node_Str")) {
      String unqualified=this.name.unqualified;
      Name name=Name.get(qualified.substring(0,qualified.length() - 3),unqualified.substring(0,unqualified.length() - 1));
      CompoundCall cc=new CompoundCall(this.position,this.instance,name,this.arguments);
      return cc.resolveCall(markers,context);
    }
    IValue op=Operators.get(this.instance,this.name,this.arguments.getFirstValue());
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  if (this.instance == null) {
    AbstractCall apply=this.resolveApply(markers,context);
    if (apply != null) {
      apply.checkArguments(markers,context);
      return apply;
    }
  }
  ICall.addResolveMarker(markers,this.position,this.instance,this.name,this.arguments);
  return this;
}

Fixed version (ground truth):
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int args=this.arguments.size();
  if (args == 1) {
    IValue op;
    if (this.instance != null) {
      op=Operators.getPriority(this.instance,this.name,this.arguments.getFirstValue());
    }
 else {
      op=Operators.getPriority(this.name,this.arguments.getFirstValue());
    }
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    this.checkArguments(markers,context);
    return this;
  }
  if (args == 1 && this.instance != null) {
    String qualified=this.name.qualified;
    if (qualified.endsWith("String_Node_Str")) {
      Name name=ExpressionParser.stripEq(this.name);
      CompoundCall cc=new CompoundCall(this.position,this.instance,name,this.arguments);
      return cc.resolveCall(markers,context);
    }
    IValue op=Operators.get(this.instance,this.name,this.arguments.getFirstValue());
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  if (this.instance == null) {
    AbstractCall apply=this.resolveApply(markers,context);
    if (apply != null) {
      apply.checkArguments(markers,context);
      return apply;
    }
  }
  ICall.addResolveMarker(markers,this.position,this.instance,this.name,this.arguments);
  return this;
}
Program: 84431
Project: 84431
Buggy source:
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if ((this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
  }
  IValue value1=IType.convertValue(newValue,this.type,instance.getType(),markers,context);
  if (value1 == null) {
    Marker marker=markers.create(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
  }
 else {
    newValue=value1;
  }
  return newValue;
}

Fixed version (ground truth):
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if ((this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
  }
  IValue value1=IType.convertValue(newValue,this.type,this.type,markers,context);
  if (value1 == null) {
    Marker marker=markers.create(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
  }
 else {
    newValue=value1;
  }
  return newValue;
}
Program: 84432
Project: 84432
Buggy source:
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (!this.isMethodTypeVariable(typeVar)) {
    return;
  }
  if (index < this.genericCount) {
    this.generics[index]=Types.combine(this.generics[index],type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}

Fixed version (ground truth):
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (!this.isMethodTypeVariable(typeVar)) {
    return;
  }
  if (index < this.genericCount) {
    if (this.generics[index] == null) {
      this.generics[index]=type;
      return;
    }
    this.generics[index]=Types.combine(this.generics[index],type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}
Program: 84435
Project: 84435
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.pattern != null) {
    this.pattern.resolve(markers,context);
    if (this.type == null) {
      this.getType();
    }
    IType type1=this.type.resolveType(PAR_TYPE);
    this.pattern=this.pattern.withType(type1,markers);
  }
  IContext context1=new CombiningContext(this,context);
  if (this.condition != null) {
    this.condition=this.condition.resolve(markers,context1);
  }
  if (this.action != null) {
    this.action=this.action.resolve(markers,context1);
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.pattern != null) {
    this.pattern.resolve(markers,context);
    if (this.type == null) {
      this.getType();
    }
    IType type1=this.type.resolveTypeSafely(PAR_TYPE);
    this.pattern=this.pattern.withType(type1,markers);
  }
  IContext context1=new CombiningContext(this,context);
  if (this.condition != null) {
    this.condition=this.condition.resolve(markers,context1);
  }
  if (this.action != null) {
    this.action=this.action.resolve(markers,context1);
  }
  return this;
}
Program: 84436
Project: 84436
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.isType(type)) {
    this.type=type;
    IType type1=this.type.resolveType(RETURN_TYPE);
    this.action=this.action.withType(type1,typeContext,markers,context);
    return this;
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.isType(type)) {
    this.type=type;
    IType type1=this.type.resolveTypeSafely(RETURN_TYPE);
    this.action=this.action.withType(type1,typeContext,markers,context);
    return this;
  }
  return null;
}
Program: 84439
Project: 84439
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.valueCount == 1) {
    return this.values[0].withType(type,typeContext,markers,context);
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.TUPLE_CONVERTIBLE);
  if (annotation != null) {
    return new LiteralExpression(this,annotation,new ArgumentList(this.values,this.valueCount)).withType(type,typeContext,markers,context);
  }
  IClass tupleClass=TupleType.getTupleClass(this.valueCount);
  if (!tupleClass.isSubTypeOf(type)) {
    return null;
  }
  for (int i=0; i < this.valueCount; i++) {
    IType elementType=type.resolveType(tupleClass.getTypeVariable(i));
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker m=markers.create(value.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + value.getType());
      m.addInfo("String_Node_Str" + elementType);
    }
 else {
      this.values[i]=value=value1;
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.valueCount == 1) {
    return this.values[0].withType(type,typeContext,markers,context);
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.TUPLE_CONVERTIBLE);
  if (annotation != null) {
    return new LiteralExpression(this,annotation,new ArgumentList(this.values,this.valueCount)).withType(type,typeContext,markers,context);
  }
  IClass tupleClass=TupleType.getTupleClass(this.valueCount);
  if (!tupleClass.isSubTypeOf(type)) {
    return null;
  }
  this.tupleType=type;
  for (int i=0; i < this.valueCount; i++) {
    IType elementType=type.resolveTypeSafely(tupleClass.getTypeVariable(i));
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker m=markers.create(value.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + value.getType());
      m.addInfo("String_Node_Str" + elementType);
    }
 else {
      this.values[i]=value=value1;
    }
  }
  return this;
}
Program: 84440
Project: 84440
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.value.writeExpression(writer,this.type);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.value.writeExpression(writer);
  this.value.getType().writeCast(writer,this.type,this.getLineNumber());
}
Program: 84441
Project: 84441
Buggy source:
@Override public IPattern withType(IType type,MarkerList markers){
  IClass tupleClass=TupleType.getTupleClass(this.patternCount);
  if (!tupleClass.isSubTypeOf(type)) {
    return null;
  }
  this.tupleType=type;
  for (int i=0; i < this.patternCount; i++) {
    IType type1=type.resolveType(tupleClass.getTypeVariable(i));
    IPattern pattern=this.patterns[i];
    IPattern pattern1=pattern.withType(type1,markers);
    if (pattern1 == null) {
      Marker m=markers.create(pattern.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + pattern.getType());
      m.addInfo("String_Node_Str" + type1);
    }
 else {
      this.patterns[i]=pattern1;
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IPattern withType(IType type,MarkerList markers){
  IClass tupleClass=TupleType.getTupleClass(this.patternCount);
  if (!tupleClass.isSubTypeOf(type)) {
    return null;
  }
  this.tupleType=type;
  for (int i=0; i < this.patternCount; i++) {
    IType type1=type.resolveTypeSafely(tupleClass.getTypeVariable(i));
    IPattern pattern=this.patterns[i];
    IPattern pattern1=pattern.withType(type1,markers);
    if (pattern1 == null) {
      Marker m=markers.create(pattern.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + pattern.getType());
      m.addInfo("String_Node_Str" + type1);
    }
 else {
      this.patterns[i]=pattern1;
    }
  }
  return this;
}
Program: 84442
Project: 84442
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.then == null) {
    this.condition.writeExpression(writer);
    writer.writeInsn(Opcodes.POP);
    return;
  }
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  if (this.elseThen != null) {
    dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
    writer.writeLabel(elseStart);
    this.elseThen.writeStatement(writer);
    writer.writeLabel(elseEnd);
  }
 else {
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeLabel(elseStart);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.then == null) {
    this.condition.writeExpression(writer);
    writer.writeInsn(Opcodes.POP);
    return;
  }
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  if (this.elseThen != null) {
    dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
    writer.writeTargetLabel(elseStart);
    this.elseThen.writeStatement(writer);
    writer.writeTargetLabel(elseEnd);
  }
 else {
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeTargetLabel(elseStart);
  }
}
Program: 84443
Project: 84443
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
  Object commonFrameType=this.commonType.getFrameType();
  this.condition.writeInvJump(writer,elseStart);
  this.then.writeExpression(writer,this.commonType);
  writer.getFrame().set(commonFrameType);
  writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
  writer.writeLabel(elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer,this.commonType);
  }
  writer.getFrame().set(commonFrameType);
  writer.writeLabel(elseEnd);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
  Object commonFrameType=this.commonType.getFrameType();
  this.condition.writeInvJump(writer,elseStart);
  this.then.writeExpression(writer,this.commonType);
  writer.getFrame().set(commonFrameType);
  writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
  writer.writeTargetLabel(elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer,this.commonType);
  }
  writer.getFrame().set(commonFrameType);
  writer.writeTargetLabel(elseEnd);
}
Program: 84446
Project: 84446
Buggy source:
@Override default boolean isGenericType(){
  return false;
}

Fixed version (ground truth):
@Override public default boolean isGenericType(){
  return false;
}
Program: 84447
Project: 84447
Buggy source:
public default int getTypecode(){
  return -1;
}

Fixed version (ground truth):
public int getTypecode();
Program: 84448
Project: 84448
Buggy source:
public default boolean isPrimitive(){
  return false;
}

Fixed version (ground truth):
public boolean isPrimitive();
Program: 84449
Project: 84449
Buggy source:
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  IClass iclass=getTupleClass(this.typeCount);
  for (int i=0; i < this.typeCount; i++) {
    ITypeVariable typeVar=iclass.getTypeVariable(i);
    IType concreteType=concrete.resolveType(typeVar);
    if (concreteType != null) {
      this.types[i].inferTypes(concreteType,typeContext);
    }
  }
}

Fixed version (ground truth):
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  IClass iclass=getTupleClass(this.typeCount);
  for (int i=0; i < this.typeCount; i++) {
    ITypeVariable typeVar=iclass.getTypeVariable(i);
    IType concreteType=concrete.resolveTypeSafely(typeVar);
    if (concreteType != null) {
      this.types[i].inferTypes(concreteType,typeContext);
    }
  }
}
Program: 84450
Project: 84450
Buggy source:
@Override public IMethod getFunctionalMethod(){
  if (this.functionalMethod != null) {
    return this.functionalMethod;
  }
  for (int i=0; i < this.methodCount; i++) {
    IMethod m=this.methods[i];
    if (m.hasModifier(Modifiers.ABSTRACT)) {
      this.functionalMethod=m;
      return m;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getFunctionalMethod(){
  if (this.functionalMethod != null) {
    return this.functionalMethod;
  }
  boolean found=false;
  IMethod match=null;
  for (int i=0; i < this.methodCount; i++) {
    IMethod m=this.methods[i];
    if (m.hasModifier(Modifiers.ABSTRACT)) {
      if (found) {
        return null;
      }
      found=true;
      match=m;
    }
  }
  return this.functionalMethod=match;
}
Program: 84451
Project: 84451
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value.checkTypes(markers,new CombiningContext(this,context));
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.method == null) {
    IType type=this.getType();
    this.withType(type,type,markers,context);
  }
  this.value.checkTypes(markers,new CombiningContext(this,context));
}
Program: 84452
Project: 84452
Buggy source:
@Override public float getVarargsTypeMatch(int index,IParameter param){
  if (index == this.size) {
    return DEFAULT_MATCH;
  }
  if (index > this.size) {
    return 0;
  }
  IValue argument=this.values[index];
  IType type=param.getType();
  float m=argument.getTypeMatch(type);
  if (m != 0) {
    return m;
  }
  return argument.getTypeMatch(type.getElementType());
}

Fixed version (ground truth):
@Override public float getVarargsTypeMatch(int index,IParameter param){
  if (index == this.size) {
    return DEFAULT_MATCH;
  }
  if (index > this.size) {
    return 0;
  }
  IValue argument=this.values[index];
  IType type=param.getType();
  float m=argument.getTypeMatch(type);
  if (m > 0F) {
    return m;
  }
  return argument.getTypeMatch(type.getElementType());
}
Program: 84453
Project: 84453
Buggy source:
public default int getSubClassDistance(IType subtype){
  if (subtype.isArrayType()) {
    IClass iclass=this.getTheClass();
    if (iclass == Types.OBJECT_CLASS) {
      return 3;
    }
    return 0;
  }
  return subtype.getTheClass().getSuperTypeDistance(this);
}

Fixed version (ground truth):
public default int getSubClassDistance(IType subtype){
  return subtype.getSuperTypeDistance(this);
}
Program: 84454
Project: 84454
Buggy source:
public default float getSubTypeDistance(IType subtype){
  if (subtype.isArrayType()) {
    IClass iclass=this.getTheClass();
    if (iclass == Types.OBJECT_CLASS) {
      return 3F;
    }
    return 0F;
  }
  return subtype.getTheClass().getSuperTypeDistance(this);
}

Fixed version (ground truth):
public default float getSubTypeDistance(IType subtype){
  return subtype.getSuperTypeDistance(this);
}
Program: 84455
Project: 84455
Buggy source:
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}

Fixed version (ground truth):
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
this.lambdaDesc=method.getDescriptor();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
this.lambdaDesc=ctor.getDescriptor();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}
Program: 84456
Project: 84456
Buggy source:
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(position,"String_Node_Str",this.name.unqualified,this.theClass.getFullName());
      }
      instance=null;
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      if (!instance.getType().getTheClass().isObject()) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(position,"String_Node_Str",this.name);
    }
 else {
      markers.add(position,"String_Node_Str",this.name.unqualified);
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if (this.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(position,"String_Node_Str",this.name);
  }
switch (IContext.getVisibility(context,this)) {
case IContext.INTERNAL:
    markers.add(position,"String_Node_Str",this.name);
  break;
case IContext.INVISIBLE:
markers.add(position,"String_Node_Str",this.name);
break;
}
return instance;
}

Fixed version (ground truth):
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(position,"String_Node_Str",this.name.unqualified,this.theClass.getFullName());
      }
      instance=null;
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      if (!instance.getType().getTheClass().isObject()) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
    }
 else {
      IType type=this.theClass.getType();
      instance=type.convertValue(instance,type,markers,context);
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(position,"String_Node_Str",this.name);
    }
 else {
      markers.add(position,"String_Node_Str",this.name.unqualified);
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if (this.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(position,"String_Node_Str",this.name);
  }
switch (IContext.getVisibility(context,this)) {
case IContext.INTERNAL:
    markers.add(position,"String_Node_Str",this.name);
  break;
case IContext.INVISIBLE:
markers.add(position,"String_Node_Str",this.name);
break;
}
return instance;
}
Program: 84457
Project: 84457
Buggy source:
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(position,"String_Node_Str",this.name.unqualified,this.theClass.getFullName());
      }
      instance=null;
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      if (!instance.getType().getTheClass().isObject()) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(position,"String_Node_Str",this.name.unqualified);
    }
 else {
      markers.add(position,"String_Node_Str",this.name.unqualified);
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if (this.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(position,"String_Node_Str",this.name);
  }
switch (context.getThisClass().getVisibility(this)) {
case IContext.INTERNAL:
    markers.add(position,"String_Node_Str",this.name);
  break;
case IContext.INVISIBLE:
markers.add(position,"String_Node_Str",this.name);
break;
}
return instance;
}

Fixed version (ground truth):
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(position,"String_Node_Str",this.name.unqualified,this.theClass.getFullName());
      }
      instance=null;
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      if (!instance.getType().getTheClass().isObject()) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
    }
 else {
      IType type=this.theClass.getType();
      instance=type.convertValue(instance,type,markers,context);
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(position,"String_Node_Str",this.name.unqualified);
    }
 else {
      markers.add(position,"String_Node_Str",this.name.unqualified);
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if (this.hasModifier(Modifiers.DEPRECATED)) {
    markers.add(position,"String_Node_Str",this.name);
  }
switch (context.getThisClass().getVisibility(this)) {
case IContext.INTERNAL:
    markers.add(position,"String_Node_Str",this.name);
  break;
case IContext.INVISIBLE:
markers.add(position,"String_Node_Str",this.name);
break;
}
return instance;
}
Program: 84459
Project: 84459
Buggy source:
@Override public float getTypeMatch(IType type){
  return this.isType(type) ? 1 : 0;
}

Fixed version (ground truth):
@Override public float getTypeMatch(IType type){
  if (type.getTheClass() == Types.OBJECT_CLASS) {
    return 2;
  }
  return this.isType(type) ? 1 : 0;
}
Program: 84461
Project: 84461
Buggy source:
public static <E>ImmutableList<E> apply(E... elements){
  return new ArrayList(elements,true);
}

Fixed version (ground truth):
public static <E>ImmutableList<E> apply(int count,IntFunction<E> generator){
  Object[] elements=new Object[count];
  for (int i=0; i < count; i++) {
    elements[i]=generator.apply(i);
  }
  return new ArrayList(elements,count,true);
}
Program: 84462
Project: 84462
Buggy source:
/** 
 * Returns an immutable list containing all of the given   {@code elements}. This method is primarily for use with <i>Array Expressions</i> in <i>Dyvil</i> and internally creates an  {@link dyvil.collection.immutable.ArrayList ArrayList} from the given{@code elements}.
 * @param elements the elements of the returned collection
 * @return an immutable list containing all of the given elements
 */
public static <E>ImmutableList<E> apply(E... elements){
  return ImmutableList.apply(elements);
}

Fixed version (ground truth):
public static <E>ImmutableList<E> apply(int count,IntFunction<E> generator){
  return ImmutableList.apply(count,generator);
}
Program: 84463
Project: 84463
Buggy source:
/** 
 * @return the descriptor of the (synthetic) lambda callback method,including captured variables, parameter types and the return type.
 */
private String getLambdaDescriptor(){
  if (this.lambdaDesc != null) {
    return this.lambdaDesc;
  }
  StringBuilder buffer=new StringBuilder();
  buffer.append('(');
  for (int i=0; i < this.capturedFieldCount; i++) {
    this.capturedFields[i].getActualType().appendExtendedName(buffer);
  }
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].getType().appendExtendedName(buffer);
  }
  buffer.append(')');
  if (this.directInvokeOpcode == ClassFormat.H_NEWINVOKESPECIAL) {
    buffer.append('V');
  }
 else {
    this.returnType.appendExtendedName(buffer);
  }
  return this.lambdaDesc=buffer.toString();
}

Fixed version (ground truth):
/** 
 * @return the descriptor of the (synthetic) lambda callback method,including captured variables, parameter types and the return type.
 */
private String getLambdaDescriptor(){
  if (this.lambdaDesc != null) {
    return this.lambdaDesc;
  }
  StringBuilder buffer=new StringBuilder();
  buffer.append('(');
  for (int i=0; i < this.capturedFieldCount; i++) {
    this.capturedFields[i].getActualType().appendExtendedName(buffer);
  }
  for (int i=this.directInvokeOpcode != 0 && this.directInvokeOpcode != Opcodes.INVOKESTATIC ? 1 : 0; i < this.parameterCount; i++) {
    this.parameters[i].getType().appendExtendedName(buffer);
  }
  buffer.append(')');
  if (this.directInvokeOpcode == ClassFormat.H_NEWINVOKESPECIAL) {
    buffer.append('V');
  }
 else {
    this.returnType.appendExtendedName(buffer);
  }
  return this.lambdaDesc=buffer.toString();
}
Program: 84464
Project: 84464
Buggy source:
private boolean checkCall(IValue instance,IArguments arguments,IParameterized p){
  this.value=null;
  if (instance != null) {
    if (this.parameterCount <= 0) {
      return false;
    }
    if (isFieldAccess(instance,this.parameters[0])) {
      if (arguments.size() != this.parameterCount - 1) {
        return false;
      }
      for (int i=1; i < this.parameterCount; i++) {
        IValue v=arguments.getValue(i - 1,p.getParameter(i - 1));
        if (!isFieldAccess(v,this.parameters[i])) {
          return false;
        }
      }
    }
    this.value=instance;
    this.thisClass=instance.getType().getTheClass();
  }
  if (arguments.size() != this.parameterCount) {
    return false;
  }
  for (int i=0; i < this.parameterCount; i++) {
    IValue v=arguments.getValue(i,p.getParameter(i));
    if (!isFieldAccess(v,this.parameters[i])) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean checkCall(IValue instance,IArguments arguments,IParameterized p){
  boolean receiver=false;
  if (instance != null) {
    if (instance.isPrimitive()) {
      return false;
    }
    if (this.parameterCount <= 0) {
      return false;
    }
    if (isFieldAccess(instance,this.parameters[0])) {
      if (arguments.size() != this.parameterCount - 1) {
        return false;
      }
      for (int i=1; i < this.parameterCount; i++) {
        IValue v=arguments.getValue(i - 1,p.getParameter(i - 1));
        if (!isFieldAccess(v,this.parameters[i])) {
          return false;
        }
      }
      this.value=null;
      return true;
    }
    receiver=true;
  }
  if (arguments.size() != this.parameterCount) {
    return false;
  }
  for (int i=0; i < this.parameterCount; i++) {
    IValue v=arguments.getValue(i,p.getParameter(i));
    if (!isFieldAccess(v,this.parameters[i])) {
      return false;
    }
  }
  if (receiver) {
    if (instance.isPrimitive()) {
      return false;
    }
    this.value=instance;
    this.thisClass=instance.getType().getTheClass();
  }
 else {
    this.value=null;
  }
  return true;
}