first up,
i would be checking the wiring as i have suggested above between the stator plug and cdi, just incase there is a broken wire.
if you find the green is broken, you can just run a new piece of wire there
either you could order a new china loom to suit your bike, and hope that it doesnt stuff up again.
think they cost about $6 for a new loom here
or you could go down to your local auto parts store and get an new plug/socket kit to suit 4 wires, just use a car style plug and socket.
or thirdly some spade terminals, male and females, and cut your old plugs off the loom and use the push in connectors there
then connect it up to the existing wires, cut the old plastic plug of the wiring, strip the insulation off the wires and solder the terminals to the wires if you can, if not crimp them well
do the same with the new plastic socket/s.
make sure you match the colours of the wires where the plug and socket connect
i think you have found the problem, and probably learnt something about electrics at the same time