<commit_before>package org.yamcs.xtce;


/**
 * Parameters made on the fly.
 * 
 * DataSource should be one of SYSTEM, COMMAND or COMMAND_HISTORY (so the class name is a misnomer);
 * 
 * @author nm
 * 
 */
public class SystemParameter extends Parameter {
    private static final long serialVersionUID = 2L;
    
    private SystemParameter(String spaceSystemName, String name, DataSource ds) {
        super(name);
        setQualifiedName(spaceSystemName+"/"+name);
        addAlias(spaceSystemName, name);
        setDataSource(ds);
    }

    public static SystemParameter getForFullyQualifiedName(String fqname) {
        DataSource ds = getSystemParameterDataSource(fqname);
        SystemParameter sp = new SystemParameter(NameDescription.getSubsystemName(fqname), NameDescription.getName(fqname), ds);
        //set the recording name "/yamcs/a/b/c" -> "/yamcs/a"
        int pos = fqname.indexOf(PATH_SEPARATOR, 0);
        pos = fqname.indexOf(PATH_SEPARATOR, pos+1);
        pos = fqname.indexOf(PATH_SEPARATOR, pos+1);
        sp.setRecordingGroup(fqname.substring(0, pos));
        
        return sp;
    }
    
    private static DataSource getSystemParameterDataSource(String fqname) {
        if(fqname.startsWith(XtceDb.YAMCS_CMD_SPACESYSTEM_NAME)) return DataSource.COMMAND;
        else if(fqname.startsWith(XtceDb.YAMCS_CMDHIST_SPACESYSTEM_NAME)) return DataSource.COMMAND_HISTORY;
        else return DataSource.SYSTEM;
    }

    
    @Override
    public String toString() {
        return "SysParam(qname=" + getQualifiedName() + ")";
    }
}<commit_msg>Remove unnecessary alias for system parameters<commit_after>package org.yamcs.xtce;

/**
 * Parameters made on the fly.
 * 
 * DataSource should be one of SYSTEM, COMMAND or COMMAND_HISTORY (so the class name is a misnomer);
 * 
 * @author nm
 * 
 */
public class SystemParameter extends Parameter {
    private static final long serialVersionUID = 2L;

    private SystemParameter(String spaceSystemName, String name, DataSource ds) {
        super(name);
        setQualifiedName(spaceSystemName + "/" + name);
        setDataSource(ds);
    }

    public static SystemParameter getForFullyQualifiedName(String fqname) {
        DataSource ds = getSystemParameterDataSource(fqname);
        SystemParameter sp = new SystemParameter(NameDescription.getSubsystemName(fqname),
                NameDescription.getName(fqname), ds);
        // set the recording name "/yamcs/a/b/c" -> "/yamcs/a"
        int pos = fqname.indexOf(PATH_SEPARATOR, 0);
        pos = fqname.indexOf(PATH_SEPARATOR, pos + 1);
        pos = fqname.indexOf(PATH_SEPARATOR, pos + 1);
        sp.setRecordingGroup(fqname.substring(0, pos));

        return sp;
    }

    private static DataSource getSystemParameterDataSource(String fqname) {
        if (fqname.startsWith(XtceDb.YAMCS_CMD_SPACESYSTEM_NAME)) {
            return DataSource.COMMAND;
        } else if (fqname.startsWith(XtceDb.YAMCS_CMDHIST_SPACESYSTEM_NAME)) {
            return DataSource.COMMAND_HISTORY;
        } else {
            return DataSource.SYSTEM;
        }
    }

    @Override
    public String toString() {
        return "SysParam(qname=" + getQualifiedName() + ")";
    }
}
{'fraction_non_alphanumeric': 0.09586056644880174, 'fraction_numerical': 0.003112356053532524, 'mean_word_length': 3.104725415070243, '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': '2559142', 'n_tokens_mistral': 1003, 'n_tokens_neox': 976, 'n_words': 216}