No, you shouldn't be seeing duplicate lines. The HTML editor does support keyboard shortcuts to a limited degree (which was the first thing I checked on), but there doesn't seem to be a Sublime Text-like multiselect function deliberately built in, so accidentally hitting the wrong key combination or something like that didn't do it (or, at least, wasn't supposed to do it). What browser/OS are you using? That will make a difference in finding/reporting a bug.
It's safer, and probably a better idea, to work on your files offline rather than using the cPanel editor when you can. Bad things can happen to the file you're working on either way, of course, but there's a lesser chance of something catastrophic going on locally (unless your local machine is unusually crashy), and you can have both the old and new versions available locally to cover both coding errors and upload errors. (If you use a version control system like git or Mercurial along with backups, your buttocks will be covered in several layers of clothing and very well-padded at all times. Yes, it is a bit of a pain to install, learn and get into the habit of using a VCS, but having both "infinite undo" even after saving and closing a file and a disaster recovery system rolled into one is very much worth it.)