Program: 83390
Project: 83390
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.context=context;
  IType varType=this.variable.type;
  IValue value=this.variable.value;
  this.variable.value=value=value.resolve(markers,context);
  if (value.valueTag() == IValue.RANGE_OPERATOR) {
    RangeOperator ro=(RangeOperator)value;
    IValue value1=ro.value1;
    IValue value2=ro.value2;
    IType rangeType=ro.getElementType();
    if (varType == Types.UNKNOWN) {
      if (rangeType == Types.UNKNOWN) {
        rangeType=Types.findCommonSuperType(value1.getType(),value2.getType());
      }
      this.variable.type=varType=rangeType;
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.position,"String_Node_Str",this.variable.name);
      }
    }
 else     if (rangeType == Types.UNKNOWN) {
      rangeType=varType;
    }
 else     if (!varType.isSuperTypeOf(rangeType)) {
      Marker marker=markers.create(value1.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + rangeType);
      marker.addInfo("String_Node_Str" + varType);
    }
    return new RangeForStatement(this.variable,value1,value2,this.action == null ? null : this.action.resolve(markers,this));
  }
  IType valueType=value.getType();
  if (valueType.isArrayType()) {
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=valueType.getElementType();
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.getPosition(),"String_Node_Str",this.variable.name);
      }
    }
 else     if (!varType.classEquals(valueType.getElementType())) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + valueType);
      marker.addInfo("String_Node_Str" + varType);
    }
    return new ArrayForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this),valueType);
  }
  if (Types.ITERABLE.isSuperTypeOf(valueType)) {
    IType iterableType=valueType.resolveType(IterableForStatement.ITERABLE_TYPE);
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=iterableType;
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.position,"String_Node_Str",this.variable.name);
      }
    }
 else     if (!varType.isSuperTypeOf(iterableType)) {
      Marker m=markers.create(value.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + iterableType);
      m.addInfo("String_Node_Str" + varType);
    }
    return new IterableForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this),valueType,iterableType);
  }
  if (Types.STRING.isSuperTypeOf(valueType)) {
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=Types.CHAR;
    }
 else     if (!varType.classEquals(Types.CHAR)) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + varType);
    }
    return new StringForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this));
  }
  Marker m=markers.create(this.variable.position,"String_Node_Str");
  m.addInfo("String_Node_Str" + varType);
  m.addInfo("String_Node_Str" + valueType);
  if (this.action != null) {
    this.action=this.action.resolve(markers,this);
  }
  this.context=null;
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.context=context;
  IType varType=this.variable.type;
  IValue value=this.variable.value;
  this.variable.value=value=value.resolve(markers,context);
  if (value.valueTag() == IValue.RANGE_OPERATOR) {
    RangeOperator ro=(RangeOperator)value;
    IValue value1=ro.getFirstValue();
    IValue value2=ro.getLastValue();
    IType rangeType=ro.getElementType();
    if (varType == Types.UNKNOWN) {
      if (rangeType == Types.UNKNOWN) {
        rangeType=Types.findCommonSuperType(value1.getType(),value2.getType());
      }
      this.variable.type=varType=rangeType;
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.position,"String_Node_Str",this.variable.name);
      }
    }
 else     if (rangeType == Types.UNKNOWN) {
      rangeType=varType;
    }
 else     if (!varType.isSuperTypeOf(rangeType)) {
      Marker marker=markers.create(value1.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + rangeType);
      marker.addInfo("String_Node_Str" + varType);
    }
    return new RangeForStatement(this.variable,value1,value2,this.action == null ? null : this.action.resolve(markers,this));
  }
  IType valueType=value.getType();
  if (valueType.isArrayType()) {
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=valueType.getElementType();
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.getPosition(),"String_Node_Str",this.variable.name);
      }
    }
 else     if (!varType.classEquals(valueType.getElementType())) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + valueType);
      marker.addInfo("String_Node_Str" + varType);
    }
    return new ArrayForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this),valueType);
  }
  if (Types.ITERABLE.isSuperTypeOf(valueType)) {
    IType iterableType=valueType.resolveType(IterableForStatement.ITERABLE_TYPE);
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=iterableType;
      if (varType == Types.UNKNOWN) {
        markers.add(this.variable.position,"String_Node_Str",this.variable.name);
      }
    }
 else     if (!varType.isSuperTypeOf(iterableType)) {
      Marker m=markers.create(value.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + iterableType);
      m.addInfo("String_Node_Str" + varType);
    }
    return new IterableForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this),valueType,iterableType);
  }
  if (Types.STRING.isSuperTypeOf(valueType)) {
    if (varType == Types.UNKNOWN) {
      this.variable.type=varType=Types.CHAR;
    }
 else     if (!varType.classEquals(Types.CHAR)) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + varType);
    }
    return new StringForStatement(this.variable,this.action == null ? null : this.action.resolve(markers,this));
  }
  Marker m=markers.create(this.variable.position,"String_Node_Str");
  m.addInfo("String_Node_Str" + varType);
  m.addInfo("String_Node_Str" + valueType);
  if (this.action != null) {
    this.action=this.action.resolve(markers,this);
  }
  this.context=null;
  return this;
}