public void replaceFunctionCallingConvention(Address originEntryPoint, TaskMonitor monitor) {
		Address resultEntryPoint = originToResultTranslator.getAddress(originEntryPoint);
		Function f1 = resultProgram.getFunctionManager().getFunctionAt(resultEntryPoint);
		Function f2 = originProgram.getFunctionManager().getFunctionAt(originEntryPoint);
		if (f1 != null && f2 != null) {
			String name1 = f1.getCallingConventionName();
			String name2 = f2.getCallingConventionName();
			if (!name1.equals(name2)) {
				try {
					f1.setCallingConvention(name2);
				}
				catch (InvalidInputException e) {
					errorMsg.append("InvalidInputException replacing calling convention: " +
						e.getMessage() + "\n");
				}
			}
		}
	}
<CODE>replaceFunctionCallingConvention</CODE> changes the function calling convention
in program1 if it doesn't match the function calling convention in program2
at the specified entry point address.
@param originEntryPoint the entry point address of the function.
This address should be derived from the origin program.
@param monitor the task monitor for notifying the user of this merge's progress.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java