Program: 75702
Project: 75702
Buggy source:
/** 
 * Does up to three things, in this order: Set new remote address value, Set new remote socket number, transmit data as a UDP packet over the ethernet.  The first two can, of course, affect where the datagram goes.  Any remote address/socket values supplied are saved and become the defaults for next time.
 */
public void fire() throws IllegalActionException {
  if (remoteAddress.getWidth() > 0 && remoteAddress.hasToken(0)) {
    String address=((StringToken)(remoteAddress.get(0))).stringValue();
    try {
      _address=InetAddress.getByName(address);
    }
 catch (    UnknownHostException ex) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + ex.getMessage());
    }
  }
  if (remoteSocketNumber.getWidth() > 0 && remoteSocketNumber.hasToken(0)) {
    _remoteSocketNumber=65535 & ((IntToken)remoteSocketNumber.get(0)).intValue();
  }
  if (data.hasToken(0)) {
    byte[] dataBytes=new byte[0];
    if (_encodeForPtolemyParser) {
      dataBytes=data.get(0).toString().getBytes();
    }
 else     if (_encodeFromIntegerArray) {
      ArrayToken dataIntArrayToken=(ArrayToken)data.get(0);
      int dataLengthInBytes=_encodedBytesPerInteger * dataIntArrayToken.length();
      dataBytes=new byte[dataLengthInBytes];
      for (int j=0; j < dataLengthInBytes; j+=_encodedBytesPerInteger) {
        IntToken dataIntOneToken=(IntToken)dataIntArrayToken.getElement(j);
        int oneIntValue=dataIntOneToken.intValue();
        if (_encodedBytesPerInteger == 1) {
          dataBytes[j]=(byte)oneIntValue;
        }
 else         if (_encodedBytesPerInteger == 4) {
          dataBytes[j]=(byte)(oneIntValue);
          dataBytes[j]=(byte)(oneIntValue >> 8);
          dataBytes[j]=(byte)(oneIntValue >> 16);
          dataBytes[j]=(byte)(oneIntValue >> 24);
        }
 else {
        }
      }
    }
 else {
      if (true)       System.out.println("String_Node_Str");
      throw new IllegalActionException(this,"String_Node_Str" + _encoding);
    }
    DatagramPacket packet=new DatagramPacket(dataBytes,dataBytes.length,_address,_remoteSocketNumber);
    try {
      _socket.send(packet);
    }
 catch (    IOException ex) {
    }
    triggerOutput.broadcast(new Token());
  }
}

Fixed version (ground truth):
/** 
 * Does up to three things, in this order: Set new remote address value, Set new remote socket number, transmit data as a UDP packet over the ethernet.  The first two can, of course, affect where the datagram goes.  Any remote address/socket values supplied are saved and become the defaults for next time.
 */
public void fire() throws IllegalActionException {
  if (remoteAddress.getWidth() > 0 && remoteAddress.hasToken(0)) {
    String address=((StringToken)(remoteAddress.get(0))).stringValue();
    try {
      _address=InetAddress.getByName(address);
    }
 catch (    UnknownHostException ex) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + ex.getMessage());
    }
  }
  if (remoteSocketNumber.getWidth() > 0 && remoteSocketNumber.hasToken(0)) {
    _remoteSocketNumber=65535 & ((IntToken)remoteSocketNumber.get(0)).intValue();
  }
  if (data.hasToken(0)) {
    byte[] dataBytes=new byte[0];
    if (_encodeForPtolemyParser) {
      dataBytes=data.get(0).toString().getBytes();
    }
 else     if (_encodeFromIntegerArray) {
      ArrayToken dataIntArrayToken=(ArrayToken)data.get(0);
      int dataLengthInBytes=_encodedBytesPerInteger * dataIntArrayToken.length();
      dataBytes=new byte[dataLengthInBytes];
      for (int j=0; j < dataIntArrayToken.length(); j++) {
        if (false) {
          System.out.println("String_Node_Str" + (null == dataIntArrayToken));
          System.out.println("String_Node_Str" + dataIntArrayToken.length());
          System.out.println("String_Node_Str" + j);
        }
        IntToken dataIntOneToken=(IntToken)dataIntArrayToken.getElement(j);
        int oneIntValue=dataIntOneToken.intValue();
        if (_encodedBytesPerInteger == 1) {
          dataBytes[j]=(byte)oneIntValue;
        }
 else         if (_encodedBytesPerInteger == 4) {
          int j4=j * _encodedBytesPerInteger;
          dataBytes[j4]=(byte)(oneIntValue);
          dataBytes[j4 + 1]=(byte)(oneIntValue >> 8);
          dataBytes[j4 + 2]=(byte)(oneIntValue >> 16);
          dataBytes[j4 + 3]=(byte)(oneIntValue >> 24);
        }
 else {
        }
      }
    }
 else {
      if (true)       System.out.println("String_Node_Str");
      throw new IllegalActionException(this,"String_Node_Str" + _encoding);
    }
    DatagramPacket packet=new DatagramPacket(dataBytes,dataBytes.length,_address,_remoteSocketNumber);
    try {
      _socket.send(packet);
    }
 catch (    IOException ex) {
    }
    triggerOutput.broadcast(new Token());
  }
}