<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package info.zamojski.soft.towercollector.dev;

import de.greenrobot.event.EventBus;
import info.zamojski.soft.towercollector.events.MeasurementSavedEvent;
import info.zamojski.soft.towercollector.model.Measurement;
import info.zamojski.soft.towercollector.model.Statistics;
import info.zamojski.soft.towercollector.utils.DateUtils;
import info.zamojski.soft.towercollector.utils.Log;

public class MeasurementMocker {

    private static final String TAG = MeasurementMocker.class.getSimpleName();

    public static void mockMainActivityData() {
        Log.d(TAG, "mockMainActivityData(): mocking data");
        Measurement m = mockLastMeasurement();
        Statistics stats = mockStatistics();
        MeasurementSavedEvent event = new MeasurementSavedEvent(m, stats);
        EventBus.getDefault().postSticky(event);
    }

    private static Measurement mockLastMeasurement() {
        Measurement m = new Measurement();

        m.setTimestamp(System.currentTimeMillis());

        m.setLatitude(52.0693267);
        m.setLongitude(19.4781224);
<commit_msg>Fixed MeasurementMocker not compiling after custom Log removal.<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package info.zamojski.soft.towercollector.dev;

import de.greenrobot.event.EventBus;
import info.zamojski.soft.towercollector.events.MeasurementSavedEvent;
import info.zamojski.soft.towercollector.model.Measurement;
import info.zamojski.soft.towercollector.model.Statistics;
import info.zamojski.soft.towercollector.utils.DateUtils;
import trikita.log.Log;

public class MeasurementMocker {

    private static final String TAG = MeasurementMocker.class.getSimpleName();

    public static void mockMainActivityData() {
        Log.d(TAG, "mockMainActivityData(): mocking data");
        Measurement m = mockLastMeasurement();
        Statistics stats = mockStatistics();
        MeasurementSavedEvent event = new MeasurementSavedEvent(m, stats);
        EventBus.getDefault().postSticky(event);
    }

    private static Measurement mockLastMeasurement() {
        Measurement m = new Measurement();

        m.setTimestamp(System.currentTimeMillis());

        m.setLatitude(52.0693267);
        m.setLongitude(19.4781224);

{'fraction_non_alphanumeric': 0.0970724191063174, 'fraction_numerical': 0.01694915254237288, 'mean_word_length': 4.032945736434108, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4943045', 'n_tokens_mistral': 821, 'n_tokens_neox': 753, 'n_words': 185}