<commit_before>package backend;

import models.Text;
import models.Word;

import java.util.List;
import java.util.Map;

/**
 * Created by hlib on 03.10.15.
 */
public class Dao {
    public List<Text> getAllTexts() {
        return Text.findAll();
    }

    public Long getRandomTextId() {
        // call Text method to query random text id
        return 42L;
    }
}<commit_msg>make getting random text id determined<commit_after>package backend;

import models.Text;
import models.Word;

import java.util.List;
import java.util.Map;
import java.util.Random;

/**
 * Created by hlib on 03.10.15.
 */
public class Dao {

    private final static Long[] STUB_TEXT_IDS = {-592328L, -1049090L, -1618176L};
    final Random random = new Random();

    public List<Text> getAllTexts() {
        return Text.findAll();
    }

    public Long getRandomTextId() {
        // call Text method to query random text id
        return getStubTextId();
    }

    private Long getStubTextId() {
        int index = random.nextInt(STUB_TEXT_IDS.length);
        return STUB_TEXT_IDS[index];
    }
}
{'fraction_non_alphanumeric': 0.10763569457221711, 'fraction_numerical': 0.031278748850046, 'mean_word_length': 2.804195804195804, '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': '192778', 'n_tokens_mistral': 370, 'n_tokens_neox': 343, 'n_words': 100}