When you Insert code... every time you save, a line is added to the top and bottom around the code box.
If I save 5 times... I get 5 new lines.
Yeah, it's a pain. I have typos I didn't wanted to fix just because the post would end up looking really awful with so many "<p> </p>"