<commit_before>package wb.receipts.analytics;

import wb.receipts.R;
import wb.receipts.SmartReceiptsFreeApplication;
import android.app.Activity;
import android.app.Application;
import android.support.v4.app.Fragment;

import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

public class Events {

	public static final void sendEvent(Activity activity, String category, String action) {
		if (activity != null) {
			Application application = activity.getApplication();
			if (application instanceof SmartReceiptsFreeApplication) {
				Tracker tracker = ((SmartReceiptsFreeApplication) application).getTracker(R.xml.analytics);
				if (tracker != null) {
					tracker.send(new HitBuilders.EventBuilder(category, action).build());
				}
			}
		}
	}

	public static final void sendEvent(Fragment fragment, String category, String action) {
		if (fragment != null) {
			Events.sendEvent(fragment.getActivity(), action, category);
		}
	}
}<commit_msg>Fixed a bug in which the category and action were incorrectly swapped<commit_after>package wb.receipts.analytics;

import wb.receipts.R;
import wb.receipts.SmartReceiptsFreeApplication;
import android.app.Activity;
import android.app.Application;
import android.support.v4.app.Fragment;

import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

public class Events {

	public static final void sendEvent(Activity activity, String category, String action) {
		if (activity != null) {
			Application application = activity.getApplication();
			if (application instanceof SmartReceiptsFreeApplication) {
				Tracker tracker = ((SmartReceiptsFreeApplication) application).getTracker(R.xml.analytics);
				if (tracker != null) {
					tracker.send(new HitBuilders.EventBuilder(category, action).build());
				}
			}
		}
	}

	public static final void sendEvent(Fragment fragment, String category, String action) {
		if (fragment != null) {
			Events.sendEvent(fragment.getActivity(), category, action);
		}
	}
}
{'fraction_non_alphanumeric': 0.10469667318982387, 'fraction_numerical': 0.0009784735812133072, 'mean_word_length': 5.086309523809524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6271903', 'n_tokens_mistral': 664, 'n_tokens_neox': 589, 'n_words': 141}