<commit_before>package ca.josephroque.bowlingcompanion.utilities;

import android.content.Intent;
import android.net.Uri;

/**
 * Created by josephroque on 15-03-24.
 * <p/>
 * Location ca.josephroque.bowlingcompanion.utilities
 * in project Bowling Companion
 */
public class EmailUtils
{
    public static Intent getEmailIntent(
            String recipientEmail,
            String emailSubject,
            String emailBody)
    {
        Intent emailIntent = new Intent(Intent.ACTION_SEND);
        emailIntent.setData(Uri.parse("mailto:"));
        emailIntent.setType("message/rfc822");
        emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{recipientEmail});
        emailIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
        emailIntent.putExtra(Intent.EXTRA_TEXT, emailBody);

        return emailIntent;
    }

    public static Intent getEmailIntent(
            String recipientEmail,
            String emailSubject)
    {
        return getEmailIntent(recipientEmail, emailSubject, "");
    }
}<commit_msg>Added documentation<commit_after>package ca.josephroque.bowlingcompanion.utilities;

import android.content.Intent;
import android.net.Uri;

/**
 * Created by josephroque on 15-03-24.
 * <p/>
 * Location ca.josephroque.bowlingcompanion.utilities
 * in project Bowling Companion
 */
public class EmailUtils
{

    /**
     * Creates an email intent and sets values to parameters
     * @param recipientEmail email recipient
     * @param emailSubject subject of the email
     * @param emailBody body of the email
     * @return new email intent
     */
    public static Intent getEmailIntent(
            String recipientEmail,
            String emailSubject,
            String emailBody)
    {
        if (emailBody == null)
            emailBody = "";

        Intent emailIntent = new Intent(Intent.ACTION_SEND);
        emailIntent.setData(Uri.parse("mailto:"));
        emailIntent.setType("message/rfc822");
        emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{recipientEmail});
        emailIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
        emailIntent.putExtra(Intent.EXTRA_TEXT, emailBody);

        return emailIntent;
    }

    /**
     * Creates an intent and sets values to parameters
     * @param recipientEmail email recipient
     * @param emailSubject subject of the email
     * @return getEmailIntent(recipientEmail, emailSubject, null)
     */
    public static Intent getEmailIntent(
            String recipientEmail,
            String emailSubject)
    {
        return getEmailIntent(recipientEmail, emailSubject, null);
    }
}
{'fraction_non_alphanumeric': 0.08725602755453502, 'fraction_numerical': 0.006888633754305396, 'mean_word_length': 2.901492537313433, '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': '5632190', 'n_tokens_mistral': 737, 'n_tokens_neox': 711, 'n_words': 171}