<commit_before>package com.novoda.downloadmanager.lib;

import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

class BatchCompletionBroadcaster {
    static final String ACTION_BATCH_COMPLETE = "com.novoda.downloadmanager.BATCH_COMPLETE";
    static final String EXTRA_BATCH_ID = "com.novoda.downloadmanager.EXTRA.batch_id";

    private final LocalBroadcastManager localBroadcastManager;
    private final String packageName;

    public static BatchCompletionBroadcaster newInstance(Context context) {
        return new BatchCompletionBroadcaster(LocalBroadcastManager.getInstance(context), context.getApplicationContext().getPackageName());
    }

    BatchCompletionBroadcaster(LocalBroadcastManager localBroadcastManager, String packageName) {
        this.localBroadcastManager = localBroadcastManager;
        this.packageName = packageName;
    }

    public void notifyBatchCompletedFor(long batchId) {
        Intent intent = new Intent(DownloadManager.ACTION_BATCH_COMPLETE);
        intent.setPackage(packageName);
        intent.putExtra(DownloadManager.EXTRA_BATCH_ID, batchId);
        localBroadcastManager.sendBroadcast(intent);
    }
}<commit_msg>Reference local constants<commit_after>package com.novoda.downloadmanager.lib;

import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

class BatchCompletionBroadcaster {
    static final String ACTION_BATCH_COMPLETE = "com.novoda.downloadmanager.BATCH_COMPLETE";
    static final String EXTRA_BATCH_ID = "com.novoda.downloadmanager.EXTRA.batch_id";

    private final LocalBroadcastManager localBroadcastManager;
    private final String packageName;

    public static BatchCompletionBroadcaster newInstance(Context context) {
        return new BatchCompletionBroadcaster(LocalBroadcastManager.getInstance(context), context.getApplicationContext().getPackageName());
    }

    BatchCompletionBroadcaster(LocalBroadcastManager localBroadcastManager, String packageName) {
        this.localBroadcastManager = localBroadcastManager;
        this.packageName = packageName;
    }

    public void notifyBatchCompletedFor(long batchId) {
        Intent intent = new Intent(ACTION_BATCH_COMPLETE);
        intent.setPackage(packageName);
        intent.putExtra(EXTRA_BATCH_ID, batchId);
        localBroadcastManager.sendBroadcast(intent);
    }
}
{'fraction_non_alphanumeric': 0.07119476268412439, 'fraction_numerical': 0.0008183306055646482, 'mean_word_length': 5.12781954887218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7664137', 'n_tokens_mistral': 649, 'n_tokens_neox': 635, 'n_words': 116}