<commit_before>package org.jetbrains.plugins.scala.codeInspection.types

import com.intellij.codeInspection.LocalInspectionTool
import org.jetbrains.plugins.scala.codeInspection.typeLambdaSimplify.{AppliedTypeLambdaCanBeSimplifiedInspection, KindProjectorSimplifyTypeProjectionInspection}
import org.jetbrains.plugins.scala.codeInspection.{InspectionBundle, ScalaLightInspectionFixtureTestAdapter}
import org.jetbrains.plugins.scala.project.settings.ScalaCompilerConfiguration

/**
 * Author: <NAME>
 * Date: 7/6/15
 */
class AppliedTypeLambdaCanBeSimplifiedTest extends ScalaLightInspectionFixtureTestAdapter {
  override protected def classOfInspection: Class[_ <: LocalInspectionTool] = classOf[AppliedTypeLambdaCanBeSimplifiedInspection]

  def quickFixAnnotation: String = InspectionBundle.message("simplify.type")

  override protected def annotation: String = InspectionBundle.message("applied.type.lambda.can.be.simplified")

  override protected def setUp(): Unit = {
    super.setUp()

    val defaultProfile = ScalaCompilerConfiguration.instanceIn(getProject).defaultProfile
    val newSettings = defaultProfile.getSettings
    newSettings.plugins :+= "kind-projector" //only some of the tests require kind-projector
    defaultProfile.setSettings(newSettings)
  }

  def testSimple(): Unit = {
    val text = s"def a: $START({type l[a] = Either[String, a]})#l[Int]$END)"
    check(text)
    val code = "def a: ({type l[a] = Either[String, a]})#l[Int]"
    val res = "def a: Either[String, Int]"
    testFix(code, res)
  }

  def testKindProjectorFunctionSyntax(): Unit = {
    val text = s"def a: ${START}λ[A => (A, A)][Int]$END)"
    check(text)
    val code = "def a: λ[A => (A, A)][Int]"
    val res = "def a: (Int, Int)"
    testFix(code, res)
  }

  def testKindProjectorInlineSyntax(): Unit = {
    val text = s"def a: ${START}Either[+?, -?][String, Int]$END)"
    check(text)
    val code = "def a: Either[+?, -?][String, Int]"
    val res = "def a: Either[String, Int]"
    testFix(code, res)
  }

  def testFix(text: String, res: String): Unit = testFix(text, res, quickFixAnnotation)

}
<commit_msg>Try to fix test.<commit_after>package org.jetbrains.plugins.scala.codeInspection.types

import com.intellij.codeInspection.LocalInspectionTool
import org.jetbrains.plugins.scala.codeInspection.typeLambdaSimplify.{AppliedTypeLambdaCanBeSimplifiedInspection, KindProjectorSimplifyTypeProjectionInspection}
import org.jetbrains.plugins.scala.codeInspection.{InspectionBundle, ScalaLightInspectionFixtureTestAdapter}
import org.jetbrains.plugins.scala.project.settings.ScalaCompilerConfiguration

/**
 * Author: <NAME>
 * Date: 7/6/15
 */
class AppliedTypeLambdaCanBeSimplifiedTest extends ScalaLightInspectionFixtureTestAdapter {
  override protected def classOfInspection: Class[_ <: LocalInspectionTool] = classOf[AppliedTypeLambdaCanBeSimplifiedInspection]

  def quickFixAnnotation: String = InspectionBundle.message("simplify.type")

  override protected def annotation: String = InspectionBundle.message("applied.type.lambda.can.be.simplified")

  override protected def setUp(): Unit = {
    super.setUp()

    val defaultProfile = ScalaCompilerConfiguration.instanceIn(getProject).defaultProfile
    val newSettings = defaultProfile.getSettings
    newSettings.plugins :+= "kind-projector" //only some of the tests require kind-projector
    defaultProfile.setSettings(newSettings)
  }

  def testSimple(): Unit = {
    val text = s"def a: $START({type l[a] = Either[String, a]})#l[Int]$END)"
    check(text)
    val code = "def a: ({type l[a] = Either[String, a]})#l[Int]"
    val res = "def a: Either[String, Int]"
    testFix(code, res)
  }

  def testKindProjectorFunctionSyntax(): Unit = {
    val text = s"def a: ${START}Lambda[A => (A, A)][Int]$END)"
    check(text)
    val code = "def a: Lamda[A => (A, A)][Int]"
    val res = "def a: (Int, Int)"
    testFix(code, res)
  }

  def testKindProjectorInlineSyntax(): Unit = {
    val text = s"def a: ${START}Either[+?, -?][String, Int]$END)"
    check(text)
    val code = "def a: Either[+?, -?][String, Int]"
    val res = "def a: Either[String, Int]"
    testFix(code, res)
  }

  def testFix(text: String, res: String): Unit = testFix(text, res, quickFixAnnotation)

}

{'fraction_non_alphanumeric': 0.12811471556182416, 'fraction_numerical': 0.0018805829807240243, 'mean_word_length': 4.967741935483871, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3146206', 'n_tokens_mistral': 1424, 'n_tokens_neox': 1354, 'n_words': 299}