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

import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.kickstarter.R;
import com.kickstarter.models.Activity;
import com.kickstarter.models.Empty;
import com.kickstarter.models.User;
import com.kickstarter.ui.viewholders.EmptyActivityFeedViewHolder;
import com.kickstarter.ui.viewholders.EmptyViewHolder;
import com.kickstarter.ui.viewholders.FriendBackingViewHolder;
import com.kickstarter.ui.viewholders.FriendFollowViewHolder;
import com.kickstarter.ui.viewholders.KsrViewHolder;
import com.kickstarter.ui.viewholders.ProjectStateChangedPositiveViewHolder;
import com.kickstarter.ui.viewholders.ProjectStateChangedViewHolder;
import com.kickstarter.ui.viewholders.ProjectUpdateViewHolder;

import java.util.Collections;
import java.util.List;

public class ActivityFeedAdapter extends KsrAdapter {
  private final Delegate delegate;

  public interface Delegate extends FriendBackingViewHolder.Delegate, ProjectStateChangedPositiveViewHolder.Delegate,
    ProjectStateChangedViewHolder.Delegate, ProjectUpdateViewHolder.Delegate, EmptyActivityFeedViewHolder.Delegate {}

  public ActivityFeedAdapter(@NonNull final Delegate delegate) {
    this.delegate = delegate;
  }

  public void takeActivities(@NonNull final List<Activity> activities) {
    data().clear();
    if (activities.size() == 0) {
      data().add(Collections.singletonList(Empty.create()));
    } else {
      data().add(activities);
    }
    notifyDataSetChanged();
  }

  public void takeLoggedOutUser(@Nullable final User user) {
    data().add(Collections.singletonList(user));
  }
<commit_msg>clear and notify data set for logged out user<commit_after>package com.kickstarter.ui.adapters;

import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.kickstarter.R;
import com.kickstarter.models.Activity;
import com.kickstarter.models.Empty;
import com.kickstarter.models.User;
import com.kickstarter.ui.viewholders.EmptyActivityFeedViewHolder;
import com.kickstarter.ui.viewholders.EmptyViewHolder;
import com.kickstarter.ui.viewholders.FriendBackingViewHolder;
import com.kickstarter.ui.viewholders.FriendFollowViewHolder;
import com.kickstarter.ui.viewholders.KsrViewHolder;
import com.kickstarter.ui.viewholders.ProjectStateChangedPositiveViewHolder;
import com.kickstarter.ui.viewholders.ProjectStateChangedViewHolder;
import com.kickstarter.ui.viewholders.ProjectUpdateViewHolder;

import java.util.Collections;
import java.util.List;

public class ActivityFeedAdapter extends KsrAdapter {
  private final Delegate delegate;

  public interface Delegate extends FriendBackingViewHolder.Delegate, ProjectStateChangedPositiveViewHolder.Delegate,
    ProjectStateChangedViewHolder.Delegate, ProjectUpdateViewHolder.Delegate, EmptyActivityFeedViewHolder.Delegate {}

  public ActivityFeedAdapter(@NonNull final Delegate delegate) {
    this.delegate = delegate;
  }

  public void takeActivities(@NonNull final List<Activity> activities) {
    data().clear();
    if (activities.size() == 0) {
      data().add(Collections.singletonList(Empty.create()));
    } else {
      data().add(activities);
    }
    notifyDataSetChanged();
  }

  public void takeLoggedOutUser(@Nullable final User user) {
    data().clear();
    data().add(Collections.singletonList(user));
    notifyDataSetChanged();
  }

{'fraction_non_alphanumeric': 0.09420697412823396, 'fraction_numerical': 0.0005624296962879641, 'mean_word_length': 6.085657370517929, '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': '3873627', 'n_tokens_mistral': 1027, 'n_tokens_neox': 959, 'n_words': 178}