<commit_before>package net.ralphpina.activitymapper.fragments;

import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mapbox.mapboxsdk.constants.Style;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.MapView;

import net.ralphpina.activitymapper.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class MapFragment extends Fragment {

    public final static String TAG = "MapFragment";

    @Bind(R.id.map_view)
    MapView _mapView;

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

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_map, container, false);
        ButterKnife.bind(this, root);

        _mapView.setStyleUrl(Style.MAPBOX_STREETS);
        _mapView.setCenterCoordinate(new LatLng(40.73581, -73.99155));
        _mapView.setZoomLevel(11);
        _mapView.onCreate(savedInstanceState);
        return root;
    }

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

    @Override
    public void onStop() {
        super.onStop();
        _mapView.onStop();
    }

    @Override
    public void onPause() {
        super.onPause();
        _mapView.onPause();
    }

    @Override
    public void onResume() {
        super.onResume();
        _mapView.onResume();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        _mapView.onDestroy();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        _mapView.onSaveInstanceState(outState);
    }
}<commit_msg>center map and show current location<commit_after>package net.ralphpina.activitymapper.fragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mapbox.mapboxsdk.constants.Style;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.MapView;

import net.ralphpina.activitymapper.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class MapFragment extends Fragment {

    public final static String TAG = "MapFragment";

    @Bind(R.id.map_view)
    MapView _mapView;

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

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_map, container, false);
        ButterKnife.bind(this, root);

        _mapView.setStyleUrl(Style.MAPBOX_STREETS);
        _mapView.setZoomLevel(12);
        _mapView.setMyLocationEnabled(true);
        _mapView.onCreate(savedInstanceState);
        return root;
    }

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

    @Override
    public void onStop() {
        super.onStop();
        _mapView.onStop();
    }

    @Override
    public void onPause() {
        super.onPause();
        _mapView.onPause();
    }

    @Override
    public void onResume() {
        super.onResume();
        _mapView.onResume();
        if (_mapView.getMyLocation() != null) {
            final double lat = _mapView.getMyLocation()
                                       .getLatitude();
            final double lng = _mapView.getMyLocation()
                                       .getLongitude();
            LatLng latLng = new LatLng(lat, lng);
            _mapView.setCenterCoordinate(latLng);
        }
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        _mapView.onDestroy();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        _mapView.onSaveInstanceState(outState);
    }
}
{'fraction_non_alphanumeric': 0.0974433188615533, 'fraction_numerical': 0.00482392667631452, 'mean_word_length': 2.5688468158347675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3112266', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1217, 'n_words': 232}