<commit_before>package scal.io.liger.model;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author <NAME>
 * @author <NAME>
 */
public class TipCard extends MarkdownCard {

    // FIXME make sure this isn't being serialized
    private Random random;
    private ArrayList<String> tags;

    // FIXME make sure this isn't being serialized
    private ArrayList<String> tips = null;

    public TipCard() {
        super();
        this.type = this.getClass().getName();
        this.random = new Random();
    }

    @Override
    public String getText() {
        if (text == null)
            text = randomTip();
        return super.getText();
    }

    public ArrayList<String> getTips() {
        if (tips == null) {
            ArrayList<Card> cards = getCardsByClass("thispath::<<scal.io.liger.model.TipCollectionHeadlessCard>>");
            if (cards.size() > 0) {
                TipCollectionHeadlessCard tipCollection = (TipCollectionHeadlessCard) cards.get(0);
                tips = tipCollection.getTipsTextByTags(tags);
            } else {
                return null;
            }
        }
        return tips;
    }

    public String randomTip() {
        ArrayList<String> ts = getTips();
        if (ts != null && (ts.size() > 0)) {
            int r = random.nextInt(ts.size());
            return ts.get(r);
        } else {
            return "(no tips match for tags: " + tags + ")"; // FIXME this is probably the wrong thing to do
        }
    }
}
<commit_msg>added missing @Expose to TipCard<commit_after>package scal.io.liger.model;

import com.google.gson.annotations.Expose;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author <NAME>
 * @author <NAME>
 */
public class TipCard extends MarkdownCard {

    private Random random;
    @Expose private ArrayList<String> tags;

    private ArrayList<String> tips = null;

    public TipCard() {
        super();
        this.type = this.getClass().getName();
        this.random = new Random();
    }

    @Override
    public String getText() {
        if (text == null)
            text = randomTip();
        return super.getText();
    }

    public ArrayList<String> getTips() {
        if (tips == null) {
            ArrayList<Card> cards = getCardsByClass("thispath::<<scal.io.liger.model.TipCollectionHeadlessCard>>");
            if (cards.size() > 0) {
                TipCollectionHeadlessCard tipCollection = (TipCollectionHeadlessCard) cards.get(0);
                tips = tipCollection.getTipsTextByTags(tags);
            } else {
                return null;
            }
        }
        return tips;
    }

    public String randomTip() {
        ArrayList<String> ts = getTips();
        if (ts != null && (ts.size() > 0)) {
            int r = random.nextInt(ts.size());
            return ts.get(r);
        } else {
            return "(no tips match for tags: " + tags + ")"; // FIXME this is probably the wrong thing to do
        }
    }
}

{'fraction_non_alphanumeric': 0.1237839651123784, 'fraction_numerical': 0.0020127474002012745, 'mean_word_length': 2.0397553516819573, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '929199', 'n_tokens_mistral': 858, 'n_tokens_neox': 841, 'n_words': 221}