Program: 73991
Project: 73991
Buggy source:
/** 
 * Return a list of enabled transitions among the given list of transitions. This includes all transitions whose guards can can be evaluated and evaluate to true, plus, if all guards can be evaluated and evaluate to false, all default transitions.
 * @param transitionList A list of transitions.
 * @return A list of enabled transition.
 * @exception IllegalActionException If the guard expression of anytransition can not be evaluated.
 */
public List enabledTransitions(List transitionList) throws IllegalActionException {
  LinkedList enabledTransitions=new LinkedList();
  LinkedList defaultTransitions=new LinkedList();
  Iterator transitionRelations=transitionList.iterator();
  boolean foundUnknown=false;
  while (transitionRelations.hasNext() && !_stopRequested) {
    Transition transition=(Transition)transitionRelations.next();
    if (transition.isDefault()) {
      defaultTransitions.add(transition);
    }
 else {
      foundUnknown=foundUnknown || !_referencedInputPortsByGuardKnown(transition);
      try {
        if (transition.isEnabled()) {
          enabledTransitions.add(transition);
        }
      }
 catch (      RuntimeException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
catch (      IllegalActionException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
    }
  }
  if (enabledTransitions.size() > 0) {
    return enabledTransitions;
  }
 else {
    if (!foundUnknown) {
      if (defaultTransitions.size() == 0 && _currentState.getRefinement() == null) {
        List<IOPort> outputs=outputPortList();
        for (        IOPort port : outputs) {
          for (int channel=0; channel < port.getWidth(); channel++) {
            if (!port.isKnown(channel)) {
              port.sendClear(channel);
            }
          }
        }
      }
      return defaultTransitions;
    }
  }
  return new LinkedList();
}

Fixed version (ground truth):
/** 
 * Return a list of enabled transitions among the given list of transitions. This includes all transitions whose guards can can be evaluated and evaluate to true, plus, if all guards can be evaluated and evaluate to false, all default transitions.
 * @param transitionList A list of transitions.
 * @return A list of enabled transition.
 * @exception IllegalActionException If the guard expression of anytransition can not be evaluated.
 */
public List enabledTransitions(List transitionList) throws IllegalActionException {
  LinkedList enabledTransitions=new LinkedList();
  LinkedList defaultTransitions=new LinkedList();
  Iterator transitionRelations=transitionList.iterator();
  boolean foundUnknown=false;
  while (transitionRelations.hasNext() && !_stopRequested) {
    Transition transition=(Transition)transitionRelations.next();
    if (transition.isDefault()) {
      if (transition.isEnabled()) {
        defaultTransitions.add(transition);
      }
    }
 else {
      foundUnknown=foundUnknown || !_referencedInputPortsByGuardKnown(transition);
      try {
        if (transition.isEnabled()) {
          enabledTransitions.add(transition);
        }
      }
 catch (      RuntimeException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
catch (      IllegalActionException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
    }
  }
  if (enabledTransitions.size() > 0) {
    return enabledTransitions;
  }
 else {
    if (!foundUnknown) {
      if (defaultTransitions.size() == 0 && _currentState.getRefinement() == null) {
        List<IOPort> outputs=outputPortList();
        for (        IOPort port : outputs) {
          for (int channel=0; channel < port.getWidth(); channel++) {
            if (!port.isKnown(channel)) {
              port.sendClear(channel);
            }
          }
        }
      }
      return defaultTransitions;
    }
  }
  return new LinkedList();
}