@never_cache
@anonymous_csrf
def password_reset_confirm(request, uidb64=None, token=None):
    assert uidb64 is not None and token is not None
    user = None
    try:
        uid_int = urlsafe_base64_decode(uidb64)
        user = UserProfile.objects.get(id=uid_int)
    except (ValueError, UserProfile.DoesNotExist, TypeError):
        pass

    if (user is not None and user.fxa_migrated()
            and waffle.switch_is_active('fxa-auth')):
        migrated = True
        validlink = False
        form = None
    elif user is not None and default_token_generator.check_token(user, token):
        migrated = False
        validlink = True
        if request.method == 'POST':
            form = forms.SetPasswordForm(user, request.POST)
            if form.is_valid():
                form.save()
                log_cef('Password Changed', 5, request,
                        username=user.username,
                        signature='PASSWORDCHANGED',
                        msg='User changed password')
                return redirect(reverse('django.contrib.auth.'
                                        'views.password_reset_complete'))
        else:
            form = forms.SetPasswordForm(user)
    else:
        migrated = False
        validlink = False
        form = None

    return render(request, 'users/pwreset_confirm.html',
                  {'form': form, 'validlink': validlink, 'migrated': migrated})
Sequence lenght
dataset/ETHPy150Open mozilla/addons-server/src/olympia/users/views.py/password_reset_confirm--crossover with--dataset/ETHPy150Open cjlee112/pygr/tests/sequence_test.py/Sequence_Test.test_length