<commit_before>package org.xcolab.view.pages.contestmanagement.entities.massactions;

import org.xcolab.client.contest.ContestClientUtil;
import org.xcolab.client.contest.pojo.Contest;

import java.util.List;

public class ActiveMassAction extends ContestMassActionAdapter {

    private final boolean setActive;

    public ActiveMassAction() {
        this(false);
    }

    public ActiveMassAction(boolean setActive) {
        super(setActive ? "Active" : "Prior");
        this.setActive = setActive;
    }

    @Override
    public void execute(List<Contest> contests, boolean actionConfirmed) {
        for (Contest contest : contests) {
            if (contest.getIsSharedContestInForeignColab()) {
                contest = ContestClientUtil.getContest(contest.getContestPK());
            }
            contest.setContestActive(setActive);
            contest.persist();
        }
    }
}<commit_msg>[COLAB-961] rename bool var for clarity<commit_after>package org.xcolab.view.pages.contestmanagement.entities.massactions;

import org.xcolab.client.contest.ContestClientUtil;
import org.xcolab.client.contest.pojo.Contest;

import java.util.List;

public class ActiveMassAction extends ContestMassActionAdapter {

    private final boolean isSetActive;

    public ActiveMassAction() {
        this(false);
    }

    public ActiveMassAction(boolean isSetActive) {
        super(isSetActive ? "Active" : "Prior");
        this.isSetActive = isSetActive;
    }

    @Override
    public void execute(List<Contest> contests, boolean actionConfirmed) {
        for (Contest contest : contests) {
            if (contest.getIsSharedContestInForeignColab()) {
                contest = ContestClientUtil.getContest(contest.getContestPK());
            }
            contest.setContestActive(isSetActive);
            contest.persist();
        }
    }
}
{'fraction_non_alphanumeric': 0.09418729817007535, 'fraction_numerical': 0.0016146393972012918, 'mean_word_length': 3.0325379609544467, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3639330', 'n_tokens_mistral': 548, 'n_tokens_neox': 531, 'n_words': 95}