Clustering code for Patent Agility