While underwater the air bar disappears when your head reaches the top area of a block and appears again when you go higher or lower. It always resets when this happens.
Tested in source blocks and flowing blocks of water.
Environment
Java 1.7.0.25 x64 on Debian Wheezy
Java 1.7.0.51 x64 on Windows 7
Duplicate of MC-48395 - If you have not, please use the search function in the future, to see if your bug has already been submitted. If you could not find the original report, please comment with the keywords you searched for.