code: public boolean isInstanceURL(String url, InstanceInfo instance) {
          String hostName = hostFromUrl(url);
          String myInfoComparator = instance.getHostName();
          if (clientConfig.getTransportConfig().applicationsResolverUseIp()) {
              myInfoComparator = instance.getIPAddr();
          }
          return hostName != null && hostName.equals(myInfoComparator);
      }
docs: Checks if the given service url matches the supplied instance
  
  @param url the service url of the replica node that the check is made.
  @param instance the instance to check the service url against
  @return true, if the url represents the supplied instance, false otherwise.