UAST diffs to detect code similarity

One of the use cases of babelfsh in the documentation is UAST diffs: Understanding changes made to code with finer-grained granularity.
Is it possible to use this to find similarities between 2 or more code fragments(detect clones)?
I am able to generate the ASTs but I dont know how i can compare them effectively.