<commit_before>package co.smartreceipts.android.trips;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabaseCorruptException;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;

import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.List;

import javax.inject.Inject;

import co.smartreceipts.android.R;
import co.smartreceipts.android.activities.NavigationHandler;
import co.smartreceipts.android.adapters.TripCardAdapter;
import co.smartreceipts.android.databinding.TripsFragmentLayoutBinding;
import co.smartreceipts.android.date.DateFormatter;
import co.smartreceipts.android.fragments.WBListFragment;
import co.smartreceipts.android.model.Trip;
import co.smartreceipts.android.persistence.LastTripMonitor;
import co.smartreceipts.android.persistence.database.controllers.TableEventsListener;
import co.smartreceipts.android.persistence.database.controllers.impl.TripTableController;
import co.smartreceipts.android.persistence.database.operations.DatabaseOperationMetadata;
import co.smartreceipts.android.purchases.plus.SmartReceiptsTitle;
import co.smartreceipts.android.receipts.ReceiptsFragment;
import co.smartreceipts.android.search.SearchResultKeeper;
import co.smartreceipts.android.search.Searchable;
import co.smartreceipts.android.settings.UserPreferenceManager;
import co.smartreceipts.android.sync.BackupProvidersManager;
import co.smartreceipts.android.tooltip.TooltipPresenter;
import co.smartreceipts.android.tooltip.TooltipView;
import co.smartreceipts.android.tooltip.model.TooltipMetadata;
import co.smartreceipts.android.tooltip.model.TooltipType;
import co.smartreceipts.android.trips.navigation.LastTripAutoNavigationController;
import co.smartreceipts.android.trips.navigation.LastTripAutoNavigationTracker;
import co.smartreceipts.android.trips.navigation.ViewReceiptsInTripRouter;
import co.smartreceipts.analytics.log.Logger;
import co.smartreceipts.android.widget.tooltip.Tooltip;
import co.smartreceipts.android.workers.EmailAssistant;
import dagger.android.support.AndroidSupportInjection;
import io.reactivex.Observable;
import wb.android.flex.Flex;

public class TripFragment extends WBListFragment implements TableEventsListener<Trip>,
        AdapterView.OnItemLongClickListener, TooltipView, ViewReceiptsInTripRouter {

    private static final String OUT_SELECTED_TRIP = "out_selected_trip";

    @Inject
    Flex flex;

    @Inject
    SmartReceiptsTitle smartReceiptsTitle;

    @Inject
    TripTableController tripTableController;

    @Inject
    BackupProvidersManager backupProvidersManager;

    @Inject
    UserPreferenceManager preferenceManager;

    @Inject
    NavigationHandler navigationHandler;

    @Inject
    TooltipPresenter tooltipPresenter;

    @Inject
    LastTripAutoNavigationController lastTripAutoNavigationController;

    @Inject
    LastTripMonitor lastTripMonitor;

    @Inject
    LastTripAutoNavigationTracker lastTripAutoNavigationTracker;

    @Inject
    DateFormatter dateFormatter;

    private TripCardAdapter tripCardAdapter;


    private ProgressBar progressBar;
    private TextView noDataAlert;
    private Tooltip tooltipView;

    private Trip selectedTrip;

    private boolean hasResults = false;

    private TripsFragmentLayoutBinding binding;

    public static TripFragment newInstance() {
        return new TripFragment();
    }

    @Override
    public void onAttach(@NonNull Context context) {
        AndroidSupportInjection.inject(this);<commit_msg>removing whitespace<commit_after>package co.smartreceipts.android.trips;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabaseCorruptException;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;

import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.List;

import javax.inject.Inject;

import co.smartreceipts.android.R;
import co.smartreceipts.android.activities.NavigationHandler;
import co.smartreceipts.android.adapters.TripCardAdapter;
import co.smartreceipts.android.databinding.TripsFragmentLayoutBinding;
import co.smartreceipts.android.date.DateFormatter;
import co.smartreceipts.android.fragments.WBListFragment;
import co.smartreceipts.android.model.Trip;
import co.smartreceipts.android.persistence.LastTripMonitor;
import co.smartreceipts.android.persistence.database.controllers.TableEventsListener;
import co.smartreceipts.android.persistence.database.controllers.impl.TripTableController;
import co.smartreceipts.android.persistence.database.operations.DatabaseOperationMetadata;
import co.smartreceipts.android.purchases.plus.SmartReceiptsTitle;
import co.smartreceipts.android.receipts.ReceiptsFragment;
import co.smartreceipts.android.search.SearchResultKeeper;
import co.smartreceipts.android.search.Searchable;
import co.smartreceipts.android.settings.UserPreferenceManager;
import co.smartreceipts.android.sync.BackupProvidersManager;
import co.smartreceipts.android.tooltip.TooltipPresenter;
import co.smartreceipts.android.tooltip.TooltipView;
import co.smartreceipts.android.tooltip.model.TooltipMetadata;
import co.smartreceipts.android.tooltip.model.TooltipType;
import co.smartreceipts.android.trips.navigation.LastTripAutoNavigationController;
import co.smartreceipts.android.trips.navigation.LastTripAutoNavigationTracker;
import co.smartreceipts.android.trips.navigation.ViewReceiptsInTripRouter;
import co.smartreceipts.analytics.log.Logger;
import co.smartreceipts.android.widget.tooltip.Tooltip;
import co.smartreceipts.android.workers.EmailAssistant;
import dagger.android.support.AndroidSupportInjection;
import io.reactivex.Observable;
import wb.android.flex.Flex;

public class TripFragment extends WBListFragment implements TableEventsListener<Trip>,
        AdapterView.OnItemLongClickListener, TooltipView, ViewReceiptsInTripRouter {

    private static final String OUT_SELECTED_TRIP = "out_selected_trip";

    @Inject
    Flex flex;

    @Inject
    SmartReceiptsTitle smartReceiptsTitle;

    @Inject
    TripTableController tripTableController;

    @Inject
    BackupProvidersManager backupProvidersManager;

    @Inject
    UserPreferenceManager preferenceManager;

    @Inject
    NavigationHandler navigationHandler;

    @Inject
    TooltipPresenter tooltipPresenter;

    @Inject
    LastTripAutoNavigationController lastTripAutoNavigationController;

    @Inject
    LastTripMonitor lastTripMonitor;

    @Inject
    LastTripAutoNavigationTracker lastTripAutoNavigationTracker;

    @Inject
    DateFormatter dateFormatter;

    private TripCardAdapter tripCardAdapter;

    private ProgressBar progressBar;
    private TextView noDataAlert;
    private Tooltip tooltipView;

    private Trip selectedTrip;

    private boolean hasResults = false;

    private TripsFragmentLayoutBinding binding;

    public static TripFragment newInstance() {
        return new TripFragment();
    }

    @Override
    public void onAttach(@NonNull Context context) {
        AndroidSupportInjection.inject(this);
{'fraction_non_alphanumeric': 0.07369323050556983, 'fraction_numerical': 0.0, 'mean_word_length': 6.0981754995655955, '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': '6541121', 'n_tokens_mistral': 2417, 'n_tokens_neox': 2317, 'n_words': 390}