The figurative language used in the above sentence is METAPHOR.
Metaphor is a figure of speech comparing two unrelated objects for rhetorical effects.
The public is compared with swine or pig.
Advertising is compared with the rattling of a stick inside a swill-bucket.