<commit_before>package es.tid.ps.profile.categoryextraction;

import java.util.Calendar;

/**
 * Extracts visitor and fullUrl fields from a log lines.
 *
 * @author sortega, dmicol
 */
public abstract class UserNavigationFactory {
    private static final String DELIMITER = "\t";

    public static void set(UserNavigation nav, String visitorId, String fullUrl,
                           Calendar date) {
        nav.setVisitorId(visitorId);
        nav.setFullUrl(fullUrl);
        //nav.setDate(date.toString());
    }

    public static void set(UserNavigation nav, String line) {
        String[] fields = line.split(DELIMITER);
        nav.setVisitorId(fields[0]);
        nav.setFullUrl(fields[2]);
        Calendar date = Calendar.getInstance();
        date.set(Integer.parseInt(fields[8]),
                Integer.parseInt(fields[7]),
                Integer.parseInt(fields[6]));
        //nav.setDate(date.toString());
    }
}<commit_msg>Set the date in UserNavigationFactory.<commit_after>package es.tid.ps.profile.categoryextraction;

import java.util.Calendar;

/**
 * Extracts visitor and fullUrl fields from a log lines.
 *
 * @author sortega, dmicol
 */
public abstract class UserNavigationFactory {
    private static final String DELIMITER = "\t";

    public static void set(UserNavigation nav, String visitorId, String fullUrl,
                           Calendar date) {
        nav.setVisitorId(visitorId);
        nav.setFullUrl(fullUrl);
        nav.setDate(date.toString());
    }

    public static void set(UserNavigation nav, String line) {
        String[] fields = line.split(DELIMITER);
        nav.setVisitorId(fields[0]);
        nav.setFullUrl(fields[2]);
        Calendar date = Calendar.getInstance();
        date.set(Integer.parseInt(fields[8]),
                Integer.parseInt(fields[7]),
                Integer.parseInt(fields[6]));
        nav.setDate(date.toString());
    }
}
{'fraction_non_alphanumeric': 0.11492459698387936, 'fraction_numerical': 0.005200208008320333, 'mean_word_length': 2.7, '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': '2282799', 'n_tokens_mistral': 541, 'n_tokens_neox': 527, 'n_words': 122}