1. A non-transitory device-readable storage medium storing instructions, the instructions when executed causing one or more processors to: identify two or more reuse candidates in a graphical state diagram model, the reuse candidates comprising at least an element in the state diagram model; select a canonicalized version of the reuse candidates, the canonicalized version of the reuse candidates having a generalized structure for representing a structure of the reuse candidates; and insert the canonicalized version of the reuse candidates into the state diagram model in place of the reuse candidates.