Bud has been a commissioned officer for nearly five years now, he served for at least a year on the USS Seahawk and has been at JAG for four years, that combined with the fact that he now has a Masters degree and is a member of the bar means he should be promoted to the rank of Lieutenant. The minimum requirements for promotion to Lieutenant are two years of service as a Lieutenant JG and four years service total, of which Bud has both. Plus when a junior commissioned officer with at least one year of service earns a masters degree they are automatically promoted to paygrade O-3, which would be a Lieutenant in the Navy.
The CO and XO of the Coral Sea are wearing the wrong rating badge, they are both wearing Surface Warfare officer badges. Maritime law and Navy regulations state that the CO and XO of an aircraft carrier must both carry the rank of Captain, which they are correctly showing this time, previous episodes showed carrier XO's being Commanders. It also states that the they must both be either Naval Aviators or Naval Flight Officers, as the primary function of a carrier is aviation.