You can buy just a male end cap and install. Don't throw out the baby with the bath water.
Should the tape be wrapped clockwise or counterclockwise? Do you use the left hand rule, or the right hand rule?But take electrical tape and tape that up thoroughly.... get both the sheath and the end of the plug...to protect it from further damage...and use it carefully... pull it off by the plug, not pulling on the cord.
First off it should be plugged into an GFCI outlet. To make it safe no matter what condition the cord is in.
Now I understand how this probably happened. I’ve always known not to unplug anything by yanking on the cord. Thanks.Have someone (or thing) hold the opposite end's outer jacket and wires (gloves, vise, etc.) near the plug.
Then, starting at the end that is now fairly secure, pull you hand towards the end in your photo. The goal is to "lengthen" the outer jacket by coaxing it towards the short jacket end. You'll gain maybe 1/4" with each full length pull. Think of a tight pillow case where you slowly manage to get the case up over the innards. You'll get the 1/4" of slack, then have to coax that 1/4" further along by repeating the stroking/pulling action.
After a few tries you'll have excess outer jacket at the socket end (the one in your photo) and you can guide that excess into the recess of that molded socket.
Does this cure the problem? Not really. During construction, the inner wires are twisted with each other and then the jacket added, thus the twisted inner wires are simply acting like the threads of a bolt, causing the outer jacket to migrate along the length of the thread. So, during use, the cord is stretched, coiled, thrown about and otherwise abused which make the outer jacket conflict with the "thread" and it's trying to unscrew itself.
You can also change the socket (female end) as aptly advised by others - perhaps with a new end that has a very secure clamp to help hold the jacket and slow down the inevitable migration down the "thread twists".
I probably use more tape than anyone for small patches with duct tape but I have plenty of black electrical tape. My kids used to have a pet rabbit. When bunnys see a cord they think it’s a tree root they need to chew through.Everyone above is correct...no argument ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ and I'll catch he11 for this...
But take electrical tape and tape that up thoroughly.... get both the sheath and the end of the plug...to protect it from further damage...and use it carefully... pull it off by the plug, not pulling on the cord.
(Honest speaking, some of my construction cords resemble a zebra.,,, and I'll bet I'm not the Lone Ranger))
I have witnessed OSHA rejecting extension cords, too. Sometimes cords with replaced ends. Home use is not regulated by OSHA so the suggested repairs can help.Until OSHA comes snooping on a jobsite. Not happy. At our local college, I had my cords with two rounds of blue tape on each end for identification. I had to remove them to prove they weren't repairs.