The battery has somehow become disconnected from the bike. The charging system is trying to charge the battery and run the ignition. However since the charge system in Ac and gets converted to DC it is in positive or spikes only.
Normally the battery acts as an accumulator and the spikes are lost , in your case the batt is not connected,-- so the ign system is trying to run on pos spikes. This will mean that occasionally the ignition system when trying to charge the coil will have zero voltage as the spike passes, consiquently it will not run smoothly, spit an cough like it had no fuel.