NEW YORK (CNS) — Considered in strictly cinematic terms, “The Judge” (Warner Bros.) constitutes an adequate but overextended drama that would have benefited from further editing.

From a moral perspective, however, the inclusion of a seamy subplot, dealt with in an inappropriately offhand manner, mars director David Dobkin’s otherwise mostly warmhearted film. Its presence also calls for mature discretion on the part of viewers.

When his mother’s death brings hotshot Chicago lawyer Hank Palmer (Robert Downey Jr.) back to his rural Indiana hometown, his plan is to attend her funeral then bolt back to the Windy City as quickly as he can. Central to his desire to cut his visit short is his chilly relationship with his estranged father Joseph (Robert Duvall), the burgh’s respected magistrate.

But when aging, forgetful Joseph is accused of causing a fatal hit-and-run accident and turns to semi-amateur local attorney C.P. Kennedy (Dax Shepard) to helm his defense, Hank not only sticks around, he becomes increasingly exasperated by C.P.’s timidity. All the more so, since hard-hitting special prosecutor Dwight Dickham (Billy Bob Thornton) proves zealous in his efforts to obtain a conviction.

As Hank and Joseph butt heads over how to handle the case, soon-to-be-divorced Hank rekindles his romance with his high-school sweetheart Samantha Powell (Vera Farmiga). He also revives his relationship with his two brothers: onetime baseball champ Glen (Vincent D’Onofrio) — whose potential career was derailed by an accident — and gentle, developmentally challenged Dale (Jeremy Strong).

Earlier, Hank has shown that Samantha isn’t the only girl in town for whom he has eyes, and it’s through his seemingly meaningless encounter with a stranger that the movie’s most troubling element eventually comes to the fore. The heinous upshot is treated so nonchalantly that ethically acute moviegoers are likely to shake their heads even as they squirm.

The film contains nongraphic casual sexual activity involving unintentional incest, some scatological humor and images, about a dozen uses of profanity and considerable rough and crude language. The Catholic News Service classification is L — limited adult audience, films whose problematic content many adults would find troubling. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian.