public void deleteFunction(String address) throws Exception {

		tx(() -> {
			Address entryPoint = addr(address);
			FunctionManager functionManager = program.getFunctionManager();
			functionManager.removeFunction(entryPoint);
		});
	}
Creates a function by examining the instructions to find the body.

@param addressString the address
@return the function
Ghidra/Features/Base/src/main/java/ghidra/program/database/ProgramBuilder.java