A Superior Court judge in Middlesex County is apologizing after inappropriately advising two women involved in a love triangle.