Program: 72658
Project: 72658
Buggy source:
/** 
 * Return a list of inputs of the FMU. An input has both a declared ScalarVariable in the model description file with causality declared to be "input" and a port with the same name contained by this actor. Each returned input contains a reference to the port and a reference to the   {@link FMIScalarVariable}.
 * @return A list of inputs of the FMU.
 * @exception IllegalActionException If no port matching the nameof a variable declared as an input is found.
 */
private List<Input> _getInputs() throws IllegalActionException {
  if (workspace().getVersion() == _inputsVersion) {
    return _inputs;
  }
  _inputs=new LinkedList<Input>();
  for (  FMIScalarVariable scalarVariable : _fmiModelDescription.modelVariables) {
    if (scalarVariable.alias != null && !scalarVariable.alias.equals(Alias.noAlias)) {
      continue;
    }
    if (scalarVariable.variability != FMIScalarVariable.Variability.parameter && scalarVariable.variability != FMIScalarVariable.Variability.constant && scalarVariable.variability != FMIScalarVariable.Variability.fixed && (scalarVariable.causality == Causality.input)) {
      TypedIOPort port=(TypedIOPort)_getPortByNameOrDisplayName(scalarVariable.name);
      if (port == null) {
        throw new IllegalActionException(this,"String_Node_Str" + scalarVariable.name + "String_Node_Str");
      }
      Input input=new Input();
      input.scalarVariable=scalarVariable;
      input.port=port;
      if (scalarVariable.type instanceof FMIRealType) {
        input.start=((FMIRealType)scalarVariable.type).start;
      }
 else {
        input.start=null;
      }
      _inputs.add(input);
    }
  }
  _inputsVersion=workspace().getVersion();
  return _inputs;
}

Fixed version (ground truth):
/** 
 * Return a list of inputs of the FMU. An input has both a declared ScalarVariable in the model description file with causality declared to be "input" and a port with the same name contained by this actor. Each returned input contains a reference to the port and a reference to the   {@link FMIScalarVariable}.
 * @return A list of inputs of the FMU.
 * @exception IllegalActionException If no port matching the nameof a variable declared as an input is found.
 */
private List<Input> _getInputs() throws IllegalActionException {
  if (workspace().getVersion() == _inputsVersion) {
    return _inputs;
  }
  _inputs=new LinkedList<Input>();
  for (  FMIScalarVariable scalarVariable : _fmiModelDescription.modelVariables) {
    if (scalarVariable.alias != null && !scalarVariable.alias.equals(Alias.noAlias)) {
      continue;
    }
    if (scalarVariable.variability != FMIScalarVariable.Variability.parameter && scalarVariable.variability != FMIScalarVariable.Variability.constant && scalarVariable.variability != FMIScalarVariable.Variability.fixed && (scalarVariable.causality == Causality.input || (_fmiModelDescription.modelExchange && scalarVariable.causality == Causality.local && (((scalarVariable.type instanceof FMIRealType && ((FMIRealType)scalarVariable.type).indexState == -1)) || !(scalarVariable.type instanceof FMIRealType))))) {
      TypedIOPort port=(TypedIOPort)_getPortByNameOrDisplayName(scalarVariable.name);
      if (port == null) {
        throw new IllegalActionException(this,"String_Node_Str" + scalarVariable.name + "String_Node_Str");
      }
      Input input=new Input();
      input.scalarVariable=scalarVariable;
      input.port=port;
      if (scalarVariable.type instanceof FMIRealType) {
        input.start=((FMIRealType)scalarVariable.type).start;
      }
 else {
        input.start=null;
      }
      _inputs.add(input);
    }
  }
  _inputsVersion=workspace().getVersion();
  return _inputs;
}