A state judge in Albany has ordered an investigation into an ex parte meeting between a court clerk and a defense attorney that might serve as the basis for a new trial for an upstate man recently sentenced to 25 years in prison for killing his best friend.