void addToMatchingCqMap(CqQueryImpl cq) {
    synchronized (matchingCqMap) {
      String cqQuery = cq.getQueryString();
      Set<String> matchingCQs;
      if (!matchingCqMap.containsKey(cqQuery)) {
        matchingCQs = Collections.newSetFromMap(new ConcurrentHashMap<>());
        matchingCqMap.put(cqQuery, matchingCQs);
        stats.incUniqueCqQuery();
      } else {
        matchingCQs = matchingCqMap.get(cqQuery);
      }
      matchingCQs.add(cq.getServerCqName());
      if (logger.isDebugEnabled()) {
        logger.debug("Adding CQ into MatchingCQ map, CQName: {} Number of matched querys are: {}",
            cq.getServerCqName(), matchingCQs.size());
      }
    }
  }
Adds the query from the given CQ to the matched CQ map.
geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/CqServiceImpl.java