Program: 84479
Project: 84479
Buggy source:
@Override public IValue checkArguments(MarkerList markers,ICodePosition position,IContext context,IValue instance,IArguments arguments,ITypeContext typeContext){
  int len=arguments.size();
  IType parType;
  if (instance == null && (this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    parType=this.theClass.getType().getConcreteType(typeContext);
    instance=arguments.getFirstValue();
    IValue instance1=parType.convertValue(instance,typeContext,markers,context);
    if (instance1 == null) {
      Marker marker=markers.create(instance.getPosition(),"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
    }
    this.checkTypeVarsInferred(markers,position,typeContext);
    return null;
  }
  if (instance != null) {
    int mod=this.modifiers & Modifiers.INFIX;
    if (mod == Modifiers.INFIX && instance.valueTag() != IValue.CLASS_ACCESS) {
      IParameter par=this.parameters[0];
      parType=par.getType().getConcreteType(typeContext);
      IValue instance1=instance.withType(parType,typeContext,markers,context);
      if (instance1 == null) {
        Marker marker=markers.create(instance.getPosition(),"String_Node_Str",par.getName());
        marker.addInfo("String_Node_Str" + parType);
        marker.addInfo("String_Node_Str" + instance.getType());
      }
 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 (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
      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.intrinsicOpcodes == null && instance.isPrimitive()) {
      instance=instance.withType(this.theClass.getType().getConcreteType(typeContext),typeContext,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.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();
  IType parType;
  if (instance == null && (this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    parType=this.theClass.getType().getConcreteType(typeContext);
    instance=arguments.getFirstValue();
    IValue instance1=parType.convertValue(instance,typeContext,markers,context);
    if (instance1 == null) {
      Marker marker=markers.create(instance.getPosition(),"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
    }
    this.checkTypeVarsInferred(markers,position,typeContext);
    return null;
  }
  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=par.getType().convertValue(instance,typeContext,markers,context);
      if (instance1 == null) {
        Marker marker=markers.create(instance.getPosition(),"String_Node_Str",par.getName());
        marker.addInfo("String_Node_Str" + par.getType());
        marker.addInfo("String_Node_Str" + instance.getType());
      }
 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 (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
      }
      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.intrinsicOpcodes == null && instance.isPrimitive()) {
      instance=this.theClass.getType().convertValue(instance,typeContext,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.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;
}