 This famous passage is sometimes called the Proportionality Doctrine. It sounds like Bentham. The first sentence appears to endorse utilitarianism, while the second sentence appears to endorse a hedonistic conception of utilitarianism.