def domain_match(A, B):
    # Note that, if A or B are IP addresses, the only relevant part of the
    # definition of the domain-match algorithm is the direct string-compare.
    A = A.lower()
    B = B.lower()
    if A == B:
        return True
    if not is_HDN(A):
        return False
    i = A.rfind(B)
    if i == -1 or i == 0:
        # A does not have form NB, or N is the empty string
        return False
    if not B.startswith("."):
        return False
    if not is_HDN(B[1:]):
        return False
    return True
This function is called when the application has taken too long
dataset/ETHPy150Open babble/babble/include/jython/Lib/cookielib.py/domain_match--crossover with--dataset/ETHPy150Open JoelBender/bacpypes/py25/bacpypes/appservice.py/ServerSSM.await_response_timeout