VOOZH about

URL: https://thenewstack.io/can-ai-find-bugs-in-your-code/

⇱ Can AI Find Bugs in Your Code? - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2020-02-27 03:00:46
Can AI Find Bugs in Your Code?
contributed,
Software Development

Can AI Find Bugs in Your Code?

Feb 27th, 2020 3:00am by Michael Shpilt
👁 Featued image for: Can AI Find Bugs in Your Code?
Michael Shpilt
Michael Shpilt is team lead at .NET debugging company OzCode. Michael blogs about .NET and the C# language on Michael's Coding Spot. His first book, Practical Debugging for .NET Developers, will be released later this year.

You’d be forgiven for believing that AI debugging already exists, because so many companies are claiming to have artificial intelligence powering their monitoring or observability products. In this, those monitoring companies are no different from the thousands of technology vendors making somewhat dubious claims about AI.

All that said, there genuinely has been an explosion of something that feels a bit more like AI; underlying technologies like deep learning are driving innovation in computer vision, object identification, natural language processing, voice recognition and artificial photogeneration. These capabilities power healthcare solutions that can spot cancers or bleeds in patient scans, autonomous vehicles, virtual assistants and chatbots. But can they be used to find and fix problems in code?

So what can “AI” in its various forms do today when it comes to debugging? The most common form of “AI” in various monitoring and exception-management products is exception and anomaly detection; basically, noticing when something weird happens.

This isn’t just setting alerts when the CPU is suddenly at 99% utilization for half an hour. To even minimally qualify as AI, the system has to be able to learn what normal usage looks like and then make decisions about when something isn’t normal. For example, a Machine Learning-powered system can learn that a typical request database takes five milliseconds and that occasionally a complicated query can take 500ms; if the system starts to see that the database is taking 300ms for simple queries on a regular basis, it can alert people that the system isn’t working as expected.

The value that Machine Learning could add here is especially in spotting patterns in the anomalies. Perhaps the system crashes exactly two hours after the memory usage is at exactly 72%, but only on Wednesdays. Humans would struggle to notice that pattern, but the right sort of AI tool could make the connection.

Finding anomalies and predicting exceptions are key parts of resolving issues in modern distributed systems, but often when we talk about “debugging” we really mean fixing mistakes in the code itself — and beyond the limited syntax detection that some IDEs already provide.

Machine learning could be a path to an AI debugger if it’s fed enough data to train it. Perhaps if an AI model was trained on a large enough sample of code with marked, identified bugs and their fixes, then maybe it could highlight suspected buggy code from past experience, particularly for common bugs.

Bugs, though, are inherently weird. There will always be uncommon bugs too. Innovative but unusual code shouldn’t be flagged as bad, buggy code. To do all of this unaided, a future AI debugger would have to independently understand the code itself.

There’s a debate about whether any of today’s machine learning systems are real “AI.” Some theorists argue that deep learning is solving a very narrow class of problems, but that it will never be a path to Artificial General Intelligence, the sort of AI that can show reason, thought and independent learning.

To solve bugs like a human, an AI will need to have a human’s general reasoning, creativity and insight. In other words, finding and fixing the uncommon bugs will take Artificial General Intelligence or something very close to it.

Imagine that a programmer explained to an AI system exactly what some code should be doing in every possible case. The AI could then automatically test all possible inputs, understand when something is considered to be an unwanted behavior, and use evolutionary algorithms to modify the code until it (hopefully) behaves as expected every time.

However, if the programmer has to tell the AI how the code should work in every possible instance, our “AI debugger” becomes some sort of meta-compiler and the programmer’s descriptions become just a higher-level form of coding.

Today’s debugging AI might be mostly anomaly detection that’s focused on system performance rather than an understanding of the code. GitHub’s new AI-driven recommendation of which issues should be fixed first in a repository, and IDEs that are beginning to incorporate whole-line completion, are other examples of machine learning creeping into developers’ workflows.

Tomorrow’s AI should be able to go further, making a best guess at the root cause of common bugs from masses of training data and real-world experience of both the code and live systems.

But when we reach the point that Artificial General Intelligence can truly debug your arbitrary code, then AI will probably be writing all code in the first place.

Feature image via Pixabay.

TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.