Test if this token appears at least once.
18447
SourcedToken getEquivalentToken(Token tok) {
        if (unsourcedTokens.contains(tok.getValue())) {
            for (int i=0; i<tokens.length; i++) {
                if (tokens[i].getValue().equals(tok.getValue())) {
                    return tokens[i];
                }
            }
            System.out.println("This is a problem");
            return null;
        } else {
            return null;
        }
    }
1030563
def check_input(self, token):
        
        if token is None:
            raise Exception(self.full_name + ": No token provided!")
        self.config["setup"].check_input(token.payload)
973104
def check_input(self, token):
        
        if token is None:
            raise Exception(self.full_name + ": No token provided!")
        if isinstance(token.payload, str):
            return
        raise Exception(self.full_name + ": Unhandled class: " + classes.get_classname(token.payload))
1162845
function checkSpacingAroundFirstToken(node) {
            const firstToken = node && sourceCode.getFirstToken(node);

            if (firstToken && firstToken.type === "Keyword") {
                checkSpacingAround(firstToken);
            }
        }
1337463
public void check(Boolean autoRepair, Boolean makeUnique)
      throws MtasParserException {
    if (autoRepair) {
      autoRepair();
    }
    if (makeUnique) {
      makeUnique();
    }
    checkTokenCollectionIndex();
    for (Integer i : tokenCollectionIndex) {
      // minimal properties
      if (tokenCollection.get(i).getId() == null
          || tokenCollection.get(i).getPositionStart() == null
          || tokenCollection.get(i).getPositionEnd() == null
          || tokenCollection.get(i).getValue() == null) {
        clear();
        break;
      }
    }
  }
42854
function once(eventName, handler, context, args) {
    this.on(eventName, handler, context, args, true);
}
113612
function isFirstTokenInCurrentLine(token) {
            const tokenBefore = sourceCode.getTokenBefore(token);

            return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore));
        }
1189855
def renew(self):
        
        if self.token is not None:
            try:
                self.client.test_and_set(self.key, self.token, self.token, ttl=self.ttl)
                return True
            except ValueError, e:
                self.token = None
                return False
923545
def collect_tokens_until(self, token_type):
        """"""
        self.next()
        if self.current_token.type == token_type:
            return

        while True:
            yield self.current_token

            self.next()
            if self.current_token.type == token_type:
                return

            if self.current_token.type != 'COMMA':
                raise self.error(f'Expected comma but got '
                                 f'{self.current_token.value!r}')
            self.next()
963409
def something(TokenClass):
    """"""
    def callback(lexer, match, context):
        text = match.group()
        if not text:
            return
        yield match.start(), TokenClass, text
        context.pos = match.end()
    return callback
19988
def token_expired(self):
        """"""
        if self._token_timer is None:
            return True
        return timeutil.is_newer_than(self._token_timer, timeutil.ONE_HOUR)
884814
function isChecked(token) {
    var checked = false;

    if (token.content.indexOf('[x]') === 0 || token.content.indexOf('[X]') === 0) {
        checked = true;
    }

    return checked;
}
1262272
def TryConsume(self, token):
    
    if self.token == token:
      self.NextToken()
      return True
    return False
161502
function checkSpacingAroundTokenBefore(node) {
            if (node) {
                const token = sourceCode.getTokenBefore(node, astUtils.isKeywordToken);

                checkSpacingAround(token);
            }
        }
680230
def _verify_token(self):
        
        res = self._session.get(self._token_verification_url)
        if not res.ok:
            raise exceptions.BadToken(consts.LOG_MSG_BAD_TOKEN)
        return True
314574
def check_token(self, token=None):
        
        if token is None:
            token = self.token
        resp, resp_body = self.method_head("tokens/%s" % token, admin=True)
        if resp.status_code in (401, 403):
            raise exc.AuthorizationFailure("You must be an admin to make this "
                    "call.")
        return 200 <= resp.status_code < 300
596586
function once(f) {
    function g() {
      f.apply(this, arguments)
      remove(g) }
    add(g)
    return notify }