<commit_before>package consulo.webService.plugins;

import com.google.common.collect.Lists;
import com.intellij.lang.Language;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.SingleRootFileViewProvider;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ThrowableConsumer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.io.URLUtil;
import com.intellij.util.io.ZipUtil;
import consulo.container.impl.PluginDescriptorImpl;
import consulo.container.impl.classloader.PluginClassLoaderFactory;
import consulo.container.impl.parser.ExtensionInfo;
import consulo.container.plugin.PluginId;
import consulo.disposer.Disposable;
import consulo.disposer.internal.impl.DisposerInternalImpl;
import consulo.pluginAnalyzer.Analyzer;
import consulo.util.concurrent.atomic.AtomicFieldUpdater;
import consulo.util.dataholder.UserDataHolder;
import consulo.util.lang.ObjectUtil;
import consulo.util.nodep.classloader.UrlClassLoader;
import consulo.util.nodep.map.SimpleMultiMap;
import consulo.util.nodep.xml.node.SimpleXmlElement;
import consulo.webService.UserConfigurationService;
import gnu.trove.THashMap;
import org.jdom.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Nonnull;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.CodeSource;
import java.util.*;

/**
 * @author VISTALL
 * @since 20-Sep-16
 */
@Service
public class PluginAnalyzerService
{
	private static class TreeMultiMap<K, V> extends MultiMap<K, V>
	{
		@Nonnull
		@Override
		protected Map<K, Collection<V>> createMap()
		{
			return new TreeMap<>();
		}

		@Nonnull
		@Override
		protected Collection<V> createCollection()
		{
			return new TreeSet<>();
		}

		@Override
		public void putValues(K key, @Nonnull Collection<? extends V> values)
		{
			if(values.isEmpty())
			{
				return;
			}

			super.putValues(key, values);
		}
	}

	public static class ExtensionsResult
	{
		public MultiMap<String, String> v1 = MultiMap.create();
		public MultiMap<String, String> v2 = MultiMap.create();
	}

	private static final Logger LOGGER = LoggerFactory.getLogger(PluginAnalyzerService.class);

	private final List<URL> platformClassUrls = new ArrayList<>();

	private UserConfigurationService myUserConfigurationService;

	@Autowired
	public PluginAnalyzerService(UserConfigurationService userConfigurationService)
	{
		myUserConfigurationService = userConfigurationService;

		init();
	}

	private void init()
	{
		// core-api
		addUrlByClass(Language.class);
		// core-impl
		addUrlByClass(SingleRootFileViewProvider.class);
		// ui-api
		addUrlByClass("consulo.ui.Component");
		// platform-api
		addUrlByClass("com.intellij.openapi.fileTypes.FileTypeConsumer");
		// platform-impl
		addUrlByClass("com.intellij.concurrency.ApplierCompleter");
		// lang-api
		addUrlByClass("com.intellij.execution.configurations.ConfigurationType");
		// lang-impl
		addUrlByClass("com.intellij.execution.configuration.ConfigurationFactoryEx");
		// compiler-api
		addUrlByClass("com.intellij.packaging.artifacts.ArtifactType");
		// compiler-impl
		addUrlByClass("com.intellij.packaging.impl.elements.ArchivePackagingElement");
		// project-model-api
		addUrlByClass("com.intellij.openapi.roots.ui.configuration.ModulesProvider");
		// project-model-impl
		addUrlByClass("consulo.extension.impl.ModuleExtensionImpl");
		// external-system-api
		addUrlByClass("com.intellij.openapi.externalSystem.model.ExternalProject");
		// external-system-impl
		addUrlByClass("com.intellij.openapi.externalSystem.action.AttachExternalProjectAction");
		// injeting-api
		addUrlByClass("consulo.injecting.InjectingContainerOwner");
		// injecting-pico-impl
		addUrlByClass("consulo.injecting.pico.PicoInjectingContainer");
		// test-impl
		addUrlByClass("consulo.test.light.LightApplicationBuilder");
		// editor-ex
		addUrlByClass("com.intellij.ide.ui.UISettings");
		// logging-api
		addUrlByClass("consulo.logging.Logger");
		// logging-impl
		addUrlByClass("consulo.logging.internal.LoggerFactory");
		// jakarta.inject
		addUrlByClass("jakarta.inject.Inject");
		// container-api
		addUrlByClass(PluginId.class);
		// container-impl
		addUrlByClass(PluginClassLoaderFactory.class);
		// util
		addUrlByClass(ContainerUtil.class);
		// util-collection
		addUrlByClass(consulo.util.collection.ContainerUtil.class);
		// util-lang
		addUrlByClass(ObjectUtil.class);
		// util-concurrent
		addUrlByClass(AtomicFieldUpdater.class);
		// util-dataholder
		addUrlByClass(UserDataHolder.class);
		// util-nodep
		addUrlByClass(UrlClassLoader.class);
		// disposer-api
		addUrlByClass(Disposable.class);
		// disposer-impl
		addUrlByClass(DisposerInternalImpl.class);
		// jdom
		addUrlByClass(Document.class);
		// trove4j
		addUrlByClass(THashMap.class);
		// guava
		addUrlByClass(Lists.class);
		// plugin-analyzer-rt
		addUrlByClass(Analyzer.class);
	}

	private void addUrlByClass(Class<?> clazz)
	{
		addUrlByClass(clazz.getName());
	}
<commit_msg>fix tests<commit_after>package consulo.webService.plugins;

import com.google.common.collect.Lists;
import com.intellij.lang.Language;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.SingleRootFileViewProvider;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ThrowableConsumer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.io.URLUtil;
import com.intellij.util.io.ZipUtil;
import consulo.container.impl.PluginDescriptorImpl;
import consulo.container.impl.classloader.PluginClassLoaderFactory;
import consulo.container.impl.parser.ExtensionInfo;
import consulo.container.plugin.PluginId;
import consulo.disposer.Disposable;
import consulo.disposer.internal.impl.DisposerInternalImpl;
import consulo.pluginAnalyzer.Analyzer;
import consulo.util.concurrent.atomic.AtomicFieldUpdater;
import consulo.util.dataholder.UserDataHolder;
import consulo.util.lang.ObjectUtil;
import consulo.util.nodep.classloader.UrlClassLoader;
import consulo.util.nodep.map.SimpleMultiMap;
import consulo.util.nodep.xml.node.SimpleXmlElement;
import consulo.webService.UserConfigurationService;
import gnu.trove.THashMap;
import org.jdom.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Nonnull;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.CodeSource;
import java.util.*;

/**
 * @author VISTALL
 * @since 20-Sep-16
 */
@Service
public class PluginAnalyzerService
{
	private static class TreeMultiMap<K, V> extends MultiMap<K, V>
	{
		@Nonnull
		@Override
		protected Map<K, Collection<V>> createMap()
		{
			return new TreeMap<>();
		}

		@Nonnull
		@Override
		protected Collection<V> createCollection()
		{
			return new TreeSet<>();
		}

		@Override
		public void putValues(K key, @Nonnull Collection<? extends V> values)
		{
			if(values.isEmpty())
			{
				return;
			}

			super.putValues(key, values);
		}
	}

	public static class ExtensionsResult
	{
		public MultiMap<String, String> v1 = MultiMap.create();
		public MultiMap<String, String> v2 = MultiMap.create();
	}

	private static final Logger LOGGER = LoggerFactory.getLogger(PluginAnalyzerService.class);

	private final List<URL> platformClassUrls = new ArrayList<>();

	private UserConfigurationService myUserConfigurationService;

	@Autowired
	public PluginAnalyzerService(UserConfigurationService userConfigurationService)
	{
		myUserConfigurationService = userConfigurationService;

		init();
	}

	private void init()
	{
		// core-api
		addUrlByClass(Language.class);
		// core-impl
		addUrlByClass(SingleRootFileViewProvider.class);
		// ui-api
		addUrlByClass("consulo.ui.Component");
		// platform-api
		addUrlByClass("com.intellij.openapi.fileTypes.FileTypeConsumer");
		// platform-impl
		addUrlByClass("com.intellij.concurrency.ApplierCompleter");
		// lang-api
		addUrlByClass("com.intellij.execution.configurations.ConfigurationType");
		// lang-impl
		addUrlByClass("com.intellij.execution.configuration.ConfigurationFactoryEx");
		// compiler-api
		addUrlByClass("com.intellij.packaging.artifacts.ArtifactType");
		// compiler-impl
		addUrlByClass("com.intellij.packaging.impl.elements.ArchivePackagingElement");
		// project-model-api
		addUrlByClass("com.intellij.openapi.roots.ui.configuration.ModulesProvider");
		// project-model-impl
		addUrlByClass("consulo.extension.impl.ModuleExtensionImpl");
		// external-system-api
		addUrlByClass("com.intellij.openapi.externalSystem.model.ExternalProject");
		// external-system-impl
		addUrlByClass("com.intellij.openapi.externalSystem.action.AttachExternalProjectAction");
		// injeting-api
		addUrlByClass("consulo.injecting.InjectingContainerOwner");
		// injecting-pico-impl
		addUrlByClass("consulo.injecting.pico.PicoInjectingContainer");
		// test-impl
		addUrlByClass("consulo.test.light.LightApplicationBuilder");
		// editor-ex
		addUrlByClass("com.intellij.ide.ui.UISettings");
		// logging-api
		addUrlByClass("consulo.logging.Logger");
		addUrlByClass("org.slf4j.LoggerFactory");
		// logging-impl
		addUrlByClass("consulo.logging.internal.LoggerFactory");
		// jakarta.inject
		addUrlByClass("jakarta.inject.Inject");
		// container-api
		addUrlByClass(PluginId.class);
		// container-impl
		addUrlByClass(PluginClassLoaderFactory.class);
		// util
		addUrlByClass(ContainerUtil.class);
		// util-collection
		addUrlByClass(consulo.util.collection.ContainerUtil.class);
		// util-lang
		addUrlByClass(ObjectUtil.class);
		// util-serializer
		addUrlByClass("com.intellij.util.xmlb.XmlSerializerImpl");
		// util-jdom
		addUrlByClass("consulo.util.jdom.JDOMUtil");
		// util-io
		addUrlByClass("consulo.util.io.URLUtil");
		// util-concurrent
		addUrlByClass(AtomicFieldUpdater.class);
		// util-dataholder
		addUrlByClass(UserDataHolder.class);
		// util-nodep
		addUrlByClass(UrlClassLoader.class);
		// disposer-api
		addUrlByClass(Disposable.class);
		// disposer-impl
		addUrlByClass(DisposerInternalImpl.class);
		// jdom
		addUrlByClass(Document.class);
		// trove4j
		addUrlByClass(THashMap.class);
		// guava
		addUrlByClass(Lists.class);
		// plugin-analyzer-rt
		addUrlByClass(Analyzer.class);
	}

	private void addUrlByClass(Class<?> clazz)
	{
		addUrlByClass(clazz.getName());
	}

{'fraction_non_alphanumeric': 0.11892240981640373, 'fraction_numerical': 0.0017529292370144847, 'mean_word_length': 5.183685111237878, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '3023103', 'n_tokens_mistral': 3736, 'n_tokens_neox': 3494, 'n_words': 486}