<commit_before>package de.setsoftware.reviewtool.reminder;

import java.util.Collections;
import java.util.Date;
import java.util.List;

import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;

import de.setsoftware.reviewtool.base.Logger;
import de.setsoftware.reviewtool.model.TicketInfo;
import de.setsoftware.reviewtool.ui.facade.ReviewUi;

/**
 * Checks if there are too many open reviews and shows a reminder.
 */
public class Reminder implements Runnable {

    private static final int CHECK_DELAY = 23 * 60 * 60 * 1000;

    private final int minCount;
    private final int minDays;

    public Reminder(int minCount, int minDays) {
        this.minCount = minCount;
        this.minDays = minDays;
    }

    @Override
    public void run() {
        Logger.debug("reminder check runs");
        if (!ReviewUi.isIdle()) {
            Logger.debug("reminder check skipped because not idle");
            Display.getCurrent().timerExec(CHECK_DELAY, this);
            return;
        }
        final List<TicketInfo> tickets;
        try {
            tickets = ReviewUi.getReviewStateManager().getTicketsForFilter(
                    ReviewUi.getLastUsedReviewFilter(), true);
        } catch (RuntimeException e) {
            Logger.warn("problem while getting tickets for reminder", e);
            tickets = Collections.emptyList();
        }
        final int maxDaysWaiting = this.determineMaxDaysWaiting(tickets);

        final boolean review;
        if (tickets.size() >= this.minCount) {
            review = MessageDialog.openQuestion(null, "Time to review",
                    String.format("There are %d open reviews. That's a lot. Start review?", tickets.size()));
        } else if (maxDaysWaiting >= this.minDays) {
            review = MessageDialog.openQuestion(null, "Time to review",
                        String.format("There are tickets that have been waiting for review for %d days."
                                + " That's a long time. Start review?", maxDaysWaiting));
        } else {<commit_msg>fix yet another compile error<commit_after>package de.setsoftware.reviewtool.reminder;

import java.util.Collections;
import java.util.Date;
import java.util.List;

import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;

import de.setsoftware.reviewtool.base.Logger;
import de.setsoftware.reviewtool.model.TicketInfo;
import de.setsoftware.reviewtool.ui.facade.ReviewUi;

/**
 * Checks if there are too many open reviews and shows a reminder.
 */
public class Reminder implements Runnable {

    private static final int CHECK_DELAY = 23 * 60 * 60 * 1000;

    private final int minCount;
    private final int minDays;

    public Reminder(int minCount, int minDays) {
        this.minCount = minCount;
        this.minDays = minDays;
    }

    @Override
    public void run() {
        Logger.debug("reminder check runs");
        if (!ReviewUi.isIdle()) {
            Logger.debug("reminder check skipped because not idle");
            Display.getCurrent().timerExec(CHECK_DELAY, this);
            return;
        }
        List<TicketInfo> tickets;
        try {
            tickets = ReviewUi.getReviewStateManager().getTicketsForFilter(
                    ReviewUi.getLastUsedReviewFilter(), true);
        } catch (RuntimeException e) {
            Logger.warn("problem while getting tickets for reminder", e);
            tickets = Collections.emptyList();
        }
        final int maxDaysWaiting = this.determineMaxDaysWaiting(tickets);

        final boolean review;
        if (tickets.size() >= this.minCount) {
            review = MessageDialog.openQuestion(null, "Time to review",
                    String.format("There are %d open reviews. That's a lot. Start review?", tickets.size()));
        } else if (maxDaysWaiting >= this.minDays) {
            review = MessageDialog.openQuestion(null, "Time to review",
                        String.format("There are tickets that have been waiting for review for %d days."
                                + " That's a long time. Start review?", maxDaysWaiting));
        } else {
{'fraction_non_alphanumeric': 0.09812206572769953, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 2.580672268907563, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '380624', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1127, 'n_words': 315}