<commit_before>package org.dasfoo.rover.android.client;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import org.dasfoo.rover.android.client.auth.PasswordManager;
import org.dasfoo.rover.android.client.grpc.task.AbstractGrpcTaskExecutor;
import org.dasfoo.rover.android.client.grpc.task.EncodersReadingTask;
import org.dasfoo.rover.android.client.grpc.task.GettingBoardInfoTask;
import org.dasfoo.rover.android.client.grpc.task.GrpcConnection;
import org.dasfoo.rover.android.client.grpc.task.MovingRoverTask;
import org.dasfoo.rover.android.client.menu.MenuFragment;
import org.dasfoo.rover.android.client.menu.SharedPreferencesHandler;
import org.dasfoo.rover.android.client.util.LogUtil;
import org.dasfoo.rover.android.client.util.ResultCallback;

import java.util.List;

import butterknife.BindView;
import butterknife.BindViews;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Main Activity of the application.
 */
public class MainActivity extends AppCompatActivity {
    /**
     * Class information for logging.
     */
    private static final String TAG = LogUtil.tagFor(MainActivity.class);

    /**
     * ButterKnife.apply() callback to enable / disable views (useful for lists).
     */
    private static final ButterKnife.Setter<View, Boolean> ENABLED =
            new ButterKnife.Setter<View, Boolean>() {
                @Override
                public void set(@NonNull final View view, final Boolean value, final int index) {
                    view.setEnabled(value);
                }
            };

    /**
     * All buttons on this activity.
     */
    @BindViews({R.id.move_forward_button, R.id.info_button, R.id.read_encoders_button})
    protected List<Button> mButtons;
    // TODO(dotdoom): try using the same for OnClick below

    /**<commit_msg>Remove TODO for sharing a list of buttons<commit_after>package org.dasfoo.rover.android.client;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import org.dasfoo.rover.android.client.auth.PasswordManager;
import org.dasfoo.rover.android.client.grpc.task.AbstractGrpcTaskExecutor;
import org.dasfoo.rover.android.client.grpc.task.EncodersReadingTask;
import org.dasfoo.rover.android.client.grpc.task.GettingBoardInfoTask;
import org.dasfoo.rover.android.client.grpc.task.GrpcConnection;
import org.dasfoo.rover.android.client.grpc.task.MovingRoverTask;
import org.dasfoo.rover.android.client.menu.MenuFragment;
import org.dasfoo.rover.android.client.menu.SharedPreferencesHandler;
import org.dasfoo.rover.android.client.util.LogUtil;
import org.dasfoo.rover.android.client.util.ResultCallback;

import java.util.List;

import butterknife.BindView;
import butterknife.BindViews;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Main Activity of the application.
 */
public class MainActivity extends AppCompatActivity {
    /**
     * Class information for logging.
     */
    private static final String TAG = LogUtil.tagFor(MainActivity.class);

    /**
     * ButterKnife.apply() callback to enable / disable views (useful for lists).
     */
    private static final ButterKnife.Setter<View, Boolean> ENABLED =
            new ButterKnife.Setter<View, Boolean>() {
                @Override
                public void set(@NonNull final View view, final Boolean value, final int index) {
                    view.setEnabled(value);
                }
            };

    /**
     * All buttons on this activity.
     */
    @BindViews({R.id.move_forward_button, R.id.info_button, R.id.read_encoders_button})
    protected List<Button> mButtons;

    /**
{'fraction_non_alphanumeric': 0.10348093772199858, 'fraction_numerical': 0.0004735969689793985, 'mean_word_length': 3.8164196123147094, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2015300', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1246, 'n_words': 249}