<commit_before>package org.wyona.yanel.servlet;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;

import java.util.HashMap;

import org.apache.log4j.Logger;

/**
 *
 */
public class SessionCounter implements HttpSessionListener {

    private static Logger log = Logger.getLogger(SessionCounter.class);

    private static HashMap activeSessions = new HashMap();

    /**
     *
     */
    public void sessionCreated(HttpSessionEvent event) {
        activeSessions.put(event.getSession().getId(), event.getSession());
        log.info("New session created! Current number of active sessions: " + activeSessions.size());
    }

    /**
     *
     */
    public void sessionDestroyed(HttpSessionEvent event) {
        activeSessions.remove(event.getSession().getId());
        log.warn("Session destroyed! Current number of active sessions: " + activeSessions.size());<commit_msg>log4j upgraded<commit_after>package org.wyona.yanel.servlet;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;

import java.util.HashMap;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

/**
 *
 */
public class SessionCounter implements HttpSessionListener {

    private static Logger log = LogManager.getLogger(SessionCounter.class);

    private static HashMap activeSessions = new HashMap();

    /**
     *
     */
    public void sessionCreated(HttpSessionEvent event) {
        activeSessions.put(event.getSession().getId(), event.getSession());
        log.info("New session created! Current number of active sessions: " + activeSessions.size());
    }

    /**
     *
     */
    public void sessionDestroyed(HttpSessionEvent event) {
        activeSessions.remove(event.getSession().getId());
        log.warn("Session destroyed! Current number of active sessions: " + activeSessions.size());
{'fraction_non_alphanumeric': 0.11396873424104892, 'fraction_numerical': 0.002017145738779627, 'mean_word_length': 3.8508557457212715, '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': '4332331', 'n_tokens_mistral': 537, 'n_tokens_neox': 533, 'n_words': 114}