def auto_in(apps):
    routes = [
        ('/robots.txt', '/welcome/static/robots.txt'),
        ('/favicon.ico', '/welcome/static/favicon.ico'),
        ('/admin$anything', '/admin$anything'),
    ]
    for domain, path in [x.strip().split() for x in apps.split('\n') if x.strip() and not x.strip().startswith('#')]:
        if not path.startswith('/'):
            path = '/' + path
        if path.endswith('/'):
            path = path[:-1]
        app = path.split('/')[1]
        routes += [
            ('.*:https?://(.*\.)?%s:$method /' % domain, path % '%s'),
            ('.*:https?://(.*\.)?%s:$method /static/$anything' %
             domain, '/%s/static/$anything' % app),
            ('.*:https?://(.*\.)?%s:$method /appadmin/$anything' %
             domain, '/%s/appadmin/$anything' % app),
            ('.*:https?://(.*\.)?%s:$method /$anything' %
             domain, '%s/$anything' % path),
        ]
    return routes
dataset/ETHPy150Open uwdata/termite-data-server/web2py/scripts/autoroutes.py/auto_in/swapped operands of `%`