<commit_before>package gov.nih.nci.cabig.caaers.domain;

import static gov.nih.nci.cabig.ctms.domain.CodedEnumHelper.getByClassAndCode;
import static gov.nih.nci.cabig.ctms.domain.CodedEnumHelper.register;
import gov.nih.nci.cabig.ctms.domain.CodedEnum;
import gov.nih.nci.cabig.ctms.domain.EnumHelper;

/**
 * This enumeration represents the user group types
 * 
 * @author <NAME>
 */
public enum UserGroupType implements CodedEnum<Integer> {
    caaers_user(-2, "caaers_user"),
    caaers_admin(-1, "caaers_admin"), 
    caaers_super_user(-3,"caaers_super_user"), 
    caaers_study_cd(-4, "caaers_study_cd"), 
    caaers_participant_cd(-5, "caaers_participant_cd"), 
    caaers_ae_cd(-13, "caaers_ae_cd"), 
    caaers_site_cd(-14, "caaers_site_cd"), 
    caaers_physician(-8, "caaers_physician"),
    caaers_central_office_sae_cd(-7943, "caaers_central_office_sae_cd"),
    caaers_data_cd(-7942, "caaers_data_cd");

    private String csmName;

    private int code;

    UserGroupType(final int code, final String name) {
        this.code = code;
        this.csmName = name;
        register(this);

    }

    public String getCsmName() {
        return csmName;
    }

    public String getDisplayName() {
        return EnumHelper.sentenceCasedName(this);
    }

    public Integer getCode() {
        return code;
    }

    public static UserGroupType getByCode(final int code) {
        return getByClassAndCode(UserGroupType.class, code);
    }

    public String toString() {
        return csmName;
    }
    
    public String getSecurityRoleName() {
    	return "ROLE_"+csmName;
    }

    public static final String[] strValues() {
        UserGroupType[] groupTypes = UserGroupType.values();
        String[] strUserGroupTypes = new String[groupTypes.length];
        for (int i = 0; i < groupTypes.length; i++) {
            strUserGroupTypes[i] = groupTypes[i].toString();
        }
        return strUserGroupTypes;
    }
    
    public static final int[] codes(){
    	UserGroupType[] groupTypes = UserGroupType.values();
    	int[] codes = new int[groupTypes.length];
    	for(int i =0; i < codes.length; i++){
    		codes[i] = groupTypes[i].code;
    	}
    	return codes;
    }
}
<commit_msg>comments , no code change CAAERS-3308<commit_after>package gov.nih.nci.cabig.caaers.domain;

import static gov.nih.nci.cabig.ctms.domain.CodedEnumHelper.getByClassAndCode;
import static gov.nih.nci.cabig.ctms.domain.CodedEnumHelper.register;
import gov.nih.nci.cabig.ctms.domain.CodedEnum;
import gov.nih.nci.cabig.ctms.domain.EnumHelper;

/**
 * This enumeration represents the user group types
 * 
 * @author <NAME>
 */
public enum UserGroupType implements CodedEnum<Integer> {
	// check *SecurityFilterer classes and RoutingAndReviewResolverController when adding new group . Need to change those classes accordingly
    caaers_user(-2, "caaers_user"),
    caaers_admin(-1, "caaers_admin"), 
    caaers_super_user(-3,"caaers_super_user"), 
    caaers_study_cd(-4, "caaers_study_cd"), 
    caaers_participant_cd(-5, "caaers_participant_cd"), 
    caaers_ae_cd(-13, "caaers_ae_cd"), 
    caaers_site_cd(-14, "caaers_site_cd"), 
    caaers_physician(-8, "caaers_physician"),
    caaers_central_office_sae_cd(-7943, "caaers_central_office_sae_cd"),
    caaers_data_cd(-7942, "caaers_data_cd");

    private String csmName;

    private int code;

    UserGroupType(final int code, final String name) {
        this.code = code;
        this.csmName = name;
        register(this);

    }

    public String getCsmName() {
        return csmName;
    }

    public String getDisplayName() {
        return EnumHelper.sentenceCasedName(this);
    }

    public Integer getCode() {
        return code;
    }

    public static UserGroupType getByCode(final int code) {
        return getByClassAndCode(UserGroupType.class, code);
    }

    public String toString() {
        return csmName;
    }
    
    public String getSecurityRoleName() {
    	return "ROLE_"+csmName;
    }

    public static final String[] strValues() {
        UserGroupType[] groupTypes = UserGroupType.values();
        String[] strUserGroupTypes = new String[groupTypes.length];
        for (int i = 0; i < groupTypes.length; i++) {
            strUserGroupTypes[i] = groupTypes[i].toString();
        }
        return strUserGroupTypes;
    }
    
    public static final int[] codes(){
    	UserGroupType[] groupTypes = UserGroupType.values();
    	int[] codes = new int[groupTypes.length];
    	for(int i =0; i < codes.length; i++){
    		codes[i] = groupTypes[i].code;
    	}
    	return codes;
    }
}

{'fraction_non_alphanumeric': 0.11062039957939011, 'fraction_numerical': 0.0092534174553102, 'mean_word_length': 2.7716098334655035, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '6545074', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1593, 'n_words': 301}