From: ep. 3.3
Event: Kate Whitney comes to Mary Watson, distressed, because her son Isaac has been gone at a crack house for 2 days. Dr. Watson goes to the crack house to retrieve Isaac and does, and finds Sherlock there undercover.
Reference: In “The Man With the Twisted Lip” this very thing happens, with very few changes. In the Doyle story, Kate Whitney comes to the Watson domicile late at night, not early in the morning, and it’s her husband Isa that’s gone to an opium den. Which makes Watson’s line: “Husband?” and Mary’s correction, “No, son” that much funnier in the episode. When Watson does go to the opium den, he finds Holmes and thus begins the adventure, but it’s not clear whether Holmes has been smoking opium to keep his cover intact, as it is in the episode clear that Sherlock has done heroin again.
Two more fun references in this episode: The character Billy Wiggins is a conglomerate of two boys of those two names respectively who Holmes uses often from the Baker Street Irregulars, and Molly’s line, “How dare you throw away the beautiful gifts you were born with?” echoes Watson’s line in The Sign of Four when admonishing Holmes about his cocaine use: “Why should you, for a mere passing pleasure, risk the loss of those great powers with which you have been endowed?”