SourceType getInferredSignatureSource() {

		DataType returnType = getReturnType();
		boolean isReturnUndefined = Undefined.isUndefined(returnType);
		SourceType type = isReturnUndefined ? SourceType.DEFAULT : SourceType.ANALYSIS;

		Parameter[] parameters = getParameters();
		for (Parameter parameter : parameters) {
			if (Undefined.isUndefined(parameter.getDataType())) {
				continue;
			}
			SourceType paramSourceType = parameter.getSource();
			if (paramSourceType != SourceType.ANALYSIS &&
				paramSourceType.isHigherPriorityThan(SourceType.ANALYSIS)) {
				type = paramSourceType;
			}
			else {
				type = SourceType.ANALYSIS;
			}
		}
		return type;
	}
Get the inferred signature source type for use during upgrade
@return inferred signature source
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java