Program: 76382
Project: 76382
Buggy source:
/** 
 * This method provides the recursive functionality of hasToken()
 */
private synchronized boolean _hasToken(Workspace workspace,DDEDirector director,TimeKeeper timeKeeper,boolean _hideNullTokens){
  timeKeeper.resortRcvrList();
  if (timeKeeper.getNextTime() == INACTIVE) {
    requestFinish();
  }
  if (getRcvrTime() == IGNORE && !_terminate) {
    if (_ignoreNotSeen) {
      _ignoreNotSeen=false;
      return false;
    }
 else {
      _ignoreNotSeen=true;
      clearIgnoredTokens();
      timeKeeper.setIgnoredTokens(false);
      return false;
    }
  }
  if (getRcvrTime() > timeKeeper.getNextTime() && !_terminate) {
    return false;
  }
  if (super.hasToken() && !_terminate) {
    if (!timeKeeper.hasMinRcvrTime()) {
      if (hasNullToken()) {
        if (timeKeeper.getHighestPriorityReal() != null) {
          return false;
        }
 else         if (this != timeKeeper.getHighestPriorityNull()) {
          return false;
        }
 else         if (!_hideNullTokens) {
          return true;
        }
 else {
          super.get();
          timeKeeper.sendOutNullTokens();
          return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
        }
      }
 else {
        return true;
      }
    }
 else {
      if (hasNullToken()) {
        if (!_hideNullTokens) {
          return true;
        }
        super.get();
        timeKeeper.sendOutNullTokens();
        return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
      }
      return true;
    }
  }
  if (!super.hasToken() && !_terminate) {
    _readPending=true;
    director.addReadBlock();
    while (_readPending && !_terminate) {
      workspace.wait(this);
    }
  }
  if (_terminate) {
    if (_readPending) {
      _readPending=false;
      director.removeReadBlock();
    }
    throw new TerminateProcessException("String_Node_Str");
  }
 else {
    return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
  }
}

Fixed version (ground truth):
/** 
 * This method provides the recursive functionality of hasToken()
 */
private synchronized boolean _hasToken(Workspace workspace,DDEDirector director,TimeKeeper timeKeeper,boolean _hideNullTokens){
  timeKeeper.resortRcvrList();
  if (timeKeeper.getNextTime() == INACTIVE) {
    requestFinish();
  }
  if (getRcvrTime() == INACTIVE && !_terminate) {
    return false;
  }
  if (getRcvrTime() == IGNORE && !_terminate) {
    if (_ignoreNotSeen) {
      _ignoreNotSeen=false;
      return false;
    }
 else {
      _ignoreNotSeen=true;
      clearIgnoredTokens();
      timeKeeper.setIgnoredTokens(false);
      return false;
    }
  }
  if (getRcvrTime() > timeKeeper.getNextTime() && !_terminate) {
    return false;
  }
  if (super.hasToken() && !_terminate) {
    if (!timeKeeper.hasMinRcvrTime()) {
      if (hasNullToken()) {
        if (timeKeeper.getHighestPriorityReal() != null) {
          return false;
        }
 else         if (this != timeKeeper.getHighestPriorityNull()) {
          return false;
        }
 else         if (!_hideNullTokens) {
          return true;
        }
 else {
          super.get();
          timeKeeper.sendOutNullTokens();
          return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
        }
      }
 else {
        return true;
      }
    }
 else {
      if (hasNullToken()) {
        if (!_hideNullTokens) {
          return true;
        }
        super.get();
        timeKeeper.sendOutNullTokens();
        return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
      }
      return true;
    }
  }
  if (!super.hasToken() && !_terminate) {
    _readPending=true;
    director.addReadBlock();
    while (_readPending && !_terminate) {
      workspace.wait(this);
    }
  }
  if (_terminate) {
    if (_readPending) {
      _readPending=false;
      director.removeReadBlock();
    }
    throw new TerminateProcessException("String_Node_Str");
  }
 else {
    return _hasToken(workspace,director,timeKeeper,_hideNullTokens);
  }
}