<commit_before>import Foundation

public protocol RuntimeProviderType: ProviderType {
  var className: String { get }
  var instanceSelectorName: String? { get } // optional
  var selectorName: String { get }
}

public extension RuntimeProviderType {
  var cls: NSObject.Type? {
    return NSClassFromString(self.className) as? NSObject.Type
  }

  var instanceSelectorName: String? {
    return nil
  }

  var instance: AnyObject? {
    guard let cls = self.cls else { return nil }
    guard let sel = self.instanceSelectorName.flatMap(NSSelectorFromString) else { return nil }
    guard cls.responds(to: sel) else { return nil }
    return cls.perform(sel)?.takeUnretainedValue()
  }

  var selector: Selector {
    return NSSelectorFromString(self.selectorName)
  }

  var responds: Bool {
    guard let cls = self.cls else { return false }
    if let instance = self.instance {
      return instance.responds(to: self.selector)
    } else {
      return cls.responds(to: self.selector)
    }
  }

  func log(_ eventName: String, parameters: [String: Any]?) {
    guard self.responds else { return }
    _ = self.cls?.perform(self.selector, with: eventName, with: parameters)
  }
}<commit_msg>Fix wrong method invocation in RuntimeProviderType.log()<commit_after>import Foundation

public protocol RuntimeProviderType: ProviderType {
  var className: String { get }
  var instanceSelectorName: String? { get } // optional
  var selectorName: String { get }
}

public extension RuntimeProviderType {
  var cls: NSObject.Type? {
    return NSClassFromString(self.className) as? NSObject.Type
  }

  var instanceSelectorName: String? {
    return nil
  }

  var instance: AnyObject? {
    guard let cls = self.cls else { return nil }
    guard let sel = self.instanceSelectorName.flatMap(NSSelectorFromString) else { return nil }
    guard cls.responds(to: sel) else { return nil }
    return cls.perform(sel)?.takeUnretainedValue()
  }

  var selector: Selector {
    return NSSelectorFromString(self.selectorName)
  }

  var responds: Bool {
    guard let cls = self.cls else { return false }
    if let instance = self.instance {
      return instance.responds(to: self.selector)
    } else {
      return cls.responds(to: self.selector)
    }
  }

  func log(_ eventName: String, parameters: [String: Any]?) {
    guard self.responds else { return }
    if let instance = self.instance {
      _ = instance.perform(self.selector, with: eventName, with: parameters)
    } else {
      _ = self.cls?.perform(self.selector, with: eventName, with: parameters)
    }
  }
}
{'fraction_non_alphanumeric': 0.09723842862699339, 'fraction_numerical': 0.0, 'mean_word_length': 3.442141623488774, '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': '6528818', 'n_tokens_mistral': 773, 'n_tokens_neox': 752, 'n_words': 217}