<commit_before>package com.kickstarter.ui.adapters;

import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.kickstarter.R;
import com.kickstarter.models.User;
import com.kickstarter.ui.activities.HelpActivity;
import com.kickstarter.ui.activities.ProfileActivity;
import com.kickstarter.ui.activities.SettingsActivity;
import com.kickstarter.ui.viewholders.LoggedInMenuProfileViewHolder;
import com.kickstarter.ui.viewholders.LoggedInMenuViewHolder;

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

import butterknife.BindString;

public final class LoggedInMenuAdapter extends BaseAdapter {
  @BindString(R.string.profile_buttons_settings) String settingsString;
  @BindString(R.string.general_navigation_buttons_help) String helpString;

  private static final int ROW_PROFILE = 0;
  private static final int ROW_SETTINGS = 1;
  private static final int ROW_HELP = 2;

  private final Context context;
  private final User user;

  private List<String> rows = new ArrayList<>();

  public LoggedInMenuAdapter(final @NonNull Context context, final @NonNull User user) {
    this.context = context;
    this.user = user;

    rows.add(ROW_PROFILE, user.name());
    rows.add(ROW_SETTINGS, settingsString);
    rows.add(ROW_HELP, helpString);
    notifyDataSetChanged();
  }

  @Override
  public int getCount() {
    return rows.size();
  }

  @Override
  public String getItem(final int position) {<commit_msg>fix null strings in loggedin popup<commit_after>package com.kickstarter.ui.adapters;

import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.kickstarter.R;
import com.kickstarter.models.User;
import com.kickstarter.ui.activities.HelpActivity;
import com.kickstarter.ui.activities.ProfileActivity;
import com.kickstarter.ui.activities.SettingsActivity;
import com.kickstarter.ui.viewholders.LoggedInMenuProfileViewHolder;
import com.kickstarter.ui.viewholders.LoggedInMenuViewHolder;

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

public final class LoggedInMenuAdapter extends BaseAdapter {
  private static final int ROW_PROFILE = 0;
  private static final int ROW_SETTINGS = 1;
  private static final int ROW_HELP = 2;

  private final Context context;
  private final User user;

  private List<String> rows = new ArrayList<>();

  public LoggedInMenuAdapter(final @NonNull Context context, final @NonNull User user) {
    this.context = context;
    this.user = user;

    rows.add(ROW_PROFILE, user.name());
    rows.add(ROW_SETTINGS, context.getResources().getString(R.string.profile_buttons_settings));
    rows.add(ROW_HELP, context.getResources().getString(R.string.general_navigation_buttons_help));
    notifyDataSetChanged();
  }

  @Override
  public int getCount() {
    return rows.size();
  }

  @Override
  public String getItem(final int position) {
{'fraction_non_alphanumeric': 0.09219422249539029, 'fraction_numerical': 0.0018438844499078057, 'mean_word_length': 5.420118343195266, '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': '3751863', 'n_tokens_mistral': 993, 'n_tokens_neox': 946, 'n_words': 223}