Prompt:
processor: (FirNamedFunctionSymbol) -> ProcessorAction
): ProcessorAction =
    doProcessAllOverriddenCallables(
        functionSymbol,
        processor,
        FirTypeScope::processDirectOverriddenFunctionsWithBaseScope,
        mutableSetOf()
    )

inline fun <reified S : FirCallableSymbol<*>> FirTypeScope.anyOverriddenOf(

Response:
symbol: S,
    processOverridden: FirTypeScope.(S, (S) -> ProcessorAction) -> ProcessorAction,
    noinline predicate: (S) -> Boolean,
): Boolean {
    var result = false
    processOverridden(symbol) {
        if (predicate(it)) {
            result = true
            return@processOverridden ProcessorAction.STOP
        }<|endoftext|>


Prompt:
override fun visitReceiver(esReceiver: ESReceiver): MutableContextInfo = MutableContextInfo.EMPTY

    override fun visitLambda(lambda: ESValue): MutableContextInfo = MutableContextInfo.EMPTY

    private fun <R> inverted(block: () -> R): R {
        isInverted = isInverted.not()
        val result = block()

Response:
isInverted = isInverted.not()
        return result
    }
}<|endoftext|>


Prompt:
fun Circle() { Vector() }

        @Composable
        fun Square() { Vector() }

        @Composable
        @ComposableTarget("Vector")
        fun Vector(content: @Composable @ComposableTarget("Vector") () -> Unit) { }

        @Composable
        fun Layer(content: @Composable () -> Unit) { Vector(content) }

Response:
@Composable
        @ComposableTarget("UI")
        fun Drawing(content: @Composable @ComposableTarget("Vector") () -> Unit) { }

        @Composable
        fun Wrapper(content: @Composable () -> Unit) { content() }
    """
}<|endoftext|>


Prompt:
value class Foo<T: String>(val x: T) {
    constructor(y: Int) : this("OK" as T) {
        if (y == 0) throw IllegalArgumentException()
        if (y == 1) return
        return Unit
    }

    constructor(z: Double) : this(z.toInt())
}

fun box(): String {

Response:
return Foo<String>(42.0).x
}<|endoftext|>


Prompt:
public inline operator fun BigInteger.dec(): BigInteger = this.subtract(BigInteger.ONE)

/** Inverts the bits including the sign bit in this value. */
@SinceKotlin("1.2")
@kotlin.internal.InlineOnly
public inline fun BigInteger.inv(): BigInteger = this.not()

/** Performs a bitwise AND operation between the two values. */

Response:
@SinceKotlin("1.2")
@kotlin.internal.InlineOnly
public inline infix fun BigInteger.and(other: BigInteger): BigInteger = this.and(other)

/** Performs a bitwise OR operation between the two values. */
@SinceKotlin("1.2")
@kotlin.internal.InlineOnly<|endoftext|>


Prompt:
val UNINITIALIZED_VARIABLE: KtDiagnosticFactory1<FirPropertySymbol> by error1<KtExpression, FirPropertySymbol>()
    val UNINITIALIZED_PARAMETER: KtDiagnosticFactory1<FirValueParameterSymbol> by error1<KtSimpleNameExpression, FirValueParameterSymbol>()

Response: val UNINITIALIZED_ENUM_ENTRY: KtDiagnosticFactory1<FirEnumEntrySymbol> by error1<KtExpression, FirEnumEntrySymbol>(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)<|endoftext|>


Prompt:
public static TargetType<? super String> LOWER_BOUNDED_WILDCARD() { return new TargetType<String>(); }

    }

}

// FILE: kotlin.kt

fun <T> accept(arg: T) {}

fun test() {
    // jspecify_nullness_mismatch

Response:
accept<Any>(<!TYPE_MISMATCH!>NullMarkedType.TargetType.UNBOUNDED_WILDCARD().produce()<!>)
    // jspecify_nullness_mismatch
    accept<String>(<!TYPE_MISMATCH!>NullMarkedType.TargetType.UPPER_BOUNDED_WILDCARD().produce()<!>)<|endoftext|>


Prompt: AGP_84(AGP.AGP_84, GradleVersion.version(Gradle.G_8_4), GradleVersion.version(Gradle.G_8_7), JavaVersion.VERSION_17),

Response:
AGP_85(AGP.AGP_85, GradleVersion.version(Gradle.G_8_5), GradleVersion.version(Gradle.G_8_7), JavaVersion.VERSION_17),
        ;
    }

    object COCOAPODS {
        const val VERSION = "1.11.0"
    }

    object AppleGradlePlugin {<|endoftext|>


Prompt:
"kotlin.collections.builders",
            "kotlin.js",
            "kotlin.jvm.internal.unsafe",
            "kotlin.internal.jdk7",
            "kotlin.internal.jdk8",
            "kotlin.random.jdk8",
        ))
    }

    @Test
    fun stdlibJdk7() {

Response:
checkNonExportedPackages("kotlin-stdlib-jdk7", setOf())
    }

    @Test
    fun stdlibJdk8() {
        checkNonExportedPackages("kotlin-stdlib-jdk8", setOf())
    }

    private fun checkNonExportedPackages(jarShortName: String, expectedPackages: Set<String>) {<|endoftext|>


Prompt:
nonNullableStrs.contains("x")
    nonNullableStrs.contains(ns)
    "x" in nonNullableStrs
    ns in nonNullableStrs
}

fun test3(ns: String?, nullableStrs: Array<out String?>, nonNullableStrs: Array<out String>) {
    nullableStrs.contains("x")

Response:
nonNullableStrs.contains("x")

    nullableStrs.contains(ns)
    nonNullableStrs.contains(ns)

    "x" in nullableStrs
    "x" in nonNullableStrs
    ns in nullableStrs
    ns in nonNullableStrs
}<|endoftext|>


Prompt:
if (b) object {
            val a = 10
        } else <!DEBUG_INFO_CONSTANT!>z<!>
    }

    val y = if (b) x else <!DEBUG_INFO_CONSTANT!>z<!>

Response: if (y !== <!DEBUG_INFO_CONSTANT!>z<!> || <!DEBUG_INFO_CONSTANT!>y<!> != <!DEBUG_INFO_CONSTANT!>implicitNullableNothingProperty<!>) {<|endoftext|>


Prompt:
package org.jetbrains.kotlin.test.services.sourceProviders

import org.jetbrains.kotlin.test.directives.AdditionalFilesDirectives
import org.jetbrains.kotlin.test.directives.model.DirectivesContainer
import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives

Response:
import org.jetbrains.kotlin.test.model.TestFile
import org.jetbrains.kotlin.test.model.TestModule
import org.jetbrains.kotlin.test.services.AdditionalSourceProvider
import org.jetbrains.kotlin.test.services.TestServices
import java.io.File<|endoftext|>


Prompt: // library.kt:12 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\1\10:int=0:int, $i$a$-inlineCall-LibraryKt$bar$1$baz$1\2\30\0:int=0:int, g\2:int=7:int

Response:
// library.kt:26 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\1\10:int=0:int
// library.kt:27 baz: param:int=6:int, b:int=2:int, $i$f$inlineCall\1\10:int=0:int<|endoftext|>


Prompt:
1
} catch (e: Exception) {
    2
}<!>
const val c2 = <!EVALUATED: `1`!>try {
    throwExample(10, 0)
    0
} catch (e: Exception) {
    1
} catch (e: ArithmeticException) {
    2
}<!>

Response:
const val c3 = <!EVALUATED: `2`!>try {
    throwExample(10, 0)
    0
} catch (e: NullPointerException) {
    1
} catch (e: ArithmeticException) {
    2
}<!>

const val d1 = <!EVALUATED: `Divide by zero`!>try {
    throwExample(10, 0)<|endoftext|>


Prompt:
ktDelegate: KtPropertyDelegate,
        propertyDescriptor: PropertyDescriptor
    ): IrProperty {

        val kPropertyType = getKPropertyTypeForDelegatedProperty(propertyDescriptor)

        val irProperty = context.symbolTable.descriptorExtension.declareProperty(

Response:
ktProperty.startOffsetSkippingComments, ktProperty.endOffset, IrDeclarationOrigin.DEFINED,
            propertyDescriptor,
            isDelegated = true
        ).apply {
            backingField = generateDelegateFieldForProperty(propertyDescriptor, kPropertyType, ktDelegate)
        }

        val irDelegate = irProperty.backingField!!<|endoftext|>


Prompt: $i$a$-g-TestKt$box$2\12\132\0:int=0:int, $i$f$h\13\48:int=0:int, xh\13:int=1:int

Response: // library.kt:13 box: m:int=2:int, m1:int=2:int, xg\9:int=0:int, $i$f$g\9\47:int=0:int, yLambdaG\12:int=2:int, xLambdaG\12:int=1:int,<|endoftext|>


Prompt:
}
    }
    with(lazyT) {
        with(lazy1) {
            <!NO_CONTEXT_RECEIVER!>test1<!>()
            test2()
            <!CANNOT_INFER_PARAMETER_TYPE, NO_CONTEXT_RECEIVER!>test3<!>()
        }
    }
    with(lazyLazyT) {

Response:
with(lazy1) {
            <!NO_CONTEXT_RECEIVER!>test1<!>()
            test2()
            test3()
        }
    }
    with(lazy1) {
        with(lazyLazyT) {
            <!NO_CONTEXT_RECEIVER!>test1<!>()
            test2()
            test3()
        }<|endoftext|>


Prompt:
private inner class ModuleDeserializationState {
        private val filesWithPendingTopLevels = mutableSetOf<FileDeserializationState>()

        fun enqueueFile(fileDeserializationState: FileDeserializationState) {
            filesWithPendingTopLevels.add(fileDeserializationState)
            linker.modulesWithReachableTopLevels.add(this@BasicIrModuleDeserializer)

Response:
}

        fun addIdSignature(key: IdSignature) {
            val fileLocalDeserializationState = moduleReversedFileIndex[key] ?: error("No file found for key $key")
            fileLocalDeserializationState.addIdSignature(key)

            enqueueFile(fileLocalDeserializationState)
        }

        fun deserializeReachableDeclarations() {<|endoftext|>


Prompt:
url = URI("https://github.com/yarnpkg/yarn/releases/download")
                                patternLayout {
                                    artifact("v[revision]/[artifact](-v[revision]).[ext]")
                                }
                                metadataSources {
                                    artifact()
                                }
                                content {
                                    includeModule("com.yarnpkg", "yarn")
                                }
                            }

Response:
}
                    }
                """.trimIndent()
            }

            build("kotlinNodeJsSetup", "kotlinYarnSetup") {
                assertTasksExecuted(":kotlinNodeJsSetup")
                assertTasksExecuted(":kotlinYarnSetup")
            }
        }
    }<|endoftext|>


Prompt:
irStatements,
                            )
                        }
                    } else {
                        Fir2IrImplicitCastInserter.coerceToUnitIfNeeded(
                            firLoopBody.convertToIrExpressionOrBlock(origin),
                            irBuiltIns
                        )
                    }
                }
                loopMap.remove(whileLoop)
            }
        }.also {

Response:
whileLoop.accept(implicitCastInserter, it)
        }
    }

    private fun FirJump<FirLoop>.convertJumpWithOffsets(
        f: (startOffset: Int, endOffset: Int, irLoop: IrLoop, label: String?) -> IrBreakContinue
    ): IrExpression {
        return convertWithOffsets { startOffset, endOffset -><|endoftext|>


Prompt: @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.\nIf you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.\nSee https://youtrack.jetbrains.com/issue/KT-46465 for details about the migration", ReplaceWith("this.toInt().toChar()"))

Response:
@DeprecatedSinceKotlin(warningSince = "1.9", errorSince = "2.3")
    public open fun toChar(): Char {
        return toInt().toChar()
    }

    /**
     * Returns the value of this number as a [Short], which may involve rounding or truncation.
     */
    public abstract fun toShort(): Short

    /**<|endoftext|>


Prompt:
@kotlin.internal.InlineOnly
public inline operator fun <T> kotlin.collections.List<T>.component2(): T

@kotlin.internal.InlineOnly
public inline operator fun <K, V> kotlin.collections.Map.Entry<K, V>.component2(): V

@kotlin.internal.InlineOnly

Response:
public inline operator fun <T> kotlin.Array<out T>.component3(): T

@kotlin.internal.InlineOnly
public inline operator fun kotlin.BooleanArray.component3(): kotlin.Boolean

@kotlin.internal.InlineOnly
public inline operator fun kotlin.ByteArray.component3(): kotlin.Byte

@kotlin.internal.InlineOnly<|endoftext|>


Prompt:
package org.jetbrains.kotlin.konan.test.blackbox.support.settings

import org.jetbrains.kotlin.konan.target.Configurables
import org.jetbrains.kotlin.konan.target.Distribution
import org.jetbrains.kotlin.konan.target.HostManager

Response:
import org.jetbrains.kotlin.konan.target.PlatformManager
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue
import org.jetbrains.kotlin.test.services.JUnit5Assertions.fail
import kotlin.reflect.KClass

abstract class Settings(private val parent: Settings?, settings: Iterable<Any>) {<|endoftext|>


Prompt:
expression.value.transform(),
            expression.type.remapType(),
            mapStatementOrigin(expression.origin),
            symbolRemapper.getReferencedClassOrNull(expression.superQualifierSymbol)
        ).processAttributes(expression)

    override fun visitCall(expression: IrCall): IrCall =
        shallowCopyCall(expression).apply {
            copyRemappedTypeArgumentsFrom(expression)

Response:
transformValueArguments(expression)
        }

    override fun visitConstructorCall(expression: IrConstructorCall): IrConstructorCall {
        val constructorSymbol = symbolRemapper.getReferencedConstructor(expression.symbol)
        return IrConstructorCallImpl(
            expression.startOffset, expression.endOffset,
            expression.type.remapType(),
            constructorSymbol,<|endoftext|>


Prompt:
assertNotEquals(nullProtoObj1.hashCode(), obj2.hashCode())
    assertNotEquals(nullProtoObj1.hashCode(), nullProtoObj2.hashCode())
    assertNotEquals(nullProtoObj1.hashCode(), arr1.hashCode())
    assertNotEquals(nullProtoObj1.hashCode(), arr2.hashCode())

Response:
assertNotEquals(nullProtoObj2.hashCode(), obj1.hashCode())
    assertNotEquals(nullProtoObj2.hashCode(), obj2.hashCode())
    assertNotEquals(nullProtoObj2.hashCode(), nullProtoObj1.hashCode())
    assertNotEquals(nullProtoObj2.hashCode(), arr1.hashCode())<|endoftext|>


Prompt:
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.NotASupertype

internal class TypeArgumentsRedundantInSuperQualifierImpl(
    firDiagnostic: KtPsiDiagnostic,
    token: KtLifetimeToken,

Response:
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.TypeArgumentsRedundantInSuperQualifier

internal class SuperclassNotAccessibleFromInterfaceImpl(
    firDiagnostic: KtPsiDiagnostic,
    token: KtLifetimeToken,<|endoftext|>


Prompt:
fun throwNotInitialized(propertyName: String, className: String): Nothing {
        throw AssertionError("Property '$propertyName' for '$className' wasn't initialized to access")
    }
}

internal abstract class AnnotatedAndDocumented {
    private var doc: String? = null
    val annotations: MutableList<String> = mutableListOf()
    var additionalComments: String? = null

Response:
fun appendDoc(doc: String) {
        if (this.doc == null) {
            this.doc = doc
        } else {
            this.doc += "$END_LINE$doc"
        }
    }

    protected fun StringBuilder.printDocumentationAndAnnotations(forceMultiLineDoc: Boolean = false) {
        if (doc != null) {<|endoftext|>


Prompt:
override val pluginVariant: String = PLUGIN_VARIANT_NAME

    override fun apply(project: Project) {
        project.registerVariantImplementations()
        super.apply(project)
    }
}

open class KotlinAndroidPluginWrapper @Inject constructor(
    registry: ToolingModelBuilderRegistry
) : AbstractKotlinAndroidPluginWrapper(registry) {

Response:
override val pluginVariant: String = PLUGIN_VARIANT_NAME

    override fun apply(project: Project) {
        project.registerVariantImplementations()
        super.apply(project)
    }
}

@Suppress("DEPRECATION_ERROR")
open class Kotlin2JsPluginWrapper @Inject constructor(
    registry: ToolingModelBuilderRegistry<|endoftext|>


Prompt:
listOf(text.substring(start, end))
    } else {
        FP_LITERAL_PARTS.findAll(text).flatMap { it.groupValues }.toList()
    }

    return parts.any { it != null && (it.startsWith("_") || it.endsWith("_")) }
}

Response:
fun hasLongSuffix(text: String) = text.endsWith('l') || text.endsWith('L')
fun hasUnsignedSuffix(text: String) = text.endsWith('u') || text.endsWith('U')
fun hasUnsignedLongSuffix(text: String) =
    text.endsWith("ul") || text.endsWith("uL") ||<|endoftext|>


Prompt: <!CONFLICTING_OVERLOADS!>@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun <T: Invariant<UserInterface>> testTypeParameterWithVarianceDifferentUpperBoundsA()<!> {}

Response:
<!CONFLICTING_OVERLOADS!>fun <T: Invariant<out UserInterface>> testTypeParameterWithVarianceDifferentUpperBoundsA()<!> {}

    <!CONFLICTING_OVERLOADS!>fun <T: Invariant<UserInterface>> testTypeParameterWithVarianceDifferentUpperBoundsAReverse()<!> {}<|endoftext|>


Prompt:
@SinceKotlin("1.3")
@ExperimentalTypeInference
public annotation class BuilderInference

/**
 * Enables overload selection based on the type of the value returned from lambda argument.
 *
 * When two or more function overloads have otherwise the same parameter lists that differ only in the return type
 * of a functional parameter, this annotation enables overload selection by the type of the value returned from

Response:
* the lambda function passed to this functional parameter.
 *
 * Example:
 * ```
 * @OverloadResolutionByLambdaReturnType
 * fun create(intProducer: () -> Int): Int
 *
 * fun create(doubleProducer: () -> Double): Double
 *
 * val newValue = create { 3.14 }
 * ```
 *<|endoftext|>


Response: <!OVERLOAD_RESOLUTION_AMBIGUITY!>-<!><!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> {<|endoftext|>


Prompt:
@Suppress("AnalysisApiMissingLifetimeCheck")
    override val useSiteModule: KtModule get() = firResolveSession.useSiteKtModule

    override val smartCastProviderImpl = KtFirSmartcastProvider(this, token)

    override val expressionTypeProviderImpl = KtFirExpressionTypeProvider(this, token)

Response:
override val diagnosticProviderImpl = KtFirDiagnosticProvider(this, token)

    override val containingDeclarationProviderImpl = KtFirSymbolContainingDeclarationProvider(this, token)

    override val callResolverImpl = KtFirCallResolver(this, token)

    override val samResolverImpl = KtFirSamResolver(this, token)<|endoftext|>


Prompt:
A.foo = l@ {
        if ("0".hashCode() == 42) return@l
        return@l <!RETURN_TYPE_MISMATCH!>null<!>
    }
}

val expectedNullableUnitExplicitReturnUnitAndString: () -> Unit? = l@ {
    if ("0".hashCode() == 42) return@l Unit

Response:
<!TYPE_MISMATCH!>""<!>
}

fun expectedFlexibleUnitImplicitReturnString() {
    A.foo = l@ {
        ""
    }
}

fun expectedFlexibleUnitExplicitReturnUnitAndString() {
    A.foo = l@ {
        if ("0".hashCode() == 42) return@l Unit
        ""
    }
}<|endoftext|>


Prompt:
private const val MH_CIGAM_64 = 0xcffaedfeL

    private const val MH_BILYD = 0x06000000L // MH_DYLIB = 0x6 converted for JVM

    private const val FILE_TYPE_OFFSET = 12L
    private const val FAT_FIRST_MACHO_OFFSET_OFFSET = 16L

    /**

Response:
* Checks if the [file] is a Mach-O dynamic shared library
     * or a Mach-O fat binary containing a number of dynamic libraries
     */
    fun isDylib(file: File, logger: Logger): Boolean {
        try {
            RandomAccessFile(file, "r").use { raf ->
                val magic = raf.readInt().fromUIntToLong()<|endoftext|>


Prompt:
package org.jetbrains.kotlin.analysis.api.descriptors.signatures

import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeToken
import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion
import org.jetbrains.kotlin.analysis.api.signatures.KtFunctionLikeSignature

Response:
import org.jetbrains.kotlin.analysis.api.signatures.KtVariableLikeSignature
import org.jetbrains.kotlin.analysis.api.symbols.KtFunctionLikeSymbol
import org.jetbrains.kotlin.analysis.api.symbols.KtValueParameterSymbol<|endoftext|>


Prompt:
}

    // The less the higher an object escapes.
    object Depths {
        val INFINITY = 1_000_000
        val ROOT_SCOPE = 0
        val RETURN_VALUE = -1
        val PARAMETER = -2
        val GLOBAL = -3
    }

    object DivergenceResolutionParams {
        const val MaxAttempts = 3

Response:
const val NegligibleSize = 100
        const val SwellingFactor = 25
    }

    private class RoleInfoEntry(val node: DataFlowIR.Node? = null, val field: DataFlowIR.Field?)

    private open class RoleInfo {
        val entries = mutableListOf<RoleInfoEntry>()

        open fun add(entry: RoleInfoEntry) = entries.add(entry)
    }<|endoftext|>


Prompt:
// KT-49200
// !RENDER_DIAGNOSTICS_FULL_TEXT
// FILE: first/KtNodeTypes.java

package first;

public interface KtNodeTypes {
    String SOME = "Some";
}

// FILE: SomeEnum.kt

package second

enum class SomeEnum {
    SOME;
}

// FILE: test.kt

Response:
import first.KtNodeTypes.SOME
import second.SomeEnum.SOME

fun test(arg: String): Boolean {
    return when (arg) {
        <!OVERLOAD_RESOLUTION_AMBIGUITY!>SOME<!> -> true
        else -> false
    }
}<|endoftext|>


Prompt:
dirtyFilesForRestoring.mapIndexedTo(ArrayList(dirtyFilesForRestoring.size)) { i, libFileAndSrcFile ->
                Triple(libFileAndSrcFile.first, libFileAndSrcFile.second, fragmentGenerators[i])
            }
        }

    private data class IrForDirtyFilesAndCompiler(

Response:
val incrementalCacheArtifacts: Map<KotlinLibraryFile, IncrementalCacheArtifact>,
        val loadedIr: LoadedJsIr,
        val dirtyFiles: Map<KotlinLibraryFile, Set<KotlinSourceFile>>,
        val irCompiler: JsIrCompilerICInterface
    )

    private fun loadIrForDirtyFilesAndInitCompiler(): IrForDirtyFilesAndCompiler {<|endoftext|>


Prompt:
override fun updateContextReceiverTypes(newTypes: List<KotlinType>) = functionCall.updateContextReceiverTypes(newTypes)
    override fun argumentToParameterMap(
        resultingDescriptor: CallableDescriptor,
        valueArguments: Map<ValueParameterDescriptor, ResolvedValueArgument>
    ) = functionCall.argumentToParameterMap(resultingDescriptor, valueArguments)

Response:
override fun setResultingSubstitutor(substitutor: NewTypeSubstitutor?) {
        functionCall.setResultingSubstitutor(substitutor)
        variableCall.setResultingSubstitutor(substitutor)
    }
}<|endoftext|>


Prompt:
if (finallyExpression != null) {
            proto.finally = serializeExpression(finallyExpression)
        }
        return proto.build()
    }

    private fun serializeTypeOperator(operator: IrTypeOperator): ProtoTypeOperator = when (operator) {
        IrTypeOperator.CAST ->
            ProtoTypeOperator.CAST

Response:
IrTypeOperator.IMPLICIT_CAST ->
            ProtoTypeOperator.IMPLICIT_CAST
        IrTypeOperator.IMPLICIT_NOTNULL ->
            ProtoTypeOperator.IMPLICIT_NOTNULL
        IrTypeOperator.IMPLICIT_COERCION_TO_UNIT ->
            ProtoTypeOperator.IMPLICIT_COERCION_TO_UNIT<|endoftext|>


Prompt: $i$f$x2\10\133:int=0:int, y2\10:int=2:int

Response: // library.kt:13 box: m:int=1:int, $i$f$foo\8\45:int=0:int, fooVar\8:int=100:int, x1Var\9:int=1:int, $i$f$x1\9\127:int=0:int, y1\9:int=1:int<|endoftext|>


Prompt:
source = expression.toKtPsiSourceElement()
                this.anonymousFunction = anonymousFunction
            }
        }

        protected fun KtSecondaryConstructor.toFirConstructor(
            delegatedTypeRef: FirTypeRef,
            selfTypeRef: FirTypeRef,
            owner: KtClassOrObject,
            ownerTypeParameters: List<FirTypeParameterRef>,

Response:
): FirConstructor {
            val target = FirFunctionTarget(labelName = null, isLambda = false)
            return buildConstructor {
                symbol = FirConstructorSymbol(callableIdForClassConstructor())
                withContainerSymbol(symbol) {
                    source = this@toFirConstructor.toFirSourceElement()
                    moduleData = baseModuleData<|endoftext|>


Prompt:
DASH_PUNCTUATION(20, "Pd"),

    /**
     * General category "Ps" in the Unicode specification.
     */
    START_PUNCTUATION(21, "Ps"),

    /**
     * General category "Pe" in the Unicode specification.
     */
    END_PUNCTUATION(22, "Pe"),

    /**

Response:
* General category "Pc" in the Unicode specification.
     */
    CONNECTOR_PUNCTUATION(23, "Pc"),

    /**
     * General category "Po" in the Unicode specification.
     */
    OTHER_PUNCTUATION(24, "Po"),

    /**
     * General category "Sm" in the Unicode specification.
     */<|endoftext|>


Prompt:
private fun FlowContent.generate(intersectionType: ConeIntersectionType) {
        +"("
        generateList(intersectionType.intersectedTypes.toList(), " & ") { generate(it) }
        +")"
    }

    private fun FlowContent.generate(type: ConeClassLikeType) {
        resolved {

Response:
when (val symbol = type.lookupTag.toSymbol(session)) {
                is FirTypeAliasSymbol -> {
                    symbolRef(symbol) {
                        simpleName(type.lookupTag.name)
                    }
                    generateTypeArguments(type)
                    if (type.isMarkedNullable) {
                        +"?"
                    }
                    +" = "<|endoftext|>


Prompt:
fun greater2(a: Double?, b: Double?) = a!! > b!!

fun greater3(a: Double?, b: Double?) = a != null && b != null && a > b

fun greater4(a: Double?, b: Double?) = if (a is Double && b is Double) a > b else null!!

Response:
fun greater5(a: Any?, b: Any?) = if (a is Double && b is Double) a > b else null!!

fun box(): String {
    if (0.0 > -0.0) return "fail 0"
    if (greater1(0.0, -0.0)) return "fail 1"
    if (greater2(0.0, -0.0)) return "fail 2"<|endoftext|>


Prompt:
dependencyNodes.forEach { dependencyNode ->
            val moduleDependency = dependencyByNode[dependencyNode]

            if (moduleDependency != null) {
                if (includeOnlySpecifiedDependenciesSet != null && moduleDependency !in includeOnlySpecifiedDependenciesSet) {
                    dependenciesNode.remove(dependencyNode)
                    return@forEach
                }
            }

Response:
val mapDependencyTo = resultDependenciesForEachUsageContext.get(moduleDependency)

            if (mapDependencyTo != null) {
                fun Node.setChildNodeByName(name: String, value: String?) {
                    val childNode: Node? = (get(name) as NodeList?)?.firstOrNull() as Node?
                    if (value != null) {<|endoftext|>


Prompt:
import org.jetbrains.kotlin.fir.analysis.checkers.isRecursiveValueClassType
import org.jetbrains.kotlin.fir.analysis.checkers.isSingleFieldValueClass
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors
import org.jetbrains.kotlin.fir.declarations.FirProperty

Response:
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter
import org.jetbrains.kotlin.fir.declarations.utils.hasExplicitBackingField
import org.jetbrains.kotlin.fir.declarations.utils.isAbstract<|endoftext|>


Prompt:
* Atomically sets the value to the given [new value][newValue] if the current value equals the [expected value][expected]
     * and returns the old value in any case.
     *
     * Provides sequential consistent ordering guarantees and cannot fail spuriously.
     */
    public fun compareAndSwap(expected: Int, newValue: Int): Int = this::value.compareAndExchangeField(expected, newValue)

Response:
/**
     * Atomically adds the [given value][delta] to the current value and returns the old value.
     */
    public fun getAndAdd(delta: Int): Int = this::value.getAndAddField(delta)

    /**
     * Atomically adds the [given value][delta] to the current value and returns the new value.
     */<|endoftext|>


Prompt:
}

    inline fun Double.calcDouble(s: (Int, Double) -> Double) : Double {
        return s(res, this)
    }

    fun doWork(l : InlineX) : Int {
        return l.calcInt({ a: Int, b: Int -> a + b})
    }

    fun doWorkWithDouble(s : Double) : Double {

Response:
return s.calcDouble({ a: Int, b: Double -> a + b})
    }

}

fun test1(): Int {
    val inlineX = Inline(9)
    return inlineX.calcExt({ z: Int -> z}, 25)
}

fun test2(): Int {
    val inlineX = Inline(9)<|endoftext|>


Prompt:
internal class JvmIrValidationAfterLoweringPhase(context: JvmBackendContext) : JvmIrValidationPhase(context) {
    override fun validate(irModule: IrModuleFragment) {
        validationCallback(context, irModule, checkProperties = true)

        checkAllFileLevelDeclarationsAreClasses(irModule)
        val validator = object : IrElementVisitorVoid {

Response:
override fun visitElement(element: IrElement) {
                element.acceptChildrenVoid(this)
            }

            override fun visitProperty(declaration: IrProperty) {
                error("No properties should remain at this stage")
            }

            override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer) {
                error("No anonymous initializers should remain at this stage")
            }
        }<|endoftext|>


Prompt:
package org.jetbrains.kotlin.resolve.calls.components.candidate

import org.jetbrains.kotlin.resolve.calls.components.KotlinResolutionCallbacks
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage

Response:
import org.jetbrains.kotlin.resolve.calls.model.KotlinCallComponents
import org.jetbrains.kotlin.resolve.calls.model.MutableResolvedCallAtom
import org.jetbrains.kotlin.resolve.calls.model.ResolvedAtom<|endoftext|>


Prompt:
* Returns null if the type cannot be unboxed.
     */
    fun unboxType(type: IrType): IrType? {
        val klass = type.classOrNull?.owner ?: return null
        val representation = klass.inlineClassRepresentation ?: return null

        // TODO: Apply type substitutions
        var underlyingType = representation.underlyingType.unboxInlineClass()

Response:
if (!underlyingType.isNullable() && underlyingType.isTypeParameter()) {
            underlyingType = underlyingType.erasedUpperBound.defaultType
        }
        if (!type.isNullable())
            return underlyingType
        if (underlyingType.isNullable() || underlyingType.isPrimitiveType())
            return null
        return underlyingType.makeNullable()
    }

    /**<|endoftext|>


Prompt:
fun testKotlinJvmContextClassLoader() {
        val kotlinTestJar = File(PathUtil.kotlinPathsForDistDirectory.homePath, "lib/kotlin-test.jar")
        assertTrue("kotlin-main-kts.jar not found, run dist task: ${kotlinTestJar.absolutePath}", kotlinTestJar.exists())

Response:
kotlincInProcess(
            "-cp", kotlinTestJar.path,
            "$testDataDirectory/contextClassLoaderTester.kt",
            "-d", tmpdir.path
        )

        runProcess(
            "kotlin",
            "-cp", listOf(tmpdir.path, kotlinTestJar.path).joinToString(File.pathSeparator),<|endoftext|>


Prompt: if (<!SENSELESS_COMPARISON!>v != null<!> || <!SENSELESS_COMPARISON!>this.v != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this.v<!>.propNullableT

Response: if (<!SENSELESS_COMPARISON!>v != null<!> || <!SENSELESS_COMPARISON!>this.v != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this.v<!>.propNullableAny<|endoftext|>


Prompt:
public interface KProperty2<D, E, out V> : kotlin.reflect.KProperty<V>, (D, E) -> V {
    public abstract fun get(receiver1: D, receiver2: E): V
}

public interface KType {
    @kotlin.SinceKotlin(version = "1.1")

Response:
public abstract val arguments: kotlin.collections.List<kotlin.reflect.KTypeProjection> { get; }

    @kotlin.SinceKotlin(version = "1.1")
    public abstract val classifier: kotlin.reflect.KClassifier? { get; }

    public abstract val isMarkedNullable: kotlin.Boolean { get; }
}<|endoftext|>


Prompt:
* Returns a character at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this char sequence.
 */
@kotlin.internal.InlineOnly
public inline fun CharSequence.getOrElse(index: Int, defaultValue: (Int) -> Char): Char {
    contract {

Response:
callsInPlace(defaultValue, InvocationKind.AT_MOST_ONCE)
    }
    return if (index in indices) get(index) else defaultValue(index)
}

/**
 * Returns a character at the given [index] or `null` if the [index] is out of bounds of this char sequence.
 *
 * @sample samples.collections.Collections.Elements.getOrNull<|endoftext|>


Prompt:
ExpectedEnumEntryWithBodyImpl(
            firDiagnostic as KtPsiDiagnostic,
            token,
        )
    }
    add(FirErrors.EXPECTED_PROPERTY_INITIALIZER) { firDiagnostic ->
        ExpectedPropertyInitializerImpl(
            firDiagnostic as KtPsiDiagnostic,
            token,
        )

Response:
}
    add(FirErrors.EXPECTED_DELEGATED_PROPERTY) { firDiagnostic ->
        ExpectedDelegatedPropertyImpl(
            firDiagnostic as KtPsiDiagnostic,
            token,
        )
    }
    add(FirErrors.EXPECTED_LATEINIT_PROPERTY) { firDiagnostic -><|endoftext|>


Prompt:
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit? & kotlin.Unit")!>x<!>.funAny()
        <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit? & kotlin.Unit")!>x<!>.funNullableT()

Response:
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit? & kotlin.Unit")!>x<!>.funNullableAny()
    }
}

// TESTCASE NUMBER: 3
fun case_3(x: Nothing?, f: Boolean) {
    do {
        if (<!SENSELESS_COMPARISON!>x != null<!>) else break<|endoftext|>


Prompt:
visitWrappedExpression(wrappedArgumentExpression, data)

    override fun visitSpreadArgumentExpression(spreadArgumentExpression: FirSpreadArgumentExpression, data: D): R =
        visitWrappedArgumentExpression(spreadArgumentExpression, data)

Response:
override fun visitNamedArgumentExpression(namedArgumentExpression: FirNamedArgumentExpression, data: D): R =
        visitWrappedArgumentExpression(namedArgumentExpression, data)

    override fun visitVarargArgumentsExpression(varargArgumentsExpression: FirVarargArgumentsExpression, data: D): R =<|endoftext|>


Prompt:
filesToCache.forEach { configuration.report(CompilerMessageSeverity.LOGGING, "    $it") }

        // Produce monolithic caches for external libraries for now.
        val makePerFileCache = !isExternal && !library.isInteropLibrary()

        val libraryCacheDirectory = when {
            library.isDefault -> konanConfig.systemCacheDirectory

Response:
isExternal -> CachedLibraries.computeVersionedCacheDirectory(
                    konanConfig.autoCacheDirectory, library, uniqueNameToLibrary, uniqueNameToHash)
            else -> konanConfig.incrementalCacheDirectory!!
        }
        val libraryCache = libraryCacheDirectory.child(
                if (makePerFileCache)
                    CachedLibraries.getPerFileCachedLibraryName(library)
                else<|endoftext|>


Prompt:
val b3 = B(b = "b")
    if (b3.a != 0) return "b3.a != 0, it: ${b3.a}"
    if (b3.b != "b") return "b3.b != 'b', it: ${b3.b}"

    val b4 = B(2, "c")

Response:
if (b4.a != 2) return "b4.a != 2, it: ${b4.a}"
    if (b4.b != "c") return "b4.b != 'c', it: ${b4.b}"

    return "OK"
}<|endoftext|>


Prompt:
for (index in 1 until paths.size) {
        val path: File = paths[index]

        val isGlob = '*' in path.name
        if (isGlob) {
            val basePath: File = paths[index - 1]
            val basePathAsPath: Path = basePath.toPath()

Response:
val pattern: String = unexpandedPath.relativeTo(basePath).path.let { pattern ->
                if (File.separatorChar == '\\') pattern.replace("\\", "\\\\") else pattern
            }
            val matcher: PathMatcher = FileSystems.getDefault().getPathMatcher("glob:$pattern")<|endoftext|>


Prompt:
classes.ifNotEmpty { wasRendered = true }
        if (wasRendered) {
            appendLine()
        }
    }

    private fun <T> PrettyPrinter.appendSorted(list: List<T>, addPrefix: Boolean, render: (T) -> String) {
        if (list.isEmpty()) return
        val prefix = if (addPrefix) "\n\n" else ""

Response:
list.map(render).sorted().joinTo(this, separator = "\n\n", prefix = prefix)
    }

    private fun PsiAnnotation.renderAnnotation(): String {

        if (qualifiedName == "kotlin.Metadata") return ""

        val renderedAttributes = parameterList.attributes.map {<|endoftext|>


Prompt:
super.visitPropertyReference(expression)
    }

    override fun visitFunctionReference(expression: IrFunctionReference) {
        patchIfNeeded(expression.symbol) { expression.symbol = it }
        patchIfNeeded(expression.reflectionTarget) { expression.reflectionTarget = it }
        super.visitFunctionReference(expression)
    }

Response:
override fun visitClassReference(expression: IrClassReference) {
        patchIfNeeded(expression.symbol) { expression.symbol = it }
        super.visitClassReference(expression)
    }

    @OptIn(UnsafeDuringIrConstructionAPI::class)<|endoftext|>


Prompt:
val deserializedIrModule = deserializeModule(stdlib2, klib)

        val actual = deserializedIrModule.dump(DumpIrTreeOptions(stableOrder = true, verboseErrorTypes = false))

        try {
            TestCase.assertEquals(wholeFile.name, expected, actual)
        } catch (e: Throwable) {
            throw rethrow(e)
        }

Response:
}

    private fun serializeModule(
        irModuleFragment: IrModuleFragment,
        bindingContext: BindingContext,
        stdlib: KotlinLibrary,
        containsErrorCode: Boolean,
    ): String {
        val klibDir = org.jetbrains.kotlin.konan.file.createTempDir("testKlib")
        serializeModuleIntoKlib(<|endoftext|>


Prompt:
val prefix = if (field.type.isPrimitiveBoolean() && !accessors.noIsPrefix) AccessorNames.IS else AccessorNames.GET
                    prefix + propertyName.capitalize()
                }
            classDescriptor.createFunction(
                Name.identifier(functionName),
                emptyList(),
                field.returnType,

Response:
visibility = getter.visibility.toDescriptorVisibility()
            )
        }
    }

}<|endoftext|>


Prompt:
import org.jetbrains.kotlin.test.model.FrontendKinds
import org.jetbrains.kotlin.test.model.TestModule
import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.defaultsProvider
import org.jetbrains.kotlin.test.services.moduleStructure

Response:
import org.jetbrains.kotlin.test.utils.MultiModuleInfoDumper
import org.jetbrains.kotlin.test.utils.withExtension

class BytecodeListingHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) {
    override val directiveContainers: List<DirectivesContainer>
        get() = listOf(CodegenTestDirectives)<|endoftext|>


Prompt:
sw.writeParameterType(JvmMethodParameterKind.VALUE, isSkippedInGenericSignature)
        writeParameterType(sw, type, function, materialized)
        sw.writeParameterTypeEnd()
    }

    private fun writeParameterType(sw: JvmSignatureWriter, type: IrType, declaration: IrDeclaration, materialized: Boolean = true) {
        if (sw.skipGenericSignature()) {

Response:
if (type.isInlineClassType() && declaration.isFromJava()) {
                typeMapper.mapType(type, TypeMappingMode.GENERIC_ARGUMENT, sw, materialized)
            } else {
                typeMapper.mapType(type, TypeMappingMode.DEFAULT, sw, materialized)
            }
            return
        }

        val mode = with(typeSystem) {<|endoftext|>


Prompt:
add(FirErrors.EXPRESSION_EXPECTED) { firDiagnostic ->
        ExpressionExpectedImpl(
            firDiagnostic as KtPsiDiagnostic,
            token,
        )
    }
    add(FirErrors.ASSIGNMENT_IN_EXPRESSION_CONTEXT) { firDiagnostic ->
        AssignmentInExpressionContextImpl(

Response:
firDiagnostic as KtPsiDiagnostic,
            token,
        )
    }
    add(FirErrors.BREAK_OR_CONTINUE_OUTSIDE_A_LOOP) { firDiagnostic ->
        BreakOrContinueOutsideALoopImpl(
            firDiagnostic as KtPsiDiagnostic,
            token,
        )
    }<|endoftext|>


Prompt:
// FILE: KotlinFile.kt
package k

import JavaClass

fun foo(javaClass: JavaClass) {
    val v = javaClass.<!INVISIBLE_REFERENCE!>something<!>
    javaClass.<!INVISIBLE_REFERENCE!>something<!> = 1
    javaClass.<!INVISIBLE_REFERENCE!>something<!>++
}

Response:
// FILE: JavaClass.java
public class JavaClass {
    protected int getSomething() { return 1; }
    public void setSomething(int value) {}
}<|endoftext|>


Prompt:
raw.maps = <!ASSIGNMENT_TYPE_MISMATCH!>arrayOf<List<String>>()<!>

    raw.arraysOfLists = arrayOf<Array<List<*>>>()
    raw.arraysOfLists = <!ASSIGNMENT_TYPE_MISMATCH!>arrayOf<List<String>>()<!>

Response:
raw.arraysOfLists = <!ASSIGNMENT_TYPE_MISMATCH!>arrayOf<Array<Array<String>>>()<!>

    raw.arraysOfAny = arrayOf<Array<Array<String>>>()

    raw.erasedLists = arrayOf<List<String>>()
}<|endoftext|>


Prompt:
delegatedSelfTypeRef ?: delegatedSuperTypeRef!!,
                    owner = this,
                    containerTypeParameters,
                    allSuperTypeCallEntries,
                    containingClassIsExpectClass,
                    copyConstructedTypeRefWithImplicitSource = true,
                    isErrorConstructor = !hasPrimaryConstructor,

Response:
isImplicitlyActual = container.status.isActual && (container.status.isInline || classKind == ClassKind.ANNOTATION_CLASS),
                    isKotlinAny = isKotlinAny,
                )
                container.declarations += firPrimaryConstructor
            }

            delegateFieldsMap.values.mapTo(container.declarations) { it.fir }<|endoftext|>


Prompt:
fun foo84(x: Int): Int
}
interface I85 {
    fun foo85(x: Int): Int
}
interface I86 {
    fun foo86(x: Int): Int
}
interface I87 {
    fun foo87(x: Int): Int
}
interface I88 {
    fun foo88(x: Int): Int
}
interface I89 {

Response:
fun foo89(x: Int): Int
}
interface I90 {
    fun foo90(x: Int): Int
}
interface I91 {
    fun foo91(x: Int): Int
}
interface I92 {
    fun foo92(x: Int): Int
}
interface I93 {
    fun foo93(x: Int): Int
}
interface I94 {<|endoftext|>


Prompt:
class Derived(a1: String, a2: String, b1: String, b2: String, cond: Boolean) : Base(
    if (eSet("E_OK;", cond)) {
        cSet("C_THEN;")
        a1
    } else {
        cSet("C_ELSE;")
        a2
    },

Response:
if (fSet("F_OK;", !cond)) {
        dSet("D_THEN;")
        b1
    } else {
        dSet("D_ELSE;")
        b2
    }
) {
}

fun box():String {<|endoftext|>


Prompt:
// function. Generic or abstract functions (interface members, lambdas, open methods, etc.)
            // do not contain a body to infer anything from so we just use the declared scheme if
            // there is one. Returning null from this function cause the scheme to be determined from
            // the target expression (using, for example, the substituted type parameters) instead of
            // the definition.

Response:
function.takeIf { it.body != null && it.typeParameters.isEmpty() }?.let {
                inferenceNodeOf(function, transformer)
            }
        }
}

/**
 * A node representing a variable declaration.
 */
class InferenceVariable(
    private val transformer: ComposableTargetAnnotationsTransformer,
    override val element: IrVariable,
) : InferenceNode() {<|endoftext|>


Prompt:
}

        libraries.forEach { if (it !in visited) dfs(it) }
        return visited
    }

    private data class LibraryFile(val library: KotlinLibrary, val file: String) {
        override fun toString() = "${library.uniqueName}|$file"
    }

    private val KotlinLibrary.isExternal

Response:
get() = autoCacheableFrom.any { libraryFile.absolutePath.startsWith(it.absolutePath) }

    fun build() {
        val externalLibrariesToCache = mutableListOf<KotlinLibrary>()
        val icedLibraries = mutableListOf<KotlinLibrary>()

        val stdlib = konanConfig.distribution.stdlib<|endoftext|>


Prompt:
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface CanvasLineJoin : JsAny {
    companion object
}

public inline val CanvasLineJoin.Companion.ROUND: CanvasLineJoin get() = "round".toJsString().unsafeCast<CanvasLineJoin>()

Response:
public inline val CanvasLineJoin.Companion.BEVEL: CanvasLineJoin get() = "bevel".toJsString().unsafeCast<CanvasLineJoin>()

public inline val CanvasLineJoin.Companion.MITER: CanvasLineJoin get() = "miter".toJsString().unsafeCast<CanvasLineJoin>()

/* please, don't implement this interface! */
@JsName("null")<|endoftext|>


Prompt:
destination += providerHelper.getTopLevelCallableSymbols(callableId, callables.mapTo(mutableSetOf()) { it.containingKtFile })
        }

        override fun getTopLevelFunctionSymbols(packageFqName: FqName, name: Name): List<FirNamedFunctionSymbol> {

Response:
if (!providerHelper.symbolNameCache.mayHaveTopLevelCallable(packageFqName, name)) return emptyList()
            return providerHelper.getTopLevelFunctionSymbols(packageFqName, name)
        }

        @FirSymbolProviderInternals<|endoftext|>


Prompt:
// Here, even though we have an explicit 'override fun foo(x: Int)' in IFooMix, we don't generate a bridge for 'foo' in IFooMix.
        // Thus, class for a lambda created by LambdaMetafactory should provide a bridge for 'foo'.
        // Thus, 'x' should be of a reference type.

Response:
// On the other hand, it should also override IFooInt#foo, where 'x' should be a primitive type.
        // LambdaMetafactory can't handle such case.
        //
        // TODO accept Example 3 if IFooMix is compiled with default interface methods
        // Note that this is a conservative check; if we reject LambdaMetafactory-based closure generation scheme, compiler would still<|endoftext|>


Prompt:
if (location !is JsLocation?) error("JsLocation expected. Found instead: $location")
                if (location == null)
                    null
                else sourceMap.segmentForGeneratedLocation(location.startLine, location.startChar)?.name?.let {
                    it to variable.name.toString()
                }
            }

            if (nameMapping.isEmpty()) return emptyList()

Response:
val expression = nameMapping.joinToString(separator = ",", prefix = "[", postfix = "]") { (_, generatedName) ->
                "__makeValueDescriptionForSteppingTests($generatedName)"
            }
            val evaluationResult = debugger.evaluateOnCallFrame(callFrame.callFrameId, expression, returnByValue = true)
            if (evaluationResult.exceptionDetails != null) {<|endoftext|>


Prompt:
object FirSerializationErrors {
    val INLINE_CLASSES_NOT_SUPPORTED by error2<PsiElement, String, String>()

    val PLUGIN_IS_NOT_ENABLED by warning0<PsiElement>()
    val ANONYMOUS_OBJECTS_NOT_SUPPORTED by error0<PsiElement>()

Response:
val INNER_CLASSES_NOT_SUPPORTED by error0<PsiElement>()

    val EXPLICIT_SERIALIZABLE_IS_REQUIRED by warning0<PsiElement>()

    val COMPANION_OBJECT_AS_CUSTOM_SERIALIZER_DEPRECATED by error1<PsiElement, FirRegularClassSymbol>()<|endoftext|>


Prompt:
build("commonize", "-Pkotlin.mpp.enableNativeDistributionCommonizationCache=true") {
                assertTasksUpToDate(":commonizeNativeDistribution")
                assertNativeDistributionCommonizationCacheHit()
                assertOutputContains("Native Distribution Commonization: All available targets are commonized already")
                assertOutputContains("Native Distribution Commonization: Lock acquired")

Response:
assertOutputContains("Native Distribution Commonization: Lock released")
                assertOutputDoesNotContain(commonizerOutput)
            }

            build("commonize", "-Pkotlin.mpp.enableNativeDistributionCommonizationCache=false") {
                assertTasksExecuted(":commonizeNativeDistribution")
                assertOutputContains("Native Distribution Commonization: Cache disabled")
                assertOutputContains(commonizerOutput)<|endoftext|>


Prompt:
// doesn't support non-sequential access of the entries, so we would have to load and index all entries in memory to provide
    // non-sequential access, thereby increasing memory usage (KT-57757).
    // Another option is to use `java.nio.file.FileSystem` API, but it seems to be slower than the other two.
    private val zipFile = ZipFile(jar)

Response:
override fun getUnixStyleRelativePaths(filter: (unixStyleRelativePath: String, isDirectory: Boolean) -> Boolean): List<String> {
        return zipFile.entries()
            .asSequence()
            .filter { filter.invoke(it.name, it.isDirectory) }<|endoftext|>


Prompt:
fun wasmPlatformByTargetNames(targets: Collection<String>): TargetPlatform =
        wasmPlatformByTargets(targets.mapNotNull { WasmTarget.fromName(it) })

    object Default : TargetPlatform(setOf(WasmPlatformUnspecifiedTarget))
}

fun TargetPlatform?.isWasm(): Boolean = this?.singleOrNull() is WasmPlatform

Response:
fun TargetPlatform?.isWasmJs(): Boolean {
    val platform = this?.singleOrNull()
    return platform is WasmPlatformWithTarget && platform.target == WasmTarget.JS
}
fun TargetPlatform?.isWasmWasi(): Boolean {
    val platform = this?.singleOrNull()
    return platform is WasmPlatformWithTarget && platform.target == WasmTarget.WASI
}<|endoftext|>


Prompt:
override var returnTypeRef: FirTypeRef = FirErrorTypeRefImpl(null, MutableOrEmptyList.empty(), null, null, diagnostic)
    override val receiverParameter: FirReceiverParameter?
        get() = null
    override var controlFlowGraphReference: FirControlFlowGraphReference? = null
    override val body: FirBlock?
        get() = null

    init {

Response:
symbol.bind(this)
        resolveState = resolvePhase.asResolveState()
    }

    override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
        annotations.forEach { it.accept(visitor, data) }
        status.accept(visitor, data)
        returnTypeRef.accept(visitor, data)<|endoftext|>


Prompt:
fun takeValue(): Token.Value? = take(valueRegex)?.let { Token.Value(it.groups[1]!!.value.unescape()) }
        fun takeEquals(): Token.Equals? = take(equalsRegex)?.let { Token.Equals }

        fun hasFinished(): Boolean = remaining.isBlank()
    }

    operator fun invoke(
        vararg options: String,

Response:
locationWithId: SourceCode.LocationWithId? = null
    ): ResultWithDiagnostics<ExternalDependenciesResolver.Options> {

        val map = mutableMapOf<String, String>()

        for (option in options) {
            val scanner = Scanner(option)

            while (!scanner.hasFinished()) {<|endoftext|>


Prompt:
val foo: Int = 1
}

fun case1() {
    Case1().<!DEBUG_INFO_CALL("fqName: tests.diag.invoke; typeCall: variable&invoke")!>foo()<!>
    val a = Case1()

Response:
a.<!DEBUG_INFO_CALL("fqName: tests.diag.invoke; typeCall: variable&invoke")!>foo()<!>
    var b = Case1()
    b.<!DEBUG_INFO_CALL("fqName: tests.diag.invoke; typeCall: variable&invoke")!>foo()<!>
}

// TESTCASE NUMBER: 2
class Case2 {<|endoftext|>


Prompt:
rootProjectVersion,
            npmProjects,
            resolutions,
            rootPackageJsonFile
        )
    }

    override fun resolveRootProject(
        services: ServiceRegistry,
        logger: Logger,
        nodeJs: NodeJsEnvironment,
        packageManagerEnvironment: YarnEnvironment,
        npmProjects: Collection<PreparedKotlinCompilationNpmResolution>,

Response:
cliArgs: List<String>
    ) {
        val nodeJsWorldDir = nodeJs.rootPackageDir

        yarnExec(
            services,
            logger,
            nodeJs,
            packageManagerEnvironment,
            nodeJsWorldDir,
            NpmApiExecution.resolveOperationDescription("yarn"),
            cliArgs
        )
    }<|endoftext|>


Prompt:
private val merger = Merger(moduleDescriptor, config.moduleId, config.moduleKind)

    private val sourceRoots = config.sourceMapRoots.map { File(it) }
    private val deserializer = JsAstDeserializer(merger.program, sourceRoots)

    fun getTranslationResult(unit: TranslationUnit): FileTranslationResult =
        when (unit) {

Response:
is TranslationUnit.SourceFile -> translatedSourceFiles[unit.file]!!
            is TranslationUnit.BinaryAst -> cache.getOrPut(unit) {
                // TODO Don't deserialize header twice
                val inlineData = JsAstProtoBuf.InlineData.parseFrom(CodedInputStream.newInstance(unit.inlineData))

                DeserializedFileTranslationResult(<|endoftext|>


Prompt:
Changes(
            lookupSymbols = setOf(
                LookupSymbol(name = "CoarseGrainedFirstBuild_CoarseGrainedSecondBuild_Class", scope = "com.example"),
                LookupSymbol(name = "CoarseGrainedFirstBuild_FineGrainedSecondBuild_Class", scope = "com.example"),

Response:
LookupSymbol(name = "FineGrainedFirstBuild_CoarseGrainedSecondBuild_Class", scope = "com.example"),
                LookupSymbol(name = "modifiedField", scope = "com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class"),
                LookupSymbol(name = "modifiedMethod", scope = "com.example.FineGrainedFirstBuild_FineGrainedSecondBuild_Class"),<|endoftext|>


Prompt:
* ${expectedRepository}/org/jetbrains/kotlin/artifact/artifact.pom
     */
    private fun Path.toExpectedPath(): Path {
        val artifactDirPath = localRepoPath.relativize(this).parent.parent
        val expectedFileName = "${artifactDirPath.fileName}.pom"

Response:
return expectedRepoPath.resolve(artifactDirPath.resolve(expectedFileName))
    }
}<|endoftext|>


Prompt:
val manifestData = parameters.manifestProvider[outputTarget].buildManifest(libraryName)
        parameters.resultsConsumer.consume(
            parameters, outputTarget,
            ResultsConsumer.ModuleResult(libraryName, serializedMetadata, manifestData)
        )
    }
    parameters.resultsConsumer.targetConsumed(parameters, outputTarget)
}

Response:
// iOS, tvOS, watchOS SDKs from Xcode 14 moved some declarations from CoreGraphics to CoreFoundation (CFCGTypes.h).
// Unfortunately (1), for Kotlin/Native cinterop this is a breaking change, so CFCGTypes platform library with `platform.CoreGraphics`
// package was introduced to mitigate this problem.<|endoftext|>


Prompt:
public override operator fun compareTo(other: Float): Int {
        // if any of values in NaN both comparisons return false
        if (this > other) return 1
        if (this < other) return -1

        val thisBits = this.toBits()
        val otherBits = other.toBits()

        // Canonical NaN bit representation is higher than any other value's bit representation

Response:
return thisBits.compareTo(otherBits)
    }

    /**
     * Compares this value with the specified value for order.
     * Returns zero if this value is equal to the specified other value, a negative number if it's less than other,
     * or a positive number if it's greater than other.
     */
    @kotlin.internal.IntrinsicConstEvaluation<|endoftext|>


Prompt:
val parcelCreateDoubleArray: IrSimpleFunctionSymbol =
        androidOsParcel.owner.addFunction(
            "createDoubleArray",
            irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.doubleType).defaultType
        ).symbol

    val parcelCreateFloatArray: IrSimpleFunctionSymbol =
        androidOsParcel.owner.addFunction(
            "createFloatArray",

Response:
irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.floatType).defaultType
        ).symbol

    val parcelCreateIntArray: IrSimpleFunctionSymbol =
        androidOsParcel.owner.addFunction(
            "createIntArray",
            irBuiltIns.primitiveArrayForType.getValue(irBuiltIns.intType).defaultType
        ).symbol<|endoftext|>


Prompt:
abstract class IrConstantObject : IrConstantValue() {
    abstract var constructor: IrConstructorSymbol

    abstract val valueArguments: MutableList<IrConstantValue>

    abstract val typeArguments: MutableList<IrType>

    override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =

Response:
visitor.visitConstantObject(this, data)

    override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
        valueArguments.forEach { it.accept(visitor, data) }
    }

    override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {<|endoftext|>


Prompt:
x <!UNCHECKED_CAST!>as? C<!>
    }

    class Outer<F> {
        inner class Inner
    }

    // bare type
    if (y is <!NO_TYPE_ARGUMENTS_ON_RHS!>Outer<!>) {
        return y
    }

Response:
if (y is <!CANNOT_CHECK_FOR_ERASED!>Outer<*><!>) {
        return y
    }

    if (y is <!NO_TYPE_ARGUMENTS_ON_RHS!>Outer.Inner<!>) {
        return y
    }<|endoftext|>


Prompt:
@Deprecated(Logger.FATAL_DEPRECATION_MESSAGE, ReplaceWith(Logger.FATAL_REPLACEMENT))
    override fun fatal(message: String): Nothing {
        error(message)
        (messageCollector as? GroupingMessageCollector)?.flush()
        throw CompilationErrorException()
    }
}

Response:
fun MessageCollector.toLogger(treatWarningsAsErrors: Boolean = false): Logger =
    CompilerLoggerAdapter(this, treatWarningsAsErrors)

fun CompilerConfiguration.getLogger(treatWarningsAsErrors: Boolean = false): Logger =<|endoftext|>


Prompt:
// TARGET_BACKEND: JVM_IR

// FILE: Java1.java
public interface Java1 extends KotlinInterface { }

//FILE: Java2.java
public interface Java2 {
    public void bar(int o);
}

//FILE: 1.kt
class A: Java1 {
    override fun bar(o: Int) { }
}

abstract class B : Java1

Response:
interface KotlinInterface : Java2

fun test(b: B) {
    val k = b.bar(1)
}

fun box() = "OK"<|endoftext|>


Prompt:
@JvmInline
value class Some(val value: String)

class RegularClass {
    var classProp: Some = Some("1")
    var classPropImplicit = Some("1")
    var Some.classPropInExtension: Int
        get() = 1
        set(value) {}

    fun classFunInReturn(): Some = Some("1")
    fun classFunInImplicitReturn() = Some("1")

Response:
fun classFunInParameter(s: Some) {}
    fun Some.classFunInExtension() {}
}

interface RegularInterface {
    var interfaceProp: Some
    var Some.interfacePropInExtension: Int

    fun interfaceFunInReturn(): Some
    fun interfaceFunInParameter(s: Some)
    fun Some.interfaceFunInExtension()
}<|endoftext|>


Prompt:
override fun containsPackageFragment(packageFragment: IrPackageFragment): Boolean =
            packageFragment.konanLibrary.let { it == null || containsLibrary(it) }

    private val containsCache = mutableMapOf<IrDeclaration, Boolean>()

    // This is essentially memoizing the IrDeclaration.konanLibrary property -- so much of the implementation

Response:
// is inlined here to take greater advantage of the cache.
    override fun containsDeclaration(declaration: IrDeclaration): Boolean = containsCache.getOrPut(declaration) {
        val metadata = ((declaration as? IrMetadataSourceOwner)?.metadata as? KonanMetadata)
        if (metadata != null) {<|endoftext|>


Prompt:
builderAction: kotlin.collections.MutableSet<E>.() -> kotlin.Unit): kotlin.collections.Set<E>

@kotlin.SinceKotlin(version = "1.6")
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
@kotlin.internal.InlineOnly

Response:
public inline fun <E> buildSet(@kotlin.BuilderInference
builderAction: kotlin.collections.MutableSet<E>.() -> kotlin.Unit): kotlin.collections.Set<E>

public fun <T> emptyList(): kotlin.collections.List<T>

public fun <K, V> emptyMap(): kotlin.collections.Map<K, V><|endoftext|>


Prompt:
assertOutputDoesNotContain(s)
                        }

                    }

                    KonanTarget.MACOS_X64 -> {
                        for (s in x64TestOutputs) {
                            assertOutputContains(s)
                        }
                        for (s in armTestOutputs) {
                            assertOutputDoesNotContain(s)
                        }
                    }

                    else -> fail("Unexpected host $host")

Response:
}

                val armTests = listOf(
                    ":iosSimulatorArm64Test",
                    ":macosArm64Test",
                    ":tvosSimulatorArm64Test",
                    ":watchosSimulatorArm64Test",
                )

                val x64Tests = listOf(
                    ":iosX64Test",
                    ":macosX64Test",
                    ":tvosX64Test",<|endoftext|>


Prompt: 0x3ff07e0f66afed07UL,     0x3ff07e0f66b097b2UL,     0x3ff07e0f66af425cUL,     0x3fe1e3779b97f4a8UL,

Response: 0x40001fe03f61bad0UL,     0x3fd6a09e667f3bcdUL,     0x401007fe00ff6070UL,     0x3ff07e0f66afed07UL,<|endoftext|>


Prompt:
// !LANGUAGE: -RangeUntilOperator

class A {
    <!UNSUPPORTED_FEATURE("The feature \"range until operator\" is disabled")!>operator<!> fun rangeUntil(other: A): Iterable<A> = TODO()
}

fun main(n: A, f: A) {

Response:
for (i in f<!UNSUPPORTED_FEATURE("The feature \"range until operator\" is disabled")!>..<<!>n) {

    }
}<|endoftext|>


Prompt:
fun collect(fragments: List<IrModuleFragment>) {
        for (fragment in fragments) {
            for (file in fragment.files) {
                for (declaration in file.declarations) {
                    if (declaration is IrClass && declaration.isExpect && declaration.isTopLevel) {
                        expectTopLevelClasses[declaration.classIdOrFail] = declaration.symbol
                    }

Response:
}
            }
        }
    }
}

private class ActualDeclarationsCollector(
    private val expectTopLevelClasses: Map<ClassId, IrClassSymbol>,
) {
    companion object {
        fun collectActualsFromFragments(fragments: List<IrModuleFragment>, expectTopLevelClasses: Map<ClassId, IrClassSymbol>): ClassActualizationInfo {<|endoftext|>


Prompt:
<!CANNOT_INFER_PARAMETER_TYPE!>takeNotNullStringAndKNullable<!>(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
    takeNullableStringAndKNullable(x1)

Response:
<!CANNOT_INFER_PARAMETER_TYPE!>takeNotNullStringAndNotNullK<!>(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
    <!CANNOT_INFER_PARAMETER_TYPE!>takeNullableStringAndNotNullK<!>(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)<|endoftext|>


Prompt:
"Expected at least one Task of $taskPaths had outcome 'SUCCESS', but none did. Actual outcomes: $taskOutcomes"
    }
}

/**
 * Asserts given [taskPaths] have [TaskOutcome.SUCCESS] execution state.
 */
fun BuildResult.assertTasksExecuted(taskPaths: Collection<String>) {

Response:
assertTasksExecuted(*taskPaths.toTypedArray())
}

/**
 * Asserts given [taskPaths] have [TaskOutcome.FAILED] execution state.
 */
fun BuildResult.assertTasksFailed(vararg taskPaths: String) {
    assertTasksHaveOutcome(TaskOutcome.FAILED, taskPaths.asList())
}

/**<|endoftext|>


Prompt:
@Suppress("DEPRECATION")
        libProject.build(
            "publish",
            options = buildOptions
        ) {
            assertSuccessful()
        }
        val localRepo = libProject.projectDir.resolve("repo")
        val localRepoUri = localRepo.toURI()

        with(appProject) {
            setupWorkingDir()

Response:
gradleProperties().appendText(
                """

                kotlin.compiler.execution.strategy=in-process
                """.trimIndent()
            )

            val pathPrefix = "metadataDependency: "

            gradleBuildScript().appendText(
                "\n" + """
                    repositories { maven { url '$localRepoUri' } }<|endoftext|>


Prompt:
outputTarget("(a, b)")

            registerDependency("(a, b)") {
                source(
                    """
                    class Box<T>
                    typealias TA<T> = Box<T>
                    """.trimIndent()
                )
            }

            simpleSingleSourceTarget(
                "a", """
                    class MyClass
                    typealias X = TA<MyClass>

Response:
fun x(x: X) {}
                    fun x2(x: TA<MyClass>) {}
                    fun x3(x: TA<X>) {}
                """.trimIndent()
            )

            simpleSingleSourceTarget(
                "b", """
                    class MyClass
                    typealias X = TA<MyClass>

                    fun x(x: X) {}<|endoftext|>


Prompt:
v.goTo(jumpLabel)

                    v.mark(cmpHighLabel)
                    v.load(arg1Var, operandType)
                    // On stack: high arg
                    // if ([high bound is NOT satisfied]) goto jumpLabel
                    if (boundedValue.isHighInclusive) {
                        // high < arg
                        comparisonGenerator.jumpIfLess(v, jumpLabel)
                    } else {

Response:
// high <= arg
                        comparisonGenerator.jumpIfLessOrEqual(v, jumpLabel)
                    }
                }

            }

            private fun putCoercedArgumentOnStack(v: InstructionAdapter) {
                val argumentKotlinType = rangeContainsTypeInfo.valueParameterType
                val rangeElementKotlinType = rangeContainsTypeInfo.rangeElementType<|endoftext|>


Prompt: if (y != null || <!SENSELESS_COMPARISON!>this.y != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit"), DEBUG_INFO_SMARTCAST!>this.y<!>.funAny()

Response: if (y != null || <!SENSELESS_COMPARISON!>this.y != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>this.y<!>.funNullableT()<|endoftext|>


Prompt:
writeInt(internalizeString(name.ident))
            writeBoolean(name.isTemporary)
            ifNotNull(name.localAlias) { writeLocalAlias(it) }
            writeBoolean(name.imported && name !in importedNames)
            writeBoolean(name.constant)
            ifNotNull(name.specialFunction) { writeByte(it.ordinal) }
        }

Response:
nameMap.size
    }

    private fun DataWriter.writeLocalAlias(alias: LocalAlias) {
        writeInt(internalizeName(alias.name))
        ifNotNull(alias.tag) { writeInt(internalizeString(it)) }
    }

    private fun internalizeString(string: String) = stringMap.getOrPut(string) {
        stringSerializer.writeString(string)<|endoftext|>


Prompt:
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit<!> var e: IC6<String>
    <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit<!> var f: IC6<*>
    <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit<!> var g: IC5

Response:
lateinit var h: IC7<Double>
    lateinit var i: IC7<*>
    lateinit var j: IC8
    <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit<!> var k : IC10
    <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit<!> var o : IC3?<|endoftext|>


Prompt: if (w != null || <!SENSELESS_COMPARISON!>this.w != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?"), DEBUG_INFO_SMARTCAST!>w<!>.funT()

Response: if (w != null || <!SENSELESS_COMPARISON!>this.w != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?"), DEBUG_INFO_SMARTCAST!>w<!>.funAny()<|endoftext|>


Prompt:
val newCompletion = createSimpleCoroutineForSuspendFunction(probeCoroutineCreated(completion))
    return (this as Function2<R, Continuation<T>, Any?>).invoke(receiver, newCompletion)
}

@InlineOnly
internal actual inline fun <R, P, T> (suspend R.(P) -> T).startCoroutineUninterceptedOrReturn(

Response:
receiver: R,
    param: P,
    completion: Continuation<T>
): Any? =
    // Wrap with ContinuationImpl, otherwise the coroutine will not be interceptable. See KT-55869
    if (this !is BaseContinuationImpl) wrapWithContinuationImpl(receiver, param, completion)<|endoftext|>


Prompt:
serializableDesc.isSingleFieldValueClass -> SerializerForInlineClassGenerator(irClass, context)
                else -> SerializerIrGenerator(irClass, context, metadataPlugin)
            }
            generator.generate()
            if (irClass.isFromPlugin(context.afterK2)) {
                // replace origin only for plugin generated serializers

Response:
irClass.origin = SERIALIZATION_PLUGIN_ORIGIN
            }
            irClass.addDefaultConstructorBodyIfAbsent(context)
            irClass.patchDeclarationParents(irClass.parent)
        }
    }
}<|endoftext|>


Prompt:
if (b) x.value<!UNSAFE_CALL!>.<!>length
    if (c) x.value<!UNSAFE_CALL!>.<!>length
}

fun testRequireNotNullViaVariable(x: String?) {
    val a = x != null
    var b = a
    val c = b
    val f: () -> Unit = {
        require(b)

Response:
x<!UNSAFE_CALL!>.<!>length
        require(c)
        x<!UNSAFE_CALL!>.<!>length
    }
    b = true
    f()
}

fun testRequireNotNullViaVariable(x: StringHolder) {
    val a = x.value != null
    var b = a
    val c = b<|endoftext|>


Prompt:
// FILE: test.kt

fun box(): String {
    try {
        val x = "x"
        throw RuntimeException(x)
    } finally {
        return "OK"
    }
    return "FAIL"
}

// EXPECTATIONS JVM_IR
// test.kt:8 box:
// test.kt:9 box:

Response:
// test.kt:10 box: x:java.lang.String="x":java.lang.String
// test.kt:12 box:

// EXPECTATIONS JS_IR
// test.kt:9 box:
// test.kt:10 box: x="x":kotlin.String
// test.kt:12 box: x="x":kotlin.String<|endoftext|>


Prompt:
// KT-22376
    global = ""
    for (s in "AB")
        global += s
    assertEquals("AB", global)

    for (s in (("CD")))
        global += s
    assertEquals("ABCD", global)

    for (s in (("EF")))
        global += s
    assertEquals("ABCDEF", global)

    return "OK"

Response: }<|endoftext|>


Prompt:
override fun findOwnName(name: String): JsName? =
                if (name == ident) labelName else null

        /**
         * Safe call is necessary, because hasOwnName can be called
         * in constructor before labelName is initialized (see KT-4394)
         */

Response:
@Suppress("UNNECESSARY_SAFE_CALL", "SAFE_CALL_WILL_CHANGE_NULLABILITY")
        override fun hasOwnName(name: String): Boolean =
                name in RESERVED_WORDS
                || name == ident
                || name == labelName?.ident
                || parent?.hasOwnName(name) ?: false
    }<|endoftext|>


Prompt:
anew(descriptorForEnumsType)
        dup()
        aconst(serialName)
        aconst(serializableDescriptor.enumEntries().size)
        invokespecial(descriptorForEnumsType.internalName, "<init>", "(Ljava/lang/String;I)V", false)
        checkcast(descImplType)
    }

Response:
override fun ExpressionCodegen.addElementsContentToDescriptor(descriptorVar: Int) = with(v) {
        val enumEntries = serializableDescriptor.enumEntries()
        for (entry in enumEntries) {
            load(descriptorVar, descImplType)
            // regular .serialName() produces fqName here, which is kinda inconvenient for enum entry<|endoftext|>


Prompt:
if (layout.isZipped)
            action(layout.extractingToTemp as L)
        else
            action(layout as L)

    fun <T> inPlace(action: (L) -> T): T =
        if (layout.isZipped)
            klibZipAccessor.withZipFileSystem(layout.klib) { zipFileSystem ->

Response:
action(layout.directlyFromZip(zipFileSystem) as L)
            }
        else
            action(layout as L)
}

class MetadataLibraryAccess<L : KotlinLibraryLayout>(klib: File, component: String, zipAccessor: ZipFileSystemAccessor? = null) :
    BaseLibraryAccess<L>(klib, component, zipAccessor) {<|endoftext|>


Prompt:
is IllegalArgumentException -> e // rethrow IAE as it is already correct exception type
            is VirtualMachineError, is ThreadDeath -> e // rethrow VM errors
            // other exceptions, like IOOBE or InvalidProtocolBufferException from proto parser
            else -> InconsistentKotlinMetadataException("Exception occurred when reading Kotlin metadata", e)
        }
    }
}

Response:
internal inline fun <T> wrapWriteIntoIAE(block: () -> T): T {
    return try {
        block()
    } catch (e: Throwable) {
        throw when (e) {
            is IllegalArgumentException -> e // rethrow IAE as it is already correct exception type
            is VirtualMachineError, is ThreadDeath -> e // rethrow VM errors<|endoftext|>


Prompt:
if (!(element3 in 1..3) != !range0.contains(element3)) throw AssertionError()
    if (!(element3 !in 1..3) != range0.contains(element3)) throw AssertionError()
}

fun testR0xE4() {
    // with possible local optimizations

Response:
if (0.toByte() in 1..3 != range0.contains(0.toByte())) throw AssertionError()
    if (0.toByte() !in 1..3 != !range0.contains(0.toByte())) throw AssertionError()<|endoftext|>


Prompt:
package kotlin.experimental

import kotlin.annotation.AnnotationTarget.*

/**
 * This annotation marks the Kotlin/Native-only standard library API that is considered experimental and is not subject to the
 * [general compatibility guarantees](https://kotlinlang.org/docs/reference/evolution/components-stability.html) given for the standard library:

Response:
* the behavior of such API may be changed or the API may be removed completely in any further release.
 *
 * > Beware using the annotated API especially if you're developing a library, since your library might become binary incompatible
 * with the future versions of the standard library.
 *
 * Any usage of a declaration annotated with `@ExperimentalNativeApi` must be accepted either by<|endoftext|>


Prompt:
// This file was generated automatically. See compiler/fir/tree/tree-generator/Readme.md.
// DO NOT MODIFY IT MANUALLY.

package org.jetbrains.kotlin.fir.references

import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.fir.FirElement

Response:
import org.jetbrains.kotlin.fir.visitors.FirTransformer
import org.jetbrains.kotlin.fir.visitors.FirVisitor
import org.jetbrains.kotlin.name.Name

/**
 * Generated from: [org.jetbrains.kotlin.fir.tree.generator.FirTreeBuilder.namedReference]
 */<|endoftext|>


Prompt:
prerequisite = setOf(jsClassUsageInReflectionPhase)
)

private val primitiveCompanionLoweringPhase = makeIrModulePhase(
    ::PrimitiveCompanionLowering,
    name = "PrimitiveCompanionLowering",
    description = "Replace common companion object access with platform one"
)

private val callsLoweringPhase = makeIrModulePhase(
    ::CallsLowering,

Response:
name = "CallsLowering",
    description = "Handle intrinsics"
)

private val staticMembersLoweringPhase = makeIrModulePhase(
    ::StaticMembersLowering,
    name = "StaticMembersLowering",
    description = "Move static member declarations to top-level"
)

private val objectDeclarationLoweringPhase = makeIrModulePhase(
    ::ObjectDeclarationLowering,<|endoftext|>


Prompt:
* Add the specified packet to the end of the work list used by the task
     * associated with the packet and make the task runnable if it is currently
     * suspended.
     * @param {Packet} packet the packet to add
     */
    fun queue(packet: Packet): TaskControlBlock? {
        val t = this.blocks[packet.id]
        if (t == null) return t

Response:
this.queueCount++
        packet.link = null
        packet.id = this.currentId
        return t.checkPriorityAdd(this.currentTcb!!, packet)
    }
}

var ID_IDLE       = 0
var ID_WORKER     = 1
var ID_HANDLER_A  = 2
var ID_HANDLER_B  = 3<|endoftext|>


Prompt:
@kotlin.SinceKotlin(version = "1.4")
@kotlin.ExperimentalUnsignedTypes
public fun kotlin.ULongArray?.contentToString(): kotlin.String

@kotlin.SinceKotlin(version = "1.4")
@kotlin.ExperimentalUnsignedTypes

Response:
public fun kotlin.UShortArray?.contentToString(): kotlin.String

@kotlin.SinceKotlin(version = "1.3")
@kotlin.internal.InlineOnly<|endoftext|>


Prompt:
import org.jetbrains.kotlin.resolve.calls.checkers.isRestrictedSuspendFunction
import org.jetbrains.kotlin.resolve.calls.checkers.isRestrictsSuspensionReceiver
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
import org.jetbrains.kotlin.storage.LockBasedStorageManager

Response:
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments

class JvmRuntimeTypes(
    module: ModuleDescriptor,
    private val languageVersionSettings: LanguageVersionSettings,
    private val generateOptimizedCallableReferenceSuperClasses: Boolean
) {<|endoftext|>


Prompt:
public class IntArrayList extends AbstractIntList {
    private final ArrayList<Integer> data = new ArrayList<>();

    public IntArrayList() {
        super();
    }

    @Override
    public int size() {
        return data.size();
    }

    @Override
    public boolean isEmpty() {
        return data.isEmpty();
    }

    @Override

Response:
public boolean contains(Object o) {
        return data.contains(o);
    }

    @NotNull
    @Override
    public Iterator<Integer> iterator() {
        return data.iterator();
    }

    @NotNull
    @Override
    public Object[] toArray() {
        return data.toArray();
    }

    @NotNull
    @Override<|endoftext|>


Prompt:
2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622,
    2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638,

Response:
2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654,
    2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670,<|endoftext|>


Prompt:
val kotlinOptions: T

    @OptIn(InternalKotlinGradlePluginApi::class)
    @Deprecated(
        message = KOTLIN_OPTIONS_DEPRECATION_MESSAGE
    )
    fun kotlinOptions(configure: T.() -> Unit) {
        @Suppress("DEPRECATION")
        configure(kotlinOptions)
    }

Response:
@OptIn(InternalKotlinGradlePluginApi::class)
    @Deprecated(
        message = KOTLIN_OPTIONS_DEPRECATION_MESSAGE
    )
    fun kotlinOptions(configure: Action<@UnsafeVariance T>) {
        @Suppress("DEPRECATION")
        configure.execute(kotlinOptions)
    }<|endoftext|>


Prompt:
assertFalse(eqCharQIntQ(1.toChar(), 1.toInt()))
    assertFalse(eqCharQIntQ(1.toChar(), null))
    assertFalse(eqCharQIntQ(1.toChar(), undefined))
    assertFalse(eqCharQIntQ(null, 0.toInt()))
    assertFalse(eqCharQIntQ(null, 1.toInt()))

Response:
assertTrue(eqCharQIntQ(null, null))
    assertTrue(eqCharQIntQ(null, undefined))
    assertFalse(eqCharQIntQ(undefined, 0.toInt()))
    assertFalse(eqCharQIntQ(undefined, 1.toInt()))
    assertTrue(eqCharQIntQ(undefined, null))<|endoftext|>


Prompt:
if (ignoredTests.isNotEmpty()) {
                        add(TestRunParameter.WithGTestPatterns(negativePatterns = ignoredTests))
                    }
                }
            }
            TestKind.REGULAR -> {
                // WithTCLogger relies on TCTestOutputFilter to be present in the checkers.
                assertIs<TCTestOutputFilter>(testCase.checks.testFiltering.testOutputFilter)

Response:
add(TestRunParameter.WithTCTestLogger)
                addIfNotNull(
                    testName?.let(TestRunParameter::WithTestFilter) ?: TestRunParameter.WithPackageFilter(testCase.nominalPackageName)
                )
            }
        }
    }
}<|endoftext|>


Prompt:
fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass()
@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass()

@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {}

Response:
fun UserKlass.testIdenticalExtensionReceivers() {}

@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {}
fun SameUserKlass.testTypeAliasedExtensionReceivers() {}

fun UserKlass.testTypeAliasedExtensionReceiversReverse() {}<|endoftext|>


Prompt:
/**
 * Returns `true` if this nullable char sequence is either `null` or empty or consists solely of whitespace characters.
 *
 * @sample samples.text.Strings.stringIsNullOrBlank
 */
@kotlin.internal.InlineOnly
public inline fun CharSequence?.isNullOrBlank(): Boolean {
    contract {

Response:
returns(false) implies (this@isNullOrBlank != null)
    }

    return this == null || this.isBlank()
}

/**
 * Iterator for characters of the given char sequence.
 */
public operator fun CharSequence.iterator(): CharIterator = object : CharIterator() {
    private var index = 0

    public override fun nextChar(): Char = get(index++)<|endoftext|>


Prompt:
package org.jetbrains.kotlin.commonizer.transformer

import org.jetbrains.kotlin.commonizer.CommonizerSettings
import org.jetbrains.kotlin.commonizer.cir.*
import org.jetbrains.kotlin.commonizer.mergedtree.*

Response:
import org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.Composite.Companion.plus
import org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.ParentNode
import org.jetbrains.kotlin.commonizer.mergedtree.CirNodeRelationship.PreferredNode<|endoftext|>


Prompt:
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>? & Out<kotlin.Int?>")!>x<!>.funNullableAny()
        val y = x.get()
        if (y != null) {
            <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>y<!>

Response:
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>y<!>.equals(null)
            <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>y<!>.propT<|endoftext|>


Prompt:
private fun directDependencyOnResourcesProducer(
        producerTarget: TargetProvider,
        consumerTarget: TargetProvider,
        strategy: KotlinTargetResourcesResolutionStrategy,
        dependencyScope: DependencyScopeProvider = { ::implementation },
        assert: (consumer: Project, producer: Project) -> Unit,
    ) {
        val rootProject = buildProject()

Response:
val producer = rootProject.createSubproject(
            "producer",
            resolutionStrategy = strategy,
        ) {
            kotlin { producerTarget() }
        }
        val consumer = rootProject.createSubproject(
            "consumer",
            resolutionStrategy = strategy,
        ) {
            kotlin {
                consumerTarget()
                sourceSets.commonMain {
                    dependencies {<|endoftext|>


Prompt:
@Composable
            fun test() {
                <call>A(123) { it ->
                    println(it)
                }
                <call>B(123) { it ->
                    <call>it(456)
                }
            }
        """
    )

    // TODO(chuckj): Replace with another nested function call.
    fun xtestMethodInvocations() = assertInterceptions(

Response:
"""
            import androidx.compose.runtime.*

            val x = CompositionLocal.of<Int> { 123 }

            @Composable
            fun test() {
                x.<call>Provider(456) {

                }
            }
        """
    )

    @Test
    fun testReceiverLambdaInvocation() = assertInterceptions(
        """<|endoftext|>


Prompt:
val firstExportedRealOverride = runIf(isFakeOverride) {
        resolveFakeOverrideMaybeAbstract { it === this || it.parentClassOrNull?.isExported(context) != true }
    }

    if (firstExportedRealOverride?.parentClassOrNull.isExportedInterface(context) && firstExportedRealOverride?.isJsExportIgnore() != true) {
        return true
    }

Response:
return overriddenSymbols
        .asSequence()
        .map { it.owner }
        .filterIsInstance<IrOverridableDeclaration<*>>()
        .filter { it.overriddenSymbols.isEmpty() }
        .mapNotNull { it.parentClassOrNull }
        .map { it.symbol }
        .any { it == context.irBuiltIns.enumClass }
}<|endoftext|>


Prompt: // library.kt:36 baz: param:int=6:int, b:int=2:int, inlineCallParam1\17:int=1:int, inlineCallParam2\17:int=2:int, $i$f$inlineCall\17\18:int=0:int, e\17:int=5:int

Response:
// library.kt:21 baz: param:int=6:int, b:int=2:int
// library.kt:23 box: $i$f$bar:int=0:int
// test.kt:55 box:<|endoftext|>


Prompt:
* Resets a range of array elements at a specified [fromIndex] (inclusive) to [toIndex] (exclusive) range of indices
 * to some implementation-specific _uninitialized_ value.
 * In particular, references stored in these elements are released and become available for garbage collection.
 * Attempts to read _uninitialized_ values work in implementation-dependent manner,
 * either throwing exception or returning some kind of implementation-specific default value.
 */

Response:
internal fun <E> Array<E>.resetRange(fromIndex: Int, toIndex: Int) {
    arrayFill(@Suppress("UNCHECKED_CAST") (this as Array<Any?>), fromIndex, toIndex, null)
}

@GCUnsafeCall("Kotlin_Array_copyImpl")<|endoftext|>


Prompt:
@DisplayName("Kotlin daemon should allow to define own jvm options via gradle daemon jvm args system property")
    @GradleTest
    internal fun shouldAllowToRedefineViaDGradleOption(gradleVersion: GradleVersion) {
        project(
            projectName = "simpleProject",
            gradleVersion = gradleVersion,
            enableKotlinDaemonMemoryLimitInMb = null,

Response:
enableGradleDaemonMemoryLimitInMb = null,
        ) {
            gradleProperties.append(
                """
                org.gradle.jvmargs =-Xmx758m -Dkotlin.daemon.jvm.options=Xmx1g,Xms128m
                """.trimIndent()
            )

            build("assemble") {<|endoftext|>


Prompt:
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// Field VS property: case "reference", protected field, invisible property

// FILE: BaseJava.java

package base;

public class BaseJava {
    protected String a = "";
}

// FILE: Derived.kt

package derived

import base.BaseJava

Response:
open class Intermediate : BaseJava() {
    private val a = "FAIL"
}

class Derived : Intermediate() {
    fun foo() = a

    fun bar() {
        a = "OK"
    }
}

fun box(): String {
    val d = Derived()
    d.bar()
    return d.foo()
}<|endoftext|>


Prompt:
return "Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list3"
    }

    val list4 = ArrayList<ULong>()
    val range4 = MaxUL - 2u..MaxUL step 2
    for (i in range4) {
        list4.add(i)
        if (list4.size > 23) break
    }

Response:
if (list4 != listOf<ULong>(MaxUL - 2u, MaxUL)) {
        return "Wrong elements for MaxUL - 2u..MaxUL step 2: $list4"
    }

    return "OK"
}<|endoftext|>


Prompt:
// !DIAGNOSTICS: -UNUSED_PARAMETER

interface Context
class Point

class Example {
    constructor(context: Context?)
    constructor(context: Context?, arg1: Int)
    constructor(context: Context?, arg1: Int, arg2: Int)
    constructor(context: Context?, arg1: Int, arg2: Int, arg3: Int)

Response:
var condition: Boolean = false
    private var index = <!DEBUG_INFO_LEAKING_THIS!>newIndex<!>(condition)
    private fun newIndex(zero: Boolean) = if (zero) 0 else 1

    private lateinit var latePoint1: Point
    private lateinit var latePoint2: Point

    private val point1 = Point()
    private val point2 = Point()<|endoftext|>


Prompt:
declaration.initializer?.resolvedType?.let { it to declaration.source } ?: run {
                    val getter = declaration.getter
                    // Getter can have delegate call as the source, but diagnostic must be reported on KtDeclaration
                    val getterDeclarationSource = if (declaration.delegate != null) declaration.source else getter?.source

Response:
(getter?.body?.singleExpressionType to getterDeclarationSource)
                }
            }
            is FirFunction -> declaration.body?.singleExpressionType to declaration.source
            else -> error("Should not be there")
        }

        type?.let { checkTypeAndArguments(it, context, reporter, source) }
    }

    private fun checkTypeAndArguments(<|endoftext|>


Prompt:
* The reference is without a receiver, i.e. it either references a top-level property or
 * has the receiver bound to it.
 *
 * Example:
 *
 * ```
 * class Login(val username: String)
 * val defaultLogin = Login("Admin")
 * val defaultUsername by defaultLogin::username
 * // equivalent to
 * val defaultUserName get() = defaultLogin.username
 * ```
 */

Response:
@SinceKotlin("1.4")
@kotlin.internal.InlineOnly
public inline operator fun <V> KProperty0<V>.getValue(thisRef: Any?, property: KProperty<*>): V {
    return get()
}

/**
 * An extension operator that allows delegating a mutable property of type [V]
 * to a property reference to a mutable property of the same type [V].<|endoftext|>


Prompt: if (c != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?"), DEBUG_INFO_SMARTCAST!>c<!>.funT()

Response:
if (c != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?"), DEBUG_INFO_SMARTCAST!>c<!>.funAny()

        if (c != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>c<!>.funNullableT()<|endoftext|>


Prompt:
* Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex].
     *
     * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence.
     *
     * @sample samples.text.Regexps.findAll
     */

Response:
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
    public actual fun findAll(input: CharSequence, startIndex: Int = 0): Sequence<MatchResult> {
        if (startIndex < 0 || startIndex > input.length) {
            throw IndexOutOfBoundsException("Start index out of bounds: $startIndex, input length: ${input.length}")
        }<|endoftext|>


Prompt:
return "FAIL in exception: " + e.message
        } else {
            return "CATCHED_EXCEPTION"
        }
    }

    return "FAIL";
}

fun test2(h: Holder): String {

    val localResult = doCall (
            {
                h.value += "OK_LOCAL"
                throw RuntimeException()
                "OK_LOCAL"

Response:
},
            {
                h.value += ", OK_EXCEPTION"
                "OK_EXCEPTION"
            },
            {
                h.value += ", OK_FINALLY"
                "OK_FINALLY"
            })

    return localResult;
}

fun test3(h: Holder): String {
    try {
        val localResult = doCall (
                {<|endoftext|>


Prompt:
var max = this[0]
    for (i in 1..lastIndex) {
        val e = this[i]
        if (max < e) max = e
    }
    return max
}

/**
 * Returns the largest element.
 *
 * @throws NoSuchElementException if the array is empty.
 */
@SinceKotlin("1.7")

Response:
@kotlin.jvm.JvmName("maxOrThrow-U")
@ExperimentalUnsignedTypes
@Suppress("CONFLICTING_OVERLOADS")
public fun UShortArray.max(): UShort {
    if (isEmpty()) throw NoSuchElementException()
    var max = this[0]
    for (i in 1..lastIndex) {
        val e = this[i]<|endoftext|>


Prompt:
// This file was generated automatically. See compiler/fir/tree/tree-generator/Readme.md.
// DO NOT MODIFY IT MANUALLY.

@file:Suppress("DuplicatedCode")

package org.jetbrains.kotlin.fir.contracts.impl

import org.jetbrains.kotlin.KtSourceElement

Response:
import org.jetbrains.kotlin.fir.contracts.FirRawContractDescription
import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.visitors.FirTransformer
import org.jetbrains.kotlin.fir.visitors.FirVisitor<|endoftext|>


Prompt:
package kotlin.collections

public actual class ArrayList<E>
/**
 * Creates a new empty [ArrayList] with the specified initial capacity.
 *
 * Capacity is the maximum number of elements the list is able to store in current backing storage.
 * When the list gets full and a new element can't be added, its capacity is expanded,
 * which usually leads to creation of a bigger backing storage.
 *

Response:
* @param initialCapacity the initial capacity of the created list.
 *   Note that the argument is just a hint for the implementation and can be ignored.
 *
 * @throws IllegalArgumentException if [initialCapacity] is negative.
 */
public actual constructor(initialCapacity: Int) : MutableList<E>, RandomAccess, AbstractMutableList<E>() {<|endoftext|>


Prompt:
var Z.nonNull_nonNullMemExt: Z
        get() = this + offset
        set(value) { offset = this + value }

    var Z.nonNull_nullableMemExt: Z?
        get() = this + offset
        set(value) { offset = this + value!! }

    var Z?.nullable_nonNullMemExt: Z
        get() = this!! + offset

Response:
set(value) { offset = this!! + value }

    var Z?.nullable_nullableMemExt: Z?
        get() = this!! + offset
        set(value) { offset = this!! + value!! }
}

var nonNullTopLevel: Z = Z(0U, 0)
var nullableTopLevel: Z? = Z(0U, 0)<|endoftext|>


Prompt:
if (y != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>this.y<!>.funNullableAny()
        if (y != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>this.y<!>

Response: if (y != null || <!SENSELESS_COMPARISON!>this.y != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?"), DEBUG_INFO_SMARTCAST!>y<!>.equals(null)<|endoftext|>


Prompt:
KtNodeTypes.NULLABLE_TYPE -> findChildByType(node, KtTokenSets.TYPE_ELEMENT_TYPES)
                ?.let { referencedTypeExpression(it) }
            else -> null
        }
    }

    val FUN_INTERFACE: LightTreePositioningStrategy = object : LightTreePositioningStrategy() {
        override fun mark(

Response:
node: LighterASTNode,
            startOffset: Int,
            endOffset: Int,
            tree: FlyweightCapableTreeStructure<LighterASTNode>
        ): List<TextRange> {
            return when (node.tokenType) {
                KtNodeTypes.CLASS -> FUN_MODIFIER.mark(node, startOffset, endOffset, tree)<|endoftext|>


Prompt:
@RequireKotlin(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1.0-beta"<!>)
fun f04() {}

@RequireKotlin(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1.1.0-dev-1111"<!>)
fun f05() {}

Response:
@RequireKotlin(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1.5.3.7"<!>)
fun f06() {}

@RequireKotlin(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1..0"<!>)
fun f07() {}<|endoftext|>


Prompt: fun <T> List<T>.testClassLiteral3() = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS, RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<T, Any><!>::class

Response: fun <T> List<T>.testUnresolved1() = <!UNRESOLVED_REFERENCE!>unresolved<!><T>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!><|endoftext|>


Prompt:
val current by lazy { SchemaVersion.parseStringOrThrow(KotlinToolingMetadata.currentSchemaVersion) }
    }
}

internal fun SchemaVersion.Companion.parseStringOrThrow(schemaVersion: String): SchemaVersion {
    fun throwIllegalSchemaVersion(): Nothing = throw IllegalArgumentException(

Response:
"Illegal schemaVersion $schemaVersion. Expected {major}.{minor}.{patch}"
    )

    val parts = schemaVersion.split(".")
    if (parts.size != 3) throwIllegalSchemaVersion()

    return SchemaVersion(
        major = parts[0].toIntOrNull() ?: throwIllegalSchemaVersion(),<|endoftext|>


Prompt:
binaryOperation(FLOAT, LONG, "rem", { a, b -> a.rem(b) }, emptyBinaryFun),
        binaryOperation(FLOAT, SHORT, "rem", { a, b -> a.rem(b) }, emptyBinaryFun),
        binaryOperation(FLOAT, BYTE, "times", { a, b -> a.times(b) }, emptyBinaryFun),

Response:
binaryOperation(FLOAT, DOUBLE, "times", { a, b -> a.times(b) }, emptyBinaryFun),
        binaryOperation(FLOAT, FLOAT, "times", { a, b -> a.times(b) }, emptyBinaryFun),
        binaryOperation(FLOAT, INT, "times", { a, b -> a.times(b) }, emptyBinaryFun),<|endoftext|>


Prompt:
+" }"
    }

    private fun FlowContent.generate(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference) {
        val typeParameter = resolvedReifiedParameterReference.symbol.fir
        +typeParameter.name.identifier
    }

    private fun FlowContent.generate(varargArgumentExpression: FirVarargArgumentsExpression) {

Response:
generateList(varargArgumentExpression.arguments, separator = ",") { generate(it) }
    }

    private fun FlowContent.generate(binaryLogicExpression: FirBinaryLogicExpression) {
        generate(binaryLogicExpression.leftOperand)
        +" ${binaryLogicExpression.kind.token} "<|endoftext|>


Prompt: contract { returns(false) implies (this@case_7_2 !is Number || this@case_7_2 !is Int || <!SENSELESS_COMPARISON!>this@case_7_2 == null<!> || value_2 == null) }

Response:
return !(this@case_7_2 !is Number || this@case_7_2 !is Int || <!SENSELESS_COMPARISON!>this@case_7_2 == null<!> || value_2 == null)
}
fun <T : Any?> T?.case_7_3(value_2: Any?): Boolean? {<|endoftext|>


Prompt:
reporter.reportOn(source, FirJsErrors.CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM, callee, context)
            }
        }
        else -> {
            if (!callToModule && callToNonModule) {

Response:
reporter.reportOn(source, FirJsErrors.CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM, callee, context)
            }
        }
    }
}<|endoftext|>


Prompt:
val containingClassSymbol = declaration.symbol.containingClassLookupTag()?.toFirRegularClassSymbol(context.session)
        if (containingClassSymbol != null) {
            if (containingClassSymbol.isInterface) {
                reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_IN_INTERFACE, context)

Response:
} else if ((modality ?: declaration.modality) == Modality.ABSTRACT) {
                reporter.reportOn(reportSource ?: declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT, context)
            }
        }

        if (declaration !is FirConstructor && declaration.body != null) {<|endoftext|>


Prompt:
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDECLARATION
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_ANNOTATION
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_ANNOTATION_TARGET


Prompt:
hash = hash * 31 + target.hashCode()
            hash = hash * 31 + propagatesToOverrides.hashCode()
            return hash
        }
    }

    class DeprecatedSince(
        annotation: AnnotationDescriptor,
        target: DeclarationDescriptor,
        propagatesToOverrides: Boolean,
        override val deprecationLevel: DeprecationLevelValue

Response:
) : DeprecatedByAnnotation(annotation, target, propagatesToOverrides) {
        override fun equals(other: Any?): Boolean {
            if (this === other) return true
            if (other !is DeprecatedSince) return false

            if (annotation != other.annotation) return false
            if (target != other.target) return false<|endoftext|>


Prompt:
override fun call(it: IC): T = it.extensionInline()
})

fun <T> dispatch(a: IC): T = bar(a, object : IFace<IC, T> {
    override fun call(it: IC): T = it.dispatchInline()
})

fun <T> normal(a: IC): T = bar(a, object : IFace<IC, T> {

Response:
override fun call(it: IC): T = normalInline(it)
})

interface IFace<T, R> {
    fun call(ic: T): R
}

fun <T, R> bar(value: T, f: IFace<T, R>): R {
    return f.call(value)
}

fun box(): String {<|endoftext|>


Prompt:
interface IrTypeTransformer<in D> : IrElementTransformer<D> {
    fun <Type : IrType?> transformType(container: IrElement, type: Type, data: D): Type

    override fun visitValueParameter(declaration: IrValueParameter, data: D): IrStatement {
        declaration.varargElementType = transformType(declaration, declaration.varargElementType, data)

Response:
declaration.type = transformType(declaration, declaration.type, data)
        return super.visitValueParameter(declaration, data)
    }

    override fun visitClass(declaration: IrClass, data: D): IrStatement {
        declaration.valueClassRepresentation?.mapUnderlyingType {
            transformType(declaration, it, data)
        }<|endoftext|>


Prompt:
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetPreset
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTestsPreset

Response:
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTestsPreset
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget<|endoftext|>


Prompt:
var exportedDerived3 = new d.ExportedDerived3 ();
    if (!d.isLegacyBackend()) {
        assertEquals(
            false,
            d.ExportedDerived3.prototype.hasOwnProperty('foo'),
            'Property foo should not be defined for ExportedDerived3.prototype'
        );
        assertEquals(
            false,

Response:
d.ExportedDerived3.prototype.hasOwnProperty('bar'),
            'Property bar should not be defined for ExportedDerived3.prototype'
        );
        assertEquals(
            false,
            d.ExportedDerived3.prototype.hasOwnProperty('baz'),
            'Property baz should not be defined for ExportedDerived3.prototype'
        );
    }

    return 'OK';<|endoftext|>