This really was one of the best episodes of the series, however it steals so much from the film "Bad Boys" (with Johnny Depp playing the Sean Penn role) that it's impossible to give it any creative credit for all the best parts.
Depp and DeLuise are put into a serious juvenile detention facility (hardcore - as in prison for the very worst kids) to figure out who killed one inmate and how drugs are getting into the prison. What they discover is a lot worse, with guards who let the inmates run the inside in exchange for peace and cash, including running a prostitution ring with the girl's dorm, and turning a blind eye to things like assaults and prison rape.
Watered down for TV, of course. But it's there if you know what to look for.