"Whosoever […] allows a state secret to come to the attention of an unauthorised person or to become known to the public in order to prejudice the Federal Republic of Germany or benefit a foreign power and thereby creates a danger of serious prejudice to the external security of the Federal Republic of Germany, shall be liable to imprisonment of not less than one year."

Seems to me like they would have a hard time proving that the journalists let either a person or the public know about a state secret in order to... "prejudice the Federal Republic of Germany" or to "benefit a foreign power". That would mean they would have to show intent, and while I'm not familiar with these particular journalists, I think it's highly unlikely they are trying to destroy their own country, and are rather trying to perform their function as journalists in that they are informing citizens, aka the public, about potentially relevant information even if it may be considered confidential or secret in nature.

The problem is that the governments of the world want to pretend like that have final say in what constitutes egregiously dangerous information and often conflate it with information that is obviously not.

Germany has quite a few more restrictions on free speech as well, but I'm curious what section of law the accusations would fall under.

Look, the bottom line is that across the world, freedom of speech is dangerous to the powers that be, and it is communication that enables freedom of speech. Communication in the form of technology has largely leveled the playing field faster than nation states could catch up, and the internet has for a short time become a bastion of free speech in a world were the state and corporations have taken over almost all other forms (first it was the printing press, then the telegraph, then radio, and TV).

Now TPTB have awoken to the danger that is the internet as a medium of unrestricted anarchistic freedom of though, and that, my friends, is the real reason the internet will be, and is being, taken over, legislated, regulated, censored, tracked and tagged. Not because of "national security", but because of "globalized aristocratic oligarchical security posing as national security".

Make no mistake, they will pass the laws they want if they don't exist, and if we fight them (like we did with SOPA/CISPA, etc) they will simply try again after learning the lessons of their defeat. That doesn't mean we shouldn't keep fighting them, but the attacker, especially a well geared and learned attacker always has the advantage.

A good example of this kind of legislative subterfuge, at least in the US, is the Aldrich plan and the Federal Reserve Act.

According to G. Edward Griffin, Paul Warburg and his co-conspirators “added several very sound provisions to the Federal Reserve Bill. By that I mean they added some provisions which seriously restricted the ability of the Federal Reserve to create money out of nothing. Warburg's associates said, ‘Paul, what are you doing? We don't want those in there, this is our bill.’ And his response was, "Relax fellas, don't you get it? Our object is to get the bill passed. We can fix it up later." Those were his exact words. ‘We can fix it up later.’ …