Program: 75707
Project: 75707
Buggy source:
/** 
 * Run.  Run the thread.  This begins running when .start() is called on the thread.
 */
public void run(){
  while (true) {
synchronized (_syncBufferLength) {
      if (_receivePacket == null || _receiveAllocated != _bufferLength) {
        _receivePacket=new DatagramPacket(new byte[_bufferLength],0,_bufferLength);
        _receiveAllocated=_bufferLength;
      }
    }
    if (_broadcastPacket == null) {
synchronized (_syncBufferLength) {
        _broadcastPacket=new DatagramPacket(new byte[_bufferLength],0,_bufferLength);
        _broadcastAllocated=_bufferLength;
      }
    }
synchronized (_syncSocket) {
      _inReceive=true;
    }
    while (_inReceive) {
      _receivePacket.setLength(_bufferLength);
      try {
        _socket.receive(_receivePacket);
synchronized (_syncSocket) {
          _inReceive=false;
          _syncSocket.notifyAll();
        }
      }
 catch (      IOException ex) {
synchronized (_syncSocket) {
        }
      }
catch (      NullPointerException ex) {
        if (_debugging)         _debug("String_Node_Str" + (_socket == null));
        return;
      }
    }
    boolean fireAtWillBeCalled;
synchronized (_syncFireAndThread) {
      while (_packetsAlreadyAwaitingFire != 0 && !_overwrite) {
        try {
          _syncFireAndThread.wait();
        }
 catch (        InterruptedException ex) {
          System.out.println("String_Node_Str");
          System.out.println(ex.toString());
          throw new RuntimeException("String_Node_Str");
        }
      }
      DatagramPacket tmp=_broadcastPacket;
      _broadcastPacket=_receivePacket;
      _receivePacket=tmp;
      int tmpLength=_broadcastAllocated;
      _broadcastAllocated=_receiveAllocated;
      _receiveAllocated=tmpLength;
      if (_packetsAlreadyAwaitingFire != 0) {
        fireAtWillBeCalled=false;
      }
 else       if (_fireIsWaiting) {
        fireAtWillBeCalled=false;
        _syncFireAndThread.notifyAll();
        _packetsAlreadyAwaitingFire++;
      }
 else {
        fireAtWillBeCalled=true;
        _packetsAlreadyAwaitingFire++;
      }
    }
    if (fireAtWillBeCalled) {
      try {
        getDirector().fireAtCurrentTime(DatagramReader.this);
      }
 catch (      IllegalActionException ex) {
        System.out.println(this + "String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Run.  Run the thread.  This begins running when .start() is called on the thread.
 */
public void run(){
  while (true) {
synchronized (_syncBufferLength) {
      if (_receivePacket == null || _receiveAllocated != _actorBufferLength) {
        _receivePacket=new DatagramPacket(new byte[_actorBufferLength],0,_actorBufferLength);
        _receiveAllocated=_actorBufferLength;
      }
    }
    if (_broadcastPacket == null) {
synchronized (_syncBufferLength) {
        _broadcastPacket=new DatagramPacket(new byte[_actorBufferLength],0,_actorBufferLength);
        _broadcastAllocated=_actorBufferLength;
      }
    }
synchronized (_syncSocket) {
      _inReceive=true;
    }
    while (_inReceive) {
      _receivePacket.setLength(_actorBufferLength);
      try {
        _socket.receive(_receivePacket);
synchronized (_syncSocket) {
          _inReceive=false;
          _syncSocket.notifyAll();
        }
      }
 catch (      IOException ex) {
synchronized (_syncSocket) {
        }
      }
catch (      NullPointerException ex) {
        if (_debugging)         _debug("String_Node_Str" + (_socket == null));
        return;
      }
    }
    boolean fireAtWillBeCalled;
synchronized (_syncFireAndThread) {
      while (_packetsAlreadyAwaitingFire != 0 && !_overwrite) {
        try {
          _syncFireAndThread.wait();
        }
 catch (        InterruptedException ex) {
          System.out.println("String_Node_Str");
          System.out.println(ex.toString());
          throw new RuntimeException("String_Node_Str");
        }
      }
      DatagramPacket tmp=_broadcastPacket;
      _broadcastPacket=_receivePacket;
      _receivePacket=tmp;
      int tmpLength=_broadcastAllocated;
      _broadcastAllocated=_receiveAllocated;
      _receiveAllocated=tmpLength;
      if (_packetsAlreadyAwaitingFire != 0) {
        fireAtWillBeCalled=false;
      }
 else       if (_fireIsWaiting) {
        fireAtWillBeCalled=false;
        _syncFireAndThread.notifyAll();
        _packetsAlreadyAwaitingFire++;
      }
 else {
        fireAtWillBeCalled=true;
        _packetsAlreadyAwaitingFire++;
      }
    }
    if (fireAtWillBeCalled) {
      try {
        getDirector().fireAtCurrentTime(DatagramReader.this);
      }
 catch (      IllegalActionException ex) {
        System.out.println(this + "String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
}