The only difference is a line which implements a different type of node.
Separate the method into a more generic class (OPMWTemplate2Graph) and then 2 extensions.
The method could be separated into an initialization in the extended class with the particular type of node and then the resto of the method in the generalized class.
The only difference is a line which implements a different type of node. Separate the method into a more generic class (OPMWTemplate2Graph) and then 2 extensions. The method could be separated into an initialization in the extended class with the particular type of node and then the resto of the method in the generalized class.