<commit_before>package com.twitter.inject.thrift.integration.modules

import com.twitter.finagle.thrift.MethodMetadata
import com.twitter.inject.Injector
import com.twitter.inject.thrift.modules.{DarkTrafficFilterModule, ReqRepDarkTrafficFilterModule}
import com.twitter.test.thriftscala.EchoService

object DoEverythingThriftServerDarkTrafficFilterModule
    extends ReqRepDarkTrafficFilterModule[EchoService.ReqRepServicePerEndpoint] {

  /**
   * Function to determine if the request should be "sampled", e.g.
   * sent to the dark service.
   */
  override def enableSampling(injector: Injector): Any => Boolean = { _ =>
    MethodMetadata.current match {
      case Some(m) => !(m.methodName.equals("setTimesToEcho"))
      case _ => true
    }
  }
}

@deprecated(
  "These tests exist to ensure legacy functionaly still operates. Do not use them for guidance",
  "2018-12-20")
class LegacyDoEverythingThriftServerDarkTrafficFilterModule
    extends DarkTrafficFilterModule[EchoService.ServiceIface] {

  /**
   * Function to determine if the request should be "sampled", e.g.
   * sent to the dark service.
   */
  override def enableSampling(injector: Injector): Any => Boolean = { _ =>
    MethodMetadata.current match {
      case Some(m) => !(m.methodName.equals("setTimesToEcho"))
      case _ => true
    }
  }
}<commit_msg>inject-thrift-client: Remove Unused Test Code<commit_after>package com.twitter.inject.thrift.integration.modules

import com.twitter.finagle.thrift.MethodMetadata
import com.twitter.inject.Injector
import com.twitter.inject.thrift.modules.ReqRepDarkTrafficFilterModule
import com.twitter.test.thriftscala.EchoService

object DoEverythingThriftServerDarkTrafficFilterModule
    extends ReqRepDarkTrafficFilterModule[EchoService.ReqRepServicePerEndpoint] {

  /**
   * Function to determine if the request should be "sampled", e.g.
   * sent to the dark service.
   */
  override def enableSampling(injector: Injector): Any => Boolean = { _ =>
    MethodMetadata.current match {
      case Some(m) => !(m.methodName.equals("setTimesToEcho"))
      case _ => true
    }
  }
}
{'fraction_non_alphanumeric': 0.09772296015180265, 'fraction_numerical': 0.003795066413662239, 'mean_word_length': 4.3938618925831205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1096226', 'n_tokens_mistral': 628, 'n_tokens_neox': 628, 'n_words': 138}