Program: 72538
Project: 72538
Buggy source:
/** 
 * Expose the send() method of the port.
 * @param channelIndex The channel index.
 * @param data The token to send.
 * @throws IllegalActionException If this is a proxy for a parameter or if sending fails.
 * @throws NoRoomException If there is no room at the destination.
 */
public void send(int channelIndex,Token data) throws NoRoomException, IllegalActionException {
  if (_port == null) {
    throw new IllegalActionException(JavaScript.this,"String_Node_Str" + _parameter.getName() + "String_Node_Str");
  }
  if (!_executing) {
    throw new InternalErrorException("String_Node_Str" + data + "String_Node_Str"+ _port.getName()+ "String_Node_Str");
  }
synchronized (this) {
    if (_inFire) {
      if (_debugging) {
        _debug("String_Node_Str" + data + "String_Node_Str"+ _port.getName());
      }
      _port.send(channelIndex,data);
    }
 else {
      if (_outputTokens == null) {
        _outputTokens=new HashMap<IOPort,HashMap<Integer,List<Token>>>();
      }
      HashMap<Integer,List<Token>> tokens=_outputTokens.get(_port);
      if (tokens == null) {
        tokens=new HashMap<Integer,List<Token>>();
        _outputTokens.put(_port,tokens);
      }
      List<Token> queue=tokens.get(channelIndex);
      if (queue == null) {
        queue=new LinkedList<Token>();
        tokens.put(channelIndex,queue);
      }
      queue.add(data);
      if (_debugging) {
        _debug("String_Node_Str" + data + "String_Node_Str"+ _port.getName()+ "String_Node_Str");
      }
      getDirector().fireAtCurrentTime(JavaScript.this);
    }
  }
}

Fixed version (ground truth):
/** 
 * Expose the send() method of the port.
 * @param channelIndex The channel index.
 * @param data The token to send.
 * @throws IllegalActionException If this is a proxy for a parameter or if sending fails.
 * @throws NoRoomException If there is no room at the destination.
 */
public void send(int channelIndex,Token data) throws NoRoomException, IllegalActionException {
  if (_port == null) {
    throw new IllegalActionException(JavaScript.this,"String_Node_Str" + _parameter.getName() + "String_Node_Str");
  }
  if (!_executing) {
    throw new InternalErrorException("String_Node_Str" + data + "String_Node_Str"+ _port.getName()+ "String_Node_Str");
  }
synchronized (JavaScript.this) {
    if (_inFire) {
      if (_debugging) {
        _debug("String_Node_Str" + data + "String_Node_Str"+ _port.getName());
      }
      _port.send(channelIndex,data);
    }
 else {
      if (_outputTokens == null) {
        _outputTokens=new HashMap<IOPort,HashMap<Integer,List<Token>>>();
      }
      HashMap<Integer,List<Token>> tokens=_outputTokens.get(_port);
      if (tokens == null) {
        tokens=new HashMap<Integer,List<Token>>();
        _outputTokens.put(_port,tokens);
      }
      List<Token> queue=tokens.get(channelIndex);
      if (queue == null) {
        queue=new LinkedList<Token>();
        tokens.put(channelIndex,queue);
      }
      queue.add(data);
      if (_debugging) {
        _debug("String_Node_Str" + data + "String_Node_Str"+ _port.getName()+ "String_Node_Str");
      }
      getDirector().fireAtCurrentTime(JavaScript.this);
    }
  }
}