In 1977, Polanski agreed to plead guilty to unlawful sexual intercourse. The presiding judge, Laurence Rittenband, was to decide Polanski's sentence after reviewing a report from the Probation Department and holding a hearing with attorneys for each side.
All parties expected Polanski to get only probation.
According to a recent documentary, Los Angeles Deputy District Attorney David Wells, who was not involved in the case, intervened with Rittenband. Wells thought Polanski was being cavalier about the charges against him and should serve time for his misdeed. (Wells showed the judge photographs of Polanski partying in Munich with his arms around two young women who Wells claimed were underage.)
Rittenband seemed to be convinced and suggested to Polanski's attorneys that he would send the director to prison and order him deported. At that time, Polanski fled.
While Wells was not himself an attorney of record in the case, he was a lawyer for one of the parties—the state of California. The California Code of Judicial Ethics (PDF) forbids judges to engage in ex parte communications—discussions where only one side is represented.
There is no question that Rittenband violated the ethics code. The question of whether his conversations with Wells are sufficient grounds for dismissal of the charges against Polanski is an open question. There is very little law on the subject to guide the judge who's now presiding over the case. Outright dismissal is an exceedingly rare remedy for ex parte communications, especially when the communications came after the plea agreement was reached. It's far more common for the plea agreement to stand, with a new judge brought in to preside over the sentencing. The original judge could also face sanctions. (Judge Rittenband is deceased, so there's a good chance the unethical contacts will have no impact.)
http://www.slate.com/articles/news_...009/09/whats_unlawful_sexual_intercourse.html