A few things come to mind:
Malfunctioning injector (s)
Incorrect timing (easy check)
Buildup of carbon in the cylinder (pull your spark plugs [one at a time] and a quick peek might reveal)
These are the leading causes these days for gasoline engines to have a "dieseling" problem.
With you having a rough idle and hesitation to boot, sounds like a timing issue. How many miles on it? When were the plugs/wires last changed? (I've lost count on how many times I have come over to someone's house that attempted to DYI a poor man's tuneup - and miss wired - causing this problem....
Update info always appreciated ~ even if you fixed it on your own...