<commit_before>package com.orgecc.calltimer;

import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Date;
import java.util.Map;

import org.slf4j.Logger;

class BaseCallTimer implements CallTimer {

    static final String HEADER =
            "YYYY-MM-DD HH:mm:ss.sss\tlevel\tTBID\tms\tinsize\toutsize\touttype\tmethod\tclass";

    private static final String MSG_FORMAT = "%s\t%s\t%s\t%s\t%s\t%s";

    private static final String TO_STRING_FORMAT =
            "%s:%s [%s %s.%s inputSize=%s, outputSize=%s, output=%s, callEnded=%s]";

    static Logger saveHeader( final Logger logger ) {
        logger.warn( HEADER );
        return logger;
    }

    static String normalizeOutMessage( final String s ) {
        return s.replace( '\t', ' ' );
    }

    @SuppressWarnings( "rawtypes" )
    private static Integer getSize( final Object output ) {

        if ( output instanceof String ) {
            return ( (String) output ).length();
        }

        if ( output instanceof Collection ) {
            return ( (Collection) output ).size();
        }

        if ( output instanceof Map ) {<commit_msg>normalizeOutMessage: omits prefix 'java.lang.'<commit_after>package com.orgecc.calltimer;

import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Date;
import java.util.Map;

import org.slf4j.Logger;

class BaseCallTimer implements CallTimer {

    static final String HEADER =
            "YYYY-MM-DD HH:mm:ss.sss\tlevel\tTBID\tms\tinsize\toutsize\touttype\tmethod\tclass";

    private static final String MSG_FORMAT = "%s\t%s\t%s\t%s\t%s\t%s";

    private static final String TO_STRING_FORMAT =
            "%s:%s [%s %s.%s inputSize=%s, outputSize=%s, output=%s, callEnded=%s]";

    private static final String TYPE_PREFIX_TO_OMIT = "java.lang.";

    static Logger saveHeader( final Logger logger ) {
        logger.warn( HEADER );
        return logger;
    }

    static String normalizeOutMessage( final String s ) {
        return ( s.startsWith( TYPE_PREFIX_TO_OMIT ) ? s.substring( TYPE_PREFIX_TO_OMIT.length() )
                : s ).replace( '\t', ' ' );
    }

    @SuppressWarnings( "rawtypes" )
    private static Integer getSize( final Object output ) {

        if ( output instanceof String ) {
            return ( (String) output ).length();
        }

        if ( output instanceof Collection ) {
            return ( (Collection) output ).size();
        }

        if ( output instanceof Map ) {
{'fraction_non_alphanumeric': 0.11996779388083736, 'fraction_numerical': 0.0008051529790660225, 'mean_word_length': 2.6924219910846956, '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': '2139376', 'n_tokens_mistral': 786, 'n_tokens_neox': 764, 'n_words': 190}