JAG is short for the Judge Advocate General. It is the the command authority for both the prosecutors and defense counsel of the respective military service, in this case the navy. The defense counsel are usually stationed at the regional Defense Service Office (DSO). The ADC (Area Defense Counsel) is the the Air Force counterpart to the DSO.
The warfare devices on the JAG officers are not applicable to JAG's. The ribbons on the LCDR are significantly higher than a LCDR would earn. The number of personal awards for a O4 JAG is also not believable.