But wouldn't you need to distribute for copyright protection to kick in? Copyright is exclusive right to distribute. If you just stole the code and keep it, you can be liable to various crimes, but I don't see how copyright infringement can be one of them.
Unpublished works are protected by copyright. http://copyright.cornell.edu/resources/publicdomain.cfm