<commit_before>module Insight
  class API
    attr_reader :network,
                :api_version

    def initialize(network: 'btc', url: nil, api_version: nil)
      @url = url
      self.network = network
      @api_version = api_version
    end

    def url
      @url ||= if network == 'btc'
                 'https://insight.bitpay.com/api'
               else
                 'https://test-insight.bitpay.com/api'
               end
    end

    def url=(other)
      @url = url
      @connection = Connection.new(url)<commit_msg>bug fix<commit_after>module Insight
  class API
    attr_reader :network,
                :api_version

    def initialize(network: 'btc', url: nil, api_version: nil)
      @url = url
      self.network = network
      @api_version = api_version
    end

    def url
      @url ||= if network == 'btc'
                 'https://insight.bitpay.com/api'
               else
                 'https://test-insight.bitpay.com/api'
               end
    end

    def url=(other)
      @url = other
      @connection = Connection.new(other)
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.0, 'mean_word_length': 1.6428571428571428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5279327', 'n_tokens_mistral': 326, 'n_tokens_neox': 316, 'n_words': 76}