Both the dopesheet and the graph editor show a red line when the data path for the fcurve cannot be found. While most times the fcurve stays connected to the correct item, there can be times when this doesn't happen, most often when the item is renamed or deleted in an external file from the one containing the animation. You will also notice that the shown data path is the complete raw path when it is broken, rather than the more user friendly abbreviation.
If an item has been renamed, we can correct the data path in the fcurves properties panel in the graph editor. If the item was deleted then you can just delete each fcurve, you can do that by selecting it in the list and pressing X or ⌦ Delete.
For a large number of items, it may be easier to make a script that will correct the data paths.
For anyone that needs to rename these for a relatively small number of animations (AKA Actions) and a small number of bones, you can do the following for each messed up animation:
Make sure you're in Pose Mode for that armature or have the Outliner open to select the bone
1) Select each messed up animation in the Dope Sheet (in Action Editor mode)
2) Rename the bone that should be referenced in that key (the thing with the dropdown arrow) to the name that it still has stored (See example below)
3) Then rename the bone back to the desired name (while the same action is selected)
Here, I have the messed up action selected and I would rename "
Gun.R" back to "
Gun" so it matches up with the messed up animation. Then, I would rename the bone back to "
Gun.R" and the animation key will be renamed correctly and the red lines will go away.
It's not a practical solution for many messed up animations and bones, but it works for few..