Duncan Jones scored a succes d’estime of sorts with his first feature “Moon,” and his second is cut from similar cloth. Though set on earth rather than in space, “Source Code” is another sci-fi tale that puts a man in an unusual circumstance and employs twists to get him out of them. And like its predecessor, it comes off like a grander version of an episode of “The Twilight Zone” or “The Outer Limits.” One of the lesser ones, that is.

It wouldn’t be fair to reveal too much about the plot, since whatever pleasure there is derives from its puzzle-like character. Suffice it to say that Jake Gyllenhaal plays Colter Stevens, an army officer serving in the Middle East who somehow wakes up on a train headed for Chicago’s Union Station. Not only that—the young lady named Christina (Michelle Monaghan) sitting across from him calls him Sean, and when he glances at his reflection, he sees somebody else’s face in the glass. Before he can figure out what’s going on, the train blows up.

Suddenly Colter’s back in his own body, locked in a cubicle where he learns that he’s the subject of a government program headed by a scientist named Rutledge (Jeffrey Wright) that allows him to be repeatedly transferred into Sean’s persona for the last eight minutes of the doomed man’s life. It’s hoped that he’ll be able not only to find and defuse the bomb before it goes off, but also to apprehend the bomber, who’s threatening to detonate a much more destructive nuclear device in the city itself. So Stevens is sent into the past again and again under the guidance of his sympathetic handler Colleen Goodwin (Vera Farmiga), each time getting a bit closer to discovering which of the passengers is the perpetrator.

Ben Ripley’s screenplay offers an explanation about how Rutledge’s system works, but it’s all pretty much hooey. Still, one wouldn’t mind the gobbledegook if the underlying ideas were cleverly worked out. Unfortunately, once the premise is established, the picture merely follows Colter on his brief journeys back onto the train, where he overcomes obstacle after obstacle in his effort to complete his mission; and when the perpetrator is unmasked, the revelation seems a spineless cop-out, designed to be as inoffensively PC as possible. In the process, needless to say, our hero develops a closer relationship with Christina than Sean had ever managed. But the logical implications of brain-wave time-travel ordain that their romance is impossible, and there’s a twist involving Colter himself that has grim consequences. But never fear; this is a studio product, and unhappy endings are forbidden in Hollywood, however arbitrarily they’re avoided. So as with “The Adjustment Bureau,” the ground rules, however outlandish, are simply tossed aside when required to achieve a satisfying close.

Gyllenhaal works extremely hard to make Colter both plausible and likable, and largely succeeds, even though he lacks the quirky quality with which Sam Rockwell enlivened the protagonist in “Moon.” But at least he doesn’t embarrass himself as he did in “Prince of Persia.” Nobody else brings much to the party, though, with Monaghan surprisingly colorless, Wright a standard-issue cerebral bureaucrat, and Farmiga tight-lipped and stiff.

But in reality the picture depends less on sturdy acting than on directorial savvy, and Jones does prove adept at giving a jolt to the frenetic action sequences (with the help of editor Paul Hirsch), though the more sedate expository passages fare less well. He benefits from a top-notch production team headed by designer Barry Chusid and cinematographer Don Burgess, who uses the Chicago locations to fine effect while achieving a nicely claustrophobic feel in the interiors. And the visual effects, if hardly overwhelming, are certainly adequate.

But energy alone isn’t enough to keep “Source Code” from feeling thin, repetitive and nowhere near as smart as it wants you to believe it is.