<commit_before>package com.adp.loadercustom;

import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import com.adp.loadercustom.loader.AppEntry;
import com.adp.loadercustom.loader.AppListLoader;

/**
 * The main activity holds an {@link AppListFragment} which displays the list of
 * all installed applications on the device.
 */
public class MainActivity extends FragmentActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Create the ListFragment and add it as our sole content.
    FragmentManager fm = getSupportFragmentManager();
    if (fm.findFragmentById(android.R.id.content) == null) {
      AppListFragment list = new AppListFragment();
      fm.beginTransaction().add(android.R.id.content, list).commit();
    }
  }

  /**
   * This ListFragment displays a list of all installed applications on the
   * device as its sole content. It uses an {@link AppListLoader} to load
   * its data and the LoaderManager to manage the loader across the activity
   * and fragment life cycles.
   */
  public static class AppListFragment extends ListFragment implements
      LoaderManager.LoaderCallbacks<List<AppEntry>> {
    private static final String TAG = "ADP_AppListFragment";
    private static final boolean DEBUG = true;

    // We use a custom ArrayAdapter to bind application info to the ListView.
    private AppListAdapter mAdapter;

    // The Loader's id (this id is specific to the ListFragment's LoaderManager)
    private static final int LOADER_ID = 0x01;

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
      setHasOptionsMenu(true);

      mAdapter = new AppListAdapter(getActivity());<commit_msg>Changed the Loader's ID from "0x01" to "1".<commit_after>package com.adp.loadercustom;

import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import com.adp.loadercustom.loader.AppEntry;
import com.adp.loadercustom.loader.AppListLoader;

/**
 * The main activity holds an {@link AppListFragment} which displays the list of
 * all installed applications on the device.
 */
public class MainActivity extends FragmentActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Create the ListFragment and add it as our sole content.
    FragmentManager fm = getSupportFragmentManager();
    if (fm.findFragmentById(android.R.id.content) == null) {
      AppListFragment list = new AppListFragment();
      fm.beginTransaction().add(android.R.id.content, list).commit();
    }
  }

  /**
   * This ListFragment displays a list of all installed applications on the
   * device as its sole content. It uses an {@link AppListLoader} to load
   * its data and the LoaderManager to manage the loader across the activity
   * and fragment life cycles.
   */
  public static class AppListFragment extends ListFragment implements
      LoaderManager.LoaderCallbacks<List<AppEntry>> {
    private static final String TAG = "ADP_AppListFragment";
    private static final boolean DEBUG = true;

    // We use a custom ArrayAdapter to bind application info to the ListView.
    private AppListAdapter mAdapter;

    // The Loader's id (this id is specific to the ListFragment's LoaderManager)
    private static final int LOADER_ID = 1;

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
      setHasOptionsMenu(true);

      mAdapter = new AppListAdapter(getActivity());
{'fraction_non_alphanumeric': 0.08274285714285715, 'fraction_numerical': 0.004114285714285714, 'mean_word_length': 4.265944645006017, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4321500', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1163, 'n_words': 374}