<commit_before>package com.diamondq.common.xmpp;

import com.diamondq.common.config.Config;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSortedSet;

import java.util.List;
import java.util.SortedSet;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xbill.DNS.Lookup;
import org.xbill.DNS.Name;
import org.xbill.DNS.Record;
import org.xbill.DNS.SRVRecord;
import org.xbill.DNS.TXTRecord;
import org.xbill.DNS.TextParseException;
import org.xbill.DNS.Type;

@ApplicationScoped
public class XMPPServerLookup {

	private static final Logger	sLogger	= LoggerFactory.getLogger(XMPPServerLookup.class);

	private final Config		mConfig;

	public XMPPServerLookup() {
		throw new IllegalArgumentException();
	}

	@Inject
	public XMPPServerLookup(Config pConfig) {
		mConfig = pConfig;
	}

	/**
	 * Find the list of XMPP Servers both from Config and from DNS Lookup
	 * 
	 * @param pDNSDomain the DNS Domain to search (if null, don't search)
	 * @return the list of servers, sorted in access order
	 */
	public SortedSet<XMPPServerInfo> getXMPPServerList(@Nullable String pDNSDomain) {

		ImmutableSortedSet.Builder<XMPPServerInfo> builder = ImmutableSortedSet.naturalOrder();

		if (pDNSDomain != null) {
<commit_msg>Enabled the XMPPServerLookup to be CDI Proxied.<commit_after>package com.diamondq.common.xmpp;

import com.diamondq.common.config.Config;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSortedSet;

import java.util.List;
import java.util.SortedSet;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xbill.DNS.Lookup;
import org.xbill.DNS.Name;
import org.xbill.DNS.Record;
import org.xbill.DNS.SRVRecord;
import org.xbill.DNS.TXTRecord;
import org.xbill.DNS.TextParseException;
import org.xbill.DNS.Type;

@ApplicationScoped
public class XMPPServerLookup {

	private static final Logger	sLogger	= LoggerFactory.getLogger(XMPPServerLookup.class);

	private final Config		mConfig;

	@SuppressWarnings("null")
	XMPPServerLookup() {
		mConfig = null;
	}

	@Inject
	private XMPPServerLookup(Config pConfig) {
		mConfig = pConfig;
	}

	/**
	 * Find the list of XMPP Servers both from Config and from DNS Lookup
	 *
	 * @param pDNSDomain the DNS Domain to search (if null, don't search)
	 * @return the list of servers, sorted in access order
	 */
	public SortedSet<XMPPServerInfo> getXMPPServerList(@Nullable String pDNSDomain) {

		ImmutableSortedSet.Builder<XMPPServerInfo> builder = ImmutableSortedSet.naturalOrder();

		if (pDNSDomain != null) {

{'fraction_non_alphanumeric': 0.09455687369155617, 'fraction_numerical': 0.0013956734124214933, 'mean_word_length': 5.314977973568282, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6350254', 'n_tokens_mistral': 1010, 'n_tokens_neox': 966, 'n_words': 215}