<commit_before>﻿namespace SIM.Products
{
  using System;
  using System.Collections.Generic;
  using System.Configuration;
  using System.IO;
  using System.Linq;
  using Sitecore.Diagnostics.Base;
  using JetBrains.Annotations;
  using Sitecore.Diagnostics.Logging;
  using SIM.Extensions;

  #region

  #endregion

  public static class ProductManager
  {
    #region Delegates

    public static event Action ProductManagerInitialized;

    #endregion

    #region Properties

    [NotNull]
    public static IEnumerable<Product> StandaloneProducts
    {
      get
      {
        return Products.Where(p => p.IsStandalone).OrderByDescending(p => p.SortOrder);
      }
    }

    #endregion

    #region Public Methods

    public static Product GetProduct(FileInfo file)
    {
      return GetProduct(file.FullName);
    }

    [NotNull]
    public static Product GetProduct([NotNull] string productName)
    {
      Assert.ArgumentNotNull(productName, nameof(productName));
      var product = Products.FirstOrDefault(p => p.ToString().EqualsIgnoreCase(productName));
      if (product != null)
      {
        return product;
      }

      var hotfixPos = productName.ToLowerInvariant().IndexOf("hotfix");
      if (hotfixPos >= 0)
      {
        var productNameWithoutHotfix = productName.Substring(0, hotfixPos).TrimEnd();
        product = Products.FirstOrDefault(p => p.ToString().EqualsIgnoreCase(productNameWithoutHotfix));
        if (product != null)
        {
          return product;
        }
      }

      return Product.Parse(productName);
    }

    public static void Initialize([NotNull] string localRepository)
    {
      Assert.ArgumentNotNull(localRepository, nameof(localRepository));
<commit_msg>Fix reinstalling 9.0.0 (closes #215)<commit_after>﻿namespace SIM.Products
{
  using System;
  using System.Collections.Generic;
  using System.Configuration;
  using System.IO;
  using System.Linq;
  using Sitecore.Diagnostics.Base;
  using JetBrains.Annotations;
  using Sitecore.Diagnostics.Logging;
  using SIM.Extensions;

  #region

  #endregion

  public static class ProductManager
  {
    #region Delegates

    public static event Action ProductManagerInitialized;

    #endregion

    #region Properties

    [NotNull]
    public static IEnumerable<Product> StandaloneProducts
    {
      get
      {
        return Products.Where(p => p.IsStandalone).OrderByDescending(p => p.SortOrder);
      }
    }

    #endregion

    #region Public Methods

    public static Product GetProduct(FileInfo file)
    {
      return GetProduct(file.FullName);
    }

    [NotNull]
    public static Product GetProduct([NotNull] string productName)
    {
      Assert.ArgumentNotNull(productName, nameof(productName));
      var product = Products.FirstOrDefault(p => p.ToString().EqualsIgnoreCase(productName));
      if (product == null)
      {
        product = Products.FirstOrDefault(p => p.ToString().EqualsIgnoreCase(productName.Replace(".0.0", ".0")));
      }

      if (product != null)
      {
        return product;
      }

      var hotfixPos = productName.ToLowerInvariant().IndexOf("hotfix");
      if (hotfixPos >= 0)
      {
        var productNameWithoutHotfix = productName.Substring(0, hotfixPos).TrimEnd();
        product = Products.FirstOrDefault(p => p.ToString().EqualsIgnoreCase(productNameWithoutHotfix));
        if (product != null)
        {
          return product;
        }
      }

      return Product.Parse(productName);
    }

    public static void Initialize([NotNull] string localRepository)
    {
      Assert.ArgumentNotNull(localRepository, nameof(localRepository));

{'fraction_non_alphanumeric': 0.0976079186142425, 'fraction_numerical': 0.0035743744844652188, 'mean_word_length': 2.9586507072905333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '5430905', 'n_tokens_mistral': 1033, 'n_tokens_neox': 1001, 'n_words': 217}