<commit_before>package com.cowbell.cordova.geofence;

import java.util.ArrayList;
import java.util.List;

import android.app.IntentService;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.google.android.gms.location.Geofence;
import com.google.android.gms.location.GeofencingEvent;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.protocol.HTTP;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.AsyncTask;
import android.os.Build;
import java.util.Iterator;
import android.os.SystemClock;
import com.shobshop.shobshopapp.R;

import java.util.ArrayList;
import java.util.List;
import android.location.Location;

public class ReceiveTransitionsIntentService extends IntentService {
    protected static final String GeofenceTransitionIntent = "com.cowbell.cordova.geofence.TRANSITION";
    protected BeepHelper beepHelper;
    protected GeoNotificationNotifier notifier;
    protected GeoNotificationStore store;

    /**
     * Sets an identifier for the service
     */
    public ReceiveTransitionsIntentService() {
        super("ReceiveTransitionsIntentService");
        beepHelper = new BeepHelper();
        store = new GeoNotificationStore(this);
        Logger.setLogger(new Logger(GeofencePlugin.TAG, this, false));
    }

    private boolean isInsideGeofence(GeoNotification geoNotification, Location location){
        int radius = geoNotification.radius;
        Location geoNotiLocation = new Location("dummyLocation");
        geoNotiLocation.setLatitude(geoNotification.latitude);
        geoNotiLocation.setLongitude(geoNotification.longitude);
        return geoNotiLocation.distanceTo(location) <= radius;
    }<commit_msg>[Android] Double radius of the event validation to make it less strict<commit_after>package com.cowbell.cordova.geofence;

import java.util.ArrayList;
import java.util.List;

import android.app.IntentService;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.google.android.gms.location.Geofence;
import com.google.android.gms.location.GeofencingEvent;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.protocol.HTTP;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.AsyncTask;
import android.os.Build;
import java.util.Iterator;
import android.os.SystemClock;
import com.shobshop.shobshopapp.R;

import java.util.ArrayList;
import java.util.List;
import android.location.Location;

public class ReceiveTransitionsIntentService extends IntentService {
    protected static final String GeofenceTransitionIntent = "com.cowbell.cordova.geofence.TRANSITION";
    protected BeepHelper beepHelper;
    protected GeoNotificationNotifier notifier;
    protected GeoNotificationStore store;

    /**
     * Sets an identifier for the service
     */
    public ReceiveTransitionsIntentService() {
        super("ReceiveTransitionsIntentService");
        beepHelper = new BeepHelper();
        store = new GeoNotificationStore(this);
        Logger.setLogger(new Logger(GeofencePlugin.TAG, this, false));
    }

    private boolean isInsideGeofence(GeoNotification geoNotification, Location location){
        int radius = geoNotification.radius;
        Location geoNotiLocation = new Location("dummyLocation");
        geoNotiLocation.setLatitude(geoNotification.latitude);
        geoNotiLocation.setLongitude(geoNotification.longitude);
        // Use doubled radius (in order not to make the filter too strict)
        return geoNotiLocation.distanceTo(location) <= radius * 2;
    }
{'fraction_non_alphanumeric': 0.087865055387714, 'fraction_numerical': 0.00025176233635448137, 'mean_word_length': 4.749638205499276, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7551109', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1084, 'n_words': 238}