<commit_before>package org.http4s.servlet

import _root_.io.chrisdavenport.vault._
import cats.effect._
import cats.implicits.{catsSyntaxEither => _, _}
import java.net.InetSocketAddress
import java.security.cert.X509Certificate
import javax.servlet.ServletConfig
import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse, HttpSession}
import org.http4s._
import org.http4s.headers.`Transfer-Encoding`
import org.http4s.internal.CollectionCompat.CollectionConverters._
import org.http4s.server.SecureSession
import org.http4s.server.ServerRequestKeys
import org.log4s.getLogger

abstract class Http4sServlet[F[_]](service: HttpRoutes[F], servletIo: ServletIo[F])(
    implicit F: Effect[F])
    extends HttpServlet {
  protected val logger = getLogger

  // micro-optimization: unwrap the service and call its .run directly
  protected val serviceFn = service.run

  protected var servletApiVersion: ServletApiVersion = _
  private[this] var serverSoftware: ServerSoftware = _

  object ServletRequestKeys {<commit_msg>Improve import<commit_after>package org.http4s.servlet

import cats.effect._
import cats.implicits.{catsSyntaxEither => _, _}
import io.chrisdavenport.vault._
import java.net.InetSocketAddress
import java.security.cert.X509Certificate
import javax.servlet.ServletConfig
import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse, HttpSession}
import org.http4s._
import org.http4s.headers.`Transfer-Encoding`
import org.http4s.internal.CollectionCompat.CollectionConverters._
import org.http4s.server.SecureSession
import org.http4s.server.ServerRequestKeys
import org.log4s.getLogger

abstract class Http4sServlet[F[_]](service: HttpRoutes[F], servletIo: ServletIo[F])(
    implicit F: Effect[F])
    extends HttpServlet {
  protected val logger = getLogger

  // micro-optimization: unwrap the service and call its .run directly
  protected val serviceFn = service.run

  protected var servletApiVersion: ServletApiVersion = _
  private[this] var serverSoftware: ServerSoftware = _

  object ServletRequestKeys {
{'fraction_non_alphanumeric': 0.08429672447013488, 'fraction_numerical': 0.010597302504816955, 'mean_word_length': 5.946488294314381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2274701', 'n_tokens_mistral': 625, 'n_tokens_neox': 611, 'n_words': 139}