The NodeData matches the context if the workspace matches exactly.
Needs to be adjusted for further context dimensions.

@return boolean
424865
protected function isNodeDataMatchingContext(): bool
    {
        if ($this->nodeDataIsMatchingContext === null) {
            $workspacesMatch = $this->workspaceIsMatchingContext();
            $this->nodeDataIsMatchingContext = $workspacesMatch && $this->dimensionsAreMatchingTargetDimensionValues();
        }

        return $this->nodeDataIsMatchingContext;
    }
345860
public function match(){

            $session = $this->getSession();
            $key = static::USER_SESSION;
            if($session->has($key)){

                if($value = $session->get($key) instanceof AuthenticationLoginObject){
                    return $value;
                }
            }else{
                return false;
            }
        }
1041289
protected function matchOnlyChild()
	{
		$branches = $this->getBranches();
		if (!isset($branches[0]->firstChild))
		{
			return false;
		}

		$firstChild = $branches[0]->firstChild;
		if ($this->isXsl($firstChild, 'choose'))
		{
			// Abort on xsl:choose because we can't move it without moving its children
			return false;
		}

		foreach ($branches as $branch)
		{
			if ($branch->childNodes->length !== 1 || !($branch->firstChild instanceof DOMElement))
			{
				return false;
			}
			if (!$this->isEqualTag($firstChild, $branch->firstChild))
			{
				return false;
			}
		}

		return true;
	}
501691
public function match(array $data): bool
    {
        $match = parent::match($data);
        if ($match) {
            if ($data['fieldConfig']['config']['foreign_table'] !== 'tx_styleguide_inline_usecombination_mm'
                && $data['fieldConfig']['config']['foreign_table'] !== 'tx_styleguide_inline_usecombinationbox_mm'
            ) {
                $match = false;
            }
        }
        return $match;
    }
918867
public function matchFilters(NodeData $nodeData, array $filterConfiguration)
    {
        $filterConjunction = $this->buildFilterConjunction($filterConfiguration);
        foreach ($filterConjunction as $filter) {
            if (!$filter->matches($nodeData)) {
                return false;
            }
        }
        return true;
    }
1046988
public function IsContextSensitive()
	{
		return ( $this->getCount() == 0 && in_array( $this->_name, FuncNode::$s_contextDs ) && $this->_ns == XmlReservedNs::xQueryFunc)  ||
				parent::IsContextSensitive();
	}
1212404
public boolean isInMatchSpace()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "isInMatchSpace");
            SibTr.exit(tc, "isInMatchSpace", Boolean.valueOf(isInMatchSpace));
        }

        return isInMatchSpace;
    }
878139
public static boolean nodeMatches(final Node nd, final QName tag) {
    if (tag == null) {
      return false;
    }

    String ns = nd.getNamespaceURI();

    if (ns == null) {
      /* It appears a node can have a NULL namespace but a QName has a zero length
       */
      if ((tag.getNamespaceURI() != null) && (!"".equals(tag.getNamespaceURI()))) {
        return false;
      }
    } else if (!ns.equals(tag.getNamespaceURI())) {
      return false;
    }

    String ln = nd.getLocalName();

    if (ln == null) {
      if (tag.getLocalPart() != null) {
        return false;
      }
    } else if (!ln.equals(tag.getLocalPart())) {
      return false;
    }

    return true;
  }
1133772
function is_text_node() {
    if ( isset($this->_is_cache["text_node"]) ) {
      return $this->_is_cache["text_node"];
    }
    
    return $this->_is_cache["text_node"] = ($this->get_node()->nodeName === "#text");
  }
194968
public boolean matches(final Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            return matches(((Element) node).getAttribute(ATTRIBUTE_NAME_CLASS));
        }
        return false;
    }
960241
public function matches(\Neos\ContentRepository\Domain\Model\NodeData $node)
    {
        $nodeIsMatchingNodeType = false;

        for($i=0; $i<$this->searchDepth;$i++){
            $parentNode = $node->getParent();

            if($parentNode!==null){
                // This will break atm for NodeTypes that no longer exist - see /Packages/Application/Neos.ContentRepository/Classes/TYPO3/TYPO3CR/Migration/Filters/NodeType.php
                // version stated there is a "hack" though and does not allow for standard UnitTesting
                $nodeType = $parentNode->getNodeType();

                if ($this->withSubTypes === true) {
                    $nodeIsMatchingNodeType = $nodeType->isOfType($this->nodeTypeName);
                } else {
                    if ($nodeType->getName() === $this->nodeTypeName) {
                        $nodeIsMatchingNodeType = true;
                        break;
                    }
                }
                $node = $parentNode;
            }
            else{
                break;
            }
        }

        return $nodeIsMatchingNodeType;
    }
1230108
public function match()
    {
        return isset($this->map[$this->key])
            ? $this->map[$this->key]
            : false;
    }
390743
protected function getNodeDataForParentAndNodeType($parentPath, $nodeTypeFilter, Workspace $workspace, array $dimensions = null, $removedNodes = false, $recursive = false)
    {
        $workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);

        $queryBuilder = $this->createQueryBuilder($workspaces);
        if ($dimensions !== null) {
            $this->addDimensionJoinConstraintsToQueryBuilder($queryBuilder, $dimensions);
        } else {
            $dimensions = [];
        }
        $this->addParentPathConstraintToQueryBuilder($queryBuilder, $parentPath, $recursive);
        if ($nodeTypeFilter !== null) {
            $this->addNodeTypeFilterConstraintsToQueryBuilder($queryBuilder, $nodeTypeFilter);
        }

        $query = $queryBuilder->getQuery();
        $nodes = $query->getResult();

        $foundNodes = $this->reduceNodeVariantsByWorkspacesAndDimensions($nodes, $workspaces, $dimensions);
        $foundNodes = $this->filterNodeDataByBestMatchInContext($foundNodes, $workspaces[0], $dimensions, $removedNodes);

        if ($removedNodes === true) {
            $foundNodes = $this->onlyRemovedNodes($foundNodes);
        } elseif ($removedNodes === false) {
            $foundNodes = $this->withoutRemovedNodes($foundNodes);
        }

        return $foundNodes;
    }
659199
final boolean isAnyChildMatched() {
    if (isAnyChildMatched == null) {
      isAnyChildMatched = false;
      for (RecursableDiffEntity entity : childEntities()) {
        if ((entity.isMatched() && !entity.isContentEmpty()) || entity.isAnyChildMatched()) {
          isAnyChildMatched = true;
          break;
        }
      }
    }
    return isAnyChildMatched;
  }
432403
public function match(Context $context)
    {
        $name = $this->getName($context);

        if ($this->map->hasRoute($name)) {
            return $this->map->getRoute($name);
        }

        return false;
    }
437462
public function match()
    {
        // if forceSlash is ON, and there is no trailing slash on current request
        if ($this->forceSlash && !$this->hasTrailingSlash($this->uriRelative)) {
            $this->forceSlash();
        }
        // Find control for current request, first with exact matching, then with variable matching
        if ($this->matchExact() || $this->matchVariable()) {
            return $this->control; // Match found
        }

        return null; // No match found
    }
1313912
private function areMultipleNamespacesInFile()
    {
        if (count($this->objects) === 0) {
            return false;
        }

        $foundNamespaces = array();
        foreach ($this->objects as $object) {
            $ns = $object->getNamespace();
            if ($ns !== null) {
                $foundNamespaces[$ns] = $ns;
            }
        }

        $foundNamespacesCount = count($foundNamespaces);

        if ($foundNamespacesCount === 0) {
            return false;
        } elseif ($foundNamespacesCount > 1) {
            return true;
        } else {
            return !isset($foundNamespaces[$this->getNamespace()]);
        }
    }