<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace SharpPlugins
{
    /// <summary>
    /// The abstract base class for plugins.
    /// </summary>
    public abstract class PluginBase
    {
        /// <summary>
        /// Gets the plugin's Author, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Author, or empty string if it fails.</returns>
        public static string GetAuthor(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Author == null ? string.Empty : attribute.Author;
        }

        /// <summary>
        /// Gets the plugin's Description, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Description, or empty string if it fails.</returns>
        public static string GetDescription(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Description == null ? string.Empty : attribute.Description;
        }

        /// <summary>
        /// Gets the identifier for the plugin, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The identifier for the plugin, or empty string if it fails.</returns>
        public static string GetIdentifier(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Identifier == null ? string.Empty : attribute.Name;
        }

        /// <summary>
        /// Gets the plugin's Name, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Name, or empty string if it fails.</returns>
        public static string GetName(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Name == null ? string.Empty : attribute.Name;<commit_msg>Fix bug: GetIdentifier returned the Name.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace SharpPlugins
{
    /// <summary>
    /// The abstract base class for plugins.
    /// </summary>
    public abstract class PluginBase
    {
        /// <summary>
        /// Gets the plugin's Author, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Author, or empty string if it fails.</returns>
        public static string GetAuthor(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Author == null ? string.Empty : attribute.Author;
        }

        /// <summary>
        /// Gets the plugin's Description, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Description, or empty string if it fails.</returns>
        public static string GetDescription(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Description == null ? string.Empty : attribute.Description;
        }

        /// <summary>
        /// Gets the identifier for the plugin, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The identifier for the plugin, or empty string if it fails.</returns>
        public static string GetIdentifier(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Identifier == null ? string.Empty : attribute.Identifier;
        }

        /// <summary>
        /// Gets the plugin's Name, or empty string if it fails.
        /// </summary>
        /// <param name="type">The plugin's Type.</param>
        /// <returns>The plugin's Name, or empty string if it fails.</returns>
        public static string GetName(Type type)
        {
            var attribute = getAttribute(type);
            return attribute == null ? string.Empty : attribute.Name == null ? string.Empty : attribute.Name;
{'fraction_non_alphanumeric': 0.12253141831238779, 'fraction_numerical': 0.0, 'mean_word_length': 2.042320819112628, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '6169644', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1066, 'n_words': 380}