<commit_before>package com.ecyrd.jspwiki.auth;

import com.ecyrd.jspwiki.InternalWikiException;
import java.security.Principal;

/**
 *  A special kind of WikiGroup.  Anyone who has set their name in
 *  the cookie is a part of this group.
 */
public class NamedGroup
    extends AllGroup
{
    public NamedGroup()
    {
        setName( UserManager.GROUP_NAMEDGUEST );
    }

    public boolean isMember( Principal user )
    {
        if( user instanceof UserProfile )
        {
            UserProfile p = (UserProfile) user;

            return ( p.getLoginStatus() == UserProfile.PASSWORD ||
                     p.getLoginStatus() == UserProfile.COOKIE );
        }

        throw new InternalWikiException("Someone offered us a Principal that is not an UserProfile!");
    }

    public boolean equals( Object o )
    {
        return o != null && o instanceof NamedGroup;
    }
}
<commit_msg>Now checks for >= COOKIE.<commit_after>package com.ecyrd.jspwiki.auth;

import com.ecyrd.jspwiki.InternalWikiException;
import java.security.Principal;

/**
 *  A special kind of WikiGroup.  Anyone who has set their name in
 *  the cookie is a part of this group.
 */
public class NamedGroup
    extends AllGroup
{
    public NamedGroup()
    {
        setName( UserManager.GROUP_NAMEDGUEST );
    }

    public boolean isMember( Principal user )
    {
        if( user instanceof UserProfile )
        {
            UserProfile p = (UserProfile) user;

            return p.getLoginStatus() >= UserProfile.COOKIE;
        }

        throw new InternalWikiException("Someone offered us a Principal that is not an UserProfile!");
    }

    public boolean equals( Object o )
    {
        return o != null && o instanceof NamedGroup;
    }
}

{'fraction_non_alphanumeric': 0.08443423319931075, 'fraction_numerical': 0.0, 'mean_word_length': 2.4495049504950495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1777446', 'n_tokens_mistral': 508, 'n_tokens_neox': 492, 'n_words': 153}