Meet Bob. Bob went out on the town wearing boxer shorts which in itself is entirely legal. A security guard pointed out to Bob that his shorts were unbuttoned so Bob buttoned them up. They later accused Bob of having his genitals hanging visibly out the front at one point which, even if truthful, he certainly was not aware of and did not intend.
If this was true, then what offences might Bob have been committing, and would they have required his self exposure to be intentional?
England and Wales specified, other jurisdictions always welcome.