<commit_before>﻿using System;

namespace Ocell.Library
{
    public struct TwitterResource
    {        
        public ResourceType Type { get; set;}
        public UserToken User { get; set;}
        private string _data;
        public string Data
        {
            get
            {
                if (_data == null)
                    return "";
                else
                    return _data;
            }
            set
            {
                _data = value;
            }
        }
        public string String
        {
            get
            {
                string value = User.ScreenName + ";";
                switch (Type)
                {
                    case ResourceType.Favorites:
                        value+="Favorites";
                        break;
                    case ResourceType.Home:
                        value += "Home";
                        break;
                    case ResourceType.List:
                        value += "List:" + Data;
                        break;
                    case ResourceType.Mentions:
                        value += "Mentions";
                        break;
                    case ResourceType.Messages:
                        value += "Messages";
                        break;
                    case ResourceType.Search:
                        value+= "Search:" + Data;
                        break;
                    case ResourceType.Tweets:
                        value += "Tweets:" + Data;<commit_msg>Fixed NullException when User was null.<commit_after>﻿using System;

namespace Ocell.Library
{
    public struct TwitterResource
    {        
        public ResourceType Type { get; set;}
        public UserToken User { get; set; }
        private string _data;
        public string Data
        {
            get
            {
                if (_data == null)
                    return "";
                else
                    return _data;
            }
            set
            {
                _data = value;
            }
        }
        public string String
        {
            get
            {
                string value; 
                if(User != null)
                    value = User.ScreenName + ";";
                else
                    value = ";";
                switch (Type)
                {
                    case ResourceType.Favorites:
                        value += "Favorites";
                        break;
                    case ResourceType.Home:
                        value += "Home";
                        break;
                    case ResourceType.List:
                        value += "List:" + Data;
                        break;
                    case ResourceType.Mentions:
                        value += "Mentions";
                        break;
                    case ResourceType.Messages:
                        value += "Messages";
                        break;
                    case ResourceType.Search:
                        value+= "Search:" + Data;
                        break;
                    case ResourceType.Tweets:
                        value += "Tweets:" + Data;
{'fraction_non_alphanumeric': 0.06964397251717676, 'fraction_numerical': 0.0, 'mean_word_length': 0.732287723093564, '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': '3364380', 'n_tokens_mistral': 694, 'n_tokens_neox': 631, 'n_words': 168}