<commit_before>package com.snell.michael.kawaii;

import static com.snell.michael.kawaii.MicroTypes.newMicroType;

/**
 * Utility methods for micro type strings
 */
public class MicroTypeStrings {
    private MicroTypeStrings() {}

    public static <T extends MicroType<String>> T toUpperCase(T microTypeString) {
        if (microTypeString == null) {
            return null;
        } else {
            return newMicroType(microTypeString, microTypeString.value().toUpperCase());
        }
    }

    public static <T extends MicroType<String>> T toLowerCase(T microTypeString) {
        if (microTypeString == null) {
            return null;
        } else {
            //noinspection unchecked
            return newMicroType(microTypeString, microTypeString.value().toLowerCase());
        }
    }
}<commit_msg>Improve cloning<commit_after>package com.snell.michael.kawaii;

import static com.snell.michael.kawaii.MicroTypes.newMicroType;

/**
 * Utility methods for micro type strings
 */
public class MicroTypeStrings {
    private MicroTypeStrings() {}

    public static <T extends MicroType<String>> T toUpperCase(T microTypeString) {
        return microTypeString == null ? null : newMicroType(microTypeString, microTypeString.value().toUpperCase());
    }

    public static <T extends MicroType<String>> T toLowerCase(T microTypeString) {
        return microTypeString == null ? null : newMicroType(microTypeString, microTypeString.value().toLowerCase());
    }

    public static <T extends MicroType<String>> T trim(T microTypeString) {
        return microTypeString == null ? null : newMicroType(microTypeString, microTypeString.value().trim());
    }
}
{'fraction_non_alphanumeric': 0.10256410256410256, 'fraction_numerical': 0.0, 'mean_word_length': 3.4627659574468086, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3631385', 'n_tokens_mistral': 485, 'n_tokens_neox': 464, 'n_words': 111}