A legal filing revealed that some of Twitter Inc.’s source code has been leaked, and the social media site, which is owned by billionaire Elon Musk,...