<commit_before>package org.kie.config.cli;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Alternative;

import org.uberfire.security.Identity;
import org.uberfire.security.Role;

/**
 * An alternative Identity used from the CLI to ensure the user has ADMIN permissions
 */
@Alternative
@ApplicationScoped
public class CliIdentity implements Identity {

    private static final long serialVersionUID = -9178650167557721039L;

    private List<Role> roles = new ArrayList<Role>();

    @PostConstruct
    public void setup() {
        roles.add( EnvironmentProvider.ADMIN_ROLE );
    }

    @Override
    public String getName() {
        return System.getProperty( "user.name" );
    }

    @Override
    public boolean hasRole( Role role ) {
        return roles.contains( role );
    }

    @Override
    public List<Role> getRoles() {
        return roles;
    }

}<commit_msg>added Override methods to run with uf0.3<commit_after>package org.kie.config.cli;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Alternative;

import org.uberfire.security.Identity;
import org.uberfire.security.Role;

/**
 * An alternative Identity used from the CLI to ensure the user has ADMIN permissions
 */
@Alternative
@ApplicationScoped
public class CliIdentity implements Identity {

    private static final long serialVersionUID = -9178650167557721039L;

    private List<Role> roles = new ArrayList<Role>();

    @PostConstruct
    public void setup() {
        roles.add( EnvironmentProvider.ADMIN_ROLE );
    }

    //@Override
    public String getName() {
        return System.getProperty( "user.name" );
    }

    @Override
    public boolean hasRole( Role role ) {
        return roles.contains( role );
    }

    @Override
    public List<Role> getRoles() {
        return roles;
    }

    @Override
    public Map<String, String> getProperties() {
        return Collections.emptyMap();
    }

    @Override
    public void aggregateProperty(String name,
                                  String value) {
    }

    @Override
    public void removeProperty(String name) {
    }

    @Override
    public String getProperty(String name,
                              String defaultValue) {
        return null;
    }

}
{'fraction_non_alphanumeric': 0.08831683168316831, 'fraction_numerical': 0.015841584158415842, 'mean_word_length': 2.990521327014218, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '15218', 'n_tokens_mistral': 732, 'n_tokens_neox': 685, 'n_words': 190}