Program: 75176
Project: 75176
Buggy source:
/** 
 * Invoke a subprocess, read the <i>input</i> data (if any) and wait for the subprocess to terminate before sending any output or error data to the appropriate ports. <p>If there is no data on the <i>input</i> port, then the subprocess executes without reading any input. If there is no output or error data from the subprocess, then the empty string is sent to the appropriate port(s).
 * @exception IllegalActionException If the subprocess cannot bestarted, if the input of the subprocess cannot be written, if the subprocess gets interrupted, or if the return value of the process is non-zero.
 */
public synchronized void fire() throws IllegalActionException {
  super.fire();
  String line=null;
  _exec();
  if (input.numberOfSources() > 0 && input.hasToken(0)) {
    if ((line=((StringToken)input.get(0)).stringValue()) != null) {
      if (_debugging) {
        _debug("String_Node_Str" + line + "String_Node_Str");
      }
      if (_inputBufferedWriter != null) {
        try {
          _inputBufferedWriter.write(line);
          _inputBufferedWriter.flush();
        }
 catch (        IOException ex) {
          throw new IllegalActionException(this,ex,"String_Node_Str" + command + "String_Node_Str");
        }
      }
    }
  }
  try {
    int processReturnCode=_process.waitFor();
    if (processReturnCode != 0) {
      throw new IllegalActionException(this,"String_Node_Str" + ((StringToken)command.getToken()).stringValue() + "String_Node_Str"+ processReturnCode);
    }
  }
 catch (  InterruptedException interrupted) {
    throw new InternalErrorException(this,interrupted,"String_Node_Str");
  }
  String outputString=_outputGobbler.getAndReset();
  String errorString=_errorGobbler.getAndReset();
  if (_debugging) {
    _debug("String_Node_Str" + errorString + "String_Node_Str");
    _debug("String_Node_Str" + outputString + "String_Node_Str");
  }
  error.send(0,new StringToken(errorString));
  output.send(0,new StringToken(outputString));
}

Fixed version (ground truth):
/** 
 * Invoke a subprocess, read the <i>input</i> data (if any) and wait for the subprocess to terminate before sending any output or error data to the appropriate ports. <p>If there is no data on the <i>input</i> port, then the subprocess executes without reading any input. If there is no output or error data from the subprocess, then the empty string is sent to the appropriate port(s).
 * @exception IllegalActionException If the subprocess cannot bestarted, if the input of the subprocess cannot be written, if the subprocess gets interrupted, or if the return value of the process is non-zero.
 */
public void fire() throws IllegalActionException {
  super.fire();
  String line=null;
  _exec();
  if (input.numberOfSources() > 0 && input.hasToken(0)) {
    if ((line=((StringToken)input.get(0)).stringValue()) != null) {
      if (_debugging) {
        _debug("String_Node_Str" + line + "String_Node_Str");
      }
      if (_inputBufferedWriter != null) {
        try {
          _inputBufferedWriter.write(line);
          _inputBufferedWriter.flush();
        }
 catch (        IOException ex) {
          throw new IllegalActionException(this,ex,"String_Node_Str" + command + "String_Node_Str");
        }
      }
    }
  }
  try {
    int processReturnCode=_process.waitFor();
    if (processReturnCode != 0) {
      throw new IllegalActionException(this,"String_Node_Str" + ((StringToken)command.getToken()).stringValue() + "String_Node_Str"+ processReturnCode);
    }
  }
 catch (  InterruptedException interrupted) {
    throw new InternalErrorException(this,interrupted,"String_Node_Str");
  }
  String outputString=_outputGobbler.getAndReset();
  String errorString=_errorGobbler.getAndReset();
  if (_debugging) {
    _debug("String_Node_Str" + errorString + "String_Node_Str");
    _debug("String_Node_Str" + outputString + "String_Node_Str");
  }
  error.send(0,new StringToken(errorString));
  output.send(0,new StringToken(outputString));
}