<commit_before>

using System;
using System.Text;

namespace Manos
{
	public class UnsafeString
	{
		private string unsafe_value;
		private string safe_value;
		private bool has_unsafe_data;
		
		public UnsafeString (string str)
		{
			this.unsafe_value = str;
		}
		
		public string UnsafeValue {
			get { return unsafe_value; }	
		}
		
		public string SafeValue {
			get {
				if (safe_value == null)
					safe_value = Escape (unsafe_value, out has_unsafe_data);
				return safe_value;
			}
		}
		
		public bool HasUnsafefData {
			get {
				if (safe_value == null)
					safe_value = Escape (unsafe_value, out has_unsafe_data);
				return has_unsafe_data;
			}
		}
		
		public override string ToString ()
		{
			return SafeValue;
		}
		
		public static implicit operator string (UnsafeString input)
		{
			if (input == null)
				return null;
			return input.ToString ();	
		}
		
		/*
		public static explicit operator string (UnsafeString input)
		{
			return input.ToString ();	
		}
		*/
		
		public static string Escape (string input)
		{
			bool dummy;
			
			return Escape (input, out dummy);
		}
		
		public static string Escape (string input, out bool has_unsafe_data)
		{
			StringBuilder builder = new StringBuilder ();

			has_unsafe_data = false;
			
			for (int i = 0; i < input.Length; i++) {
				char c = input [i];
				
				switch (c) {
				case '&':
					builder.Append ("&amp;");<commit_msg>Remove cruft.<commit_after>

using System;
using System.Text;

namespace Manos
{
	public class UnsafeString
	{
		private string unsafe_value;
		private string safe_value;
		private bool has_unsafe_data;
		
		public UnsafeString (string str)
		{
			this.unsafe_value = str;
		}
		
		public string UnsafeValue {
			get { return unsafe_value; }	
		}
		
		public string SafeValue {
			get {
				if (safe_value == null)
					safe_value = Escape (unsafe_value, out has_unsafe_data);
				return safe_value;
			}
		}
		
		public bool HasUnsafefData {
			get {
				if (safe_value == null)
					safe_value = Escape (unsafe_value, out has_unsafe_data);
				return has_unsafe_data;
			}
		}
		
		public override string ToString ()
		{
			return SafeValue;
		}
		
		public static implicit operator string (UnsafeString input)
		{
			if (input == null)
				return null;
			return input.ToString ();	
		}
		
		public static string Escape (string input)
		{
			bool dummy;
			
			return Escape (input, out dummy);
		}
		
		public static string Escape (string input, out bool has_unsafe_data)
		{
			StringBuilder builder = new StringBuilder ();

			has_unsafe_data = false;
			
			for (int i = 0; i < input.Length; i++) {
				char c = input [i];
				
				switch (c) {
				case '&':
					builder.Append ("&amp;");
{'fraction_non_alphanumeric': 0.09131238447319778, 'fraction_numerical': 0.0007393715341959334, 'mean_word_length': 2.711934156378601, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2340064', 'n_tokens_mistral': 1132, 'n_tokens_neox': 855, 'n_words': 255}