Program: 75701
Project: 75701
Buggy source:
/** 
 * Fire this actor.  Optionally parse a received datagram into a token of arbitrary type.  Otherwise, assemble an integer array token by placing 1 or 4 bytes of the datagram into each integer in the array.  Broadcast the converted token on the output port.
 * @exception IllegalActionException If the data cannot beconverted into a token of the same type as the configured type of the output port.
 */
public void fire() throws IllegalActionException {
  for (int i=0; i < trigger.getWidth(); i++) {
    if (trigger.hasToken(i)) {
      trigger.get(i);
    }
  }
  boolean useDefaultOutput;
synchronized (_syncFireAndThread) {
    int bytesAvailable=0;
    byte[] dataBytes=new byte[0];
    while (_blockAwaitingDatagram && _packetsAlreadyAwaitingFire == 0) {
      try {
        _fireIsWaiting=true;
        _syncFireAndThread.wait();
        _fireIsWaiting=false;
      }
 catch (      InterruptedException ex) {
        System.out.println(this + "String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
 finally {
        if (_stopFire) {
          _stopFire=false;
          if (_debugging)           _debug("String_Node_Str");
          return;
        }
      }
    }
    if (_packetsAlreadyAwaitingFire != 0) {
      useDefaultOutput=false;
      bytesAvailable=_broadcastPacket.getLength();
      dataBytes=_broadcastPacket.getData();
      _returnAddress=_broadcastPacket.getAddress().getHostAddress();
      _returnSocketNumber=_broadcastPacket.getPort();
      _packetsAlreadyAwaitingFire--;
    }
 else {
      useDefaultOutput=true;
    }
    if (!useDefaultOutput) {
      if (_decodeWithPtolemyParser) {
        String dataStr=new String(dataBytes,0,bytesAvailable);
        _evalVar.setExpression(dataStr);
        _outputToken=_evalVar.getToken();
        if (_outputToken == null) {
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new Token();
        }
 else {
          if (_debugging)           _debug("String_Node_Str");
        }
      }
 else       if (_decodeToIntegerArray) {
        int xs=bytesAvailable % _decodedBytesPerInteger;
        if (xs != 0) {
          if (_debugging)           _debug(xs + "String_Node_Str");
        }
        if (bytesAvailable / _decodedBytesPerInteger > 0) {
          Token[] dataIntTokens=new Token[bytesAvailable / _decodedBytesPerInteger];
          if (_decodedBytesPerInteger == 1) {
            for (int j=0; j < bytesAvailable; j++) {
              dataIntTokens[j]=new IntToken(dataBytes[j]);
            }
          }
 else           if (_decodedBytesPerInteger == 4) {
            for (int j=0; j < bytesAvailable / 4; j++) {
              dataIntTokens[j]=new IntToken(dataBytes[4 * j] + 256 * dataBytes[4 * j + 1] + 65536 * dataBytes[4 * j + 2] + 16777216 * dataBytes[4 * j + 3]);
            }
          }
 else {
          }
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new ArrayToken(dataIntTokens);
        }
 else {
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new ArrayToken(BaseType.INT);
        }
      }
 else {
        if (true)         System.out.println("String_Node_Str");
        throw new IllegalActionException(this,"String_Node_Str" + _encoding);
      }
    }
    _syncFireAndThread.notifyAll();
  }
  if (!useDefaultOutput) {
    returnAddress.broadcast(new StringToken(_returnAddress));
    returnSocketNumber.broadcast(new IntToken(_returnSocketNumber));
    output.broadcast(_outputToken);
  }
 else {
    if (_defaultOutputToken == null) {
      if (_debugging)       _debug("String_Node_Str");
    }
 else {
      if (_debugging)       _debug("String_Node_Str");
synchronized (_syncDefaultOutputs) {
        returnAddress.broadcast(new StringToken(_defaultReturnAddress));
        returnSocketNumber.broadcast(new IntToken(_defaultReturnSocketNumber));
        output.broadcast(_defaultOutputToken);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Fire this actor.  Optionally parse a received datagram into a token of arbitrary type.  Otherwise, assemble an integer array token by placing 1 or 4 bytes of the datagram into each integer in the array.  Broadcast the converted token on the output port.
 * @exception IllegalActionException If the data cannot beconverted into a token of the same type as the configured type of the output port.
 */
public void fire() throws IllegalActionException {
  for (int i=0; i < trigger.getWidth(); i++) {
    if (trigger.hasToken(i)) {
      trigger.get(i);
    }
  }
  boolean useDefaultOutput;
synchronized (_syncFireAndThread) {
    int bytesAvailable=0;
    byte[] dataBytes=new byte[0];
    while (_blockAwaitingDatagram && _packetsAlreadyAwaitingFire == 0) {
      try {
        _fireIsWaiting=true;
        _syncFireAndThread.wait();
        _fireIsWaiting=false;
      }
 catch (      InterruptedException ex) {
        System.out.println(this + "String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
 finally {
        if (_stopFire) {
          _stopFire=false;
          if (_debugging)           _debug("String_Node_Str");
          return;
        }
      }
    }
    if (_packetsAlreadyAwaitingFire != 0) {
      useDefaultOutput=false;
      bytesAvailable=_broadcastPacket.getLength();
      dataBytes=_broadcastPacket.getData();
      _returnAddress=_broadcastPacket.getAddress().getHostAddress();
      _returnSocketNumber=_broadcastPacket.getPort();
      _packetsAlreadyAwaitingFire--;
    }
 else {
      useDefaultOutput=true;
    }
    if (!useDefaultOutput) {
      if (_decodeWithPtolemyParser) {
        String dataStr=new String(dataBytes,0,bytesAvailable);
        _evalVar.setExpression(dataStr);
        _outputToken=_evalVar.getToken();
        if (_outputToken == null) {
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new Token();
        }
 else {
          if (_debugging)           _debug("String_Node_Str");
        }
      }
 else       if (_decodeToIntegerArray) {
        int xs=bytesAvailable % _decodedBytesPerInteger;
        if (xs != 0) {
          if (_debugging)           _debug(xs + "String_Node_Str");
        }
        if (bytesAvailable / _decodedBytesPerInteger > 0) {
          Token[] dataIntTokens=new Token[bytesAvailable / _decodedBytesPerInteger];
          if (_decodedBytesPerInteger == 1) {
            for (int j=0; j < bytesAvailable; j++) {
              dataIntTokens[j]=new IntToken(dataBytes[j]);
            }
          }
 else           if (_decodedBytesPerInteger == 4) {
            for (int j=0; j < bytesAvailable / 4; j++) {
              if (false)               System.out.println(dataBytes[4 * j] + "String_Node_Str" + dataBytes[4 * j + 1]+ "String_Node_Str"+ dataBytes[4 * j + 2]+ "String_Node_Str"+ dataBytes[4 * j + 3]);
              dataIntTokens[j]=new IntToken((255 & dataBytes[4 * j]) | (255 & dataBytes[4 * j + 1]) << 8 | (255 & dataBytes[4 * j + 2]) << 16 | (255 & dataBytes[4 * j + 3]) << 24);
            }
          }
 else {
          }
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new ArrayToken(dataIntTokens);
        }
 else {
          if (_debugging)           _debug("String_Node_Str");
          _outputToken=new ArrayToken(BaseType.INT);
        }
      }
 else {
        if (true)         System.out.println("String_Node_Str");
        throw new IllegalActionException(this,"String_Node_Str" + _encoding);
      }
    }
    _syncFireAndThread.notifyAll();
  }
  if (!useDefaultOutput) {
    returnAddress.broadcast(new StringToken(_returnAddress));
    returnSocketNumber.broadcast(new IntToken(_returnSocketNumber));
    output.broadcast(_outputToken);
  }
 else {
    if (_defaultOutputToken == null) {
      if (_debugging)       _debug("String_Node_Str");
    }
 else {
      if (_debugging)       _debug("String_Node_Str");
synchronized (_syncDefaultOutputs) {
        returnAddress.broadcast(new StringToken(_defaultReturnAddress));
        returnSocketNumber.broadcast(new IntToken(_defaultReturnSocketNumber));
        output.broadcast(_defaultOutputToken);
      }
    }
  }
}