<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.safehaus.kiskis.mgmt.shared.protocol;

import java.util.Collection;
import java.util.Set;

/**
 *
 * @author dilshat
 */
public class Util {

    public static boolean isStringEmpty(String str) {
        return str == null || str.trim().isEmpty();
    }

    public static boolean isCollectionEmpty(Collection col) {
        return col == null || col.isEmpty();
    }

    public static Set retainValues(Set col1, Set col2) {
        if (col1 == null || col2 == null) {
            return null;
        } else {
            col1.retainAll(col2);
            return col1;
        }
    }
}<commit_msg>mongo UI in progress<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.safehaus.kiskis.mgmt.shared.protocol;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author dilshat
 */
public class Util {

    public static boolean isStringEmpty(String str) {
        return str == null || str.trim().isEmpty();
    }

    public static boolean isCollectionEmpty(Collection col) {
        return col == null || col.isEmpty();
    }

    public static Set retainValues(Set col1, Set col2) {
        if (col1 == null || col2 == null) {
            return null;
        } else {
            Set tmp = new HashSet(col1);
            tmp.retainAll(col2);
            return tmp;
        }
    }
}
{'fraction_non_alphanumeric': 0.10672169811320754, 'fraction_numerical': 0.0076650943396226415, 'mean_word_length': 2.470347648261759, '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': '3638457', 'n_tokens_mistral': 486, 'n_tokens_neox': 478, 'n_words': 157}