1. A method comprising: determining, by a system comprising a processor and a non-transitory computer-readable storage medium, a similarity metric representing similarity between a plurality of trees stored in computer-readable media, wherein the determined similarity metric is based on similarities between all nodes of the plurality of trees and is computed based on combining the similarities of the nodes of the plurality of trees; constructing, by the system, a distance matrix including a distance between sub-trees of the plurality of trees based on the determined similarity metric; correlating, by the system, the sub-trees based on the distance matrix; rating, by the system, the sub-trees for a specified parameter; modifying, by the system, a first tree of the plurality of trees by substituting a first sub-tree in the first tree with a second sub-tree in a second tree of the plurality of trees, the substituting based on the rating and a similarity score representing a similarity between the first and second sub-trees; and use the modified first tree to modify a manufacture of a device represented by the first tree, wherein the use of the modified first tree causes use of a component represented by the second sub-tree in the manufacture of the device instead of use of a component represented by the first sub-tree.