Program: 75447
Project: 75447
Buggy source:
/** 
 * Initialize this actor, including the creation of an evaluation variable for the Ptolemy parser, a DatagramSocket for receiving datagrams, and a SocketReadingThread for blocking in the DatagramSocket.receive() method call.  This method is used as a bookend with wrapup() being the other end.  Resources created/allocated here are released in wrapup().
 * @exception IllegalActionException If the<i>localSocketNumber</i> parameter has a value outside 0..65535 or a socket could not be created.  
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  _packetsAlreadyAwaitingFire=0;
  _defaultReturnAddress=((StringToken)defaultReturnAddress.getToken()).stringValue();
  if (_defaultReturnAddress.compareTo("String_Node_Str") >= 0 && _defaultReturnAddress.compareTo("String_Node_Str") <= 0) {
    _multiCast=true;
  }
 else {
    _multiCast=false;
  }
  int portNumber=((IntToken)(localSocketNumber.getToken())).intValue();
  if (portNumber < 0 || portNumber > 65535) {
    throw new IllegalActionException(this,localSocketNumber + "String_Node_Str");
  }
  if (_debugging)   _debug(this + "String_Node_Str" + portNumber);
  if (_multiCast=true) {
    try {
      if (_debugging) {
        _debug("String_Node_Str" + portNumber);
      }
      _multicastSocket=new MulticastSocket(portNumber);
      if (_debugging) {
        _debug("String_Node_Str");
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + portNumber);
    }
    String address=((StringToken)defaultReturnAddress.getToken()).stringValue();
    try {
      _address=InetAddress.getByName(address);
    }
 catch (    UnknownHostException ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
    }
    try {
      _multicastSocket.joinGroup(_address);
    }
 catch (    IOException exp) {
      throw new IllegalActionException("String_Node_Str" + exp);
    }
  }
 else {
    try {
      if (_debugging) {
        _debug("String_Node_Str" + portNumber);
      }
      _socket=new DatagramSocket(portNumber);
      if (_debugging) {
        _debug("String_Node_Str");
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + portNumber);
    }
  }
  _ChangeRequestedToPlatformBufferLength=1;
  _socketReadingThread=new SocketReadingThread();
  _socketReadingThread.start();
}

Fixed version (ground truth):
/** 
 * Initialize this actor, including the creation of an evaluation variable for the Ptolemy parser, a DatagramSocket for receiving datagrams, and a SocketReadingThread for blocking in the DatagramSocket.receive() method call.  This method is used as a bookend with wrapup() being the other end.  Resources created/allocated here are released in wrapup().
 * @exception IllegalActionException If the<i>localSocketNumber</i> parameter has a value outside 0..65535 or a socket could not be created.  
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  _packetsAlreadyAwaitingFire=0;
  _defaultReturnAddress=((StringToken)defaultReturnAddress.getToken()).stringValue();
  if (_defaultReturnAddress.compareTo("String_Node_Str") >= 0 && _defaultReturnAddress.compareTo("String_Node_Str") <= 0) {
    _multiCast=true;
  }
 else {
    _multiCast=false;
  }
  int portNumber=((IntToken)(localSocketNumber.getToken())).intValue();
  if (portNumber < 0 || portNumber > 65535) {
    throw new IllegalActionException(this,localSocketNumber + "String_Node_Str");
  }
  if (_debugging)   _debug(this + "String_Node_Str" + portNumber);
  if (_multiCast == true) {
    try {
      if (_debugging) {
        _debug("String_Node_Str" + portNumber);
      }
      _multicastSocket=new MulticastSocket(portNumber);
      if (_debugging) {
        _debug("String_Node_Str");
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + portNumber);
    }
    String address=((StringToken)defaultReturnAddress.getToken()).stringValue();
    try {
      _address=InetAddress.getByName(address);
    }
 catch (    UnknownHostException ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
    }
    try {
      _multicastSocket.joinGroup(_address);
    }
 catch (    IOException exp) {
      throw new IllegalActionException("String_Node_Str" + exp);
    }
  }
 else {
    try {
      if (_debugging) {
        _debug("String_Node_Str" + portNumber);
      }
      _socket=new DatagramSocket(portNumber);
      if (_debugging) {
        _debug("String_Node_Str");
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + portNumber);
    }
  }
  _ChangeRequestedToPlatformBufferLength=1;
  _socketReadingThread=new SocketReadingThread();
  _socketReadingThread.start();
}