Boy, is that a false equivalency. You do realize that anonymizing a source is part of a bargain for the journalist to get access to information they wouldn't otherwise have had access to, often information the source isn't authorized to disclose (and thus could face punishment for disclosing it)?
It's also worth nothing that, in the real world, revealing someone's real name isn't the high crime of "doxxing," rather it's normal and expected. Journalists aren't typically creatures of pseudonymous web forums, and it's a category error to expect them to abide by the peculiar norms of them.