<commit_before>package org.uiautomation.ios.server;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import org.uiautomation.ios.IOSCapabilities;
import org.uiautomation.ios.UIAModels.Session;
import org.uiautomation.ios.communication.IOSDevice;
import org.uiautomation.ios.server.application.IOSApplication;
import org.uiautomation.ios.server.instruments.CommunicationChannel;
import org.uiautomation.ios.server.instruments.InstrumentsManager;

public class ServerSideSession extends Session {

  private final IOSApplication application;
  private final InstrumentsManager instruments;



  public ServerSideSession(IOSApplication application, int serverPort) {
    super(UUID.randomUUID().toString());
    this.application = application;

    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        forceStop();
      }
    });
    instruments = new InstrumentsManager(serverPort);
  }

  public IOSApplication getApplication() {
    return application;
  }

  public CommunicationChannel communication() {
    return instruments.communicate();
  }

  public void stop() {
    instruments.stop();
  }

  public void forceStop() {
    instruments.forceStop();
  }

  public File getOutputFolder() {
    return instruments.getOutput();
  }

  public InstrumentsManager getInstruments() {
    return instruments;

  }

  public void start(IOSCapabilities capabilities) {
    instruments.startSession(IOSDevice.iPhoneSimulator, capabilities.getSDKVersion(), capabilities.getLocale(),
        capabilities.getLanguage(), application.getApplicationPath(), getSessionId(),
        capabilities.isTimeHack(), capabilities.getExtraSwitches());

  }

}<commit_msg>removing hardcoded device<commit_after>package org.uiautomation.ios.server;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import org.uiautomation.ios.IOSCapabilities;
import org.uiautomation.ios.UIAModels.Session;
import org.uiautomation.ios.communication.IOSDevice;
import org.uiautomation.ios.server.application.IOSApplication;
import org.uiautomation.ios.server.instruments.CommunicationChannel;
import org.uiautomation.ios.server.instruments.InstrumentsManager;

public class ServerSideSession extends Session {

  private final IOSApplication application;
  private final InstrumentsManager instruments;



  public ServerSideSession(IOSApplication application, int serverPort) {
    super(UUID.randomUUID().toString());
    this.application = application;

    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        forceStop();
      }
    });
    instruments = new InstrumentsManager(serverPort);
  }

  public IOSApplication getApplication() {
    return application;
  }

  public CommunicationChannel communication() {
    return instruments.communicate();
  }

  public void stop() {
    instruments.stop();
  }

  public void forceStop() {
    instruments.forceStop();
  }

  public File getOutputFolder() {
    return instruments.getOutput();
  }

  public InstrumentsManager getInstruments() {
    return instruments;

  }

  public void start(IOSCapabilities capabilities) {
    instruments.startSession(capabilities.getDevice(), capabilities.getSDKVersion(), capabilities.getLocale(),
        capabilities.getLanguage(), application.getApplicationPath(), getSessionId(),
        capabilities.isTimeHack(), capabilities.getExtraSwitches());

  }

}
{'fraction_non_alphanumeric': 0.0990606319385141, 'fraction_numerical': 0.0, 'mean_word_length': 4.568938193343898, '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': '1220498', 'n_tokens_mistral': 1001, 'n_tokens_neox': 965, 'n_words': 188}