code: private String getLocation()
      {
          Collection<InetAddress> localAddresses = FBUtilities.getAllLocalAddresses();
  
          for (InetAddress address : localAddresses)
          {
              for (String location : split.getLocations())
              {
                  InetAddress locationAddress = null;
                  try
                  {
                      locationAddress = InetAddress.getByName(location);
                  }
                  catch (UnknownHostException e)
                  {
                      throw new AssertionError(e);
                  }
                  if (address.equals(locationAddress))
                  {
                      return location;
                  }
              }
          }
          return split.getLocations()[0];
      }
docs: not necessarily on Cassandra machines, too.  This should be adequate for single-DC clusters, at least.