Program: 73207
Project: 73207
Buggy source:
/** 
 * @exception IllegalActionException If there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  if (_debugging) {
    _debug("String_Node_Str");
  }
  String modelIdentifier=_fmiModelDescription.modelIdentifier;
  double time=getDirector().getModelTime().getDoubleValue();
  double stepSize=((ptolemy.domains.sdf.kernel.SDFDirector)getDirector()).periodValue();
  if (_debugging) {
    _debug("String_Node_Str" + modelIdentifier + "String_Node_Str"+ time+ "String_Node_Str"+ stepSize+ "String_Node_Str");
  }
  int fmiFlag=((Integer)_fmiDoStep.invokeInt(new Object[]{_fmiComponent,time,stepSize,(byte)1})).intValue();
  if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
    throw new IllegalActionException(this,"String_Node_Str" + modelIdentifier + "String_Node_Str"+ time+ "String_Node_Str"+ stepSize+ "String_Node_Str"+ fmiFlag);
  }
  if (_debugging) {
    _debug("String_Node_Str" + modelIdentifier + "String_Node_Str");
  }
  for (  FMIScalarVariable scalarVariable : _fmiModelDescription.modelVariables) {
    if (_debugging) {
      _debug("String_Node_Str" + scalarVariable.name);
    }
    if (scalarVariable.alias != null && scalarVariable.alias != Alias.noAlias) {
      continue;
    }
    Token token=null;
    if (scalarVariable.variability != FMIScalarVariable.Variability.parameter) {
      if (scalarVariable.type instanceof FMIBooleanType) {
        boolean result=scalarVariable.getBoolean(_fmiComponent);
        token=new BooleanToken(result);
      }
 else       if (scalarVariable.type instanceof FMIIntegerType) {
        int result=scalarVariable.getInt(_fmiComponent);
        token=new IntToken(result);
      }
 else       if (scalarVariable.type instanceof FMIRealType) {
        double result=scalarVariable.getDouble(_fmiComponent);
        token=new DoubleToken(result);
      }
 else       if (scalarVariable.type instanceof FMIStringType) {
        String result=scalarVariable.getString(_fmiComponent);
        token=new StringToken(result);
      }
 else {
        throw new IllegalActionException("String_Node_Str" + scalarVariable.type + "String_Node_Str");
      }
      TypedIOPort port=(TypedIOPort)getPort(scalarVariable.name);
      if (_debugging) {
        _debug("String_Node_Str" + scalarVariable.name + "String_Node_Str"+ token+ "String_Node_Str"+ scalarVariable.causality+ "String_Node_Str"+ Causality.output);
      }
switch (scalarVariable.causality) {
case internal:
        break;
case input:
      token=port.get(0);
    break;
case output:
case none:
  port.send(0,token);
break;
}
}
}
}

Fixed version (ground truth):
/** 
 * @exception IllegalActionException If there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  if (_debugging) {
    _debug("String_Node_Str");
  }
  String modelIdentifier=_fmiModelDescription.modelIdentifier;
  double time=getDirector().getModelTime().getDoubleValue();
  double stepSize=((ptolemy.domains.sdf.kernel.SDFDirector)getDirector()).periodValue();
  if (_debugging) {
    _debug("String_Node_Str" + modelIdentifier + "String_Node_Str"+ time+ "String_Node_Str"+ stepSize+ "String_Node_Str");
  }
  int fmiFlag=((Integer)_fmiDoStep.invokeInt(new Object[]{_fmiComponent,time,stepSize,(byte)1})).intValue();
  if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
    throw new IllegalActionException(this,"String_Node_Str" + modelIdentifier + "String_Node_Str"+ time+ "String_Node_Str"+ stepSize+ "String_Node_Str"+ fmiFlag);
  }
  if (_debugging) {
    _debug("String_Node_Str" + modelIdentifier + "String_Node_Str");
  }
  for (  FMIScalarVariable scalarVariable : _fmiModelDescription.modelVariables) {
    if (_debugging) {
      _debug("String_Node_Str" + scalarVariable.name);
    }
    if (scalarVariable.alias != null && scalarVariable.alias != Alias.noAlias) {
      continue;
    }
    Token token=null;
    if (scalarVariable.variability != FMIScalarVariable.Variability.parameter) {
      if (scalarVariable.type instanceof FMIBooleanType) {
        boolean result=scalarVariable.getBoolean(_fmiComponent);
        token=new BooleanToken(result);
      }
 else       if (scalarVariable.type instanceof FMIIntegerType) {
        int result=scalarVariable.getInt(_fmiComponent);
        token=new IntToken(result);
      }
 else       if (scalarVariable.type instanceof FMIRealType) {
        double result=scalarVariable.getDouble(_fmiComponent);
        token=new DoubleToken(result);
      }
 else       if (scalarVariable.type instanceof FMIStringType) {
        String result=scalarVariable.getString(_fmiComponent);
        token=new StringToken(result);
      }
 else {
        throw new IllegalActionException("String_Node_Str" + scalarVariable.type + "String_Node_Str");
      }
      TypedIOPort port=(TypedIOPort)getPort(scalarVariable.name);
      if (_debugging) {
        _debug("String_Node_Str" + scalarVariable.name + "String_Node_Str"+ token+ "String_Node_Str"+ scalarVariable.causality+ "String_Node_Str"+ Causality.output);
      }
switch (scalarVariable.causality) {
case none:
        break;
case input:
      token=port.get(0);
    break;
case output:
case internal:
  port.send(0,token);
break;
}
}
}
}