<commit_before>package com.tikal.jenkins.plugins.multijob;

import hudson.EnvVars;
import hudson.Extension;
import hudson.model.*;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@Restricted(NoExternalUse.class)
public class MultiJobParametersAction extends ParametersAction {

    private List<ParameterValue> parameters;

    public MultiJobParametersAction(@Nonnull List<ParameterValue> parameters) {
        super(parameters);
        this.parameters = parameters;
    }

    public MultiJobParametersAction(ParameterValue... parameters) {
        this(Arrays.asList(parameters));
    }

    private Object readResolve() {
        List<ParameterValue> superParameters = super.getParameters();
        // Migrate the stuf if there is inconsistency
        if (!parameters.isEmpty() && (superParameters == null || superParameters.isEmpty())) {
            // TODO: Should it actually check if the lists are diffrerent?
            // No use-case exception reflection/groovy
            return new MultiJobParametersAction(parameters);
        }
        return this;
    }
    
    @Override
    public List<ParameterValue> getParameters() {
        return Collections.unmodifiableList(parameters);
    }

    @Override
    public ParameterValue getParameter(String name) {
        for (ParameterValue parameter : parameters) {<commit_msg>Revert "[JENKINS-38850] - Add migration logic for actions loaded from the disk"<commit_after>package com.tikal.jenkins.plugins.multijob;

import hudson.EnvVars;
import hudson.Extension;
import hudson.model.*;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@Restricted(NoExternalUse.class)
public class MultiJobParametersAction extends ParametersAction {

    private List<ParameterValue> parameters;

    public MultiJobParametersAction(@Nonnull List<ParameterValue> parameters) {
        super(parameters);
        this.parameters = parameters;
    }

    public MultiJobParametersAction(ParameterValue... parameters) {
        this(Arrays.asList(parameters));
    }

    @Override
    public List<ParameterValue> getParameters() {
        return Collections.unmodifiableList(parameters);
    }

    @Override
    public ParameterValue getParameter(String name) {
        for (ParameterValue parameter : parameters) {
{'fraction_non_alphanumeric': 0.0897679726131609, 'fraction_numerical': 0.001901863826550019, 'mean_word_length': 3.906716417910448, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5454666', 'n_tokens_mistral': 714, 'n_tokens_neox': 692, 'n_words': 161}