private Set<VTAssociation> getAllRelatedAssociations(Address source, Address destination,
			TaskMonitor monitor) throws CancelledException {

		// get all associations with the same source or the same destination address
		VTAssociationManager vtAssocManager = session.getAssociationManager();
		Collection<VTAssociation> relatedAssociations =
			vtAssocManager.getRelatedAssociationsBySourceAndDestinationAddress(
				source, destination);

		Set<VTAssociation> allRelatedAssociations = new HashSet<VTAssociation>(relatedAssociations);

		// from the initial set of related associations get all the other ones that have related
		// associations with all the source/destinations of the newly found associations
		for (VTAssociation association : relatedAssociations) {
			monitor.checkCancelled();

			allRelatedAssociations
					.addAll(vtAssocManager.getRelatedAssociationsBySourceAndDestinationAddress(
						association.getSourceAddress(), association.getDestinationAddress()));
		}

		return allRelatedAssociations;
	}
Get the entire set of related duplicate functions with the same instructions
@param source the given source address
@param destination the given destination address
@param monitor the task monitor
@return the entire set of related duplicate functions with the same instructions
@throws CancelledException if cancelled
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.java