I am not Avery however, get urself 2 locals, one for the duration of Censure on target and the other for Censure on focus (ofc first checking IF there is a focus target at all...) and then comparing them decide on which one to cast Judgement on. If censure on target duration < censure on focus then if judge is available cast it on the target, elseif censure on focus duration < censure on target then if judge is available cast judge on focus. Should work, ofc this is pseudo code
Cheers