code: public ServiceInstanceQuery getPatternQueryCriterion(String key, String pattern){
          QueryCriterion c = new PatternQueryCriterion(key, pattern);
          addQueryCriterion(c);
          return this;
      }
docs: Get a metadata value match regex pattern QueryCriterion.
  
  Add a QueryCriterion to check ServiceInstance has metadata value
  match the target regex pattern.
  
  @param key
  the metadata key.
  @param pattern
  the target regex pattern that metadata should match.
  @return
  the ServiceInstanceQuery.