Static code analysis is a way to find the errors in the code without executing the code. Static code analysis has lot of advantages over the normal testing.
1. No need to wait for full software or code to start the testing.
2. No need to write any script/steps for testing
Apart from that you can easily verify different versions code for the errors. Some of the errors it can find,
1. Infinite loops
2. Null pointers
Open source tools such as Findbugs are doing a good job in this area. Will discuss about them later.