ExtractableCodeDescriptor ( @NotNull ExtractableCodeDescriptor originalDescriptor, @NotNull String newName, @Nullable KtModifierKeywordToken newVisibility, @Nullable ExtractFunctionParameterTablePanel.ParameterInfo newReceiverInfo, @NotNull List<ExtractFunctionParameterTablePanel.ParameterInfo> newParameterInfos, @Nullable KotlinType returnType ) { Map<Parameter, Parameter> oldToNewParameters = new LinkedHashMap<>(); for (ExtractFunctionParameterTablePanel.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); } return ExtractableCodeDescriptorKt.copy(originalDescriptor, newName, newVisibility, oldToNewParameters, newReceiver, returnType); }