Have you ever conducted discovery before, let alone patent-litigation discovery? Discovery is about your suspicions. If you already had facts, you would not need discovery.
Judges are very lenient about discovery requests; the bar is very low -- reasonable suspicion is enough. BTW, you aren't actually required to justify your discovery requests unless the opposing party challenges them, and even then, it's their burden to show that your discovery request is unreasonable and irrelevant.
Code would be a request for production of documents (which actually refers to any physical evidence). Patents are exclusively federal jurisdiction, so the FRCP applies. In federal court, discovery is granted for anything that could lead to relevant evidence
All of the examples you mentioned are enough to get discovery, which occurs before trial. I've seen discovery granted based upon the affidavit of an employee who was fired for cause for stealing from the defendant company. I've seen discovery granted based on a *news article about a company.