<commit_before>package dateadog.dateadog;

import android.content.Context;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.util.Set;


/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link FormFragment.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link FormFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class FormFragment extends Fragment {
    private OnFragmentInteractionListener mListener;
    private LinearLayout layout;
    private DADAPI DogManager;

    public FormFragment() {
        // Required empty public constructor
    }

    /**
     * Use this factory method to create a new instance of
     * this fragment using the provided parameters.
     *
     * @return A new instance of fragment FormFragment.
     */
    // TODO: Rename and change types and number of parameters
    public static FormFragment newInstance() {
        FormFragment fragment = new FormFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        DogManager = DADAPI.getInstance(getContext().getApplicationContext());
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        //return inflater.inflate(R.layout.fragment_form, container, false);
        View rootView = inflater.inflate(R.layout.fragment_form, container, false);
        layout = (LinearLayout) rootView.findViewById(R.id.formLayout);
        TextView label1 = new TextView(getActivity());
        EditText text1 = new EditText(getActivity());
        label1.setTextSize(25);
        text1.setTextSize(25);
        label1.setText("First Name: ");
        text1.setText("Sally");


        layout.addView(label1);
        layout.addView(text1);

        TextView label2 = new TextView(getActivity());
        EditText text2 = new EditText(getActivity());
        label2.setTextSize(25);
        text2.setTextSize(25);
        label2.setText("Last Name: ");
        text2.setText("Smith");

        layout.addView(label2);
        layout.addView(text2);

        TextView label3 = new TextView(getActivity());
        EditText text3 = new EditText(getActivity());
        label3.setTextSize(25);
        text3.setTextSize(25);
        label3.setText("Email: ");
        text3.setText("<EMAIL>");


        layout.addView(label3);
        layout.addView(text3);

        TextView label4 = new TextView(getActivity());
        EditText text4 = new EditText(getActivity());
        label4.setTextSize(25);
        text4.setTextSize(25);
        label4.setText("Phone number ");
        text4.setText("206-000-1111");

        layout.addView(label4);
        layout.addView(text4);

        TextView label5 = new TextView(getActivity());
        EditText text5 = new EditText(getActivity());
        label5.setTextSize(25);
        text5.setTextSize(25);
        label5.setText("Why do you want to date a dog? ");
        text5.setText("I am looking for my doggie");

        layout.addView(label5);
        layout.addView(text5);

        Button button = new Button(getActivity());
        button.setText("OK");
        button.setGravity(Gravity.CENTER);
        layout.addView(button);
        return rootView;
    }

    // TODO: Rename method, update argument and hook method into UI event<commit_msg>added button listener to form submit button<commit_after>package dateadog.dateadog;

import android.content.Context;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.util.Set;


/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link FormFragment.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link FormFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class FormFragment extends Fragment {
    private OnFragmentInteractionListener mListener;
    private LinearLayout layout;
    private DADAPI DogManager;

    public FormFragment() {
        // Required empty public constructor
    }

    /**
     * Use this factory method to create a new instance of
     * this fragment using the provided parameters.
     *
     * @return A new instance of fragment FormFragment.
     */
    // TODO: Rename and change types and number of parameters
    public static FormFragment newInstance() {
        FormFragment fragment = new FormFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        DogManager = DADAPI.getInstance(getContext().getApplicationContext());
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        getFormData();
        // Inflate the layout for this fragment
        //return inflater.inflate(R.layout.fragment_form, container, false);
        View rootView = inflater.inflate(R.layout.fragment_form, container, false);
        layout = (LinearLayout) rootView.findViewById(R.id.formLayout);
        TextView label1 = new TextView(getActivity());
        EditText text1 = new EditText(getActivity());
        label1.setTextSize(25);
        text1.setTextSize(25);
        label1.setText("First Name: ");
        text1.setText("Sally");


        layout.addView(label1);
        layout.addView(text1);

        TextView label2 = new TextView(getActivity());
        EditText text2 = new EditText(getActivity());
        label2.setTextSize(25);
        text2.setTextSize(25);
        label2.setText("Last Name: ");
        text2.setText("Smith");

        layout.addView(label2);
        layout.addView(text2);

        TextView label3 = new TextView(getActivity());
        EditText text3 = new EditText(getActivity());
        label3.setTextSize(25);
        text3.setTextSize(25);
        label3.setText("Email: ");
        text3.setText("<EMAIL>");


        layout.addView(label3);
        layout.addView(text3);

        TextView label4 = new TextView(getActivity());
        EditText text4 = new EditText(getActivity());
        label4.setTextSize(25);
        text4.setTextSize(25);
        label4.setText("Phone number ");
        text4.setText("206-000-1111");

        layout.addView(label4);
        layout.addView(text4);

        TextView label5 = new TextView(getActivity());
        EditText text5 = new EditText(getActivity());
        label5.setTextSize(25);
        text5.setTextSize(25);
        label5.setText("Why do you want to date a dog? ");
        text5.setText("I am looking for my doggie");

        layout.addView(label5);
        layout.addView(text5);
        System.out.println("hi");
        Button button = new Button(getActivity());
        button.setText("Submit");
        button.setGravity(Gravity.CENTER);
        layout.addView(button);
        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                //need to call DogManager.updateForm(form);
            }
        });
        return rootView;
    }

    // TODO: Rename method, update argument and hook method into UI event
{'fraction_non_alphanumeric': 0.1023238836841465, 'fraction_numerical': 0.017277041002555057, 'mean_word_length': 2.868235294117647, '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': '672120', 'n_tokens_mistral': 2262, 'n_tokens_neox': 2135, 'n_words': 557}