public static AddressSetView getFunctionBody(Program program, Address entry,
			boolean includeOtherFunctions, TaskMonitor monitor) {

		Instruction instr = program.getListing().getInstructionAt(entry);
		if (instr == null) {
			// return single byte body
			return new AddressSet(entry, entry);
		}

		FlowType[] dontFollow = { RefType.COMPUTED_CALL, RefType.CONDITIONAL_CALL,
			RefType.UNCONDITIONAL_CALL, RefType.INDIRECTION };
		FollowFlow flow =
			new FollowFlow(program, entry, dontFollow, includeOtherFunctions, false, true);
		return flow.getFlowAddressSet(monitor);
	}
Find the function body by following all flows other than a call from the
entry point.
@param program the program where the function is being created.
@param entry entry point to start tracing flow

@return AddressSetView address set representing the body of the function
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/CreateFunctionCmd.java