Professor Franz Streng at the University of Erlangen in Bavaria asked his first-year law students the same set of questions every year from 1989 to 2012.
"At the beginning of their studies, they've still only had their opinions formed by school, their parents and the media," Streng said.
He found that despite the young people feeling less at risk from crime from year to year, they became more and more positive about harsher punishments for criminals.
Asked to decide on a sentence in a fictitious case of manslaughter after a couple broke up, the average grew from six years in 1989 to nine and a half in 2012.
And in stark contrast to 1989, when more than one in three students wanted to abolish life sentences altogether, only two percent were for ending them in 2012.
Streng notes that the effect is completely unlinked to violent crime statistics, which have been sinking since 2007.
"The people I survey feel more secure than they ever have," he said.
He adds that these beginner lawyers aren't yet prepared for the questions they're being asked – and that isn't necessarily fixed during their studies.
"Young lawyers aren't trained enough to deal with sentencing. They know the criminal law itself, but they don't get any knowledge about psychology, sociology and psychiatry."
Lawyers starting work as judges and prosecutors should have to receive compulsory training in criminology, Streng said.
Stefan Caspari of the Magistrates' Federation suggested that differences are ironed out by the time lawyers qualify, saying that "there is no difference to be found between young and old [judges] in terms of the sentences they request or hand down"
Every age group has stricter and harsher judges according to individual personalities, Caspari said.
But Streng suspects that societal factors are at play in the students' hardening attitudes.
He welcomes the focus on victims that has developed in recent years, but says it has "problematic side effects" - along with crime sensationalism in the media which leads to people feeling generally less safe.
"If you push for victims' interests, you'll tend towards higher sentences," Streng believes – and the same goes for those who watch a lot of crime movies.
As for the death sentence, its reintroduction is completely out of the question.
"It's abolished by our Constitution, and at the same time it's unthinkable that it could be reintroduced because of international treaties and the context of the European Union."