Automatic code analysis