<commit_before>class Plastic
  # ActiveMerchant::Billing::CreditCard
  DUCK_TYPE_INTERFACE = [
    [:number, :pan],
    [:first_name, :given_name],
    [:last_name, :surname],
    [:verification_value, :cvv2],
    [:security_code, :cvv2],
    [:expiration_date, :expiration],
    [:track1, :track_1],
    [:track2, :track_2],
  ]

  DUCK_TYPE_INTERFACE.each do |_alias, attribute_name|
    alias_method _alias, attribute_name
    alias_method :"#{_alias}=", :"#{attribute_name}="
    define_method :"#{_alias}?", lambda { value_is_present?(send(_alias)) }
  end

  def year
    expiration ? "%02d" % expiration_year : nil
  end

  def month
    expiration ? "%02d" % expiration_month : nil
  end
end<commit_msg>Fix #year output to work with new #expiration_year implementation.<commit_after>class Plastic
  # ActiveMerchant::Billing::CreditCard
  DUCK_TYPE_INTERFACE = [
    [:number, :pan],
    [:first_name, :given_name],
    [:last_name, :surname],
    [:verification_value, :cvv2],
    [:security_code, :cvv2],
    [:expiration_date, :expiration],
    [:track1, :track_1],
    [:track2, :track_2],
  ]

  DUCK_TYPE_INTERFACE.each do |_alias, attribute_name|
    alias_method _alias, attribute_name
    alias_method :"#{_alias}=", :"#{attribute_name}="
    define_method :"#{_alias}?", lambda { value_is_present?(send(_alias)) }
  end

  def year
    expiration ? DateTime.new(expiration_year).strftime("%y") : nil
  end

  def month
    expiration ? "%02d" % expiration_month : nil
  end
end
{'fraction_non_alphanumeric': 0.14715719063545152, 'fraction_numerical': 0.012040133779264214, 'mean_word_length': 4.3428571428571425, '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': '628480', 'n_tokens_mistral': 565, 'n_tokens_neox': 533, 'n_words': 106}