Source Code is a 2011 American science fiction action thriller film directed by Duncan Jones and written by Ben Ripley on spec. It stars Jake Gyllenhaal as U.S. Army Captain Colter Stevens, who is sent into an eight-minute digital recreation of a real-life train explosion, tasked with determining the identity of the terrorist who bombed it.