To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (an extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
* By clicking this button you agree to our Privacy Policy statement

Free PVS-Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

Message submitted.

Your message has been sent. We will email you at

If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

Philosophy of Static Code Analysis: We …

Philosophy of Static Code Analysis: We Have 100 Developers, the Analyzer Found Few Bugs, Is Analyzer Useless?

Oct 16 2017

People often think incorrectly about static code analysis.

It is often possible to meet such an opinion expressed in the following paragraph:

We have a large project. Dozens (hundreds) of developers work on it. This is that very case about which you are writing, that needs static code analysis application. I downloaded the code analyzer, performed a analysis and found very few bugs. Obviously, the code analyzer is simply useless!

Unfortunately, it seems that the way of promoting static code analysis via checking open source projects plays tricks on some people. People EXPECT that having run the analyzer on a random project, they will NECESSARILY find a bunch of errors. Of course this is not true, here is why.

Let us suppose we have a project involving 10 developers, 3 QAs and 1 project manager. We will consider an interval of one month (21 working days). The interval was selected randomly and it is not that important.

Let in the first working day the developers wrote code and introduced 5 errors. The next day, the QAs found these 5 bugs and wrote back to programmers. On the third day the programmers fixed 5 bugs. Here we have formed such a "tuple" or a cohort: one day they make errors, the second day they find them, the third day they correct them.

Obviously, this cohort moves through time, and every day the bugs are added, errors are detected and fixed. Although in every moment of time there are not not so many errors, but this "window" moves and the general number of fulfilled work on detecting and fixing bugs is quite significant. On the last day of the 21-days working cycle, a project manager gets tired, he shouts at everybody, and all errors are fixed. As a result, at the end of the month, there is 0 errors in a project. This, of course, will not last long, but the manager is happy about the nice month totals.

Let us suppose that on this 21st day someone from programmers downloaded the code analyzer, performed the check, got 0 errors (and a couple of stupid false positives) and made the obvious, but wrong conclusion: code analyzers just don't work and aren't needed!

Now we will look at the moving of the cohort if the analyzer is used regularly.

On the first day of the programmers also made 5 errors. But thanks to the automatic code analysis, 3 bugs have been found and were fixed immediately even at the stage of coding. So, the next day, the testers will find just 2 errors. On the third day the programmers will have much less work on edits, because some errors have been fixed on the first day. It turns out that the analyzer has reduced the amount of work on errors fixing more than twice that significantly accelerates the development process as a whole.

Of course, the numbers above are relative. The most important thing is that we can make the right important conclusion. Static analysis is the most useful when it is used not as a one-time activity, but as a regular process.

Popular related articles
PVS-Studio evolution: data flow analysis for related variables

Date: Apr 28 2022

Author: Nikita Lipilin

Related variables are one of the main problems of static analysis. This article covers this topic and describes how PVS-Studio developers are fighting false positives caused by different relationship…
SAST in Secure SDLC: 3 reasons to integrate it in a DevSecOps pipeline

Date: Apr 19 2022

Author: Sergey Vasiliev

Vulnerabilities produce enormous reputational and financial risks. That's why many companies are fascinated by security and desire to build a secure development life cycle (SSDLC). So, today we're go…
PVS-Studio: static code analysis technology

Date: Jan 11 2022

Author: Andrey Karpov, Paul Eremeev

PVS-Studio provides static analyzers for C, C++, C# and Java languages on Windows, Linux and macOS platforms. PVS-Studio analyzers can vary slightly due to certain features that the languages have. H…
How to speed up building and analyzing of your project with Incredibuild?

Date: May 17 2021

Author: Maxim Zvyagintsev

"How much longer are you going to build it?" - a phrase that every developer has uttered at least once in the middle of the night. Yes, a build can be long and there is no escaping it. One does not s…
GTK: the first analyzer run in figures

Date: Jan 04 2021

Author: Svyatoslav Razmyslov

For some people, the introduction of a static analyzer into a project seems like an insurmountable obstacle. It is widely believed that the amount of analysis results issued after the first run is so…

Comments (0)

Next comments
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →