@Test
	public void testChangeRegParamConflict() throws Exception {

		mtf.initialize("DiffTestPgm1", new OriginalProgramModifierListener() {

			@Override
			public void modifyOriginal(ProgramDB program) {
				try {
					Function applesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "apples" },
							addr(program, "77db1020"), new ByteDataType(), SourceType.USER_DEFINED);
					assertNotNull(applesFunction);
					Parameter parameter1 = new ParameterImpl("P1", new DWordDataType(), program);
					parameter1.setComment("Test Parameter Comment");
					applesFunction.addParameter(parameter1, SourceType.USER_DEFINED);

					Function orangesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "oranges" });
					addParameter(orangesFunction, "A1", SourceType.USER_DEFINED,
						new DWordDataType(), "Test Parameter Comment");
					addParameter(orangesFunction, "A2", SourceType.USER_DEFINED,
						new DWordDataType(), "Test Parameter Comment");

					Function pearsFunction =
						createExternalFunction(program, new String[] { "user32.dll", "pears" });
					addParameter(pearsFunction, "B1", SourceType.USER_DEFINED, new DWordDataType(),
						"Test Parameter Comment");
					addParameter(pearsFunction, "B2", SourceType.USER_DEFINED, new DWordDataType(),
						"Test Parameter Comment");

					Function grapesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "grapes" });
					addParameter(grapesFunction, "C1", SourceType.USER_DEFINED, new DWordDataType(),
						"Test Parameter Comment");
					addParameter(grapesFunction, "C2", SourceType.USER_DEFINED, new DWordDataType(),
						"Test Parameter Comment");

					Function berriesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "berries" });
					addParameter(berriesFunction, "D1", SourceType.USER_DEFINED,
						new DWordDataType(), "Test Parameter Comment");
					addParameter(berriesFunction, "D2", SourceType.USER_DEFINED,
						new DWordDataType(), "Test Parameter Comment");
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyLatest(ProgramDB program) {
				try {
					ProgramContext context = program.getProgramContext();
					Function func;

					func = getExternalFunction(program, new String[] { "user32.dll", "apples" });
					func.setCustomVariableStorage(true);
					changeToRegisterParameter(func, 0, context.getRegister("R1"));

					func = getExternalFunction(program, new String[] { "user32.dll", "oranges" });
					func.setCustomVariableStorage(true);
					changeToStackParameter(func, 1, 0x4);

					func = getExternalFunction(program, new String[] { "user32.dll", "pears" });
					func.getParameter(0).setName("LatestName_0", SourceType.USER_DEFINED);

					func = getExternalFunction(program, new String[] { "user32.dll", "grapes" });
					func.getParameter(1).setDataType(new WordDataType(), SourceType.USER_DEFINED);

					func = getExternalFunction(program, new String[] { "user32.dll", "berries" });
					func.getParameter(0).setComment("test comment.");
				}
				catch (Exception e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				try {
					ProgramContext context = program.getProgramContext();
					Function func;

					func = getExternalFunction(program, new String[] { "user32.dll", "apples" });
					func.setCustomVariableStorage(true);
					changeToStackParameter(func, 0, 0x4);

					func = getExternalFunction(program, new String[] { "user32.dll", "oranges" });
					func.setCustomVariableStorage(true);
					changeToRegisterParameter(func, 1, context.getRegister("r2"));

					func = getExternalFunction(program, new String[] { "user32.dll", "pears" });
					func.getParameter(0).setName("NewName_0", SourceType.USER_DEFINED);

					func = getExternalFunction(program, new String[] { "user32.dll", "grapes" });
					func.getParameter(1)
							.setDataType(new ArrayDataType(new ByteDataType(), 2, 1),
								SourceType.USER_DEFINED);

					func = getExternalFunction(program, new String[] { "user32.dll", "berries" });
					func.getParameter(0).setComment("My sample comment.");
				}
				catch (Exception e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}
		});

		executeMerge(ASK_USER);
		chooseRadioButton(CHECKED_OUT_BUTTON_NAME);// storage change for user32.dll::apples
		chooseRadioButton(CHECKED_OUT_BUTTON_NAME);// storage change for user32.dll::oranges
		chooseVariousOptions(new int[] { INFO_ROW, KEEP_MY });// Name change for user32.dll::pears
		chooseVariousOptions(new int[] { INFO_ROW, KEEP_MY });// Datatype change for user32.dll::grapes
		chooseVariousOptions(new int[] { INFO_ROW, KEEP_MY });// Comment change for user32.dll::berries
		waitForMergeCompletion();

		Function func = getExternalFunction(resultProgram, new String[] { "user32.dll", "apples" });
		Parameter[] parameters = func.getParameters();
		assertEquals(1, parameters.length);
		assertEquals("P1", parameters[0].getName());
		assertEquals(4, parameters[0].getStackOffset());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		Variable[] localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);

		func = getExternalFunction(resultProgram, new String[] { "user32.dll", "oranges" });
		parameters = func.getParameters();
		assertEquals(2, parameters.length);
		assertEquals("A1", parameters[0].getName());
		assertEquals("r12", parameters[0].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		assertEquals("A2", parameters[1].getName());
		assertEquals("r2", parameters[1].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[1].getDataType()));
		localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);

		func = getExternalFunction(resultProgram, new String[] { "user32.dll", "pears" });
		parameters = func.getParameters();
		assertEquals(2, parameters.length);
		assertEquals("NewName_0", parameters[0].getName());
		assertEquals("r12", parameters[0].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		assertEquals("B2", parameters[1].getName());
		assertEquals("r11", parameters[1].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[1].getDataType()));
		localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);

		func = getExternalFunction(resultProgram, new String[] { "user32.dll", "grapes" });
		parameters = func.getParameters();
		assertEquals(2, parameters.length);
		assertEquals("C1", parameters[0].getName());
		assertEquals("r12", parameters[0].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		assertEquals("C2", parameters[1].getName());
		assertEquals("r11l", parameters[1].getRegister().getName());
		assertTrue(
			new ArrayDataType(new ByteDataType(), 2, 1).isEquivalent(parameters[1].getDataType()));
		localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);

		func = getExternalFunction(resultProgram, new String[] { "user32.dll", "berries" });
		parameters = func.getParameters();
		assertEquals(2, parameters.length);
		assertEquals("D1", parameters[0].getName());
		assertEquals("r12", parameters[0].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		assertTrue("My sample comment.".equals(parameters[0].getComment()));
		assertEquals("D2", parameters[1].getName());
		assertEquals("r11", parameters[1].getRegister().getName());
		assertTrue(new DWordDataType().isEquivalent(parameters[1].getDataType()));
		localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);
	}
Remove a register parameter vs change the register on a register parameter.

@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/ExternalFunctionMergeManagerTest.java