Is this provider ID authoritative for this XRI?

    @returntype: bool
510069
def providerIsAuthoritative(providerID, canonicalID):
    
    # XXX: can't use rsplit until we require python >= 2.4.
    lastbang = canonicalID.rindex('!')
    parent = canonicalID[:lastbang]
    return parent == providerID
686042
def isAuthorized(self, pid, action, vendorSpecific=None):
        """"""
        response = self.isAuthorizedResponse(pid, action, vendorSpecific)
        return self._read_boolean_401_response(response)
950631
private boolean checkImplementer(TypeElement providerImplementer, TypeElement providerType) {

    String verify = processingEnv.getOptions().get("verify");
    if (verify == null || !Boolean.valueOf(verify)) {
      return true;
    }

    // TODO: We're currently only enforcing the subtype relationship
    // constraint. It would be nice to enforce them all.

    Types types = processingEnv.getTypeUtils();

    return types.isSubtype(providerImplementer.asType(), providerType.asType());
  }
690984
def get(self, identifier):
        """"""
        for provider in self._providers:
            if provider.identifier == identifier:
                return provider
        return None
696094
def is_primary(self):
        
        return bool(next(iter(self.selfsig._signature.subpackets['h_PrimaryUserID']), False))
112656
public static boolean isProvider(ClassInfo classInfo) {
        AnnotationInfo annotationInfo = classInfo.getAnnotation(JaxWsConstants.WEB_SERVICE_ANNOTATION_NAME);
        if (annotationInfo == null) {
            annotationInfo = classInfo.getAnnotation(JaxWsConstants.WEB_SERVICE_PROVIDER_ANNOTATION_NAME);
            if (annotationInfo != null) {
                return true;
            }
        }
        return false;
    }
212356
protected function getId()
  {
    if($this->currObj instanceof Server)
    {
      return "ts3_s" . $this->currObj->virtualserver_id;
    }
    elseif($this->currObj instanceof Channel)
    {
      return "ts3_c" . $this->currObj->cid;
    }
    elseif($this->currObj instanceof Client)
    {
      return "ts3_u" . $this->currObj->clid;
    }

    return FALSE;
  }
485295
public function checkIntegrityData()
    {
        $prevId = 0;
        $identifier = $this->getIdentifier();

        foreach ($this as $item) {
            $this->checkIdentifierType($item[$identifier]);

            if ($item[$identifier] < $prevId) {
                throw new DataStoreException("This storage type supports only a list ordered by id ASC");
            }

            $prevId = $item[$identifier];
        }

        return true;
    }
1298518
protected function checkBrowserVivaldi() {
        if( stripos($this->_agent,'Vivaldi') !== false ) {
            $aresult = explode('/',stristr($this->_agent,'Vivaldi'));
            $aversion = explode(' ',$aresult[1]);
            $this->setVersion($aversion[0]);
            $this->setBrowser(self::BROWSER_VIVALDI);
            return true;
        }
        return false;
    }
373202
public function isAuthenticated()
    {
        if (!$this->session->has('usr_id')) {
            return false;
        }

        if ($this->session->has('session_id')) {
            if (null !== $this->app['repo.sessions']->find($this->session->get('session_id'))) {
                return true;
            }
        }

        $this->session->invalidate();
        $this->reinitUser();

        return false;
    }
1099831
public function hasAutoIncrementPrimaryKey()
    {
        if ($this->getIdMethod() != IDMethod::NO_ID_METHOD) {
            $pks = $this->getPrimaryKey();
            foreach ($pks as $pk) {
                if ($pk->isAutoIncrement()) {
                    return true;
                }
            }
        }

        return false;
    }
780357
def has_override(self, addr):
        """"""
        override = False
        if self._overrides.get(addr, None) is not None:
            override = True
        return override
1076297
private static boolean isValidAddress(InetAddress address) {
        if (address == null || address.isLoopbackAddress()) {
            return false;
        }
        String name = address.getHostAddress();
        return (name != null
            && !isAnyHost(name)
            && !isLocalHost(name)
            && isIPv4Host(name));
    }
369095
def IsRegistryStatEntry(self, original_result):
    """"""
    return (original_result.pathspec.pathtype ==
            rdf_paths.PathSpec.PathType.REGISTRY)
13396
public static function checkBrowserVivaldi()
    {
        if (stripos(self::$userAgentString, 'Vivaldi') !== false) {
            $aresult = explode('/', stristr(self::$userAgentString, 'Vivaldi'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                self::$browser->setVersion($aversion[0]);
            }
            self::$browser->setName(Browser::VIVALDI);

            return true;
        }

        return false;
    }
617547
public static function getCurrentProviderId()
    {
        try {
            $optionValue = Option::get(self::CURRENT_PROVIDER_OPTION_NAME);
        } catch (\Exception $e) {
            $optionValue = false;
        }
        return $optionValue === false ? DefaultProvider::ID : $optionValue;
    }
957266
public static boolean checkClientId(boolean isLegacyAttributeList, String farEndClientID) {
		if (ZRTP.CLIENT_ID_LEGACY.equals(farEndClientID)) 
			return true;
		
		if (ZRTP.CLIENT_ID_RFC.equals(farEndClientID)) 
			return false;
		
		boolean isPrintable = true;
		
		for (int i = 0; i < farEndClientID.length(); i++) {
			int singleChar = farEndClientID.charAt(i);
			if (singleChar < 32 || singleChar >= 127) {
				isPrintable = false;
			}
		}
		return !isPrintable && isLegacyAttributeList;
	}