Matching hierarchical structures using association graphs