<commit_before>module Selenium
  module WebDriver
    module IE
      class Server

        STOP_TIMEOUT = 5

        def self.get
          binary = Platform.find_binary("IEDriverServer")
          if binary
            new(binary)
          else
            require 'selenium/webdrier/ie/in_process_server'
            InProcessServer.new
          end
        end

        def initialize(binary_path)
          Platform.assert_executable binary_path

          @binary_path = binary_path
          @process     = nil
        end

        def start(port, timeout)
          return @port if running?

          @port = port

          @process = ChildProcess.new(@binary_path, "--port=#{@port}")
          @process.io.inherit! if $DEBUG
          @process.start

          unless SocketPoller.new(Platform.localhost, @port, timeout).connected?
            raise Error::WebDriverError, "unable to connect to IE server within #{timeout} seconds"
          end

          Platform.exit_hook { stop }<commit_msg>JariBakken: Add a todo<commit_after>module Selenium
  module WebDriver
    module IE
      class Server

        STOP_TIMEOUT = 5

        def self.get
          binary = Platform.find_binary("IEDriverServer")
          if binary
            new(binary)
          else
            # TODO: deprecation warning
            require 'selenium/webdrier/ie/in_process_server'
            InProcessServer.new
          end
        end

        def initialize(binary_path)
          Platform.assert_executable binary_path

          @binary_path = binary_path
          @process     = nil
        end

        def start(port, timeout)
          return @port if running?

          @port = port

          @process = ChildProcess.new(@binary_path, "--port=#{@port}")
          @process.io.inherit! if $DEBUG
          @process.start

          unless SocketPoller.new(Platform.localhost, @port, timeout).connected?
            raise Error::WebDriverError, "unable to connect to IE server within #{timeout} seconds"
          end

          Platform.exit_hook { stop }
{'fraction_non_alphanumeric': 0.07498790517658442, 'fraction_numerical': 0.0009675858732462506, 'mean_word_length': 1.7870619946091644, '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': '5310166', 'n_tokens_mistral': 558, 'n_tokens_neox': 530, 'n_words': 138}