<commit_before>package com.example.wrench;

import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;

import com.example.wrench.databinding.ActivityMainBinding;
import com.izettle.wrench.preferences.WrenchPreferences;
import com.izettle.wrench.service.WrenchService;

import java.util.Date;


public class MainActivity extends AppCompatActivity {

    private ActivityMainBinding activityMainBinding;

    private WrenchSampleViewModel wrenchSampleViewModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityMainBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);

        setSupportActionBar(activityMainBinding.toolbar);

        wrenchSampleViewModel = ViewModelProviders.of(this).get(WrenchSampleViewModel.class);

        WrenchPreferences wrenchPreferences = new WrenchPreferences(this);

        wrenchSampleViewModel.getStringBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.stringConfiguration.setText(bolt.value);
            }
        });

        wrenchSampleViewModel.getUrlBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.urlConfiguration.setText(bolt.value);
            }
        });

        wrenchSampleViewModel.getBooleanBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.booleanConfiguration.setText(bolt.value);

            }
        });

        wrenchSampleViewModel.getIntBolt().observe(this, bolt -> {<commit_msg>Move field to variable<commit_after>package com.example.wrench;

import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;

import com.example.wrench.databinding.ActivityMainBinding;
import com.izettle.wrench.preferences.WrenchPreferences;
import com.izettle.wrench.service.WrenchService;

import java.util.Date;


public class MainActivity extends AppCompatActivity {

    private ActivityMainBinding activityMainBinding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityMainBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);

        setSupportActionBar(activityMainBinding.toolbar);

        WrenchSampleViewModel wrenchSampleViewModel = ViewModelProviders.of(this).get(WrenchSampleViewModel.class);

        WrenchPreferences wrenchPreferences = new WrenchPreferences(this);

        wrenchSampleViewModel.getStringBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.stringConfiguration.setText(bolt.value);
            }
        });

        wrenchSampleViewModel.getUrlBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.urlConfiguration.setText(bolt.value);
            }
        });

        wrenchSampleViewModel.getBooleanBolt().observe(this, bolt -> {
            if (bolt != null) {
                activityMainBinding.booleanConfiguration.setText(bolt.value);

            }
        });

        wrenchSampleViewModel.getIntBolt().observe(this, bolt -> {
{'fraction_non_alphanumeric': 0.0924706555969081, 'fraction_numerical': 0.000572573718866304, 'mean_word_length': 3.3729662077596996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4441161', 'n_tokens_mistral': 952, 'n_tokens_neox': 883, 'n_words': 139}