<commit_before>package hoopray.safetypongandroid;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.firebase.client.Firebase;

import java.util.UUID;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * @author <NAME> 4/04/2016.
 */
public class NewPlayerFragment extends Fragment
{
    @Bind(R.id.name)
    EditText name;
    @Bind(R.id.start_rating)
    EditText rating;
    @Bind(R.id.save)
    Button save;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        View view = inflater.inflate(R.layout.new_player_layout, container, false);
        ButterKnife.bind(this, view);
        save.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                SafetyPong app = SafetyPong.getInstance();
                Firebase safetyPong = app.firebase.child(FirebaseConstants.LEAGUES).child(app.currentLeagueKey).child(FirebaseConstants.PLAYERS).child(UUID.randomUUID().toString());
                Player player = new Player();
                player.setName(name.getText().toString());
                player.setRating(Integer.valueOf(rating.getText().toString()));
                safetyPong.setValue(player);
            }
        });
        return view;<commit_msg>Unnest Players and make it top level<commit_after>package hoopray.safetypongandroid;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.firebase.client.Firebase;

import java.util.UUID;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * @author <NAME> 4/04/2016.
 */
public class NewPlayerFragment extends Fragment
{
    @Bind(R.id.name)
    EditText name;
    @Bind(R.id.start_rating)
    EditText rating;
    @Bind(R.id.save)
    Button save;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        View view = inflater.inflate(R.layout.new_player_layout, container, false);
        ButterKnife.bind(this, view);
        save.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                SafetyPong app = SafetyPong.getInstance();
                Firebase safetyPong = app.firebase.child(FirebaseConstants.PLAYERS).child(app.currentLeagueKey).child(UUID.randomUUID().toString());
                Player player = new Player();
                player.setName(name.getText().toString());
                player.setRating(Integer.valueOf(rating.getText().toString()));
                safetyPong.setValue(player);
            }
        });
        return view;
{'fraction_non_alphanumeric': 0.10612760581174985, 'fraction_numerical': 0.00505369551484523, 'mean_word_length': 2.963704630788486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '138574', 'n_tokens_mistral': 925, 'n_tokens_neox': 882, 'n_words': 169}