"The Departed" won the Oscar for best picture and I confess I found watching it an engrossing couple of hours. Jack Nicholson free to ham it up (in the best possible sense), good performances from Leo and Matt, suspenseful moments, and the ambiguous world that Scorsese loves to explore. Just don't use it as a model for how to write a script.
In case you haven't seen it yet, I won't go into details at this point, but the ending suggests a state of panic as far as the script goes: how can we tie up all the loose ends? I know! Let's have a couple of the characters do something for which there was no set-up at all! It'll be a surprise when X shoots Y...
It proves that if enough other elements are in place, a film can overcome a script with some faults--especially since most audience members aren't as picky as we writers are.