This is a particularly gruesome example of the sort of raunchy R-rated comedy that’s proliferated in Hollywood since the success of the Apatow pictures and “The Hangover.” The third word in the script is our old friend beginning with “f,” which reappears like a motif through the rest of the picture. That’s followed almost immediately by the site of an infant banging his head violently against his crib, and a gross poop gag featuring the kid and his dad. The plot kicks in with a prolonged scene of public urination, and before we’re finally released from the auditorium there are jokes involving porn movies, sex with highly pregnant women and even—if you can believe it—child endangerment. It’s as though scripters Jon Lucas and Scott Moore were determined to amp up the coarseness and vulgarity with each change of scene. And what’s even more depressing is that audiences actually laugh at this stuff.

The premise of “The Change-Up” is basically a retread of “Freaky Friday” and its many successors. Two unlikely best buds—hard-working corporate lawyer and dedicated husband/father Dave Lockwood (Jason Bateman) and overage slacker/womanizer Mitch Planko (Ryan Reynolds)—finish off a boy’s night out by relieving themselves in a public fountain and saying how much each envies the other’s life. Next morning they’ve been magically transposed into each other’s bodies.

So Mitch must step into Dave’s shoes to finish the big merger on which his promotion depends while learning to be a husband (to wife Jamie, played by Leslie Mann) and father, while Dave has to take over Mitch’s gig in the adult-film business, and cater to his many female callers. Added wrinkles concern Mitch’s estranged father (Alan Arkin), who’s getting remarried and wants his son to attend the ceremony, and Dave’s sexy co-worker Sabrina (Olivia Wilde), who’s caught the married man’s eye despite his commitment to fidelity. Naturally in the end both guys realize what’s really important in life and seek to change themselves back by urinating again in that magical fountain (which, in a particularly goofy plot device, has been disassembled and transported from the park indoors to a busy mall).

Though theoretically the movie’s supposed to be a balanced farce in which both stars have equal time, the fact of the matter is that the onus of carrying it falls to Bateman, who has the comic chops that bland Reynolds frankly lacks but can’t do much with such feeble material. Nobody else has much to do, Mann basically called upon to affect aghast reaction shots (cueing viewers, perhaps, to a similar reaction) and Wilde to look striking, which she accomplishes with ease. As for Arkin, he hasn’t appeared so bored since “Firewall,” and David Dobkin’s direction is limp.

“The Change-Up” is set in Atlanta, but most of it appears to have been shot on drearily anonymous California sound stages. Still, Eric Edwards’ cinematography is fine, in a straightforwardly sitcom way, and the other technical credits are pro.

It’s nice to see Jason Bateman’s career take off again after “Juno.” He’s an adept light comedian, and could be great fun to watch in smart, sophisticated fare. But instead he’s opted for dumb, scummy shlock like “Horrible Bosses” and this. A lead role just isn’t worth slumming.