public static ExtractableCodeDescriptor createNewDescriptor(
            @NotNull ExtractableCodeDescriptor originalDescriptor,
            @NotNull String newName,
            @Nullable KtModifierKeywordToken newVisibility,
            @Nullable FirExtractFunctionParameterTablePanel.ParameterInfo newReceiverInfo,
            @NotNull List<FirExtractFunctionParameterTablePanel.ParameterInfo> newParameterInfos,
            @Nullable KaType returnType
    ) {
        Map<Parameter, Parameter> oldToNewParameters = new LinkedHashMap<>();
        for (FirExtractFunctionParameterTablePanel.ParameterInfo parameterInfo : newParameterInfos) {
            oldToNewParameters.put(parameterInfo.getOriginalParameter(), parameterInfo.toParameter());
        }
        Parameter originalReceiver = originalDescriptor.getReceiverParameter();
        Parameter newReceiver = newReceiverInfo != null ? newReceiverInfo.toParameter() : null;
        if (originalReceiver != null && newReceiver != null) {
            oldToNewParameters.put(originalReceiver, newReceiver);
        }

        ExtractionData data = originalDescriptor.getExtractionData();
        return new ExtractableCodeDescriptor(originalDescriptor.getContext(),
                                             data,
                                             List.of(newName),
                                             newVisibility,
                                             oldToNewParameters.values().stream().toList(),
                                             newReceiver,
                                             originalDescriptor.getTypeParameters(),
                                             originalDescriptor.getReplacementMap(),
                                             originalDescriptor.getControlFlow(),
                                             returnType,
                                             originalDescriptor.getModifiers(),
                                             originalDescriptor.getOptInMarkers(),
                                             originalDescriptor.getAnnotationClassIds());
    }
public static ExtractableCodeDescriptor createNewDescriptor(
            @NotNull ExtractableCodeDescriptor originalDescriptor,
            @NotNull String newName,
            @Nullable KtModifierKeywordToken newVisibility,
            @Nullable FirExtractFunctionParameterTablePanel.ParameterInfo newReceiverInfo,
            @NotNull List<FirExtractFunctionParameterTablePanel.ParameterInfo> newParameterInfos,
            @Nullable KaType returnType
    )