<commit_before>module Grit

  class Actor
    attr_reader :name
    attr_reader :email

    def initialize(name, email)
      @name = name
      @email = email
    end
    alias_method :to_s, :name

    # Create an Actor from a string.
    #
    # str - The String in this format: '<NAME> <<EMAIL>>'
    #
    # Returns Git::Actor.
    def self.from_string(str)
      case str
        when /<.+>/
          m, name, email = *str.match(/(.*) <(.+?)>/)
          return self.new(name, email)
        else
          return self.new(str, nil)
      end
    end

    # Outputs an actor string for Git commits.
    #
    #   actor = Actor.new('bob', '<EMAIL>')
    #   actor.output(time) # => "bob <<EMAIL>> UNIX_TIME +0700"
    #
    # time - The Time the commit was authored or committed.
    #
    # Returns a String.
    def output(time)
      offset = time.utc_offset / 60
      "%s <%s> %d %+.2d%.2d" % [
        @name,
        @email || "null",
        time.to_i,
        offset / 60,
        offset.abs % 60]
    end

    # Pretty object inspection
    def inspect
      %Q{#<Grit::Actor "#{@name} <#{@email}>">}
    end
  end # Actor

end # Grit
<commit_msg>fix commit name email not match right problem<commit_after>module Grit

  class Actor
    attr_reader :name
    attr_reader :email

    def initialize(name, email)
      @name = name
      @email = email
    end
    alias_method :to_s, :name

    # Create an Actor from a string.
    #
    # str - The String in this format: '<NAME> <<EMAIL>>'
    #
    # Returns Git::Actor.
    def self.from_string(str)
      case str
        when /<.+>/
          m, name, email = *str.match(/(?:(.*)\s{1})?<(.+?)>/)
          return self.new(name, email)
        else
          return self.new(str, nil)
      end
    end

    # Outputs an actor string for Git commits.
    #
    #   actor = Actor.new('bob', '<EMAIL>')
    #   actor.output(time) # => "bob <<EMAIL>> UNIX_TIME +0700"
    #
    # time - The Time the commit was authored or committed.
    #
    # Returns a String.
    def output(time)
      offset = time.utc_offset / 60
      "%s <%s> %d %+.2d%.2d" % [
        @name,
        @email || "null",
        time.to_i,
        offset / 60,
        offset.abs % 60]
    end

    # Pretty object inspection
    def inspect
      %Q{#<Grit::Actor "#{@name} <#{@email}>">}
    end
  end # Actor

end # Grit

{'fraction_non_alphanumeric': 0.14219212865002115, 'fraction_numerical': 0.010579771476936098, 'mean_word_length': 1.8345323741007193, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '4964807', 'n_tokens_mistral': 849, 'n_tokens_neox': 804, 'n_words': 229}