Program: 75623
Project: 75623
Buggy source:
/** 
 * If the plot has not already been created, create it. If configurations specified by a call to configure() have not yet been processed, process them. Clear the data sets that this actor is responsible for (starting with the one indexed by <i>startingDataset</i>, up to <i>startingDataset</i> + <i>width</i> - 1, where <i>width</i> is the width of the input port.
 * @exception IllegalActionException If the parent class throws it.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  if (plot == null) {
    plot=_newPlot();
    plot.setTitle(getName());
    plot.setButtons(true);
  }
  if (_frame == null && _container == null) {
    Effigy containerEffigy=Configuration.findEffigy(toplevel());
    if (containerEffigy == null) {
      throw new IllegalActionException(this,"String_Node_Str" + toplevel().getFullName());
    }
    try {
      PlotEffigy plotEffigy=new PlotEffigy(containerEffigy,containerEffigy.uniqueName("String_Node_Str"));
      plotEffigy.identifier.setExpression(getFullName());
      PlotWindowTableau tableau=new PlotWindowTableau(plotEffigy,"String_Node_Str");
      _frame=tableau.frame;
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,null,ex,"String_Node_Str");
    }
    _windowProperties.setProperties(_frame);
    _implementDeferredConfigurations();
    if (_plotSize != null) {
      _plotSize.setSize(plot);
    }
  }
 else {
    if (plot instanceof Plot) {
      int width=((Plot)plot).getNumDataSets();
      int offset=((IntToken)startingDataset.getToken()).intValue();
      for (int i=width - 1; i >= 0; i--) {
        ((Plot)plot).clear(i + offset);
      }
      plot.repaint();
    }
 else {
      plot.clear(false);
      plot.repaint();
    }
  }
  if (_frame != null) {
    _frame.show();
  }
}

Fixed version (ground truth):
/** 
 * If the plot has not already been created, create it. If configurations specified by a call to configure() have not yet been processed, process them. Clear the data sets that this actor is responsible for (starting with the one indexed by <i>startingDataset</i>, up to <i>startingDataset</i> + <i>width</i> - 1, where <i>width</i> is the width of the input port.
 * @exception IllegalActionException If the parent class throws it.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  if (plot == null) {
    plot=_newPlot();
    plot.setTitle(getName());
    plot.setButtons(true);
  }
  if (_frame == null && _container == null) {
    Effigy containerEffigy=Configuration.findEffigy(toplevel());
    if (containerEffigy == null) {
      throw new IllegalActionException(this,"String_Node_Str" + toplevel().getFullName());
    }
    try {
      PlotEffigy plotEffigy=new PlotEffigy(containerEffigy,containerEffigy.uniqueName("String_Node_Str"));
      plotEffigy.identifier.setExpression(getFullName());
      PlotWindowTableau tableau=new PlotWindowTableau(plotEffigy,"String_Node_Str");
      _frame=tableau.frame;
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,null,ex,"String_Node_Str");
    }
    _windowProperties.setProperties(_frame);
    _implementDeferredConfigurations();
    if (_plotSize != null) {
      _plotSize.setSize(plot);
    }
    _frame.show();
  }
 else {
    if (plot instanceof Plot) {
      int width=((Plot)plot).getNumDataSets();
      int offset=((IntToken)startingDataset.getToken()).intValue();
      for (int i=width - 1; i >= 0; i--) {
        ((Plot)plot).clear(i + offset);
      }
      plot.repaint();
    }
 else {
      plot.clear(false);
      plot.repaint();
    }
  }
}