nus-yam/ex-repair huggingface dataset:
Program: 76355
Project: 76355
Buggy source:
/** 
 * Set current time to zero, calculate priorities for simultaneous events, and invoke the initialize() methods of all actors deeply contained by the container.  To be able to calculate the priorities, it is essential that the graph not have a delay-free loop.  If it does, then this can be corrected by inserting a DEDelay actor with a zero-valued delay.  This has the effect of breaking the loop for the purposes of calculating priorities, without introducing a time delay. <p> This method should be invoked once per execution, before any iteration. Actors may produce output data in their initialize() methods, or more commonly, they may schedule pure events. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If there is a delay-free loop, orif the initialize() method of the container or one of the deeply contained actors throws it.
 */
public void initialize() throws IllegalActionException {
  _eventQueue.clear();
  _deadActors=null;
  _currentTime=0.0;
  _noMoreActorsToFire=false;
  _startTime=Double.MAX_VALUE;
  _isInitialized=false;
  super.initialize();
  _isInitialized=true;
  if (_isEmbedded() && !_eventQueue.isEmpty()) {
    _requestFiring();
  }
}

Fixed version (ground truth):
/** 
 * Set current time to zero, calculate priorities for simultaneous events, and invoke the initialize() methods of all actors deeply contained by the container.  To be able to calculate the priorities, it is essential that the graph not have a delay-free loop.  If it does, then this can be corrected by inserting a DEDelay actor with a zero-valued delay.  This has the effect of breaking the loop for the purposes of calculating priorities, without introducing a time delay. <p> This method should be invoked once per execution, before any iteration. Actors may produce output data in their initialize() methods, or more commonly, they may schedule pure events. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If there is a delay-free loop, orif the initialize() method of the container or one of the deeply contained actors throws it.
 */
public void initialize() throws IllegalActionException {
  _eventQueue.clear();
  _deadActors=null;
  _currentTime=0.0;
  _noMoreActorsToFire=false;
  _pendingEvents=new LinkedList();
  _startTime=Double.MAX_VALUE;
  _isInitialized=false;
  super.initialize();
  _isInitialized=true;
  if (_isEmbedded() && !_eventQueue.isEmpty()) {
    _requestFiring();
  }
}
Program: 76357
Project: 76357
Buggy source:
private boolean _isEmbedded(){
  if (getContainer().getContainer() == null) {
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
private boolean _isEmbedded(){
  return (getContainer().getContainer() != null);
}
Program: 76358
Project: 76358
Buggy source:
/** 
 * Construct an empty queue with the specified comparator, which is used to sort the entries, the specified minimum number of buckets, and the specified bin count factor. The bin count factor multiplies or divides the number of bins when the number of bins is changed.  It defaults to 2 if the other constructor is used. The minimum number of buckets is also the initial number of buckets.  It too defaults to 2 if the other constructor is used.
 * @param comparator The comparator used to sort entries.
 * @param minNumBucket The minimum number of buckets.
 * @param resizeFactor The threshold factor.
 */
public CalendarQueue(CQComparator comparator,int minNumBucket,int resizeFactor){
  this(comparator);
  _minNumBucket=minNumBucket;
  _queueResizeFactor=resizeFactor;
}

Fixed version (ground truth):
/** 
 * Construct an empty queue with the specified comparator, which is used to sort the entries, the specified minimum number of buckets, and the specified bin count factor. The bin count factor multiplies or divides the number of bins when the number of bins is changed.  It defaults to 2 if the other constructor is used. The minimum number of buckets is also the initial number of buckets.  It too defaults to 2 if the other constructor is used.
 * @param comparator The comparator used to sort entries.
 * @param minNumBuckets The minimum number of buckets.
 * @param resizeFactor The threshold factor.
 */
public CalendarQueue(CQComparator comparator,int minNumBuckets,int resizeFactor){
  this(comparator);
  _minNumBuckets=minNumBuckets;
  _queueResizeFactor=resizeFactor;
}
Program: 76359
Project: 76359
Buggy source:
/** 
 * Add an entry to the queue. An entry is given as an instance of CQEntry. This method always returns true.  A derived class, however, may return false if the entry is already on the queue and is not added again.  In this class, the entry is always added, even if an identical entry already exists on the queue.
 * @param key The key of the entry to be added to the queue.
 * @param value The value of the entry to be added to the queue.
 * @return True.
 * @exception IllegalArgumentException If the key is null.
 */
public synchronized boolean put(CQEntry cqEntry){
  if (cqEntry.key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (_zeroRef == null) {
    _zeroRef=cqEntry.key;
    _qSize=0;
    _localInit(_minNumBucket,_cqComparator.getBinWidth(null),cqEntry.key);
  }
  long i=_getBinIndex(cqEntry.key);
  i=i % _nBuckets;
  if (i < 0)   i+=_nBuckets;
  if (_minKey == null || _cqComparator.compare(cqEntry.key,_minKey) < 0) {
    _minKey=cqEntry.key;
    _minVirtualBucket=_getBinIndex(_minKey);
    _minBucket=(int)(_minVirtualBucket % _nBuckets);
    if (_minBucket < 0)     _minBucket+=_nBuckets;
  }
  _bucket[(int)i].insert(cqEntry);
  ++_qSize;
  if (_qSize > _topThreshold) {
    _resize(_nBuckets * _queueResizeFactor);
  }
  notifyAll();
  return true;
}

Fixed version (ground truth):
/** 
 * Add an entry to the queue. An entry is given as an instance of CQEntry. This method always returns true.  A derived class, however, may return false if the entry is already on the queue and is not added again.  In this class, the entry is always added, even if an identical entry already exists on the queue.
 * @param key The key of the entry to be added to the queue.
 * @param value The value of the entry to be added to the queue.
 * @return True.
 * @exception IllegalArgumentException If the key is null.
 */
public synchronized boolean put(CQEntry cqEntry){
  if (cqEntry.key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (_debugging)   _debug("String_Node_Str" + cqEntry.value + "String_Node_Str"+ cqEntry.key);
  if (_zeroRef == null) {
    _zeroRef=cqEntry.key;
    _qSize=0;
    _localInit(_minNumBuckets,_cqComparator.getBinWidth(null),cqEntry.key);
    _sampleValid=false;
    _previousTakenKey=null;
  }
  long i=_getBinIndex(cqEntry.key);
  i=i % _nBuckets;
  if (i < 0)   i+=_nBuckets;
  if (_minKey == null || _cqComparator.compare(cqEntry.key,_minKey) < 0) {
    _minKey=cqEntry.key;
    _minVirtualBucket=_getBinIndex(_minKey);
    _minBucket=(int)(_minVirtualBucket % _nBuckets);
    if (_minBucket < 0)     _minBucket+=_nBuckets;
  }
  _bucket[(int)i].insert(cqEntry);
  ++_qSize;
  if (_qSize > _topThreshold)   _qSizeOverThreshold++;
  if (_qSizeOverThreshold > _RESIZE_LAG) {
    _resize(_nBuckets * _queueResizeFactor);
  }
  notifyAll();
  return true;
}
Program: 76360
Project: 76360
Buggy source:
private void _resize(int newsize){
  if (!_resizeEnabled)   return;
  Object new_width=_computeNewWidth();
  CQLinkedList[] old_bucket=_bucket;
  int old_nbuckets=_nBuckets;
  _localInit(newsize,new_width,_minKey);
  _qSize=0;
  _resizeEnabled=false;
  for (int i=0; i < old_nbuckets; i++) {
    while (!old_bucket[i].isEmpty()) {
      CQEntry entry=(CQEntry)old_bucket[i].take();
      put(entry);
    }
  }
  _resizeEnabled=true;
}

Fixed version (ground truth):
private void _resize(int newsize){
  if (!_resizeEnabled)   return;
  if (_debugging)   _debug("String_Node_Str" + newsize);
  Object new_width=_width;
  if (_sampleValid) {
    new_width=_cqComparator.getBinWidth(_sampleKeys);
    if (_debugging)     _debug("String_Node_Str" + new_width);
  }
  CQLinkedList[] old_bucket=_bucket;
  int old_nbuckets=_nBuckets;
  _localInit(newsize,new_width,_minKey);
  _qSize=0;
  boolean saveDebugging=_debugging;
  _debugging=false;
  _resizeEnabled=false;
  for (int i=0; i < old_nbuckets; i++) {
    while (!old_bucket[i].isEmpty()) {
      CQEntry entry=(CQEntry)old_bucket[i].take();
      put(entry);
    }
  }
  _debugging=saveDebugging;
  _resizeEnabled=true;
}
Program: 76362
Project: 76362
Buggy source:
private Object _takeFromBucket(int index){
  CQEntry minEntry=(CQEntry)_bucket[index].take();
  _minBucket=index;
  _minKey=minEntry.key;
  _minVirtualBucket=_getBinIndex(_minKey);
  --_qSize;
  if (_qSize == 0)   _minKey=null;
  if (_qSize < _bottomThreshold) {
    if (_nBuckets / _queueResizeFactor > _minNumBucket) {
      _resize(_nBuckets / _queueResizeFactor);
    }
  }
  _takenKey=minEntry.key;
  return minEntry.value;
}

Fixed version (ground truth):
private Object _takeFromBucket(int index){
  CQEntry minEntry=(CQEntry)_bucket[index].take();
  _minBucket=index;
  _minKey=minEntry.key;
  _minVirtualBucket=_getBinIndex(_minKey);
  --_qSize;
  if (_qSize == 0)   _minKey=null;
  if (_qSize < _bottomThreshold)   _qSizeUnderThreshold++;
  if (_qSizeUnderThreshold > _RESIZE_LAG) {
    if (_nBuckets / _queueResizeFactor > _minNumBuckets) {
      _resize(_nBuckets / _queueResizeFactor);
    }
  }
  _takenKey=minEntry.key;
  return minEntry.value;
}
Program: 76363
Project: 76363
Buggy source:
private void _localInit(int nbuckets,Object bwidth,Object startKey){
  _width=bwidth;
  _nBuckets=nbuckets;
  _bucket=new CQLinkedList[_nBuckets];
  for (int i=0; i < _nBuckets; ++i) {
    _bucket[i]=new CQLinkedList();
  }
  _minKey=startKey;
  _minVirtualBucket=_getBinIndex(startKey);
  _minBucket=(int)(_minVirtualBucket % _nBuckets);
  if (_minBucket < 0)   _minBucket+=_nBuckets;
  _bottomThreshold=_nBuckets / _queueResizeFactor;
  _topThreshold=_nBuckets * _queueResizeFactor;
}

Fixed version (ground truth):
private void _localInit(int nbuckets,Object bwidth,Object startKey){
  _width=bwidth;
  _nBuckets=nbuckets;
  _bucket=new CQLinkedList[_nBuckets];
  for (int i=0; i < _nBuckets; ++i) {
    _bucket[i]=new CQLinkedList();
  }
  _minKey=startKey;
  _minVirtualBucket=_getBinIndex(startKey);
  _minBucket=(int)(_minVirtualBucket % _nBuckets);
  if (_minBucket < 0)   _minBucket+=_nBuckets;
  _bottomThreshold=_nBuckets / _queueResizeFactor;
  _topThreshold=_nBuckets * _queueResizeFactor;
  _qSizeOverThreshold=_qSizeUnderThreshold=0;
}
Program: 76364
Project: 76364
Buggy source:
/** 
 * Remove ignored tokens from this receiver. If the receiver time of this receiver is equal to TimedQueueReceiver.IGNORE, then take the oldest token off of the queue. If after doing so no other tokens are on the queue, then set the receiver time of this receiver to be equal to the current time of the time keeper controlling this receiver.
 * @see ptolemy.domains.dde.kernel.TimedQueueReceiver
 */
public synchronized void clearIgnoredTokens(){
  if (getRcvrTime() != TimedQueueReceiver.IGNORE) {
    return;
  }
  super.get();
  if ((getRcvrTime() == TimedQueueReceiver.IGNORE) && !super.hasToken()) {
    Thread thread=Thread.currentThread();
    DDEThread ddeThread;
    if (thread instanceof DDEThread) {
      ddeThread=(DDEThread)thread;
      TimeKeeper keeper=ddeThread.getTimeKeeper();
      setRcvrTime(keeper.getCurrentTime());
    }
  }
}

Fixed version (ground truth):
/** 
 * Remove ignored tokens from this receiver. If the receiver time of this receiver is equal to TimedQueueReceiver.IGNORE, then take the oldest token off of the queue. If after doing so no other tokens are on the queue, then set the receiver time of this receiver to be equal to the current time of the time keeper controlling this receiver.
 * @see ptolemy.domains.dde.kernel.TimedQueueReceiver
 */
public synchronized void clearIgnoredTokens(){
  if (getRcvrTime() != TimedQueueReceiver.IGNORE) {
    return;
  }
  String actorName=((Nameable)getContainer().getContainer()).getName();
  if (actorName.equals("String_Node_Str")) {
  }
  super.get();
  if ((getRcvrTime() == TimedQueueReceiver.IGNORE) && !super.hasToken()) {
    Thread thread=Thread.currentThread();
    DDEThread ddeThread;
    if (thread instanceof DDEThread) {
      ddeThread=(DDEThread)thread;
      TimeKeeper keeper=ddeThread.getTimeKeeper();
      if (actorName.equals("String_Node_Str")) {
        double time=keeper.getCurrentTime();
      }
      setRcvrTime(keeper.getCurrentTime());
    }
  }
}
Program: 76368
Project: 76368
Buggy source:
/** 
 * This method provides the recursive functionality of  hasToken() for general receivers.
 */
private synchronized boolean _hasInsideToken(Workspace workspace,DDEDirector director,TimeKeeper timeKeeper){
  if (getRcvrTime() == INACTIVE && !_terminate) {
    return false;
  }
  if (getRcvrTime() == IGNORE && !_terminate) {
    if (_ignoreNotSeen) {
      IOPort port=(IOPort)getContainer();
      Director outsideDir=((Actor)port.getContainer()).getExecutiveDirector();
      if (outsideDir instanceof DDEDirector) {
        Receiver[][] rcvrs=null;
        rcvrs=port.getRemoteReceivers();
        for (int i=0; i < rcvrs.length; i++) {
          for (int j=0; j < rcvrs[i].length; j++) {
            DDEReceiver rcvr=(DDEReceiver)rcvrs[i][j];
            rcvr.put(new Token(),TimedQueueReceiver.IGNORE);
          }
        }
      }
      _ignoreNotSeen=false;
      return false;
    }
 else {
      _ignoreNotSeen=true;
      clearIgnoredTokens();
      timeKeeper.setIgnoredTokens(false);
      return false;
    }
  }
  if (super.hasToken() && !_terminate) {
    if (hasNullToken()) {
      get();
      return _hasInsideToken(workspace,director,timeKeeper);
    }
    return true;
  }
  if (_terminate) {
    if (_readPending) {
      _readPending=false;
      director.removeInternalReadBlock();
    }
    throw new TerminateProcessException("String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
/** 
 * This method provides the recursive functionality of  hasToken() for general receivers.
 */
private synchronized boolean _hasInsideToken(Workspace workspace,DDEDirector director,TimeKeeper timeKeeper){
  String actorName=((Nameable)getContainer().getContainer()).getName();
  String portName=((Nameable)getContainer()).getName();
  if (getRcvrTime() == INACTIVE && !_terminate) {
    return false;
  }
  if (getRcvrTime() == IGNORE && !_terminate) {
    if (_ignoreNotSeen) {
      IOPort port=(IOPort)getContainer();
      Director outsideDir=((Actor)port.getContainer()).getExecutiveDirector();
      if (outsideDir instanceof DDEDirector) {
        Receiver[][] rcvrs=null;
        rcvrs=port.getRemoteReceivers();
        for (int i=0; i < rcvrs.length; i++) {
          for (int j=0; j < rcvrs[i].length; j++) {
            DDEReceiver rcvr=(DDEReceiver)rcvrs[i][j];
            rcvr.put(new Token(),TimedQueueReceiver.IGNORE);
          }
        }
      }
      _ignoreNotSeen=false;
      return false;
    }
 else {
      _ignoreNotSeen=true;
      clearIgnoredTokens();
      timeKeeper.setIgnoredTokens(false);
      return false;
    }
  }
  if (super.hasToken() && !_terminate) {
    if (hasNullToken()) {
      get();
      return _hasInsideToken(workspace,director,timeKeeper);
    }
    return true;
  }
  if (_terminate) {
    if (_readPending) {
      _readPending=false;
      director.removeInternalReadBlock();
    }
    throw new TerminateProcessException("String_Node_Str");
  }
  return false;
}
Program: 76370
Project: 76370
Buggy source:
/** 
 * This method provides the recursive functionality of put(Token, double).
 */
private void _put(Token token,double time,Workspace workspace,DDEDirector director){
synchronized (this) {
    String name=((Nameable)getContainer().getContainer()).getName();
    if (token instanceof NullToken) {
    }
 else {
    }
    if (time > getCompletionTime() && getCompletionTime() != ETERNITY && !_terminate) {
      time=INACTIVE;
    }
    if (super.hasRoom() && !_terminate) {
      super.put(token,time);
      if (_readPending) {
        if (isConnectedToBoundary()) {
          if (token instanceof NullToken) {
          }
 else {
          }
          director.removeExternalReadBlock();
        }
 else {
          director.removeInternalReadBlock();
        }
        _readPending=false;
        notifyAll();
      }
      return;
    }
    if (!super.hasRoom() && !_terminate) {
      _writePending=true;
      director.addWriteBlock(this);
      while (_writePending && !_terminate) {
        workspace.wait(this);
      }
    }
    if (_terminate) {
      if (_writePending) {
        _writePending=false;
        director.removeWriteBlock(this);
      }
      throw new TerminateProcessException(getContainer(),"String_Node_Str" + "String_Node_Str");
    }
 else {
      _put(token,time,workspace,director);
    }
  }
}

Fixed version (ground truth):
/** 
 * This method provides the recursive functionality of put(Token, double).
 */
private void _put(Token token,double time,Workspace workspace,DDEDirector director){
synchronized (this) {
    String name=((Nameable)getContainer().getContainer()).getName();
    if (time > getCompletionTime() && getCompletionTime() != ETERNITY && !_terminate) {
      time=INACTIVE;
    }
    if (super.hasRoom() && !_terminate) {
      super.put(token,time);
      if (_readPending) {
        if (isConnectedToBoundary()) {
          if (token instanceof NullToken) {
          }
 else {
          }
          director.removeExternalReadBlock();
        }
 else {
          director.removeInternalReadBlock();
        }
        _readPending=false;
        notifyAll();
      }
      return;
    }
    if (!super.hasRoom() && !_terminate) {
      _writePending=true;
      director.addWriteBlock(this);
      while (_writePending && !_terminate) {
        workspace.wait(this);
      }
    }
    if (_terminate) {
      if (_writePending) {
        _writePending=false;
        director.removeWriteBlock(this);
      }
      throw new TerminateProcessException(getContainer(),"String_Node_Str" + "String_Node_Str");
    }
 else {
      _put(token,time,workspace,director);
    }
  }
}
Program: 76372
Project: 76372
Buggy source:
/** 
 */
public BusContentionDemo(BusContentionGraphic bcg) throws IllegalActionException, NameDuplicationException {
  this();
  _proc1.setGraphicFrame(bcg);
  _proc2.setGraphicFrame(bcg);
  _proc3.setGraphicFrame(bcg);
}

Fixed version (ground truth):
/** 
 * Construct a BusContentionDemo object with the specified BusContentionGraphic.
 * @exception IllegalActionException If there are problems.
 * @exception NameDuplicationException If there are problems.
 */
public BusContentionDemo(BusContentionGraphic bcg) throws IllegalActionException, NameDuplicationException {
  this();
  _proc1.setGraphicFrame(bcg);
  _proc2.setGraphicFrame(bcg);
  _proc3.setGraphicFrame(bcg);
}
Program: 76373
Project: 76373
Buggy source:
/** 
 * @exception IllegalActionException If there are problems
 * @exception IllegalStateException If there are problems
 * @exception NameDuplicationException If there are problems
 */
public static void main(String args[]) throws IllegalActionException, IllegalStateException, NameDuplicationException {
  BusContentionDemo demo=new BusContentionDemo();
  demo.makeConnections();
  demo.run();
}

Fixed version (ground truth):
/** 
 * Start the BusContention demo.
 * @exception IllegalActionException If there are problems
 * @exception IllegalStateException If there are problems
 * @exception NameDuplicationException If there are problems
 */
public static void main(String args[]) throws IllegalActionException, IllegalStateException, NameDuplicationException {
  BusContentionDemo demo=new BusContentionDemo();
  demo.makeConnections();
  demo.run();
}
Program: 76374
Project: 76374
Buggy source:
/** 
 * @exception IllegalActionException If there are problems
 * @exception IllegalStateException If there are problems
 * @exception NameDuplicationException If there are problems
 */
public void run(){
  _manager.run();
  System.out.println();
  System.out.println();
  System.out.println();
}

Fixed version (ground truth):
/** 
 * Execute the model by calling the manager's run method.
 */
public void run(){
  _manager.run();
  System.out.println();
  System.out.println();
  System.out.println();
}
Program: 76375
Project: 76375
Buggy source:
/** 
 * While the current time is less then 50.0, return the delay value as specified in the super class. After the current time has exceeded 50, return a delay value of 0.001 for 200 firings. After the 200 firings are complete, resume returning the super class delay value.
 * @return
 */
public double getDelay(){
  if (_cntr < 200) {
    if (getCurrentTime() < 50.0) {
      return super.getDelay();
    }
 else {
      _cntr++;
      return 0.001;
    }
  }
  return super.getDelay();
}

Fixed version (ground truth):
/** 
 * While the current time is less then 50.0, return the delay value as specified in the super class. After the current time has exceeded 50, return a delay value of 0.001 for 200 firings. After the 200 firings are complete, resume returning the super class delay value.
 * @return The delay value depending upon whether time hasexceeded 50.0.
 */
public double getDelay(){
  if (_cntr < 200) {
    if (getCurrentTime() < 50.0) {
      return super.getDelay();
    }
 else {
      _cntr++;
      return 0.001;
    }
  }
  return super.getDelay();
}
Program: 76377
Project: 76377
Buggy source:
private synchronized void _edit(int x,int y){
  if (_dataset < 0)   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _undoStack.push(save);
  _redoStack.clear();
  Graphics graphics=getGraphics();
  if (y > _lry)   y=_lry;
  if (y < _uly)   y=_uly;
  if (x > _lrx)   x=_lrx;
  if (x < _ulx)   x=_ulx;
  _editPoint(x,y);
  Vector pts=(Vector)_points.elementAt(_dataset);
  for (int i=0; i < pts.size(); i++) {
    PlotPoint pt=(PlotPoint)pts.elementAt(i);
    if ((pt.x >= _xMin) && (pt.x <= _xMax)) {
      int index=(int)((pt.x - _xMin) * _xscale) - (_lrx - _ulx - _editSpecX.length);
      if (index >= 0 && index < _editSpecX.length) {
        if (_editSpecSet[index]) {
          pt.y=_yMax - (_editSpecY[index] - _uly) / _yscale;
          if (pt.y < _yBottom)           _yBottom=pt.y;
          if (pt.y > _yTop)           _yTop=pt.y;
        }
      }
    }
  }
  repaint();
  graphics.setXORMode(_editColor);
  for (int i=0; i < _editSpecX.length; i++) {
    if (_editSpecSet[i]) {
      graphics.drawLine(_editSpecX[i],_editSpecY[i] - 1,_editSpecX[i],_editSpecY[i] + 1);
    }
  }
  graphics.setPaintMode();
}

Fixed version (ground truth):
private synchronized void _edit(int x,int y){
  if (_dataset < 0)   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _undoStack.push(save);
  _redoStack.clear();
  Graphics graphics=getGraphics();
  if (y > _lry)   y=_lry;
  if (y < _uly)   y=_uly;
  if (x > _lrx)   x=_lrx;
  if (x < _ulx)   x=_ulx;
  _editPoint(x,y);
  Vector pts=(Vector)_points.elementAt(_dataset);
  for (int i=0; i < pts.size(); i++) {
    PlotPoint pt=(PlotPoint)pts.elementAt(i);
    if ((pt.x >= _xMin) && (pt.x <= _xMax)) {
      int index=(int)((pt.x - _xMin) * _xscale) - (_lrx - _ulx - _editSpecX.length);
      if (index >= 0 && index < _editSpecX.length) {
        if (_editSpecSet[index]) {
          pt.y=_yMax - (_editSpecY[index] - _uly) / _yscale;
          if (pt.y < _yBottom)           _yBottom=pt.y;
          if (pt.y > _yTop)           _yTop=pt.y;
        }
      }
    }
  }
  repaint();
  graphics.setXORMode(_editColor);
  for (int i=0; i < _editSpecX.length; i++) {
    if (_editSpecSet[i]) {
      graphics.drawLine(_editSpecX[i],_editSpecY[i] - 1,_editSpecX[i],_editSpecY[i] + 1);
    }
  }
  graphics.setPaintMode();
  _notifyListeners(_dataset);
}
Program: 76378
Project: 76378
Buggy source:
/** 
 * Constructor.
 */
public EditablePlot(){
  super();
  addMouseListener(new EditListener());
  addMouseMotionListener(new ModifyListener());
  addKeyListener(new UndoListener());
}

Fixed version (ground truth):
/** 
 * Constructor.
 */
public EditablePlot(){
  super();
  addMouseListener(new EditMouseListener());
  addMouseMotionListener(new ModifyListener());
  addKeyListener(new UndoListener());
}
Program: 76379
Project: 76379
Buggy source:
/** 
 * Redo the latest signal editing operation that was undone by calling undo(), if there was one.  Otherwise, do nothing.
 */
public void redo(){
  if (_redoStack.empty())   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _undoStack.push(save);
  Object[] saved=(Object[])_redoStack.pop();
  _setData(((Integer)saved[0]).intValue(),(double[][])saved[1]);
  repaint();
}

Fixed version (ground truth):
/** 
 * Redo the latest signal editing operation that was undone by calling undo(), if there was one.  Otherwise, do nothing.
 */
public void redo(){
  if (_redoStack.empty())   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _undoStack.push(save);
  Object[] saved=(Object[])_redoStack.pop();
  _setData(((Integer)saved[0]).intValue(),(double[][])saved[1]);
  repaint();
  _notifyListeners(_dataset);
}
Program: 76380
Project: 76380
Buggy source:
/** 
 * Undo the latest signal editing operation, if there was one. Otherwise, do nothing.
 */
public void undo(){
  if (_undoStack.empty())   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _redoStack.push(save);
  Object[] saved=(Object[])_undoStack.pop();
  _setData(((Integer)saved[0]).intValue(),(double[][])saved[1]);
  repaint();
}

Fixed version (ground truth):
/** 
 * Undo the latest signal editing operation, if there was one. Otherwise, do nothing.
 */
public void undo(){
  if (_undoStack.empty())   return;
  Object[] save=new Object[2];
  save[0]=new Integer(_dataset);
  save[1]=getData(_dataset);
  _redoStack.push(save);
  Object[] saved=(Object[])_undoStack.pop();
  _setData(((Integer)saved[0]).intValue(),(double[][])saved[1]);
  repaint();
  _notifyListeners(_dataset);
}
Program: 76381
Project: 76381
Buggy source:
private synchronized void _editPoint(int x,int y){
  if (_dataset < 0)   return;
  Graphics graphics=getGraphics();
  if (y > _lry)   y=_lry;
  if (y < _uly)   y=_uly;
  if (x > _lrx)   x=_lrx;
  if (x < _ulx)   x=_ulx;
  if (x <= _currentEditX || x >= _lrx) {
    return;
  }
  int step=_currentEditX + 1;
  while (step <= x) {
    int index=step - (_lrx - _editSpecX.length);
    double proportion=(step - _currentEditX) / (double)(x - _currentEditX);
    int newY=(int)(_currentEditY + proportion * (y - _currentEditY));
    _editSpecX[index]=step;
    _editSpecY[index]=newY;
    _editSpecSet[index]=true;
    graphics.setXORMode(_editColor);
    graphics.drawLine(step,newY - 1,step,newY + 1);
    graphics.setPaintMode();
    step++;
  }
  _currentEditX=x;
  _currentEditY=y;
}

Fixed version (ground truth):
private synchronized void _editPoint(int x,int y){
  if (_dataset < 0)   return;
  Graphics graphics=getGraphics();
  if (y > _lry)   y=_lry;
  if (y < _uly)   y=_uly;
  if (x > _lrx)   x=_lrx;
  if (x < _ulx)   x=_ulx;
  if (x <= _currentEditX || x >= _lrx) {
    return;
  }
  int step=_currentEditX;
  while (step <= x) {
    int index=step - (_lrx - _editSpecX.length);
    double proportion=(step - _currentEditX) / (double)(x - _currentEditX);
    int newY=(int)(_currentEditY + proportion * (y - _currentEditY));
    if (!_editSpecSet[index]) {
      _editSpecX[index]=step;
      _editSpecY[index]=newY;
      _editSpecSet[index]=true;
      graphics.setXORMode(_editColor);
      graphics.drawLine(step,newY - 1,step,newY + 1);
      graphics.setPaintMode();
    }
    step++;
  }
  _currentEditX=x;
  _currentEditY=y;
}
Program: 76386
Project: 76386
Buggy source:
/** 
 * In addition to creating the buttons provided by the base class, if the number of iterations has not been specified, then create a dialog box for that number to be entered.  The panel containing the buttons and the entry box is returned.
 * @param numbuttons The number of buttons to create.
 */
protected Panel _createRunControls(int numbuttons){
  Panel controlPanel=super._createRunControls(numbuttons);
  if (numbuttons > 2) {
    Button layout=new Button("String_Node_Str");
    controlPanel.add(layout);
    layout.addActionListener(new LayoutListener());
  }
  return controlPanel;
}

Fixed version (ground truth):
/** 
 * In addition to creating the buttons provided by the base class, if the number of iterations has not been specified, then create a dialog box for that number to be entered.  The panel containing the buttons and the entry box is returned.
 * @param numButtons The number of buttons to create.
 */
protected Panel _createRunControls(int numButtons){
  Panel controlPanel=super._createRunControls(numButtons);
  if (numButtons > 2) {
    Button layout=new Button("String_Node_Str");
    controlPanel.add(layout);
    layout.addActionListener(new LayoutListener());
  }
  return controlPanel;
}
Program: 76387
Project: 76387
Buggy source:
/** 
 * Construct the graph representing the topology. This is sort of bogus because it's totally hird-wired, but it will do for now...
 */
public GraphModel constructDivaGraph(){
  GraphModel model=new GraphModel();
  Node n1=model.createNode(_contentionActor);
  Node n2=model.createNode(_alarmActor);
  Node n3=model.createNode(_memoryActor);
  Node n4=model.createNode(_processActor1);
  Node n5=model.createNode(_processActor2);
  Node n6=model.createNode(_processActor3);
  model.addNode(n1);
  model.addNode(n2);
  model.addNode(n3);
  model.addNode(n4);
  model.addNode(n5);
  model.addNode(n6);
  _nodeMap.put(_contentionActor,n1);
  _nodeMap.put(_alarmActor,n2);
  _nodeMap.put(_memoryActor,n3);
  _nodeMap.put(_processActor1,n4);
  _nodeMap.put(_processActor2,n5);
  _nodeMap.put(_processActor3,n6);
  model.createEdge(n1,n2);
  model.createEdge(n1,n4);
  model.createEdge(n1,n5);
  model.createEdge(n1,n6);
  model.createEdge(n3,n4);
  model.createEdge(n3,n5);
  model.createEdge(n3,n6);
  return model;
}

Fixed version (ground truth):
/** 
 * Construct the graph representing the topology. This is sort of bogus because it's totally hard-wired, but it will do for now...
 */
public GraphModel constructDivaGraph(){
  GraphModel model=new GraphModel();
  Node n1=model.createNode(_contentionActor);
  Node n2=model.createNode(_alarmActor);
  Node n3=model.createNode(_memoryActor);
  Node n4=model.createNode(_processActor1);
  Node n5=model.createNode(_processActor2);
  Node n6=model.createNode(_processActor3);
  model.addNode(n1);
  model.addNode(n2);
  model.addNode(n3);
  model.addNode(n4);
  model.addNode(n5);
  model.addNode(n6);
  _nodeMap.put(_contentionActor,n1);
  _nodeMap.put(_alarmActor,n2);
  _nodeMap.put(_memoryActor,n3);
  _nodeMap.put(_processActor1,n4);
  _nodeMap.put(_processActor2,n5);
  _nodeMap.put(_processActor3,n6);
  model.createEdge(n1,n2);
  model.createEdge(n1,n4);
  model.createEdge(n1,n5);
  model.createEdge(n1,n6);
  model.createEdge(n3,n4);
  model.createEdge(n3,n5);
  model.createEdge(n3,n6);
  return model;
}
Program: 76388
Project: 76388
Buggy source:
/** 
 * Construct the graph widget with the default constructor (giving it an empty graph). 
 */
public void displayGraph(JGraph g,GraphModel model){
  _divaPanel.add(g,BorderLayout.NORTH);
  g.setPreferredSize(new Dimension(600,400));
  final GraphPane gp=(GraphPane)g.getCanvasPane();
  final GraphView gv=gp.getGraphView();
  gv.setNodeRenderer(new ThreadRenderer());
  gv.setEdgeRenderer(new LocalEdgeRenderer());
  gv.setLayoutPercentage(0.6);
  g.setGraphModel(model);
  gp.repaint();
  final GraphModel m=model;
  try {
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        LevelLayout staticLayout=new LevelLayout();
        staticLayout.setOrientation(LevelLayout.HORIZONTAL);
        staticLayout.layout(gv,m.getGraph());
        gp.repaint();
      }
    }
);
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new RuntimeException(e.toString());
  }
}

Fixed version (ground truth):
/** 
 * Construct the graph widget with the default constructor (giving it an empty graph).
 */
public void displayGraph(JGraph g,GraphModel model){
  _divaPanel.add(g,BorderLayout.NORTH);
  g.setPreferredSize(new Dimension(600,400));
  final GraphPane gp=(GraphPane)g.getCanvasPane();
  final GraphView gv=gp.getGraphView();
  gv.setNodeRenderer(new ThreadRenderer());
  gv.setEdgeRenderer(new LocalEdgeRenderer());
  gv.setLayoutPercentage(0.6);
  g.setGraphModel(model);
  gp.repaint();
  final GraphModel m=model;
  try {
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        LevelLayout staticLayout=new LevelLayout();
        staticLayout.setOrientation(LevelLayout.HORIZONTAL);
        staticLayout.layout(gv,m.getGraph());
        gp.repaint();
      }
    }
);
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new RuntimeException(e.toString());
  }
}
Program: 76390
Project: 76390
Buggy source:
/** 
 * If the topological sort is not valid, then compute it.
 * @return True.
 * @exception IllegalActionException If the graph has a zerodelay loop.
 */
public boolean prefire() throws IllegalActionException {
  if (!_sortValid) {
    _constructDirectedGraph();
    if (!_dag.isAcyclic()) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
    }
  }
  return super.prefire();
}

Fixed version (ground truth):
/** 
 * If the topological sort is not valid, then compute it.
 * @return True.
 * @exception IllegalActionException If the graph has a zerodelay loop.
 */
public boolean prefire() throws IllegalActionException {
  if (!_sortValid) {
    _computeDepth();
  }
  return super.prefire();
}
Program: 76391
Project: 76391
Buggy source:
/** 
 * Set current time to zero, calculate priorities for simultaneous events, and invoke the initialize() methods of all actors deeply contained by the container.  To be able to calculate the priorities, it is essential that the graph not have a delay-free loop.  If it does, then this can be corrected by inserting a DEDelay actor with a zero-valued delay.  This has the effect of breaking the loop for the purposes of calculating priorities, without introducing a time delay. <p> This method should be invoked once per execution, before any iteration. Actors may produce output data in their initialize() methods, or more commonly, they may schedule pure events. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If there is a delay-free loop, orif the initialize() method of the container or one of the deeply contained actors throws it.
 */
public void initialize() throws IllegalActionException {
  _eventQueue.clear();
  _dag=new DirectedAcyclicGraph();
  _deadActors=null;
  _currentTime=0.0;
  _noMoreActorsToFire=false;
  _startTime=Double.MAX_VALUE;
  _isInitialized=false;
  super.initialize();
  _isInitialized=true;
  _computeDepth();
  if (_isEmbedded() && !_eventQueue.isEmpty()) {
    _requestFiring();
  }
}

Fixed version (ground truth):
/** 
 * Set current time to zero, calculate priorities for simultaneous events, and invoke the initialize() methods of all actors deeply contained by the container.  To be able to calculate the priorities, it is essential that the graph not have a delay-free loop.  If it does, then this can be corrected by inserting a DEDelay actor with a zero-valued delay.  This has the effect of breaking the loop for the purposes of calculating priorities, without introducing a time delay. <p> This method should be invoked once per execution, before any iteration. Actors may produce output data in their initialize() methods, or more commonly, they may schedule pure events. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If there is a delay-free loop, orif the initialize() method of the container or one of the deeply contained actors throws it.
 */
public void initialize() throws IllegalActionException {
  _eventQueue.clear();
  _deadActors=null;
  _currentTime=0.0;
  _noMoreActorsToFire=false;
  _startTime=Double.MAX_VALUE;
  _isInitialized=false;
  super.initialize();
  _isInitialized=true;
  _computeDepth();
  if (_isEmbedded() && !_eventQueue.isEmpty()) {
    _requestFiring();
  }
}
Program: 76392
Project: 76392
Buggy source:
private void _computeDepth(){
  Object[] sort=(Object[])_dag.topologicalSort();
  if (DEBUG) {
    System.out.println("String_Node_Str");
  }
  for (int i=sort.length - 1; i >= 0; i--) {
    IOPort p=(IOPort)sort[i];
    if (DEBUG) {
      System.out.println(p.description(FULLNAME) + "String_Node_Str" + i);
    }
    Receiver[][] r;
    try {
      r=p.getReceivers();
    }
 catch (    IllegalActionException e) {
      throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
    }
    if (r == null) {
      continue;
    }
    for (int j=r.length - 1; j >= 0; j--) {
      for (int k=r[j].length - 1; k >= 0; k--) {
        DEReceiver der=(DEReceiver)r[j][k];
        der._setDepth(i);
      }
    }
  }
}

Fixed version (ground truth):
private void _computeDepth() throws IllegalActionException {
  DirectedAcyclicGraph dag=_constructDirectedGraph();
  Object[] sort=(Object[])dag.topologicalSort();
  _debug("String_Node_Str");
  for (int i=sort.length - 1; i >= 0; i--) {
    IOPort p=(IOPort)sort[i];
    _debug(p.getFullName() + "String_Node_Str" + i);
    Receiver[][] r;
    try {
      r=p.getReceivers();
    }
 catch (    IllegalActionException e) {
      throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
    }
    if (r == null) {
      continue;
    }
    for (int j=r.length - 1; j >= 0; j--) {
      for (int k=r[j].length - 1; k >= 0; k--) {
        DEReceiver der=(DEReceiver)r[j][k];
        der._setDepth(i);
      }
    }
  }
}
Program: 76393
Project: 76393
Buggy source:
/** 
 */
public boolean postfire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,2));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException(this,"String_Node_Str" + "String_Node_Str");
  }
  return super.postfire();
}

Fixed version (ground truth):
/** 
 */
public boolean postfire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,2));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return super.postfire();
}
Program: 76394
Project: 76394
Buggy source:
/** 
 */
public boolean prefire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,1));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException(this,"String_Node_Str" + "String_Node_Str");
  }
  return super.prefire();
}

Fixed version (ground truth):
/** 
 */
public boolean prefire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,1));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return super.prefire();
}
Program: 76395
Project: 76395
Buggy source:
/** 
 */
public boolean postfire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,2));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException(this,"String_Node_Str" + "String_Node_Str");
  }
  return super.postfire();
}

Fixed version (ground truth):
/** 
 */
public boolean postfire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,2));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return super.postfire();
}
Program: 76396
Project: 76396
Buggy source:
/** 
 */
public boolean prefire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,1));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException(this,"String_Node_Str" + "String_Node_Str");
  }
  return super.prefire();
}

Fixed version (ground truth):
/** 
 */
public boolean prefire() throws IllegalActionException {
  generateEvents(new ExecEvent(this,1));
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
  }
  return super.prefire();
}
Program: 76397
Project: 76397
Buggy source:
public void run(){
  LevelLayout staticLayout=new LevelLayout();
  staticLayout.setOrientation(LevelLayout.HORIZONTAL);
  staticLayout.layout(gv,m.getGraph());
  gp.repaint();
}

Fixed version (ground truth):
public void run(){
switch (state) {
case 1:
    figure.setFillPaint(Color.yellow);
  break;
case 2:
figure.setFillPaint(Color.green);
break;
case 3:
figure.setFillPaint(Color.red);
break;
default :
System.out.println("String_Node_Str" + state);
}
}
Program: 76398
Project: 76398
Buggy source:
/** 
 * Respond to a state changed event.
 */
public void stateChanged(ExecEvent event){
}

Fixed version (ground truth):
/** 
 * Respond to a state changed event.
 */
public void stateChanged(ExecEvent event){
  final int state=event.getCurrentState();
  Actor actor=event.getActor();
  String name=((Nameable)actor).getName();
  Node node=(Node)_nodeMap.get(actor);
  LabelWrapper wrapper=(LabelWrapper)_graphPane.getGraphView().getNodeFigure(node);
  final BasicFigure figure=(BasicFigure)wrapper.getChild();
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      public void run(){
switch (state) {
case 1:
          figure.setFillPaint(Color.yellow);
        break;
case 2:
      figure.setFillPaint(Color.green);
    break;
case 3:
  figure.setFillPaint(Color.red);
break;
default :
System.out.println("String_Node_Str" + state);
}
}
}
);
}
 catch (Exception e) {
e.printStackTrace();
}
}
Program: 76399
Project: 76399
Buggy source:
/** 
 * Initialize the applet. After calling the base class init() method, this method creates a director which is accessible to derived  classes via a protected member. If the applet "stopTime" parameter  is given, then set the director stop time to its value. If this  parameter is not given, then create an entry box on screen to query  the user for the stop time.
 */
public void init(){
  super.init();
  try {
    _director=new DDEDirector(_toplevel,"String_Node_Str");
    String stopSpec=getParameter("String_Node_Str");
    if (stopSpec != null) {
      double stopTime=(new Double(stopSpec)).doubleValue();
      _stopTimeGiven=true;
      Parameter dirStopTime=(Parameter)_director.getAttribute("String_Node_Str");
      dirStopTime.setToken(new DoubleToken(stopTime));
    }
  }
 catch (  IllegalActionException ex) {
    report("String_Node_Str",ex);
  }
catch (  Exception ex) {
    report("String_Node_Str" + "String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Initialize the applet. After calling the base class init() method, this method creates a director which is accessible to derived  classes via a protected member. If the applet "stopTime" parameter  is given, then set the director stop time to its value. If this  parameter is not given, then create an entry box on screen to query  the user for the stop time.
 */
public void init(){
  super.init();
  try {
    _director=new DDEDirector(_toplevel,"String_Node_Str");
    String stopSpec=getSingleParameter("String_Node_Str");
    System.out.println("String_Node_Str" + stopSpec);
    if (stopSpec != null) {
      double stopTime=(new Double(stopSpec)).doubleValue();
      _stopTimeGiven=true;
      Parameter dirStopTime=(Parameter)_director.getAttribute("String_Node_Str");
      dirStopTime.setToken(new DoubleToken(stopTime));
    }
  }
 catch (  IllegalActionException ex) {
    report("String_Node_Str",ex);
  }
catch (  Exception ex) {
    report("String_Node_Str" + "String_Node_Str",ex);
  }
}
Program: 76400
Project: 76400
Buggy source:
/** 
 * In addition to creating the buttons provided by the base  class, if the stop time has not been specified by the  applet parameter "stopTime," then create an entry box for  that number to be entered. If the "showStopTime" parameter  is set to true, then display a text entry box for specifying  the stop time of the model. The panel containing the buttons  and the entry box is returned.
 * @param numbuttons The number of buttons to create.
 * @param showStopTime A flag indicating whether stop timeselection box should be displayed.
 * @return The panel containing the controls.
 */
protected Panel _createRunControls(int numbuttons,boolean showStopTime){
  Panel panel=_createRunControls(numbuttons);
  if (showStopTime) {
    Panel stopTimePanel=new Panel();
    stopTimePanel.add(new Label("String_Node_Str"));
    String defaultStopSpec=getParameter("String_Node_Str");
    if (defaultStopSpec == null) {
      defaultStopSpec="String_Node_Str";
    }
    _stopTimeBox=new TextField(defaultStopSpec,10);
    _stopTimeBox.addActionListener(new StopTimeBoxListener());
    stopTimePanel.add(_stopTimeBox);
    panel.add(stopTimePanel);
  }
  return panel;
}

Fixed version (ground truth):
/** 
 * In addition to creating the buttons provided by the base  class, if the stop time has not been specified by the  applet parameter "stopTime," then create an entry box for  that number to be entered. If the "showStopTime" parameter  is set to true, then display a text entry box for specifying  the stop time of the model. The panel containing the buttons  and the entry box is returned.
 * @param numbuttons The number of buttons to create.
 * @param showStopTime A flag indicating whether stop timeselection box should be displayed.
 * @return The panel containing the controls.
 */
protected Panel _createRunControls(int numbuttons){
  Panel panel=super._createRunControls(numbuttons);
  if (!_stopTimeGiven) {
    Panel stopTimePanel=new Panel();
    stopTimePanel.add(new Label("String_Node_Str"));
    String defaultStopSpec=getSingleParameter("String_Node_Str");
    if (defaultStopSpec == null) {
      defaultStopSpec="String_Node_Str";
    }
    _stopTimeBox=new TextField(defaultStopSpec,10);
    _stopTimeBox.addActionListener(new StopTimeBoxListener());
    stopTimePanel.add(_stopTimeBox);
    panel.add(stopTimePanel);
  }
  return panel;
}
Program: 76401
Project: 76401
Buggy source:
/** 
 * Describe the applet parameters.
 * @return An array describing the applet parameters.
 */
public String[][] getParameterInfo(){
  String newinfo[][]={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
  return _concatStringArrays(super.getParameterInfo(),newinfo);
}

Fixed version (ground truth):
/** 
 * Describe the applet parameters.
 * @return An array describing the applet parameters.
 */
public String[][] getParameterInfo(){
  if (_params == null) {
    String newinfo[][]={{"String_Node_Str","String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str","String_Node_Str"}};
    _params=_concatStringArrays(super.getParameterInfo(),newinfo);
  }
  return _params;
}
Program: 76402
Project: 76402
Buggy source:
/** 
 * Reset local flags. The local flag of this receiver indicates whether this receiver is scheduled for termination. Resetting the termination flag will make sure that this receiver is not scheduled for termination.
 */
public void reset(){
  _terminate=false;
}

Fixed version (ground truth):
/** 
 * Reset local flags. The local flag of this receiver indicates whether this receiver is scheduled for termination. Resetting the termination flag will make sure that this receiver is not scheduled for termination. FIXME
 */
public void reset(){
  _terminate=false;
  _readPending=false;
  _writePending=false;
  _ignoreNotSeen=true;
  clearRcvr();
  Director director=((Actor)getContainer().getContainer()).getDirector();
  String name=((Nameable)getContainer().getContainer()).getName();
  System.out.println(name + "String_Node_Str");
  setRcvrTime(0.0);
}