@Override
	public Set<Function> getCalledFunctions(TaskMonitor monitor) {
		monitor = TaskMonitor.dummyIfNull(monitor);
		Set<Function> callees = new HashSet<>();
		ReferenceManager refManager = program.getReferenceManager();
		AddressRangeIterator rangeIter = getBody().getAddressRanges();

		while (rangeIter.hasNext()) {
			AddressRange range = rangeIter.next();
			ReferenceIterator refIter = refManager.getReferenceIterator(range.getMinAddress());
			while (refIter.hasNext()) {
				if (monitor.isCancelled()) {
					return callees;
				}
				Reference ref = refIter.next();
				if (!range.contains(ref.getFromAddress())) {
					break; // exhausted all addresses in the AddressRange, check next AddressRange
				}
				if (!ref.getReferenceType().isCall()) {
					continue; // reference is not a call, check next reference
				}
				Function callee = manager.getFunctionAt(ref.getToAddress());
				if (callee != null) {  // sanity check
					callees.add(callee);
				}
			}
		}
		return callees;
	}
Sets the indicated function flag to true or false.

@param functionFlagIndicator
           the function flag from the FunctionAdapter class (i.e.
           FunctionAdapter.FUNCTION_VARARG_FLAG,
           FunctionAdapter.FUNCTION_INLINE_FLAG,
           FunctionAdapter.FUNCTION_NO_RETURN_FLAG,
           FunctionAdapter.FUNCTION_CUSTOM_PARAM_STORAGE_FLAG)
@param shouldBeSet
           true means the indicated flag should be set.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java