nus-yam/ex-repair huggingface dataset:
Program: 73558
Project: 73558
Buggy source:
/** 
 * Generate the code for the firing of actors. In this base class, it is attempted to fire all the actors once. In subclasses such as the adapters for SDF and Giotto directors, the firings of actors observe the associated schedule. In addition, some special handling is needed, e.g., the iteration limit in SDF and time advancement in Giotto.
 * @return The generated code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating fire code for the actor.
 */
public String generateFireCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  code.append(getCodeGenerator().comment("String_Node_Str"));
  Iterator<?> actors=((CompositeActor)_director.getContainer()).deepEntityList().iterator();
  actors=((CompositeActor)_director.getContainer()).deepEntityList().iterator();
  while (actors.hasNext()) {
    Actor actor=(Actor)actors.next();
    if (actor.getFullName().contains("String_Node_Str")) {
      NamedProgramCodeGeneratorAdapter adapter=(NamedProgramCodeGeneratorAdapter)getCodeGenerator().getAdapter(actor);
      code.append(adapter.generateFireCode());
    }
  }
  return code.toString();
}

Fixed version (ground truth):
/** 
 * Generate the code for the firing of actors. In this base class, it is attempted to fire all the actors once. In subclasses such as the adapters for SDF and Giotto directors, the firings of actors observe the associated schedule. In addition, some special handling is needed, e.g., the iteration limit in SDF and time advancement in Giotto.
 * @return The generated code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating fire code for the actor.
 */
public String generateFireCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  code.append(getCodeGenerator().comment("String_Node_Str"));
  Iterator<?> actors=((CompositeActor)_director.getContainer()).deepEntityList().iterator();
  while (actors.hasNext()) {
    Actor actor=(Actor)actors.next();
    if (actor.getFullName().contains("String_Node_Str")) {
      NamedProgramCodeGeneratorAdapter adapter=(NamedProgramCodeGeneratorAdapter)getCodeGenerator().getAdapter(actor);
      code.append(adapter.generateFireCode());
    }
  }
  return code.toString();
}
Program: 73559
Project: 73559
Buggy source:
/** 
 * Create a new Infinite concept, belonging to the given ontology, with an automatically generated name.
 * @param ontology The finite ontology to which this belongs.
 * @throws NameDuplicationException Should never be thrown.
 * @throws IllegalActionException If the base class throws it.
 */
protected InfiniteConcept(Ontology ontology) throws IllegalActionException, NameDuplicationException {
  super(ontology,"String_Node_Str" + ++_conceptNumber);
  setName(getName() + "String_Node_Str" + getClass().getSimpleName()+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create a new Infinite concept, belonging to the given ontology, with an automatically generated name.
 * @param ontology The finite ontology to which this belongs.
 * @throws NameDuplicationException Should never be thrown.
 * @throws IllegalActionException If the base class throws it.
 */
protected InfiniteConcept(Ontology ontology) throws IllegalActionException, NameDuplicationException {
  super(ontology,"String_Node_Str" + ++_conceptNumber);
  setName(getName() + "String_Node_Str" + getClass().getSimpleName()+ "String_Node_Str");
  _ontology=ontology;
}
Program: 73560
Project: 73560
Buggy source:
private void _init() throws IllegalActionException, NameDuplicationException {
  GiottoScheduler scheduler=new GiottoScheduler(workspace());
  setScheduler(scheduler);
  period=new Parameter(this,"String_Node_Str");
  period.setToken(new DoubleToken(_DEFAULT_GIOTTO_PERIOD));
  iterations=new Parameter(this,"String_Node_Str",new IntToken(0));
  synchronizeToRealTime=new Parameter(this,"String_Node_Str",new BooleanToken(false));
  timeResolution.setVisibility(Settable.FULL);
}

Fixed version (ground truth):
private void _init() throws NameDuplicationException, IllegalActionException {
  GiottoScheduler scheduler=new GiottoScheduler(workspace());
  setScheduler(scheduler);
  period=new Parameter(this,"String_Node_Str");
  period.setToken(new DoubleToken(_DEFAULT_GIOTTO_PERIOD));
  iterations=new Parameter(this,"String_Node_Str",new IntToken(0));
  synchronizeToRealTime=new Parameter(this,"String_Node_Str",new BooleanToken(false));
  timeResolution.setVisibility(Settable.FULL);
}
Program: 73561
Project: 73561
Buggy source:
/** 
 * Construct an instance with the specified container and name.
 * @param container The container.
 * @param name The name of this actor.
 * @exception IllegalActionException If the entity cannot be containedby the proposed container.
 * @exception NameDuplicationException If the container already has anactor with this name.
 */
public GiottoTimingManager(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  SingletonParameter hideName=new SingletonParameter(this,"String_Node_Str");
  hideName.setToken(BooleanToken.TRUE);
  hideName.setVisibility(Settable.EXPERT);
  seed=new SharedParameter(this,"String_Node_Str",GiottoTimingManager.class,"String_Node_Str");
  seed.setTypeEquals(BaseType.LONG);
  resetOnEachRun=new SharedParameter(this,"String_Node_Str",GiottoTimingManager.class,"String_Node_Str");
  resetOnEachRun.setTypeEquals(BaseType.BOOLEAN);
}

Fixed version (ground truth):
/** 
 * Construct an instance with the specified container and name.
 * @param container The container.
 * @param name The name of this actor.
 * @exception IllegalActionException If the entity cannot be containedby the proposed container.
 * @exception NameDuplicationException If the container already has anactor with this name.
 */
public GiottoTimingManager(NamedObj container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  SingletonParameter hideName=new SingletonParameter(this,"String_Node_Str");
  hideName.setToken(BooleanToken.TRUE);
  hideName.setVisibility(Settable.EXPERT);
  seed=new SharedParameter(this,"String_Node_Str",GiottoTimingManager.class,"String_Node_Str");
  seed.setTypeEquals(BaseType.LONG);
  resetOnEachRun=new SharedParameter(this,"String_Node_Str",GiottoTimingManager.class,"String_Node_Str");
  resetOnEachRun.setTypeEquals(BaseType.BOOLEAN);
  probabilityDistribution=new StringParameter(this,"String_Node_Str");
  probabilityDistribution.setExpression("String_Node_Str");
  probabilityDistribution.addChoice("String_Node_Str");
}
Program: 73562
Project: 73562
Buggy source:
/** 
 * If the attribute is <i>seed</i> then create the base random number generator.
 * @param attribute The attribute that changed.
 * @exception IllegalActionException If the change is not acceptableto this container (not thrown in this base class).
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  if (attribute == seed) {
    long seedValue=((LongToken)(seed.getToken())).longValue();
    if (seedValue != _generatorSeed) {
      _needNewGenerator=true;
    }
  }
 else {
    super.attributeChanged(attribute);
  }
}

Fixed version (ground truth):
/** 
 * If the attribute is <i>seed</i> then create the base random number generator.
 * @param attribute The attribute that changed.
 * @exception IllegalActionException If the change is not acceptableto this container (not thrown in this base class).
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  if (attribute == seed) {
    long seedValue=((LongToken)(seed.getToken())).longValue();
    if (seedValue != _generatorSeed) {
      _needNewGenerator=true;
    }
  }
  if (attribute == probabilityDistribution) {
  }
 else {
    super.attributeChanged(attribute);
  }
}
Program: 73563
Project: 73563
Buggy source:
protected void _generateRandomNumber() throws IllegalActionException {
}

Fixed version (ground truth):
/** 
 * Generate the next random number.
 */
protected void _generateRandomNumber() throws IllegalActionException {
  _current=_random.nextDouble();
}
Program: 73564
Project: 73564
Buggy source:
public State(ptolemy.domains.modal.kernel.State component){
  super(component);
}

Fixed version (ground truth):
/** 
 * Construct the code generator adapter associated with the given state.
 * @param componentThe associatedptolemy.domains.modal.kernel.State
 */
public State(ptolemy.domains.modal.kernel.State component){
  super(component);
}
Program: 73565
Project: 73565
Buggy source:
public FSMDirector(ptolemy.domains.modal.kernel.FSMDirector director){
  super(director);
}

Fixed version (ground truth):
/** 
 * Construct the code generator adapter associated with the given FSMDirector.
 * @param director The associated ptolemy.domains.modal.kernel.FSMDirector
 */
public FSMDirector(ptolemy.domains.modal.kernel.FSMDirector director){
  super(director);
}
Program: 73566
Project: 73566
Buggy source:
/** 
 * Construct the code generator helper associated with the given FSMActor.
 * @param component The associated component.
 */
public FSMActor(ptolemy.domains.modal.kernel.FSMActor component) throws NameDuplicationException, IllegalActionException {
  super(component);
}

Fixed version (ground truth):
/** 
 * Construct the code generator helper associated with the given FSMActor.
 * @param component The associated component.
 * @exception NameDuplicationException If the container already contains a a code generator adapter for this particular FSMActor.
 * @exception IllegalActionException If the NamedProgramCodeGeneratorAdapter throws an IllegalActionException.
 */
public FSMActor(ptolemy.domains.modal.kernel.FSMActor component) throws NameDuplicationException, IllegalActionException {
  super(component);
}
Program: 73567
Project: 73567
Buggy source:
/** 
 * Construct the code generator adapter associated with the given state.
 * @param componentThe associatedptolemy.domains.modal.kernel.State
 */
public State(ptolemy.domains.modal.kernel.State component){
  super(component);
}

Fixed version (ground truth):
/** 
 * Construct the code generator adapter associated with the given state.
 * @param component The associatedptolemy.domains.modal.kernel.State
 */
public State(ptolemy.domains.modal.kernel.State component){
  super(component);
}
Program: 73569
Project: 73569
Buggy source:
/** 
 * Among all events in the event queue, find the first event that is destined to an output port of the containing composite actor. This event is taken from the event queue, and the token is sent to the actuator/network output port.
 * @return the containing composite actor.
 */
protected void _actorFired(){
  int eventIndex=0;
synchronized (_eventQueue) {
    while (eventIndex < _eventQueue.size()) {
      PtidesEvent nextEvent=((PtidesListEventQueue)_eventQueue).get(eventIndex);
      if (nextEvent.ioPort() != null && nextEvent.ioPort().isOutput()) {
        ((PtidesListEventQueue)_eventQueue).take(eventIndex);
        continue;
      }
      eventIndex++;
    }
  }
  if (_lastActorFired != null) {
    _pureEventDeadlines.remove(_lastActorFired);
    _pureEventDelays.remove(_lastActorFired);
    _pureEventSourcePorts.remove(_lastActorFired);
  }
}

Fixed version (ground truth):
/** 
 * An actor has just been fired. An actuation event could have been produced, so we transfer that event to the outside. Also, we clear  bookkeeping structures that keeps track of what actor has just fired.
 */
protected void _actorFired(){
  _getNextActuationEvent();
  if (_lastActorFired != null) {
    _pureEventDeadlines.remove(_lastActorFired);
    _pureEventDelays.remove(_lastActorFired);
    _pureEventSourcePorts.remove(_lastActorFired);
  }
}
Program: 73572
Project: 73572
Buggy source:
/** 
 * Return the hash code for the event object.
 * @return The hash code for the event object.
 * @see #equals(Object)
 */
public int hashCode(){
  return super.hashCode();
}

Fixed version (ground truth):
/** 
 * Return the hash code for the event object.
 * @return The hash code for the event object.
 * @see #equals(Object)
 */
public int hashCode(){
  int primitiveFieldHash=super.hashCode() >>> _channel;
  int objectFieldHash=(isPureEvent() ? _absoluteDeadline.hashCode() : (_token.hashCode()) >>> _receiver.hashCode());
  return primitiveFieldHash >>> objectFieldHash;
}
Program: 73573
Project: 73573
Buggy source:
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and their tokens, receiver, channel, absoluteDeadline, as well as indication whether they are pure events are all equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  return (super.equals(object) && event.token().equals(_token) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline().equals(_absoluteDeadline)) || !event.isPureEvent()));
}

Fixed version (ground truth):
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and their tokens, receiver, channel, absoluteDeadline, as well as indication whether they are pure events are all equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  return (super.equals(object) && ((!event.isPureEvent() && event.token().equals(_token)) || event.isPureEvent()) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline().equals(_absoluteDeadline)) || !event.isPureEvent()));
}
Program: 73574
Project: 73574
Buggy source:
/** 
 * Return the output of the concept function based on the concept inputs.
 * @param argValues The list of concept inputs to the function.
 * @return The concept output result of the function.
 * @exception IllegalActionException If there is an error withthe input argument array or evaluating the function.
 */
public Concept evaluateFunction(List<Concept> argValues) throws IllegalActionException {
  if (argValues == null) {
    throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str");
  }
 else   if (_numArgsIsFixed) {
    if (argValues.size() != getNumberOfArguments()) {
      throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ getNumberOfArguments()+ "String_Node_Str"+ argValues.size());
    }
 else {
      int index=0;
      for (      Concept argument : argValues) {
        if (argument != null && !_argumentDomainOntologies.get(index).entityList(FiniteConcept.class).contains(argument)) {
          throw new IllegalActionException("String_Node_Str" + argument + "String_Node_Str"+ index+ "String_Node_Str"+ this+ "String_Node_Str"+ _argumentDomainOntologies.get(index)+ "String_Node_Str");
        }
        index++;
      }
    }
  }
  Concept outputValue=_evaluateFunction(argValues);
  if (outputValue != null && _outputRangeOntology.equals(outputValue.getOntology())) {
    throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str"+ outputValue+ "String_Node_Str"+ _outputRangeOntology+ "String_Node_Str");
  }
 else {
    return outputValue;
  }
}

Fixed version (ground truth):
/** 
 * Return the output of the concept function based on the concept inputs.
 * @param argValues The list of concept inputs to the function.
 * @return The concept output result of the function.
 * @exception IllegalActionException If there is an error withthe input argument array or evaluating the function.
 */
public Concept evaluateFunction(List<Concept> argValues) throws IllegalActionException {
  if (argValues == null) {
    throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str");
  }
 else   if (_numArgsIsFixed) {
    if (argValues.size() != getNumberOfArguments()) {
      throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ getNumberOfArguments()+ "String_Node_Str"+ argValues.size());
    }
 else {
      int index=0;
      for (      Concept argument : argValues) {
        if (argument != null && !_argumentDomainOntologies.get(index).entityList(FiniteConcept.class).contains(argument)) {
          throw new IllegalActionException("String_Node_Str" + argument + "String_Node_Str"+ index+ "String_Node_Str"+ this+ "String_Node_Str"+ _argumentDomainOntologies.get(index)+ "String_Node_Str");
        }
        index++;
      }
    }
  }
  Concept outputValue=_evaluateFunction(argValues);
  if (outputValue != null && !_outputRangeOntology.equals(outputValue.getOntology())) {
    throw new IllegalActionException("String_Node_Str" + this + "String_Node_Str"+ outputValue+ "String_Node_Str"+ _outputRangeOntology+ "String_Node_Str");
  }
 else {
    return outputValue;
  }
}
Program: 73575
Project: 73575
Buggy source:
/** 
 * Construct a trigger event with the specified destination IO port, timestamp, microstep, and depth. This constructor should be used if the event is a trigger event (a non-pure event that is destined to a port). To construct trigger event, neither _token nor _receiver should be null.
 * @param ioPort The destination IO port.
 * @param channel The channel the event is destined to.
 * @param timeStamp The time when the event occurs.
 * @param microstep The phase of execution within a fixed time.
 * @param depth The topological depth of the destination IO Port.
 * @param token The token associated with the event.
 * @param receiver The Receiver the event is destined to.
 * @exception IllegalActionException If the actor has a priority parameter,but its value cannot be obtained, which should be an integer.
 */
public PtidesEvent(IOPort ioPort,int channel,Time timeStamp,int microstep,int depth,Token token,Receiver receiver) throws IllegalActionException {
  super(ioPort,timeStamp,microstep,depth);
  if (token == null || receiver == null) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  _channel=channel;
  _token=token;
  _receiver=receiver;
  _isPureEvent=false;
}

Fixed version (ground truth):
/** 
 * Construct a trigger event with the specified destination IO port, timestamp, microstep, and depth. This constructor should be used if the event is a trigger event (a non-pure event that is destined to a port). To construct trigger event, neither _token nor _receiver should be null.
 * @param ioPort The destination IO port.
 * @param channel The channel the event is destined to.
 * @param timeStamp The time when the event occurs.
 * @param microstep The phase of execution within a fixed time.
 * @param depth The topological depth of the destination IO Port.
 * @param token The token associated with the event. This field shouldnot be null.
 * @param receiver The Receiver the event is destined to. This field should not be null.
 * @exception IllegalActionException If the actor has a priority parameter,but its value cannot be obtained, which should be an integer.
 */
public PtidesEvent(IOPort ioPort,int channel,Time timeStamp,int microstep,int depth,Token token,Receiver receiver) throws IllegalActionException {
  super(ioPort,timeStamp,microstep,depth);
  assert(token != null && receiver != null);
  _channel=channel;
  _token=token;
  _receiver=receiver;
  _isPureEvent=false;
}
Program: 73576
Project: 73576
Buggy source:
/** 
 * Return the receiver this event is destined to.
 * @return The receiver.
 */
public final Receiver receiver(){
  if (!isPureEvent() && (_receiver == null)) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return _receiver;
}

Fixed version (ground truth):
/** 
 * Return the destination receiver for this event.
 * @return The destination receiver for this event.
 */
public final Receiver receiver(){
  if (!isPureEvent()) {
    assert(_receiver != null);
  }
  return _receiver;
}
Program: 73577
Project: 73577
Buggy source:
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and the event types (pure vs. non-pure) are the same, and their receivers are the same object, and the channels, tokens,  and absoluteDeadlines values are the same.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  return (super.equals(object) && ((!event.isPureEvent() && event.token().equals(_token)) || event.isPureEvent()) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline().equals(_absoluteDeadline)) || !event.isPureEvent()));
}

Fixed version (ground truth):
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and the event types (pure vs. non-pure) are the same, and their receivers are the same object, and the channels, tokens,  and absoluteDeadline values are the same.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  boolean result=super.equals(object);
  if (!event.isPureEvent()) {
    result=result && event.token().equals(_token);
  }
 else {
    result=result && event.absoluteDeadline().equals(_absoluteDeadline);
  }
  return result && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel;
}
Program: 73578
Project: 73578
Buggy source:
/** 
 * Return the channel this event is destined to.
 * @return The channel.
 */
public final int channel(){
  return _channel;
}

Fixed version (ground truth):
/** 
 * Return the destination channel for this event.
 * @return The channel The destination channel for this event.
 */
public final int channel(){
  return _channel;
}
Program: 73579
Project: 73579
Buggy source:
/** 
 * Return a description of the event, including the the tag, depth, the token, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ _absoluteDeadline+ "String_Node_Str"+ name+ "String_Node_Str"+ (_ioPort == null ? "String_Node_Str" : _ioPort.getName())+ "String_Node_Str"+ _channel+ "String_Node_Str"+ (_receiver == null ? "String_Node_Str" : getClass().getName() + "String_Node_Str" + (_receiver.getContainer() != null ? _receiver.getContainer().getFullName() : "String_Node_Str")+ "String_Node_Str")+ "String_Node_Str"+ _isPureEvent+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Return a description of the event, including the the tag, depth, the token, absolute deadline, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ (_absoluteDeadline == null ? "String_Node_Str" : _absoluteDeadline.toString())+ "String_Node_Str"+ name+ "String_Node_Str"+ (_ioPort == null ? "String_Node_Str" : _ioPort.getName())+ "String_Node_Str"+ _channel+ "String_Node_Str"+ (_receiver == null ? "String_Node_Str" : getClass().getName() + "String_Node_Str" + (_receiver.getContainer() != null ? _receiver.getContainer().getFullName() : "String_Node_Str")+ "String_Node_Str")+ "String_Node_Str"+ _isPureEvent+ "String_Node_Str";
}
Program: 73580
Project: 73580
Buggy source:
/** 
 * Return the absolute deadline of this event if the event is a pure event. A pure event is one that does not contained a token (value) that  is destined to an input port.
 * @return absolute deadline if the event is a pure event.
 * @exception InternalErrorException If event is not a pure event,or the event is a pure event and absoluteDeadline is null.
 */
public final Time absoluteDeadline(){
  if (!isPureEvent()) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  if (isPureEvent() && _absoluteDeadline == null) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return _absoluteDeadline;
}

Fixed version (ground truth):
/** 
 * Return the absolute deadline of this event if the event is a pure event. A pure event is one that does not contained a token (value) that  is destined to an input port.
 * @return absolute deadline if the event is a pure event.
 * @exception InternalErrorException If event is not a pure event,or the event is a pure event and absoluteDeadline is null.
 */
public final Time absoluteDeadline(){
  if (!isPureEvent()) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
 else {
    assert(_absoluteDeadline == null);
  }
  return _absoluteDeadline;
}
Program: 73581
Project: 73581
Buggy source:
/** 
 * Return true if this event is a pure event.
 * @return True if this event is a pure event.
 */
public final boolean isPureEvent(){
  return _isPureEvent;
}

Fixed version (ground truth):
/** 
 * Return true if this event is a pure event. A pure event is one that does not contained a token that is destined to an input port.
 * @return True if this event is a pure event.
 */
public final boolean isPureEvent(){
  return _isPureEvent;
}
Program: 73582
Project: 73582
Buggy source:
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and their tokens, receiver, channel, absoluteDeadline, as well as indication whether they are pure events are all equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  return (super.equals(object) && event.token() == _token && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline() == _absoluteDeadline) || !event.isPureEvent()));
}

Fixed version (ground truth):
/** 
 * Indicate whether some other object is equal to this PtidesEvent. PtidesEvents are equal if the super class indicates they are equal and their tokens, receiver, channel, absoluteDeadline, as well as indication whether they are pure events are all equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  PtidesEvent event=(PtidesEvent)object;
  return (super.equals(object) && event.token().equals(_token) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline().equals(_absoluteDeadline)) || !event.isPureEvent()));
}
Program: 73583
Project: 73583
Buggy source:
/** 
 * Return a description of the event, including the the tag, depth, the token, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ _absoluteDeadline+ "String_Node_Str"+ name+ "String_Node_Str"+ (_ioPort == null ? "String_Node_Str" : _ioPort.getName())+ "String_Node_Str"+ _channel+ "String_Node_Str"+ _isPureEvent+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Return a description of the event, including the the tag, depth, the token, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ _absoluteDeadline+ "String_Node_Str"+ name+ "String_Node_Str"+ (_ioPort == null ? "String_Node_Str" : _ioPort.getName())+ "String_Node_Str"+ _channel+ "String_Node_Str"+ _isPureEvent+ (_receiver == null ? "String_Node_Str" : getClass().getName() + "String_Node_Str" + (_receiver.getContainer() != null ? _receiver.getContainer().getFullName() : "String_Node_Str")+ "String_Node_Str")+ "String_Node_Str";
}
Program: 73584
Project: 73584
Buggy source:
/** 
 * Return the absolute deadline of this event.
 * @return absolute deadline if the event is not a pure event.
 */
public final Time absoluteDeadline(){
  if (!isPureEvent()) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  return _absoluteDeadline;
}

Fixed version (ground truth):
/** 
 * Return the absolute deadline of this event. A pure event is one that does not contained a token (value) that  is destined to an input port.
 * @return absolute deadline if the event is not a pure event.
 * @exception InternalErrorException If event is not a pure event.
 */
public final Time absoluteDeadline(){
  if (!isPureEvent()) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  return _absoluteDeadline;
}
Program: 73585
Project: 73585
Buggy source:
public void put(DEEvent event) throws IllegalActionException {
  put((PtidesEvent)event);
}

Fixed version (ground truth):
/** 
 * Put the event queue into the event queue, and then sort it by timestamp order. 
 * @param event a DEEvent object.
 * @throws IllegalActionException if the addFirst() method of the queue throws it.
 */
public void put(DEEvent event) throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str" + event);
  }
  _listQueue.addFirst(event);
  Collections.sort(_listQueue);
}
Program: 73586
Project: 73586
Buggy source:
public int compare(Object o1,Object o2){
  double[] location1={Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
  double[] location2={Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
  List locations=((Entity)o1).attributeList(Locatable.class);
  if (locations.size() > 0) {
    location1=((Locatable)locations.get(0)).getLocation();
  }
  locations=((Entity)o2).attributeList(Locatable.class);
  if (locations.size() > 0) {
    location2=((Locatable)locations.get(0)).getLocation();
  }
  if (location1[0] < location2[0]) {
    return -1;
  }
 else   if (location1[0] > location2[0]) {
    return 1;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
public int compare(Object o1,Object o2){
  double[] location1={Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
  double[] location2={Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
  List locations=((Entity)o1).attributeList(Locatable.class);
  if (locations.size() > 0) {
    location1=((Locatable)locations.get(0)).getLocation();
  }
  locations=((Entity)o2).attributeList(Locatable.class);
  if (locations.size() > 0) {
    location2=((Locatable)locations.get(0)).getLocation();
  }
  if (location1[0] < location2[0]) {
    return -1;
  }
 else   if (location1[0] > location2[0]) {
    return 1;
  }
 else {
    if (o1.equals(o2)) {
      return 0;
    }
    return -1;
  }
}
Program: 73587
Project: 73587
Buggy source:
protected Schedule _getSchedule() throws IllegalActionException, NotSchedulableException {
  StaticSchedulingDirector director=(StaticSchedulingDirector)getContainer();
  CompositeActor compositeActor=(CompositeActor)(director.getContainer());
  List actors=compositeActor.deepEntityList();
  Iterator actorIterator=actors.iterator();
  TreeSet sortedActors=new TreeSet(new LeftRightComparator());
  while (actorIterator.hasNext()) {
    Actor actor=(Actor)actorIterator.next();
    sortedActors.add(actor);
  }
  Schedule schedule=new Schedule();
  Iterator sortedActorsIterator=sortedActors.iterator();
  while (sortedActorsIterator.hasNext()) {
    Actor actor=(Actor)sortedActorsIterator.next();
    Firing firing=new Firing();
    firing.setActor(actor);
    schedule.add(firing);
  }
  return schedule;
}

Fixed version (ground truth):
/** 
 * Return a left-to-right schedule. 
 */
protected Schedule _getSchedule() throws IllegalActionException, NotSchedulableException {
  NamedObj director=getContainer();
  CompositeActor compositeActor=(CompositeActor)(director.getContainer());
  List<Actor> actors=compositeActor.deepEntityList();
  TreeSet<Actor> sortedActors=new TreeSet(new LeftRightComparator());
  sortedActors.addAll(actors);
  Schedule schedule=new Schedule();
  for (  Actor actor : sortedActors) {
    Firing firing=new Firing(actor);
    schedule.add(firing);
  }
  return schedule;
}
Program: 73588
Project: 73588
Buggy source:
public LeftRightDirector(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  setScheduler(new LeftRightScheduler(this,"String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Constructor. A director is an Attribute.
 * @param container The container for the director.
 * @param name The name of the director.
 * @throws IllegalActionException If the container cannot contain this director.
 * @throws NameDuplicationException If the container already contains anAttribute with this name.
 */
public LeftRightDirector(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  setScheduler(new LeftRightScheduler(this,"String_Node_Str"));
}
Program: 73589
Project: 73589
Buggy source:
public LeftRightScheduler(LeftRightDirector director,String name) throws IllegalActionException, NameDuplicationException {
  super(director,name);
}

Fixed version (ground truth):
/** 
 * Constructor. A Scheduler is an Attribute, normally contained by a director.
 * @param director The director that will use this scheduler.
 * @param name The name of the scheduler.
 * @throws IllegalActionException If the director cannot use this scheduler.
 * @throws NameDuplicationException If the director already contains anAttribute with this name.
 */
public LeftRightScheduler(LeftRightDirector director,String name) throws IllegalActionException, NameDuplicationException {
  super(director,name);
}
Program: 73590
Project: 73590
Buggy source:
/** 
 * Return the receiver.
 * @return The receiver.
 */
public final boolean isPureEvent(){
  return _isPureEvent;
}

Fixed version (ground truth):
/** 
 * Return true if this event is a pure event.
 * @return True if this event is a pure event.
 */
public final boolean isPureEvent(){
  return _isPureEvent;
}
Program: 73591
Project: 73591
Buggy source:
/** 
 * Indicate whether some the super class returns they are equal and their tokens are equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  boolean result=super.equals(object);
  if (result == true && ((PtidesEvent)object).token() == _token) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Indicate whether some the super class returns they are equal and their tokens are equal.
 * @param object The object with which to compare.
 * @return true if the object is a DEEvent and the fields ofthe object and of this object are equal.
 * @see #hashCode()
 */
public boolean equals(Object object){
  if (!(object instanceof PtidesEvent)) {
    return false;
  }
  boolean result=super.equals(object);
  if (result == true && ((PtidesEvent)object).token() == _token) {
    return true;
  }
 else {
    return false;
  }
}
Program: 73592
Project: 73592
Buggy source:
/** 
 * Return a description of the event, including the the tag, depth, the token, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  if (!_isPureEvent) {
    return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ name+ "String_Node_Str"+ _ioPort.getName()+ "String_Node_Str"+ _channel+ "String_Node_Str";
  }
 else {
    return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ name+ "String_Node_Str"+ _isPureEvent+ "String_Node_Str"+ "String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Return a description of the event, including the the tag, depth, the token, and destination information.
 * @return The token as a string with the time stamp.
 */
public String toString(){
  String name="String_Node_Str";
  if (_actor != null) {
    name=((NamedObj)_actor).getFullName();
  }
  if (!_isPureEvent) {
    return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ _token+ "String_Node_Str"+ _absoluteDeadline+ "String_Node_Str"+ name+ "String_Node_Str"+ (_ioPort == null ? "String_Node_Str" : _ioPort.getName())+ "String_Node_Str"+ _channel+ "String_Node_Str";
  }
 else {
    return "String_Node_Str" + _timestamp + "String_Node_Str"+ _microstep+ "String_Node_Str"+ _depth+ "String_Node_Str"+ "String_Node_Str"+ _token+ "String_Node_Str"+ _absoluteDeadline+ "String_Node_Str"+ name+ "String_Node_Str"+ _isPureEvent+ "String_Node_Str"+ "String_Node_Str";
  }
}
Program: 73595
Project: 73595
Buggy source:
/** 
 * Create new form ModelsListFrame 
 */
public ModelsListFrame(Configuration configuration){
  this.setTitle("String_Node_Str");
  _initModelsList();
  initComponents();
  _configuration=configuration;
}

Fixed version (ground truth):
/** 
 * Create new form ModelsListFrame 
 */
public ModelsListFrame(Configuration configuration){
  setTitle("String_Node_Str");
  _initModelsList();
  initComponents();
  _configuration=configuration;
}
Program: 73600
Project: 73600
Buggy source:
/** 
 * Constructor for a generic attribute PTDBSearchAttribute.
 * @param genericClassName Name of the Attribute class.
 */
public PTDBSearchAttribute(String genericClassName){
  super();
  _isGenericAttribute=true;
  _genericClassName=genericClassName;
}

Fixed version (ground truth):
/** 
 * Default constructor of PTDBSearchAttribute.
 */
public PTDBSearchAttribute(){
  super();
  _isGenericAttribute=false;
}
Program: 73601
Project: 73601
Buggy source:
protected ArrayList<Attribute> getAttributes() throws IllegalActionException {
  ArrayList<Attribute> returnList=super.getAttributes();
  Component[] componentArray1=_attListPanel.getComponents();
  for (int i=0; i < componentArray1.length; i++) {
    if (componentArray1[i] instanceof JPanel) {
      Component[] componentArray2=((JPanel)componentArray1[i]).getComponents();
      for (int j=0; j < componentArray2.length; j++) {
        if (componentArray2[j] instanceof GenericAttributePanel) {
          try {
            PTDBSearchAttribute attribute=new PTDBSearchAttribute((((GenericAttributePanel)componentArray2[j]).getAttributeClass()));
            attribute.setName(((GenericAttributePanel)componentArray2[j]).getAttributeName());
            attribute.setExpression(((GenericAttributePanel)componentArray2[j]).getValue());
            returnList.add(attribute);
          }
 catch (          NameDuplicationException e) {
          }
        }
      }
    }
  }
  return returnList;
}

Fixed version (ground truth):
protected ArrayList<Attribute> getAttributes() throws IllegalActionException {
  ArrayList<Attribute> returnList=super.getAttributes();
  Component[] componentArray1=_attListPanel.getComponents();
  for (int i=0; i < componentArray1.length; i++) {
    if (componentArray1[i] instanceof JPanel) {
      Component[] componentArray2=((JPanel)componentArray1[i]).getComponents();
      for (int j=0; j < componentArray2.length; j++) {
        if (componentArray2[j] instanceof GenericAttributePanel) {
          try {
            PTDBSearchAttribute attribute=new PTDBSearchAttribute();
            attribute.setGenericAttribute(true);
            if ((((GenericAttributePanel)componentArray2[j]).getAttributeClass()).length() > 0) {
              attribute.setGenericClassName((((GenericAttributePanel)componentArray2[j]).getAttributeClass()));
            }
            attribute.setName(((GenericAttributePanel)componentArray2[j]).getAttributeName());
            if ((((GenericAttributePanel)componentArray2[j]).getValue()).length() > 0) {
              attribute.setExpression(((GenericAttributePanel)componentArray2[j]).getValue());
            }
            System.out.println("String_Node_Str" + attribute.getName());
            System.out.println("String_Node_Str" + attribute.getExpression());
            System.out.println("String_Node_Str" + attribute.getGenericClassName());
            returnList.add(attribute);
          }
 catch (          NameDuplicationException e) {
          }
        }
      }
    }
  }
  return returnList;
}
Program: 73603
Project: 73603
Buggy source:
public boolean hasCode(){
  return true;
}

Fixed version (ground truth):
public boolean hasCode(){
  return !isEmpty();
}
Program: 73604
Project: 73604
Buggy source:
/** 
 * Create new empty Syntactic Column. 
 */
public SyntacticColumn(){
  super();
  _inputs=new LinkedList();
  _outputs=new LinkedList();
}

Fixed version (ground truth):
/** 
 * Create new empty Syntactic Column. 
 */
public SyntacticColumn(){
  super();
}
Program: 73605
Project: 73605
Buggy source:
/** 
 * Sort constituent terms in column by type order.  Sorting a column will change its neighboring permutations. 
 */
public void sort(){
  final Comparator<SyntacticTerm> compareNodes=new Comparator<SyntacticTerm>(){
    public int compare(    SyntacticTerm a,    SyntacticTerm b){
      return a.getOrder() - b.getOrder();
    }
  }
;
  Collections.sort(this,compareNodes);
  _inputs.clear();
  _outputs.clear();
  for (  SyntacticTerm node : this) {
    _inputs.addAll(node.getInputs());
    _outputs.addAll(node.getOutputs());
  }
}

Fixed version (ground truth):
/** 
 * Sort constituent terms in column by type order.  Sorting a column will change its neighboring permutations. 
 */
public void sort(){
  final Comparator<SyntacticTerm> compareNodes=new Comparator<SyntacticTerm>(){
    public int compare(    SyntacticTerm a,    SyntacticTerm b){
      return a.getOrder() - b.getOrder();
    }
  }
;
  Collections.sort(this,compareNodes);
  _refreshPorts();
}
Program: 73606
Project: 73606
Buggy source:
public String generateCode(){
  return "String_Node_Str" + _degree + "String_Node_Str"+ (_kernel == null ? "String_Node_Str" : _kernel.generateCode())+ "String_Node_Str";
}

Fixed version (ground truth):
public String generateCode(){
  if (_kernel == null)   return "String_Node_Str";
 else   return "String_Node_Str" + _degree + "String_Node_Str"+ _kernel.generateCode()+ "String_Node_Str";
}
Program: 73607
Project: 73607
Buggy source:
public SyntacticContraction(int degree){
  _degree=degree > 0 ? degree : 0;
  _kernel=null;
}

Fixed version (ground truth):
public SyntacticContraction(int degree){
  _degree=degree > 0 ? degree : 0;
  _kernel=null;
  _rank=null;
}
Program: 73608
Project: 73608
Buggy source:
public boolean setKernel(SyntacticTerm term){
  int termIns=term.sizeInputs();
  int termOuts=term.sizeOutputs();
  System.out.print("String_Node_Str" + _degree + "String_Node_Str"+ termIns+ "String_Node_Str"+ termOuts+ "String_Node_Str");
  if (_degree > termIns || _degree > termOuts)   return false;
  _kernel=term;
  return true;
}

Fixed version (ground truth):
public boolean setKernel(SyntacticTerm term){
  SyntacticRank rank=term.rank();
  SyntacticRank crank=SyntacticRank.contract(rank,_degree);
  if (crank == null)   return false;
  _rank=crank;
  _kernel=term;
  System.out.print("String_Node_Str" + _degree + "String_Node_Str"+ crank.generateCode()+ "String_Node_Str");
  return true;
}
Program: 73609
Project: 73609
Buggy source:
public Rank rank(){
  return null;
}

Fixed version (ground truth):
public SyntacticRank rank(){
  return _rank;
}
Program: 73611
Project: 73611
Buggy source:
/** 
 * Display the given node with the current prefix, recursing into the children of the node.
 * @param node The node to be displayed.
 * @exception If there is a problem displaying the children.
 */
protected void _displayNode(ASTPtRootNode node) throws IllegalActionException {
  if (node.isEvaluated()) {
    String str=node.toString(_prefix) + "String_Node_Str";
    str=str + node.getToken().getClass().getName() + "String_Node_Str";
    _stream.println(str + node.getToken().toString());
  }
 else {
    _stream.println(node.toString(_prefix) + "String_Node_Str");
  }
  _stream.println("String_Node_Str" + node.getType());
  if (node.jjtGetNumChildren() > 0) {
    String oldPrefix=_prefix;
    _prefix="String_Node_Str" + oldPrefix;
    for (int i=0; i < node.jjtGetNumChildren(); i++) {
      ASTPtRootNode child=(ASTPtRootNode)node.jjtGetChild(i);
      child.visit(this);
    }
    _prefix=oldPrefix;
  }
}

Fixed version (ground truth):
/** 
 * Display the given node with the current prefix, recursing into the children of the node.
 * @param node The node to be displayed.
 * @exception IllegalActionException If there is a problemdisplaying the children.
 */
protected void _displayNode(ASTPtRootNode node) throws IllegalActionException {
  if (node.isEvaluated()) {
    String str=node.toString(_prefix) + "String_Node_Str";
    str=str + node.getToken().getClass().getName() + "String_Node_Str";
    _stream.println(str + node.getToken().toString());
  }
 else {
    _stream.println(node.toString(_prefix) + "String_Node_Str");
  }
  _stream.println("String_Node_Str" + node.getType());
  if (node.jjtGetNumChildren() > 0) {
    String oldPrefix=_prefix;
    _prefix="String_Node_Str" + oldPrefix;
    for (int i=0; i < node.jjtGetNumChildren(); i++) {
      ASTPtRootNode child=(ASTPtRootNode)node.jjtGetChild(i);
      child.visit(this);
    }
    _prefix=oldPrefix;
  }
}