<commit_before>﻿using MongoDB.Bson;
using System;
using System.Linq;

namespace MongoFramework.Bson
{
	public class BsonDiff
	{
		public static bool HasDifferences(BsonDocument documentA, BsonDocument documentB)
		{
			if (documentA == null && documentB == null)
			{
				return false;
			}
			else if (documentA == null || documentB == null || documentA.ElementCount != documentB.ElementCount)
			{
				return true;
			}

			var propertyNames = documentA.Names.Union(documentB.Names);

			foreach (var propertyName in propertyNames)
			{
				if (!documentB.Contains(propertyName))
				{
					return true;
				}
				else
				{
					var propertyHasDifference = HasDifferences(documentA[propertyName], documentB[propertyName]);
					if (propertyHasDifference)<commit_msg>Set BsonDiff back to being a static class<commit_after>﻿using MongoDB.Bson;
using System;
using System.Linq;

namespace MongoFramework.Bson
{
	public static class BsonDiff
	{
		public static bool HasDifferences(BsonDocument documentA, BsonDocument documentB)
		{
			if (documentA == null && documentB == null)
			{
				return false;
			}
			else if (documentA == null || documentB == null || documentA.ElementCount != documentB.ElementCount)
			{
				return true;
			}

			var propertyNames = documentA.Names.Union(documentB.Names);

			foreach (var propertyName in propertyNames)
			{
				if (!documentB.Contains(propertyName))
				{
					return true;
				}
				else
				{
					var propertyHasDifference = HasDifferences(documentA[propertyName], documentB[propertyName]);
					if (propertyHasDifference)
{'fraction_non_alphanumeric': 0.09535918626827718, 'fraction_numerical': 0.0, 'mean_word_length': 3.7267267267267266, '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': '2951751', 'n_tokens_mistral': 583, 'n_tokens_neox': 465, 'n_words': 115}