I had an old optical mouse that had a frayed wire, and it would cause the mouse to cut out on a regular basis due to shorting wires.
So I'd decided to fix it and get the mouse working again, so after cutting the wire in half to remove the damaged portion and then soldering it back together, it was good as new!
There are some pictures of the process below. I do not recommend doing this, as you could risk damaging your computer if you don't know what you're doing. I take no responsibility for any damaged hardware. Do this at your own risk!