Program: 72798
Project: 72798
Buggy source:
/** 
 * Invoke the fire() of the super class. Then, Modelica library and model(s) are loaded. Upon modifying the value of variable(s) and parameter(s) by input port or actors' parameters, the Modelica model is built in <i>non-interactive</i> or <i>interactive</i> mode. <p>After building the model in an interactive mode, the simulation result is calculated step by step according to the parameters of the OpenModelica actor. The result is sent in the string format to the output port of the OpenModelica actor to be displayed by Display actor.</p>
 * @exception IllegalActionException If the evaluation of the expressiontriggers it, or the evaluation yields a null result, or the evaluation yields an incompatible type, or if there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  try {
    _omcCommand.loadModelicaFile(fileName.getExpression(),subModel.getExpression());
    if (!(dependencies.getExpression().isEmpty() && baseModel.getExpression().isEmpty()))     _omcCommand.loadModelicaFile(dependencies.getExpression(),baseModel.getExpression());
  }
 catch (  ConnectException e) {
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
  if (input.getWidth() > 0) {
    IntToken inputPort=(IntToken)input.get(0);
    try {
      if (!(parameter.getExpression().isEmpty() && initialValue.getExpression().isEmpty())) {
        if (!(baseModel.getExpression().isEmpty())) {
          _omcCommand.modifyComponents(inputPort.toString(),baseModel.getExpression(),parameter.getExpression());
        }
 else {
          _omcCommand.modifyComponents(inputPort.toString(),subModel.getExpression(),parameter.getExpression());
        }
      }
 else {
        _omcLogger.getInfo("String_Node_Str");
      }
    }
 catch (    ConnectException e) {
      throw new IllegalActionException("String_Node_Str" + e.getMessage());
    }
  }
 else   if (!(input.getWidth() > 0)) {
    if (!(parameter.getExpression().isEmpty() && initialValue.getExpression().isEmpty())) {
      try {
        if (baseModel.getExpression().isEmpty()) {
          _omcCommand.modifyComponents(initialValue.getExpression(),subModel.getExpression(),parameter.getExpression());
        }
 else {
          _omcCommand.modifyComponents(initialValue.getExpression(),baseModel.getExpression(),parameter.getExpression());
        }
      }
 catch (      ConnectException e) {
        throw new IllegalActionException("String_Node_Str" + baseModel.getExpression() + "String_Node_Str"+ e.getMessage());
      }
    }
 else {
      _omcLogger.getInfo("String_Node_Str");
    }
  }
  try {
    if (!(dependencies.getExpression().isEmpty() && baseModel.getExpression().isEmpty())) {
      _omcCommand.runModel(dependencies.getExpression(),baseModel.getExpression(),simulationStartTime.getExpression(),simulationStopTime.getExpression(),Integer.parseInt(numberOfIntervals.getExpression()),outputFormat.getExpression(),processingMode.getExpression());
      if (outputFormat.getExpression().equalsIgnoreCase("String_Node_Str") && processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
        _omcCommand.plotPltFile(baseModel.getExpression());
      }
    }
 else {
      _omcCommand.runModel(fileName.getExpression(),subModel.getExpression(),simulationStartTime.getExpression(),simulationStopTime.getExpression(),Integer.parseInt(numberOfIntervals.getExpression()),outputFormat.getExpression(),processingMode.getExpression());
      if (outputFormat.getExpression().equalsIgnoreCase("String_Node_Str") && processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
        _omcCommand.plotPltFile(subModel.getExpression());
      }
    }
    if (processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
      _omiThread=new OMIThread(variableFilter.getExpression(),simulationStopTime.getExpression(),output);
      _omiThread.run();
    }
  }
 catch (  UnknownHostException e) {
    throw new IllegalActionException(e.getMessage());
  }
catch (  IOException e) {
    throw new IllegalActionException(e.getMessage());
  }
catch (  ConnectException e) {
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Invoke the fire() of the super class. Then, Modelica library and model(s) are loaded. Upon modifying the value of variable(s) and parameter(s) by input port or actors' parameters, the Modelica model is built in <i>non-interactive</i> or <i>interactive</i> mode. <p>After building the model in an interactive mode, the simulation result is calculated step by step according to the parameters of the OpenModelica actor. The result is sent in the string format to the output port of the OpenModelica actor to be displayed by Display actor.</p>
 * @exception IllegalActionException If the evaluation of the expressiontriggers it, or the evaluation yields a null result, or the evaluation yields an incompatible type, or if there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  try {
    _omcCommand.loadModelicaFile(fileName.getExpression(),subModel.getExpression());
    if (!(dependencies.getExpression().isEmpty() && baseModel.getExpression().isEmpty()))     _omcCommand.loadModelicaFile(dependencies.getExpression(),baseModel.getExpression());
  }
 catch (  ConnectException e) {
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
  if (input.getWidth() > 0) {
    IntToken inputPort=(IntToken)input.get(0);
    try {
      if (!(parameter.getExpression().isEmpty() && initialValue.getExpression().isEmpty())) {
        if (!(baseModel.getExpression().isEmpty())) {
          _omcCommand.modifyComponents(inputPort.toString(),baseModel.getExpression(),parameter.getExpression());
        }
 else {
          _omcCommand.modifyComponents(inputPort.toString(),subModel.getExpression(),parameter.getExpression());
        }
      }
 else {
        _omcLogger.getInfo("String_Node_Str");
      }
    }
 catch (    ConnectException e) {
      throw new IllegalActionException("String_Node_Str" + e.getMessage());
    }
  }
 else   if (!(input.getWidth() > 0)) {
    if (!(parameter.getExpression().isEmpty() && initialValue.getExpression().isEmpty())) {
      try {
        if (baseModel.getExpression().isEmpty()) {
          _omcCommand.modifyComponents(initialValue.getExpression(),subModel.getExpression(),parameter.getExpression());
        }
 else {
          _omcCommand.modifyComponents(initialValue.getExpression(),baseModel.getExpression(),parameter.getExpression());
        }
      }
 catch (      ConnectException e) {
        throw new IllegalActionException("String_Node_Str" + baseModel.getExpression() + "String_Node_Str"+ e.getMessage());
      }
    }
 else {
      _omcLogger.getInfo("String_Node_Str");
    }
  }
  try {
    if (!(dependencies.getExpression().isEmpty() && baseModel.getExpression().isEmpty())) {
      _omcCommand.runModel(dependencies.getExpression(),baseModel.getExpression(),simulationStartTime.getExpression(),simulationStopTime.getExpression(),Integer.parseInt(numberOfIntervals.getExpression()),outputFormat.getExpression(),processingMode.getExpression());
      if (outputFormat.getExpression().equalsIgnoreCase("String_Node_Str") && processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
        _omcCommand.plotPltFile(baseModel.getExpression());
      }
    }
 else {
      _omcCommand.runModel(fileName.getExpression(),subModel.getExpression(),simulationStartTime.getExpression(),simulationStopTime.getExpression(),Integer.parseInt(numberOfIntervals.getExpression()),outputFormat.getExpression(),processingMode.getExpression());
      if (outputFormat.getExpression().equalsIgnoreCase("String_Node_Str") && processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
        _omcCommand.plotPltFile(subModel.getExpression());
      }
    }
    if (processingMode.getExpression().equalsIgnoreCase("String_Node_Str")) {
      _omiThread=new OMIThread(variableFilter.getExpression(),simulationStopTime.getExpression(),output);
      _omiThread.run();
    }
  }
 catch (  UnknownHostException e) {
    e.printStackTrace();
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
catch (  IOException e) {
    e.printStackTrace();
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
catch (  ConnectException e) {
    e.printStackTrace();
    throw new IllegalActionException("String_Node_Str" + e.getMessage());
  }
}