The Heat

Nothing will sink a buddy comedy faster than poor chemistry between the leads, which can seem unfair if the script is good. But the opposite is also true: a pair of actors with real comic energy, who complement one another and work fluidly as a team, can turn a so-so script into a boisterous fireball of mirth.

It’s that second thing, the boisterous-fireball-of-mirth thing, that “The Heat” turns out to be. The fact that it never deviates from the standard “mismatched cops solve a case” plot formula is almost irrelevant in the face of Sandra Bullock and Melissa McCarthy using their different but compatible comedy skills to razz each other, bust their bosses’ chops, bring down a drug lord, and become BFFs. They embody “girl power” without pandering to a particular audience, and reference the glass ceiling honestly without getting preachy.

They’re also really, really funny. McCarthy is no surprise, especially since she’s reunited with her “Bridesmaids” director, Paul Feig, who seems to have a knack for helping her channel her talents into characters that are brassy and odd but still likable. (For a counter-example, consider “Identity Thief.”) Bullock is more of a revelation. She hasn’t starred in a full-fledged comedy since the one-two butt-punch of “The Proposal” and “All About Steve” in 2009, and she hasn’t starred in a funny comedy since, what, “Two Weeks Notice,” back in 2002? Here she really cuts loose, forsaking all vanity and relishing the chance to go nuts alongside someone who’s more experienced at going nuts and can show her the ropes. By the time the film reaches the inevitable montage of the two women drunkenly bonding in a trashy bar, you’d swear this was the fourth or fifth comedy McCarthy and Bullock had made together, not the first.

Bullock plays Sarah Ashburn, an uptight FBI agent who’s great at her job but doesn’t get any respect from her colleagues — not because she’s a woman, necessarily, but because she’s a drip. (Being a woman certainly doesn’t help.) She’s sent to Boston to find a brutal new drug lord who’s leaving bodies in his wake but not many clues as to his identity. Though Ashburn prefers to work alone, she finds she needs the local expertise of Boston police detective Shannon Mullins (McCarthy), a sloppy, stringy-haired, foul-mouthed force of nature who looks, from a certain angle, like Meat Loaf.

You know the drill. The screenplay, by Katie Dippold (a “Parks and Recreation” writer and co-producer), though peppered with sharp dialogue, makes no effort to break out of the routine when it comes to characters and story. Ashburn is strictly by-the-book; Mullins is a loose cannon who strikes terror in the hearts of suspects and superior officers alike. They clash, they argue, they make a lot of genital-based insults (just like men!), and gradually they come to rely on each other’s strengths. In solving the case, they butt heads with two DEA agents (Dan Bakkedahl and Taran Killam), follow the usual pattern of false leads, and take down a few lower-level bad guys along the way. Nothing to see here plot-wise, folks. Move along.

But there are several deft comedic touches besides the pairing of Bullock and McCarthy. Mullins’ parents and siblings, all fractious Boston low-lifes, add a certain flavor, and they’re played by the likes of Michael Rapaport, Joey McIntyre (from New Kids on the Block), and Nathan Corddry, with Jane Curtin as Mom. Kaitlin Olson, from “It’s Always Sunny in Philadelphia,” shows up as a Bulgarian drug-supplier. One of the DEA agents is an albino, just to give the ladies something to make fun. There’s a recurring joke about Mullins running into one-night stands who are still infatuated with her, and an admirably loose-limbed scene at a nightclub where Mullins has to teach Ashburn how to dress and act sexy while undercover.

The reason it all works is that despite the raucous vulgarity, it’s never mean-spirited. McCarthy’s size is used for laughs a few times, but indirectly, and in ways that don’t make you feel embarrassed for her. There’s a sense of affection underneath it all. You can tell when performers are genuinely having fun, and it’s loud and clear in “The Heat.”

B+ (1 hr., 57 min.; R, pervasive harsh profanity and vulgarity, some strong violence.)

Originally published Twitch.