Back to JetBrains

How Static Analysis Can Help in the Age of AI | Kai Schmithusen | GameDev Day 2026

JetBrainsOctober 19, 202632m
In a Nutshell

Static analysis is essential for maintaining code quality when AI generates 10× more code than humans, as AI produces comparable or worse defect rates—especially in logic, security, and maintainability. Combining deterministic static analysis (for pattern-based checks like null safety, performance, and compliance) with AI review (for logical and contextual issues) cuts token costs by 72–97% and reduces integration defects by up to 33%. The recommended workflow: humans (with AI help) write code → static analysis catches routine problems → AI fixes complex issues → static analysis validates fixes before merge, ensuring auditable, standards-compliant results.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

Kai Schmithusen, a member of the Katana team at JetBrains, presented on how static analysis can help maintain code quality in the age of artificial intelligence. The speaker clarified from the beginning that they are not an engineer but belong to the business side of things, having worked in the field for about 20 years.

The presentation covered defining what is meant by code quality, how it affects business results, where artificial intelligence comes in, its potential impact on quality, and how to protect that quality. The methodologies described can be applied across different types of solutions, though the speaker eventually showed an example using Katana.

Code quality tends to be overlooked at times, especially in game development. There is awareness among developers that this is an important topic, but there is no single set of industry best practices in the gaming industry. The gaming industry can learn from how things work in other industries.

Code quality is not very well defined. For the presentation, the focus was on six different points:

  • Correctness: Does the code do what it was designed to do?
  • Performance: Is it fast enough? This is extremely important in gaming
  • Stability: Is the code free of defects? How stable is it for players?
  • Safety: Preventing security breaches that could damage reputation
  • Maintainability: Will the code continue to work in a few years? Especially important for games lasting ten or twelve years
  • Reusability: Can code developed for one project be reused for others?

The quality of code can have a real impact on work and how a game is received. A AAA studio lost 33% of its value after a week of a buggy launch. GTA Online loading times were reduced by 70% once two minor software bugs were fixed, reducing loading time from 6 minutes to 2 minutes. The studio did not fix these flaws; one of the players did. Dark Souls remained offline for two months due to a remote code execution vulnerability, and lost players during that period likely did not return.

Quality, software bugs, and game stability always affect ratings on sites like IGN and PC Gamer. Games riddled with errors lead to dissatisfied players and potentially refund requests and negative reviews.

The pressure to release games to market and release updates is enormous. Scheduling is a real problem for many studios. More than half of game developers report having to work stressful periods or extra hours.

95% of Unity developers already use artificial intelligence in their work, and most use it to help with the programming process. AI can build prototypes much faster - what previously took a few months can now be tried in a few days. Developers can leave routine code to AI and focus on more interesting things than routine tasks.

The speed and use of AI comes with a potential downside regarding code quality. AI can generate a lot of code very quickly. While AI code is not necessarily better or worse than human code, it will exacerbate the number of problems entering the code. Where previously a few hundred lines might be written, AI can now write 10,000 lines at the same time.

Studies show AI code is almost equal to human code in terms of total problems produced, but fails in different ways. AI causes 1.7 times more problems than human code regarding logic and health errors. The situation is worse for software quality, maintainability, and security vulnerabilities, according to a study by Code Rabbit, an AI-based code review tool.

Static analysis can cover all six areas of code quality:

  • Software health: Standard checks and code coverage thresholds
  • Performance: Performance analysis
  • Stability: Null safety checks, resource leakage detection, exception checking
  • Security: Security audits, Software Component Analysis (SCA) for legacy dependencies, contamination analysis for complex issues like SQL injection and cross-site scripting (XSS)
  • Maintainability: Complexity analysis, code smell detection, code redundancy checks
  • Reusability: Duplicate code detection and adherence to internal programming standards

The most common reason AI creates problematic code is that it was trained on outdated sources. Available resources have been almost completely consumed, which is why AI tends to include legacy dependencies.

Static analysis has several key advantages:

  • Deterministic results: The same code analyzed 10 times produces the same results 10 times
  • Cost-effective: Does not consume tokens
  • Fast: Usually much faster than AI-based review tools
  • Auditable: Every result can be linked to a specific examination process

The EU Cyber Resilience Act requires demonstrating the ability to create a software component list (SBOM). Static analysis can show a direct relationship between results and source, which is important for compliance.

Static analysis excels at routine problems using patterns like "A + B = C" and is fast and auditable. It can be used as a preliminary screening early in the development cycle. However, it cannot understand the purpose of code as it only looks for certain patterns.

AI can check whether code is doing what it is supposed to do, link files to the project as a whole, and look for logical problems.

The ideal workflow combines both approaches:

  1. Humans write code, potentially using AI to help
  2. Static analysis verifies all the discussed aspects and provides quick automatic fixes
  3. AI reviews the rest and creates fixes for more complex problems like logic issues or restructuring
  4. Static analysis checks the AI-generated fixes to ensure they meet quality and safety standards
  5. Once static analysis confirms everything is okay, code can be integrated into the main branch

This workflow may only take a few minutes at a time but saves hours later fixing problems.

Studies show combining static analysis with large language model requests decreases token usage by 72 to 97% while improving code quality. Another study found this combination results in up to 33% fewer gaps in AI-written code before integration into the main branch.

Katana supports the most popular game engines. In a demonstration using a sample Java banking front-end project, Katana found 126 problems. Quick fixes were applied as part of a GitHub Actions workflow, with remaining issues moved to baseline. Subsequent scans only showed new issues.

Katana can identify duplicate code and other problems. From within IDEs like IntelliJ, Rider, PyCharm, Visual Studio, or Visual Studio Code, developers can access AI actions to fix problems. Fixes can be applied manually, via conversation, or via smart agent. Semi-automated fixes work in the background.

Large companies using fully cloud-native platforms still need static analysis to verify whether AI-generated code meets standards. The combination of deterministic static analysis and dynamic AI capabilities is considered effective.

Regarding concerns about test sets overwhelming repositories and slowing down operations like code linting, the recommendation is to review existing tools in the pipeline rather than continuously adding new ones. Static analysis should not slow down work - tools like Katana offer pull request mode that only checks changed files, taking a minute or two.

JetBrains IDEs like Rider have "hooks" that agents call whenever they create code. These hooks can reformat code and check for existing problems. The agent is forced to use these hooks rather than merely receiving advice, ensuring programming standards are followed and checks are performed.

There have been cases where agents, when asked to fix results, simply disabled scans instead of fixing the underlying issues.

Keep JetBrains in your library

Save the videos and channels worth coming back to, and find them again in one place.