Program: 73849
Project: 73849
Buggy source:
/** 
 * Return the WCET of the actors. The Worst-Case Execution Time (WCET) of an actor is the maximum length of time  the task could take to execute on a particular platform
 */
public double _getWCET() throws IllegalActionException {
  double wcet=0;
  double actorFrequency=0;
  double actorWCET=0;
  int actorCount=0;
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)this.getContainer()).deepEntityList()) {
    actorCount++;
    Attribute frequency=((Entity)actor).getAttribute("String_Node_Str");
    actor.getDirector();
    Attribute WCET=((Entity)actor).getAttribute("String_Node_Str");
    if (!(actor instanceof ptolemy.domains.giotto.lib.GiottoError)) {
      if (actor instanceof CompositeActor) {
        if (_debugging) {
        }
        Director dir=actor.getDirector();
        if (_debugging) {
        }
        if (dir == null) {
          if (_debugging) {
          }
        }
 else {
          double dummyWCET=0.0011;
          Attribute dirWCET=dir.getAttribute("String_Node_Str");
          if (dirWCET != null) {
            dummyWCET=((DoubleToken)((Variable)dirWCET).getToken()).doubleValue();
          }
          if (_debugging) {
          }
          wcet+=dummyWCET;
        }
      }
 else {
        if (WCET == null) {
          actorWCET=0.0;
        }
 else {
          try {
            actorWCET=((DoubleToken)((Variable)WCET).getToken()).doubleValue();
          }
 catch (          Exception e2) {
            actorWCET=((IntToken)((Variable)WCET).getToken()).intValue();
          }
        }
        if (frequency == null) {
          actorFrequency=1;
        }
 else {
          actorFrequency=((IntToken)((Variable)frequency).getToken()).intValue();
        }
        wcet+=(actorFrequency * actorWCET);
      }
    }
    if (_debugging) {
    }
  }
  return wcet;
}

Fixed version (ground truth):
/** 
 * Return the WCET of the actors. The Worst-Case Execution Time (WCET) of an actor is the maximum length of time  the task could take to execute on a particular platform
 * @return A double containing the WCET of the actors
 * @throws IllegalActionException If an error occurs
 */
public double _getWCET() throws IllegalActionException {
  double wcet=0;
  double actorFrequency=0;
  double actorWCET=0;
  int actorCount=0;
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)this.getContainer()).deepEntityList()) {
    actorCount++;
    Attribute frequency=((Entity)actor).getAttribute("String_Node_Str");
    actor.getDirector();
    Attribute WCET=((Entity)actor).getAttribute("String_Node_Str");
    if (!(actor instanceof ptolemy.domains.giotto.lib.GiottoError)) {
      if (actor instanceof CompositeActor) {
        if (_debugging) {
        }
        Director dir=actor.getDirector();
        if (_debugging) {
        }
        if (dir == null) {
          if (_debugging) {
          }
        }
 else {
          double dummyWCET=0.0011;
          Attribute dirWCET=dir.getAttribute("String_Node_Str");
          if (dirWCET != null) {
            dummyWCET=((DoubleToken)((Variable)dirWCET).getToken()).doubleValue();
          }
          if (_debugging) {
          }
          wcet+=dummyWCET;
        }
      }
 else {
        if (WCET == null) {
          actorWCET=0.0;
        }
 else {
          try {
            actorWCET=((DoubleToken)((Variable)WCET).getToken()).doubleValue();
          }
 catch (          Exception e2) {
            actorWCET=((IntToken)((Variable)WCET).getToken()).intValue();
          }
        }
        if (frequency == null) {
          actorFrequency=1;
        }
 else {
          actorFrequency=((IntToken)((Variable)frequency).getToken()).intValue();
        }
        wcet+=(actorFrequency * actorWCET);
      }
    }
    if (_debugging) {
    }
  }
  return wcet;
}