<commit_before>package com.barterli.android;

import android.app.ActionBar;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.SpannableString;
import android.text.Spanned;

import com.barterli.android.widgets.TypefaceCache;
import com.barterli.android.widgets.TypefacedSpan;

/**
 * @author <NAME> Base class for inheriting all other Activities from
 */
public class AbstractBarterLiActivity extends FragmentActivity {

	private static final int ACTION_BAR_DISPLAY_MASK = ActionBar.DISPLAY_HOME_AS_UP
			| ActionBar.DISPLAY_SHOW_TITLE;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (getActionBar() != null) {
			getActionBar().setDisplayOptions(ACTION_BAR_DISPLAY_MASK);
			setActionBarTitle(getTitle().toString());
		}
	}
	
	protected void setActionBarDisplayOptions(int displayOptions) {
		if(getActionBar() != null) {
			getActionBar().setDisplayOptions(displayOptions, ACTION_BAR_DISPLAY_MASK);
		}
	}

	protected final void setActionBarTitle(final String title) {

		final SpannableString s = new SpannableString(title);
		s.setSpan(new TypefacedSpan(this, TypefaceCache.ALEGREYA_BLACK_ITALIC),
				0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

		// Update the action bar title with the TypefaceSpan instance
		final ActionBar actionBar = getActionBar();
		actionBar.setTitle(s);
	}

}
<commit_msg>Added helper method to show toast methods<commit_after>package com.barterli.android;

import android.app.ActionBar;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.SpannableString;
import android.text.Spanned;
import android.widget.Toast;

import com.barterli.android.widgets.TypefaceCache;
import com.barterli.android.widgets.TypefacedSpan;

/**
 * @author <NAME> Base class for inheriting all other Activities from
 */
public class AbstractBarterLiActivity extends FragmentActivity {

	private static final int ACTION_BAR_DISPLAY_MASK = ActionBar.DISPLAY_HOME_AS_UP
			| ActionBar.DISPLAY_SHOW_TITLE;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (getActionBar() != null) {
			getActionBar().setDisplayOptions(ACTION_BAR_DISPLAY_MASK);
			setActionBarTitle(getTitle().toString());
		}
	}
	
	protected void setActionBarDisplayOptions(int displayOptions) {
		if(getActionBar() != null) {
			getActionBar().setDisplayOptions(displayOptions, ACTION_BAR_DISPLAY_MASK);
		}
	}

	protected final void setActionBarTitle(final String title) {

		final SpannableString s = new SpannableString(title);
		s.setSpan(new TypefacedSpan(this, TypefaceCache.ALEGREYA_BLACK_ITALIC),
				0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

		// Update the action bar title with the TypefaceSpan instance
		final ActionBar actionBar = getActionBar();
		actionBar.setTitle(s);
	}
	
	protected void showToast(String toastMessage, boolean isLong) {
		Toast.makeText(this, toastMessage, isLong ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();
	}
	
	protected void showToast(int toastMessageResId, boolean isLong) {
		Toast.makeText(this, toastMessageResId, isLong ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();;
	}

}

{'fraction_non_alphanumeric': 0.0914560770156438, 'fraction_numerical': 0.0012033694344163659, 'mean_word_length': 4.833333333333333, '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': '2369306', 'n_tokens_mistral': 1111, 'n_tokens_neox': 998, 'n_words': 206}