This ruthlessly unfunny misfire should be quickly relegated to an IMDb trivia question after a brief theatrical bow.

Managing to elicit genuine belly laughs while playing a blind teenage cancer patient in this summer’s “The Fault in Our Stars,” 19-year-old Nat Wolff has displayed a precocious knack for wringing humor out of the most unfortunate circumstances. And yet, as Tim Garrick’s barrel-bottom teen sex farce “Behaving Badly” illustrates, even he has his limits. Wolff is hardly alone, however, as a surprisingly deep cast of slumming stars (Selena Gomez, Mary-Louise Parker, Elisabeth Shue, Gary Busey, Jason Lee, and even an uncredited Justin Bieber) all fail to lift this ruthlessly unfunny misfire, which should be quickly relegated to an IMDb trivia question after a brief theatrical bow.

Things start out badly for 17-year-old Rick Stevens (Wolff), who opens the film by discovering he has crabs, only to head downstairs and discover his alcoholic mother (Parker) slumped on the couch, with pill bottles, vodka and various suicide notes strewn all around. “I am so fucked,” he notes helpfully in voiceover, before rewinding his story to two weeks prior to explain exactly how he ended up in such dire straits.

As it turns out, both his unfortunate infestation and his mother’s presumed death are rather irrelevant complications, with Rick’s real troubles arising from a crush and a bet. Making the first of many inexplicable decisions without which the film’s plot would never progress, Rick strikes a $1,000 wager with a Lithuanian-mafia-connected classmate (Nate Hartley) that he can bed the school’s resident saintly hottie, Nina (Gomez), prior to Arbor Day.

Perhaps realizing just how many factory-line comedies have been made with remarkably similar premises, Garrick and co-scripter Scott Russell (loosely adapting a novel by Ric Browde) attempt to crowd out the malnourished plot with all manner of lecherous side characters. Complicating matters most are Nina’s brutish ex (Austin Stowell) and Rick’s halfway unwilling affair with his best friend’s mother (Shue), who pops up to seduce him at the most inopportune times.

Also coming and going through Rick’s life: a sleazy strip-club owner (Dylan McDermott) who employs Rick’s sister (Ashley Rickards) as a star dancer; a horny Catholic priest (Lee) with underworld connections; a pedophile school principal (Patrick Warburton); a shticky sidekick (Lachlan Buchanan) who vomits in response to any disturbance; and a nymphomaniac lawyer (Heather Graham).

Most disastrously of all, Rick experiences sporadic visitations from a scantily clad angel calling herself St. Lola, “the patron saint of teenagers.” Like Rick’s mother, the angel is also played by Parker, and the grossly inappropriate advice she dispenses to her son provides the first of many uncomfortable Oedipal flourishes.

Needless to say, the film is plenty filthy, and, despite its ample nudity, about as erotic as a city council meeting. But it’s also disastrously laugh-less, failing to work up a single new angle on the seemingly evergreen teenage-sexual-humiliation front. Both overplotted and narratively senseless, the pic would be an ungainly beast even if its jokes landed with any regularity, and by the time it reaches the home stretch, it’s grown so devoid of ideas that it simply rips off “Risky Business” to craft a climactic scene.

Expending minimal effort, Wolff meanders through the proceedings with a deadpan detachment that may have been intended as teenage disaffection, but which is hard not to read as disdain for the material. Gomez emerges with her dignity intact, and her squeaky-clean effervescence powers the film’s most watchable scenes, even if the performance can’t help but feel like a weak reprise of her “Spring Breakers” role, in which she was similarly cast as a virginal innocent adrift amid some of the worst people on earth.

The film’s trio of overqualified adult-age actresses (Shue, Parker and Graham) aren’t so lucky, struggling earnestly with some frankly miserable roles. Shue’s treatment is particularly hard to watch: In one brutally elongated scene, the Oscar-nominated actress is forced to flail around a kitchen high on ecstasy, pleasure herself with various cooking appliances, and lasciviously lick her son’s ear. Minutes later, she’s punched in the face, a shot that the film rewinds and repeats three times, using a device previously deployed on a shot of a stripper disrobing. Granted, no one comes to a hard-R teen sex farce expecting an Andrea Dworkin lecture, but the film’s sexism — coupled with its happy-go-lucky treatment of rape (be it the statutory, date or prison variety) — is fairly hideous even by genre standards.

“Behaving Badly” was clearly shot on a budget, but it could have looked worse, and the filmmakers clearly had enough in the account to splurge on some vintage ’80s music choices. Curiously, though it’s ostensibly set among present-day high schoolers, the film contains almost no cell phones or references to the Internet, with characters communicating on landlines, shooting incriminating footage on videotape, and masturbating to books checked out of the library.