private void searchOverlapped(
      PathPatternNode<V, VSerializer> node,
      String[] deviceNodes,
      int pos,
      List<String> measurements,
      List<Set<V>> resultSet) {
    if (pos == deviceNodes.length - 1) {
      for (int i = 0; i < measurements.size(); i++) {
        for (PathPatternNode<V, VSerializer> child : node.getMatchChildren(measurements.get(i))) {
          resultSet.get(i).addAll(child.getValues());
        }
        if (node.isMultiLevelWildcard()) {
          resultSet.get(i).addAll(node.getValues());
        }
      }
      return;
    }
    if (node.isMultiLevelWildcard()) {
      searchOverlapped(node, deviceNodes, pos + 1, measurements, resultSet);
    }
    for (PathPatternNode<V, VSerializer> child : node.getMatchChildren(deviceNodes[pos + 1])) {
      searchOverlapped(child, deviceNodes, pos + 1, measurements, resultSet);
    }
  }
Recursive method for search overlapped pattern.

@param node current PathPatternNode
@param deviceNodes pathNodes of device
@param pos current index of deviceNodes
@param measurements list of measurements under device
@param resultSet result set
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PatternTreeMap.java