<commit_before>package lecho.lib.hellocharts.anim;

import lecho.lib.hellocharts.LineChart;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.SuppressLint;
import android.view.animation.LinearInterpolator;

@SuppressLint("NewApi")
public class ChartAnimatorV11 implements ChartAnimator, AnimatorListener, AnimatorUpdateListener {
	@SuppressWarnings("unused")
	private float mScale;
	private ObjectAnimator mObjectAnimator;
	private final LineChart mChart;
	private final long mDuration;

	public ChartAnimatorV11(final LineChart chart, final long duration) {
		mChart = chart;
		mDuration = duration;
		mObjectAnimator = ObjectAnimator.ofFloat(this, "mScale", 0.0f, 1.0f);
		mObjectAnimator.setDuration(mDuration);
		mObjectAnimator.setInterpolator(new LinearInterpolator());
		mObjectAnimator.addListener(this);
		mObjectAnimator.addUpdateListener(this);
	}

	@Override
	public void startAnimation() {
		mScale = 0.0f;
		mObjectAnimator.start();
	}

	@Override
	public void cancelAnimation() {
		mObjectAnimator.cancel();
	}

	@Override
	public void onAnimationUpdate(ValueAnimator animation) {
		mChart.animationUpdate((Float) animation.getAnimatedValue());<commit_msg>Refactored ChartAnimatorV11 to use ValueAnimator.<commit_after>package lecho.lib.hellocharts.anim;

import lecho.lib.hellocharts.LineChart;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.SuppressLint;
import android.view.animation.LinearInterpolator;

@SuppressLint("NewApi")
public class ChartAnimatorV11 implements ChartAnimator, AnimatorListener, AnimatorUpdateListener {
	private ValueAnimator mAnimator;
	private final LineChart mChart;
	private final long mDuration;

	public ChartAnimatorV11(final LineChart chart, final long duration) {
		mChart = chart;
		mDuration = duration;
		mAnimator = ValueAnimator.ofFloat(0.0f, 1.0f);
		mAnimator.setDuration(mDuration);
		mAnimator.setInterpolator(new LinearInterpolator());
		mAnimator.addListener(this);
		mAnimator.addUpdateListener(this);
	}

	@Override
	public void startAnimation() {
		mAnimator.start();
	}

	@Override
	public void cancelAnimation() {
		mAnimator.cancel();
	}

	@Override
	public void onAnimationUpdate(ValueAnimator animation) {
		mChart.animationUpdate((Float) animation.getAnimatedValue());
{'fraction_non_alphanumeric': 0.08983180428134556, 'fraction_numerical': 0.00764525993883792, 'mean_word_length': 6.978658536585366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1566971', 'n_tokens_mistral': 814, 'n_tokens_neox': 784, 'n_words': 155}