Program: 72913
Project: 72913
Buggy source:
public String generateInitializeCode() throws IllegalActionException {
  CodeStream codeStream=_templateParser.getCodeStream();
  codeStream.clear();
  LinkedList args=new LinkedList();
  Parameter stopTime=((ptolemy.actor.lib.PoissonClock)getComponent()).stopTime;
  double doubleStopTime=((DoubleToken)stopTime.getToken()).doubleValue();
  ptolemy.actor.lib.PoissonClock actor=(ptolemy.actor.lib.PoissonClock)getComponent();
  ptolemy.actor.CompositeActor container=(ptolemy.actor.CompositeActor)actor.getContainer();
  ptolemy.actor.Director director=container.getDirector();
  double modelStopTime=director.getModelStopTime().getDoubleValue();
  if (doubleStopTime > modelStopTime)   doubleStopTime=modelStopTime;
  Parameter meanTime=((ptolemy.actor.lib.PoissonClock)getComponent()).meanTime;
  double doubleMeanTime=((DoubleToken)meanTime.getToken()).doubleValue();
  Parameter fireAtStart=((ptolemy.actor.lib.PoissonClock)getComponent()).fireAtStart;
  boolean boolFireAtStart=((BooleanToken)fireAtStart.getToken()).booleanValue();
  args.add(Double.toString(doubleStopTime));
  args.add(Double.toString(doubleMeanTime));
  args.add(Boolean.toString(boolFireAtStart));
  Parameter valuesPar=((ptolemy.actor.lib.PoissonClock)getComponent()).values;
  Token valuesToken=valuesPar.getToken();
  Token[] values;
  double[] valuesDouble=null;
  int[] valuesInt=null;
  int size=0;
  if (valuesToken instanceof ArrayToken) {
    values=((ArrayToken)valuesToken).arrayValue();
    size=values.length;
    args.add(Integer.toString(size));
    int i=0;
    if (size > 0) {
      if (values[0] instanceof DoubleToken) {
        valuesDouble=new double[size];
      }
 else       if (values[0] instanceof IntToken) {
        valuesInt=new int[size];
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
      }
    }
    for (    Token t : values) {
      if (t instanceof DoubleToken) {
        valuesDouble[i++]=((DoubleToken)t).doubleValue();
      }
 else       if (t instanceof IntToken) {
        valuesInt[i++]=((IntToken)t).intValue();
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
      }
    }
  }
 else {
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
  }
  StringBuffer valuesString=new StringBuffer();
  int i=0;
  if (valuesDouble != null)   for (  double value : valuesDouble)   valuesString.append("String_Node_Str" + i++ + "String_Node_Str"+ Double.toString(value)+ "String_Node_Str"+ _eol);
 else   if (valuesInt != null)   for (  int value : valuesInt)   valuesString.append("String_Node_Str" + i++ + "String_Node_Str"+ Integer.toString(value)+ "String_Node_Str"+ _eol);
  args.add(valuesString);
  long longPrivateSeed=0;
  Parameter privateSeed=((ptolemy.actor.lib.PoissonClock)getComponent()).privateSeed;
  if (privateSeed.getToken() instanceof LongToken)   longPrivateSeed=((LongToken)privateSeed.getToken()).longValue();
  args.add(Long.toString(longPrivateSeed));
  long longSeed=0;
  Parameter seed=((ptolemy.actor.lib.PoissonClock)getComponent()).seed;
  if (seed.getToken() instanceof LongToken)   longSeed=((LongToken)seed.getToken()).longValue() + ((ptolemy.actor.lib.PoissonClock)getComponent()).getFullName().hashCode();
  args.add(Long.toString(longSeed));
  codeStream.appendCodeBlock("String_Node_Str",args);
  return processCode(codeStream.toString());
}

Fixed version (ground truth):
public String generateInitializeCode() throws IllegalActionException {
  CodeStream codeStream=_templateParser.getCodeStream();
  codeStream.clear();
  LinkedList args=new LinkedList();
  Parameter stopTime=((ptolemy.actor.lib.PoissonClock)getComponent()).stopTime;
  double doubleStopTime=((DoubleToken)stopTime.getToken()).doubleValue();
  ptolemy.actor.lib.PoissonClock actor=(ptolemy.actor.lib.PoissonClock)getComponent();
  ptolemy.actor.CompositeActor container=(ptolemy.actor.CompositeActor)actor.getContainer();
  ptolemy.actor.Director director=container.getDirector();
  double modelStopTime=director.getModelStopTime().getDoubleValue();
  if (doubleStopTime > modelStopTime)   doubleStopTime=modelStopTime;
  Parameter meanTime=((ptolemy.actor.lib.PoissonClock)getComponent()).meanTime;
  double doubleMeanTime=((DoubleToken)meanTime.getToken()).doubleValue();
  Parameter fireAtStart=((ptolemy.actor.lib.PoissonClock)getComponent()).fireAtStart;
  boolean boolFireAtStart=((BooleanToken)fireAtStart.getToken()).booleanValue();
  args.add(Double.toString(doubleStopTime));
  args.add(Double.toString(doubleMeanTime));
  args.add(Boolean.toString(boolFireAtStart));
  Parameter valuesPar=((ptolemy.actor.lib.PoissonClock)getComponent()).values;
  Token valuesToken=valuesPar.getToken();
  Token[] values;
  double[] valuesDouble=null;
  int[] valuesInt=null;
  int size=0;
  if (valuesToken instanceof ArrayToken) {
    values=((ArrayToken)valuesToken).arrayValue();
    size=values.length;
    args.add(Integer.toString(size));
    int i=0;
    if (size > 0) {
      if (values[0] instanceof DoubleToken) {
        valuesDouble=new double[size];
      }
 else       if (values[0] instanceof IntToken) {
        valuesInt=new int[size];
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
      }
    }
    for (    Token t : values) {
      if (t instanceof DoubleToken) {
        valuesDouble[i++]=((DoubleToken)t).doubleValue();
      }
 else       if (t instanceof IntToken) {
        valuesInt[i++]=((IntToken)t).intValue();
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
      }
    }
  }
 else {
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
  }
  StringBuffer valuesString=new StringBuffer();
  int i=0;
  if (valuesDouble != null)   for (  double value : valuesDouble)   valuesString.append("String_Node_Str" + i++ + "String_Node_Str"+ Double.toString(value)+ "String_Node_Str");
 else   if (valuesInt != null)   for (  int value : valuesInt)   valuesString.append("String_Node_Str" + i++ + "String_Node_Str"+ Integer.toString(value)+ "String_Node_Str");
  args.add(valuesString);
  long longPrivateSeed=0;
  Parameter privateSeed=((ptolemy.actor.lib.PoissonClock)getComponent()).privateSeed;
  if (privateSeed.getToken() instanceof LongToken)   longPrivateSeed=((LongToken)privateSeed.getToken()).longValue();
  args.add(Long.toString(longPrivateSeed));
  long longSeed=0;
  Parameter seed=((ptolemy.actor.lib.PoissonClock)getComponent()).seed;
  if (seed.getToken() instanceof LongToken)   longSeed=((LongToken)seed.getToken()).longValue() + ((ptolemy.actor.lib.PoissonClock)getComponent()).getFullName().hashCode();
  args.add(Long.toString(longSeed));
  codeStream.appendCodeBlock("String_Node_Str",args);
  return processCode(codeStream.toString());
}