Program: 83023
Project: 83023
Buggy source:
@Override public IValue checkArguments(MarkerList markers,ICodePosition position,IContext context,IValue instance,IArguments arguments,ITypeContext typeContext){
  int len=arguments.size();
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX && !this.isStatic()) {
    IValue argument=arguments.getFirstValue();
    arguments.setFirstValue(instance);
    instance=argument;
  }
  if (instance != null) {
    int mod=this.modifiers & Modifiers.INFIX;
    if (mod == Modifiers.INFIX && instance.valueTag() != IValue.CLASS_ACCESS) {
      IParameter par=this.parameters[0];
      IValue instance1=IType.convertValue(instance,par.getType(),typeContext,markers,context);
      if (instance1 == null) {
        Util.createTypeError(markers,instance,par.getType(),typeContext,"String_Node_Str",par.getName());
      }
 else {
        instance=instance1;
      }
      if ((this.modifiers & Modifiers.VARARGS) != 0) {
        arguments.checkVarargsValue(this.parameterCount - 2,this.parameters[this.parameterCount - 1],typeContext,markers,context);
        for (int i=0; i < this.parameterCount - 2; i++) {
          arguments.checkValue(i,this.parameters[i + 1],typeContext,markers,context);
        }
        this.checkTypeVarsInferred(markers,position,typeContext);
        return instance;
      }
      for (int i=0; i < this.parameterCount - 1; i++) {
        arguments.checkValue(i,this.parameters[i + 1],typeContext,markers,context);
      }
      this.checkTypeVarsInferred(markers,position,typeContext);
      return instance;
    }
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(I18n.createMarker(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(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
      }
    }
 else {
      IValue instance1=IType.convertValue(instance,this.theClass.getType(),typeContext,markers,context);
      if (instance1 == null) {
        Util.createTypeError(markers,instance,this.theClass.getType(),typeContext,"String_Node_Str",this.getName());
      }
 else {
        instance=instance1;
      }
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name));
    }
 else {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    len=this.parameterCount - 1;
    arguments.checkVarargsValue(len,this.parameters[len],typeContext,markers,null);
    for (int i=0; i < len; i++) {
      arguments.checkValue(i,this.parameters[i],typeContext,markers,context);
    }
    this.checkTypeVarsInferred(markers,position,typeContext);
    return instance;
  }
  for (int i=0; i < this.parameterCount; i++) {
    arguments.checkValue(i,this.parameters[i],typeContext,markers,context);
  }
  this.checkTypeVarsInferred(markers,position,typeContext);
  return instance;
}

Fixed version (ground truth):
@Override public IValue checkArguments(MarkerList markers,ICodePosition position,IContext context,IValue instance,IArguments arguments,ITypeContext typeContext){
  int len=arguments.size();
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX && !this.isStatic()) {
    IValue argument=arguments.getFirstValue();
    arguments.setFirstValue(instance);
    instance=argument;
  }
  if (instance != null) {
    int mod=this.modifiers & Modifiers.INFIX;
    if (mod == Modifiers.INFIX && instance.valueTag() != IValue.CLASS_ACCESS) {
      IParameter par=this.parameters[0];
      IValue instance1=IType.convertValue(instance,par.getType(),typeContext,markers,context);
      if (instance1 == null) {
        Util.createTypeError(markers,instance,par.getType(),typeContext,"String_Node_Str",par.getName());
      }
 else {
        instance=instance1;
      }
      if ((this.modifiers & Modifiers.VARARGS) != 0) {
        arguments.checkVarargsValue(this.parameterCount - 2,this.parameters[this.parameterCount - 1],typeContext,markers,context);
        for (int i=0; i < this.parameterCount - 2; i++) {
          arguments.checkValue(i,this.parameters[i + 1],typeContext,markers,context);
        }
        this.checkTypeVarsInferred(markers,position,typeContext);
        return instance;
      }
      for (int i=0; i < this.parameterCount - 1; i++) {
        arguments.checkValue(i,this.parameters[i + 1],typeContext,markers,context);
      }
      this.checkTypeVarsInferred(markers,position,typeContext);
      return instance;
    }
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(I18n.createMarker(position,"String_Node_Str",this.name));
      }
 else       if (instance.getType().getTheClass() != this.theClass) {
        markers.add(I18n.createMarker(position,"String_Node_Str",this.name,this.theClass.getFullName()));
      }
      instance=null;
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      if (!instance.getType().getTheClass().isObject()) {
        markers.add(I18n.createMarker(position,"String_Node_Str",this.name));
      }
    }
 else {
      IType type=this.theClass.getClassType();
      IValue instance1=IType.convertValue(instance,type,typeContext,markers,context);
      if (instance1 == null) {
        Util.createTypeError(markers,instance,type,typeContext,"String_Node_Str",this.name);
      }
 else {
        instance=instance1;
      }
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (context.isStatic()) {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name));
    }
 else {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
      instance=new ThisValue(position,this.theClass.getType(),context,markers);
    }
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    len=this.parameterCount - 1;
    arguments.checkVarargsValue(len,this.parameters[len],typeContext,markers,null);
    for (int i=0; i < len; i++) {
      arguments.checkValue(i,this.parameters[i],typeContext,markers,context);
    }
    this.checkTypeVarsInferred(markers,position,typeContext);
    return instance;
  }
  for (int i=0; i < this.parameterCount; i++) {
    arguments.checkValue(i,this.parameters[i],typeContext,markers,context);
  }
  this.checkTypeVarsInferred(markers,position,typeContext);
  return instance;
}