

def add_domain(domain, url, secure=False):
    protocol = ('https' if secure else 'http')
    if url.startswith('//'):
        url = ('%s:%s' % (protocol, url))
    elif (not (url.startswith('http://') or protocol.startswith('https://') or url.startswith('mailto:'))):
        url = iri_to_uri(('%s://%s%s' % (protocol, domain, url)))
    return url

dataset/ETHPy150Open statesofpop/django-cal/django_cal/views.py add_domain/VarMisuse@60/73 `url`->`protocol`