<commit_before>package com.medical.medicate;


import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;
import java.util.List;


/**
 * A simple {@link Fragment} subclass.
 */
public class My_Appointment extends Fragment {


    private FirebaseDatabase mdatabase;
    private DatabaseReference mReference;
    private ProgressDialog pDialog;
    private ListView listView;



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


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_my__appointment, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        final String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();
        mdatabase = FirebaseDatabase.getInstance();
        mReference = mdatabase.getReference();

        listView = (ListView) view.findViewById(R.id.list);

        pDialog = new ProgressDialog(getContext());
        pDialog.setCancelable(false);

        pDialog.setMessage("Fetching Form...Please Wait");
        showDialog();

        mReference.child("users").child(userId).child("Book Appointment").addListenerForSingleValueEvent(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {

                final List<String> namesList = new ArrayList<String>();

                for (DataSnapshot messageSnapshot : dataSnapshot.getChildren()) {
                     Message msg = messageSnapshot.getValue(Message.class);
                   if(msg!=null){
                     namesList.add(msg.Fullname);
                   }
                }

                ArrayAdapter<String> areasAdapter = new ArrayAdapter<String>(getActivity(), R.layout.activity_listview, R.id.textView,namesList);
                listView.setAdapter(areasAdapter);
                hideDialog();
               // Toast.makeText(getActivity(),"i am out",Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {
                // Getting Post failed, log a message
                Log.w("Error", "loadPost:onCancelled", databaseError.toException());
                // ...
            }
        });
    }

    public static class  Message{
        String Fullname;
        Message(){}
        Message(String Fullname){
            this.Fullname=Fullname;
        }
    }

    private void showDialog()
    {
        if (!pDialog.isShowing())
            pDialog.show();
    }
<commit_msg>complete pranjal<commit_after>package com.medical.medicate;


import android.app.ListFragment;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * A simple {@link Fragment} subclass.
 */
public class My_Appointment extends Fragment{


    private FirebaseDatabase mdatabase;
    private DatabaseReference mReference;
    private ProgressDialog pDialog;
    private ListView listView;



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


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_my__appointment, container, false);
    }

    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        final String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();
        mdatabase = FirebaseDatabase.getInstance();
        mReference = mdatabase.getReference();

        listView = (ListView) view.findViewById(R.id.list);

        pDialog = new ProgressDialog(getActivity());
        pDialog.setCancelable(false);

        pDialog.setMessage("Fetching Form...Please Wait");
        showDialog();

        mReference.child("users").child(userId).child("Book Appointment").addListenerForSingleValueEvent(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {

                final List<String> namesList = new ArrayList<String>();
                final List<String> datelist = new ArrayList<String>();
                final List<String> timelist = new ArrayList<String>();
                final List<String> approvelist = new ArrayList<String>();


                for (DataSnapshot messageSnapshot : dataSnapshot.getChildren()) {
                     Message msg = messageSnapshot.getValue(Message.class);
                   if(msg!=null){
                     namesList.add(msg.Fullname);
                     datelist.add(msg.Date);
                     timelist.add(msg.Time);
                     approvelist.add(msg.Approved);
                   }
                }

                ArrayAdapter<String> areasAdapter = new ArrayAdapter<String>(getActivity(), R.layout.activity_listview, R.id.textView,namesList);
                listView.setAdapter(areasAdapter);
                hideDialog();
               // Toast.makeText(getActivity(),"i am out",Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {
                // Getting Post failed, log a message
                Log.w("Error", "loadPost:onCancelled", databaseError.toException());
                // ...
            }
        });


    }

    public static class  Message{
        String Fullname,Date,Time,Approved;
        Message(){}
        Message(String Fullname,String Date,String Time,String Approved ){
            this.Fullname=Fullname;
            this.Date=Date;
            this.Time=Time;
            this.Approved=Approved;
        }
    }

    private void showDialog()
    {
        if (!pDialog.isShowing())
            pDialog.show();
    }

{'fraction_non_alphanumeric': 0.09816196057538626, 'fraction_numerical': 0.0002663825253063399, 'mean_word_length': 2.570613409415121, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '371154', 'n_tokens_mistral': 1980, 'n_tokens_neox': 1869, 'n_words': 392}