public void replaceFunctionParameterDataType(Address originEntryPoint, int ordinal,
			TaskMonitor monitor) {
		Address resultEntryPoint = originToResultTranslator.getAddress(originEntryPoint);
		Function f1 = resultProgram.getFunctionManager().getFunctionAt(resultEntryPoint);
		Function f2 = originProgram.getFunctionManager().getFunctionAt(originEntryPoint);
		if (f1 != null && f2 != null) {
			Parameter p1 = f1.getParameter(getAdjustedResultOrdinal(f1, f2, ordinal));
			Parameter p2 = f2.getParameter(ordinal);
			try {
				try {
					if (f1.hasCustomVariableStorage() &&
						p1.getVariableStorage().isUnassignedStorage()) {
						p1.setDataType(p2.getDataType(), p2.getVariableStorage(), false,
							f2.getSignatureSource());
					}
					else if (p1.isAutoParameter()) {
						// skip
						// TODO: this may not handle all situations where p2 really needs to be inserted !!
						String msg = "Auto-parameter datatype may not be modified, " +
							p1.getFunction().getName(true) + ":" + p1.getName();
						Msg.error(this, msg);
						errorMsg.append(msg + "\n");
					}
					else {
						DataType dt = p2.getDataType();
						if (!f1.hasCustomVariableStorage()) {
							dt = p2.getFormalDataType();
						}
						p1.setDataType(dt, true, false, SourceType.ANALYSIS);
					}
				}
				catch (InvalidInputException e) {
					DataType dt = p2.getDataType();
					if (!f1.hasCustomVariableStorage()) {
						dt = p2.getFormalDataType();
					}
					p1.setDataType(dt, VariableStorage.UNASSIGNED_STORAGE, false,
						SourceType.DEFAULT);
					String msg = "Parameter storage forced to UNASSIGNED for " +
						p1.getFunction().getName(true) + ":" + p1.getName() + ":\n    " +
						e.getMessage();
					Msg.error(this, msg);
					errorMsg.append(msg + "\n");
				}
			}
			catch (InvalidInputException e) {
				String msg =
					"Can't replace parameter datatype for " + p1.getFunction().getName(true) + ":" +
						p1.getName() + ":\n    " + e.getMessage();
				Msg.error(this, msg);
				errorMsg.append(msg + "\n");
			}
		}
	}
<CODE>replaceFunctionParameterDataType</CODE> replaces the data type of the indicated
function parameter in program1 with the data type from the origin program.
@param originEntryPoint the entry point address of the function to modify.
This address should be derived from the origin program.
@param ordinal the index of the parameter to change.
@param monitor the task monitor for notifying the user of progress.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java