Program: 72733
Project: 72733
Buggy source:
/** 
 * Invoke _fmiInitialize() (for model exchange) or _fmiInitializeSlave() (for co-simulation) on the FMU. In the case of model exchange, this method also checks for a returned next event time and calls fireAt() on the director if a next event time is returned. In the case of co-simulation, if the FMU provides a maximum step size, get that from the FMU and call fireAt() as well.
 * @exception IllegalActionException If the FMU does not return fmiOK.
 */
@SuppressWarnings("String_Node_Str") protected void _fmiInitialize() throws IllegalActionException {
  if (_fmiModelDescription.modelExchange) {
    if (_fmiVersion < 1.5) {
      FMIEventInfo eventInfo=new FMIEventInfo.ByValue();
      int fmiFlag=((Integer)_fmiInitializeFunction.invoke(Integer.class,new Object[]{_fmiComponent,_toleranceControlled,_relativeTolerance,eventInfo.getPointer()})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      if (eventInfo.terminateSimulation != (byte)0) {
        throw new IllegalActionException(this,"String_Node_Str");
      }
      if (eventInfo.upcomingTimeEvent != (byte)0) {
        getDirector().fireAt(this,eventInfo.nextEventTime);
      }
    }
 else {
      int fmiFlag=((Integer)_fmiEnterInitializationModeFunction.invoke(Integer.class,new Object[]{_fmiComponent})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      if (_fmiModelDescription.numberOfEventIndicators > 0) {
        new Exception("String_Node_Str").printStackTrace();
      }
    }
  }
 else {
    String modelIdentifier=_fmiModelDescription.modelIdentifier;
    Director director=getDirector();
    Time startTime=director.getModelStartTime();
    Time stopTime=director.getModelStopTime();
    int fmiFlag;
    if (_fmiVersion < 1.5) {
      fmiFlag=((Integer)_fmiInitializeSlaveFunction.invoke(Integer.class,new Object[]{_fmiComponent,startTime.getDoubleValue(),(byte)1,stopTime.getDoubleValue()})).intValue();
    }
 else {
      fmiFlag=((Integer)_fmiInitializeSlaveFunction.invoke(Integer.class,new Object[]{_fmiComponent,_relativeTolerance,startTime.getDoubleValue(),(byte)1,stopTime.getDoubleValue()})).intValue();
      _requestRefiringIfNecessary();
      _recordFMUState();
    }
    if (fmiFlag > FMILibrary.FMIStatus.fmiWarning) {
      throw new IllegalActionException(this,"String_Node_Str" + modelIdentifier + "String_Node_Str"+ startTime.getDoubleValue()+ "String_Node_Str"+ stopTime.getDoubleValue()+ "String_Node_Str"+ _fmiStatusDescription(fmiFlag));
    }
  }
  if (_debugging) {
    _debugToStdOut("String_Node_Str");
  }
  _modelInitialized=true;
}

Fixed version (ground truth):
/** 
 * Invoke _fmiInitialize() (for model exchange) or _fmiInitializeSlave() (for co-simulation) on the FMU. In the case of model exchange, this method also checks for a returned next event time and calls fireAt() on the director if a next event time is returned. In the case of co-simulation, if the FMU provides a maximum step size, get that from the FMU and call fireAt() as well.
 * @exception IllegalActionException If the FMU does not return fmiOK.
 */
@SuppressWarnings("String_Node_Str") protected void _fmiInitialize() throws IllegalActionException {
  if (_fmiModelDescription.modelExchange) {
    if (_fmiVersion < 1.5) {
      FMIEventInfo eventInfo=new FMIEventInfo.ByValue();
      int fmiFlag=((Integer)_fmiInitializeFunction.invoke(Integer.class,new Object[]{_fmiComponent,_toleranceControlled,_relativeTolerance,eventInfo.getPointer()})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      if (eventInfo.terminateSimulation != (byte)0) {
        throw new IllegalActionException(this,"String_Node_Str");
      }
      if (eventInfo.upcomingTimeEvent != (byte)0) {
        getDirector().fireAt(this,eventInfo.nextEventTime);
      }
    }
 else {
      int fmiFlag=((Integer)_fmiEnterInitializationModeFunction.invoke(Integer.class,new Object[]{_fmiComponent})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      fmiFlag=((Integer)_fmiExitInitializationModeFunction.invoke(Integer.class,new Object[]{_fmiComponent})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      if (_fmiModelDescription.numberOfEventIndicators > 0) {
        new Exception("String_Node_Str").printStackTrace();
      }
    }
  }
 else {
    String modelIdentifier=_fmiModelDescription.modelIdentifier;
    Director director=getDirector();
    Time startTime=director.getModelStartTime();
    Time stopTime=director.getModelStopTime();
    int fmiFlag;
    if (_fmiVersion < 1.5) {
      fmiFlag=((Integer)_fmiInitializeSlaveFunction.invoke(Integer.class,new Object[]{_fmiComponent,startTime.getDoubleValue(),(byte)1,stopTime.getDoubleValue()})).intValue();
    }
 else {
      fmiFlag=((Integer)_fmiEnterInitializationModeFunction.invoke(Integer.class,new Object[]{_fmiComponent})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      fmiFlag=((Integer)_fmiExitInitializationModeFunction.invoke(Integer.class,new Object[]{_fmiComponent})).intValue();
      if (fmiFlag != FMILibrary.FMIStatus.fmiOK) {
        throw new IllegalActionException(this,"String_Node_Str" + _fmiStatusDescription(fmiFlag));
      }
      _requestRefiringIfNecessary();
      _recordFMUState();
    }
    if (fmiFlag > FMILibrary.FMIStatus.fmiWarning) {
      throw new IllegalActionException(this,"String_Node_Str" + modelIdentifier + "String_Node_Str"+ startTime.getDoubleValue()+ "String_Node_Str"+ stopTime.getDoubleValue()+ "String_Node_Str"+ _fmiStatusDescription(fmiFlag));
    }
  }
  if (_debugging) {
    _debugToStdOut("String_Node_Str");
  }
  _modelInitialized=true;
}