private static ExternalMatchType testExternalNameMatch(ExternalLocation extLoc1,
			ExternalLocation extLoc2) {
		boolean isDefaul1 = extLoc1.getSymbol().getSource() == SourceType.DEFAULT;
		boolean isDefaul2 = extLoc2.getSymbol().getSource() == SourceType.DEFAULT;
		if (isDefaul1 || isDefaul2) {
			return ExternalMatchType.NONE;
		}
		if (!extLoc1.getLibraryName().equals(extLoc2.getLibraryName())) {
			return ExternalMatchType.NONE; // assume this prevails over Namespace
		}

		String name1 = extLoc1.getLabel();
		String name2 = extLoc2.getLabel();
		String origName1 = extLoc1.getOriginalImportedName();
		String origName2 = extLoc2.getOriginalImportedName();
		if (origName1 != null) {
			if (origName2 != null) {
				// assume mangled names if both known must match
				return origName1.equals(origName2) ? ExternalMatchType.MANGLED_NAME
						: ExternalMatchType.NONE;
			}
			// mangled name must be in root namespace of library
			if (extLoc2.getSymbol().getParentNamespace().isLibrary() && origName1.equals(name2)) {
				return ExternalMatchType.MANGLED_NAME;
			}
		}
		else if (origName2 != null && extLoc1.getSymbol().getParentNamespace().isLibrary() &&
			origName2.equals(name1)) {
			return ExternalMatchType.MANGLED_NAME;
		}
		return name1.equals(name2) ? ExternalMatchType.NAME : ExternalMatchType.NONE;
	}
Generate relative rank when a non-default name match occurs.
Method should not be invoked when either location symbol has a default source type.
@param targetAddr
@param targetNamespace
@param targetName
@param targetOrigImportedName
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/SimpleDiffUtility.java