<commit_before>package org.kleemann.diceprobabilities;

import java.util.Random;

import org.kleemann.diceprobabilities.distribution.Distribution;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;

/**
 * <p>
 * Bring up a dialog that shows the results of a simulated roll of the dice
 * resulting in a check.
 */
public class Check {

	private static final int ANIMATION_START_DELAY_MILLISECONDS = 500;
	private static final int ANIMATION_PROGRESS_DURATION_CONSTANT_MILLISECONDS = 1000;
	private static final int ANIMATION_PROGRESS_DURATION_VARIABLE_MILLISECONDS = 1000;
	private static final float ANIMATION_PROGRESS_DECELERATE_SCALE = 2.0f;

	private final AlertDialog dialog;
	private final TextView checkTest;
	private final ProgressBar checkTargetProgress;
	private final ProgressBar checkActualProgress;
	private final TextView checkResult;

	private String probabilityText;
	private Distribution distribution;
	private int target;

	private final Wrapper wrapper;

	/**
	 * <p>
	 * On button click, the check dialog will be brought up.
	 * <commit_msg>release only bug; proguard was obfuscating class names needed by animator which uses introspection and thus needs original java names<commit_after>package org.kleemann.diceprobabilities;

import java.util.Random;

import org.kleemann.diceprobabilities.distribution.Distribution;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;

/**
 * <p>
 * Bring up a dialog that shows the results of a simulated roll of the dice
 * resulting in a check.
 * 
 * <p>
 * NOTE: this class uses the android Animator classes which rely on java
 * introspection. This class should not be obfuscated by proguard or the release
 * build will silently fail to animat.
 */
public class Check {

	private static final int ANIMATION_START_DELAY_MILLISECONDS = 500;
	private static final int ANIMATION_PROGRESS_DURATION_CONSTANT_MILLISECONDS = 1000;
	private static final int ANIMATION_PROGRESS_DURATION_VARIABLE_MILLISECONDS = 1000;
	private static final float ANIMATION_PROGRESS_DECELERATE_SCALE = 2.0f;

	private final AlertDialog dialog;
	private final TextView checkTest;
	private final ProgressBar checkTargetProgress;
	private final ProgressBar checkActualProgress;
	private final TextView checkResult;

	private String probabilityText;
	private Distribution distribution;
	private int target;

	private final Wrapper wrapper;

	/**
	 * <p>
	 * On button click, the check dialog will be brought up.
	 * 
{'fraction_non_alphanumeric': 0.060899437851342914, 'fraction_numerical': 0.008119925046845722, 'mean_word_length': 5.672916666666667, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '361782', 'n_tokens_mistral': 956, 'n_tokens_neox': 901, 'n_words': 292}