Program: 76031
Project: 76031
Buggy source:
/** 
 * Propagate the number of fractional firings decided for this actor through the specified input port.   Set and verify the fractional firing for each Actor that is connected through this input port. Any actors that we calculate their firing vector for the first time are moved from RemainingActors to pendingActors.
 * @param currentPort The port that we are propagating from.
 * @param firings The current Map of fractional firings for eachActor.
 * @param remainingActors The set of actors that have not had theirfractional firing set.
 * @param pendingActors The set of actors that have had their rateset, but have not been propagated onwards.
 * @exception NotSchedulableException If the CompositeActor is notschedulable.
 * @exception IllegalActionException If any called method throws it.
 */
private void _propagateInputPort(IOPort currentPort,Map firings,LinkedList remainingActors,LinkedList pendingActors) throws NotSchedulableException, IllegalActionException {
  ComponentEntity currentActor=(ComponentEntity)currentPort.getContainer();
  int currentRate=getTokenConsumptionRate(currentPort);
  if (currentRate > 0) {
    Iterator connectedPorts=currentPort.deepConnectedOutPortList().iterator();
    while (connectedPorts.hasNext()) {
      IOPort connectedPort=(IOPort)connectedPorts.next();
      ComponentEntity connectedActor=(ComponentEntity)connectedPort.getContainer();
      if (_debugging)       _debug("String_Node_Str" + connectedActor.getName());
      int connectedRate=getTokenProductionRate(connectedPort);
      Fraction currentFiring=(Fraction)firings.get(currentActor);
      Fraction desiredFiring=currentFiring.multiply(new Fraction(currentRate,connectedRate));
      try {
        Fraction presentFiring=(Fraction)firings.get(connectedActor);
        if (presentFiring.equals(Fraction.ZERO)) {
          firings.put(connectedActor,desiredFiring);
          remainingActors.remove(connectedActor);
          pendingActors.addLast(connectedActor);
        }
 else         if (!presentFiring.equals(desiredFiring))         throw new NotSchedulableException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
      }
 catch (      NoSuchElementException e) {
        throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + ((ComponentEntity)connectedActor).getName() + "String_Node_Str");
      }
      if (_debugging) {
        _debug("String_Node_Str");
        _debug(firings.toString());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Propagate the number of fractional firings decided for this actor through the specified input port.   Set and verify the fractional firing for each Actor that is connected through this input port. Any actors that we calculate their firing vector for the first time are moved from RemainingActors to pendingActors.
 * @param currentPort The port that we are propagating from.
 * @param firings The current Map of fractional firings for eachActor.
 * @param remainingActors The set of actors that have not had theirfractional firing set.
 * @param pendingActors The set of actors that have had their rateset, but have not been propagated onwards.
 * @exception NotSchedulableException If the CompositeActor is notschedulable.
 * @exception IllegalActionException If any called method throws it.
 */
private void _propagateInputPort(IOPort currentPort,Map firings,LinkedList remainingActors,LinkedList pendingActors) throws NotSchedulableException, IllegalActionException {
  ComponentEntity currentActor=(ComponentEntity)currentPort.getContainer();
  int currentRate=getTokenConsumptionRate(currentPort);
  if (currentRate > 0) {
    Iterator connectedPorts=currentPort.deepConnectedOutPortList().iterator();
    while (connectedPorts.hasNext()) {
      IOPort connectedPort=(IOPort)connectedPorts.next();
      ComponentEntity connectedActor=(ComponentEntity)connectedPort.getContainer();
      if (_debugging)       _debug("String_Node_Str" + connectedActor.getName());
      int connectedRate=getTokenProductionRate(connectedPort);
      Fraction currentFiring=(Fraction)firings.get(currentActor);
      Fraction desiredFiring=currentFiring.multiply(new Fraction(currentRate,connectedRate));
      try {
        Fraction presentFiring=(Fraction)firings.get(connectedActor);
        if (presentFiring == null) {
        }
 else         if (presentFiring.equals(Fraction.ZERO)) {
          firings.put(connectedActor,desiredFiring);
          remainingActors.remove(connectedActor);
          pendingActors.addLast(connectedActor);
        }
 else         if (!presentFiring.equals(desiredFiring))         throw new NotSchedulableException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
      }
 catch (      NoSuchElementException e) {
        throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + ((ComponentEntity)connectedActor).getName() + "String_Node_Str");
      }
      if (_debugging) {
        _debug("String_Node_Str");
        _debug(firings.toString());
      }
    }
  }
}