Applies refactored patterns to Subnet and Port.