code: public MatcherPath commonPrefix(MatcherPath that) {
          checkArgNotNull(that, "that");
          if (element.level > that.element.level) return parent.commonPrefix(that);
          if (element.level < that.element.level) return commonPrefix(that.parent);
          if (this == that) return this;
          return (parent != null && that.parent != null) ? parent.commonPrefix(that.parent) : null;
      }
docs: Returns the common prefix of this MatcherPath and the given other one.
  
  @param that the other path
  @return the common prefix or null