Program: 75397
Project: 75397
Buggy source:
/** 
 * Return the parameterized scheduling sequence. An exception will be thrown if the graph is not schedulable.
 * @return A schedule of the deeply contained opaque entitiesin the firing order.
 * @exception NotSchedulableException If a parameterized schedulecannot be derived for the model.
 * @exception IllegalActionException If the rate parametersof the model are not correct, or the computed rates for external ports are not correct.
 */
protected Schedule _getSchedule() throws NotSchedulableException, IllegalActionException {
  _debug("String_Node_Str");
  PSDFDirector director=(PSDFDirector)getContainer();
  CompositeActor model=(CompositeActor)director.getContainer();
  PSDFGraphReader graphReader=new PSDFGraphReader();
  PSDFGraph psdfGraph=(PSDFGraph)(graphReader.convert(model));
  _debug("String_Node_Str");
  _debug(psdfGraph.toString() + "String_Node_Str");
  psdfGraph.printEdgeRateExpressions();
  _debug("String_Node_Str");
  PSDFAPGANStrategy scheduler=new PSDFAPGANStrategy(psdfGraph);
  ptolemy.graph.sched.Schedule schedule=scheduler.schedule();
  _debug("String_Node_Str");
  _debug(schedule.toString() + "String_Node_Str");
  SymbolicScheduleElement result=_expandAPGAN(psdfGraph,scheduler.getClusteredGraphRoot(),scheduler);
  _debug("String_Node_Str" + "String_Node_Str" + result.toString() + "String_Node_Str");
  _debug("String_Node_Str");
  _saveBufferSizes(_bufferSizeMap);
  _debug("String_Node_Str");
  _debug(displayBufferSizes() + "String_Node_Str");
  if (_debugging) {
    _debug("String_Node_Str");
    Iterator relations=_bufferSizeMap.keySet().iterator();
    while (relations.hasNext()) {
      Relation relation=(Relation)relations.next();
      _debug(relation.getName() + "String_Node_Str" + _bufferSizeMap.get(relation)+ "String_Node_Str");
    }
  }
  return (Schedule)result;
}

Fixed version (ground truth):
/** 
 * Return the parameterized scheduling sequence. An exception will be thrown if the graph is not schedulable.
 * @return A schedule of the deeply contained opaque entitiesin the firing order.
 * @exception NotSchedulableException If a parameterized schedulecannot be derived for the model.
 * @exception IllegalActionException If the rate parametersof the model are not correct, or the computed rates for external ports are not correct.
 */
protected Schedule _getSchedule() throws NotSchedulableException, IllegalActionException {
  _debug("String_Node_Str");
  PSDFDirector director=(PSDFDirector)getContainer();
  CompositeActor model=(CompositeActor)director.getContainer();
  PSDFGraphReader graphReader=new PSDFGraphReader();
  PSDFGraph psdfGraph=(PSDFGraph)(graphReader.convert(model));
  _debug("String_Node_Str");
  _debug(psdfGraph.toString() + "String_Node_Str");
  psdfGraph.printEdgeRateExpressions();
  _debug("String_Node_Str");
  PSDFAPGANStrategy scheduler=new PSDFAPGANStrategy(psdfGraph);
  ptolemy.graph.sched.Schedule graphSchedule=scheduler.schedule();
  _debug("String_Node_Str");
  _debug(graphSchedule.toString() + "String_Node_Str");
  SymbolicScheduleElement result=_expandAPGAN(psdfGraph,scheduler.getClusteredGraphRoot(),scheduler);
  _debug("String_Node_Str" + "String_Node_Str" + result.toString() + "String_Node_Str");
  _debug("String_Node_Str");
  _saveBufferSizes(_bufferSizeMap);
  _debug("String_Node_Str");
  _debug(displayBufferSizes() + "String_Node_Str");
  if (_debugging) {
    _debug("String_Node_Str");
    Iterator relations=_bufferSizeMap.keySet().iterator();
    while (relations.hasNext()) {
      Relation relation=(Relation)relations.next();
      _debug(relation.getName() + "String_Node_Str" + _bufferSizeMap.get(relation)+ "String_Node_Str");
    }
  }
  System.out.println("String_Node_Str" + result);
  if (result instanceof Schedule) {
    return (Schedule)result;
  }
 else {
    Schedule schedule=new Schedule();
    schedule.add((ScheduleElement)result);
    return schedule;
  }
}