Linux code is the 'benchmark of quality,' study concludes
pcworld.in
pcworld.in
That makes this comparison complete nonsense, surely? "Bugs found by static analyser X" is only useful as a metric for comparing software projects insofar as it's representative of wider code quality. Which may well be true normally, but doesn't work if you report those bugs, then do the analysis again after they're fixed to compare with the results from software projects you didn't do that with!
[1] See http://www.coverity.com/library/pdf/linux_report.pdf . At one point it listed all linux bugs found at http://linuxbugs.coverity.com/ . Example bug report on lkml from last month: https://lkml.org/lkml/2013/4/5/297
What about comparing code that has similar requirements and has similar numbers of users.
Of course Linux is going to fare well against BS corporate software that was made primarily to satisfy some middle manager.
Likewise open source is going to include a lot of stuff written by college students that nobody actually uses.
Would be more interesting to compare Linux with similar parts of the NT core for example.
"// doing it like this to make Coverity happy"
The other issue is that the high-quality closed source codebases are probably inaccessible precisely because the amount of investment it takes to get the defect count low is also the reason they are closed.
Suddenly, the Hello Kitty USB drive matters. That code is running in kernel space.
Minix on the other hand runs device drivers in user-land. [2]
Given that device drivers contain 3-7 times as many bugs as other kernel code,[3] a conclusion you may reach is that Linux contains more bugs per line than Minix.
[1] https://www.youtube.com/watch?v=D8Im0_KUEf8
[2] http://www.minix3.org/other/reliability.html
[3] http://www.osnews.com/story/15960
ps. Sure as hell I can't code to the standard of getting a non-trivial patch accepted to the Kernel :-)
Driver quality is of course something which will always significantly rock the boat when it comes to stability but that is going to be the same with any operating system. To an extent driver quality should be a factor when choosing hardware. If you don't build your kernel with Hello Kitty support you never have to worry about that code.
I guess that is one of the reasons that Apple has a better reputation for software reliability in that for the most part they get to choose the hardware that will be used with the OS.
On embedded there's less verification going on, but the drivers are still almost all in userland.
It's by no means the definition of "code quality", but others parameters (readability, efficiency, encapsulation, etc.) are in good part subjective and very hard to translate into numbers, I think.
DD's have 3-7 times as many bugs in Linux than the other code. [2]
Linux can do better and I am sure Linus would admit this.
If software can automatically find code defects... why are there any code defects at all anymore? Just fix whatever their scan says to fix.
Open source projects can register and get reports for free, commercial companies have to pay. Coverity uses eg. Linux to test and compare their product against, and write various marketing pieces such as this one to raise awareness for their product.
Good study though... not the greatest qualification of facts in the article.
Edit: This article has better details. http://gcn.com/blogs/pulse/2013/05/linux-leads-in-open-sourc...
"The finding is based on an analysis by the Coverity Scan Service, which for more than seven years analyzed 850 million lines of code from more than 300 open-source projects, including those written in Linux, PHP and Apache."
"In general, Coverity found the average quality of open-source software was virtually equal to that of proprietary software. Open-source projects showed an average defect density of .69, the study found, a dead heat with the .68 for proprietary code developed by enterprise customers of the service.
Although the average rates of defects in the two types of code are nearly identical, researchers did find a difference in quality trends based on the size of the development project.
For instance, as proprietary software coding projects passed 1 million lines of code, defect density dropped from .98 to .66, a sign that software quality rises in proprietary projects of that size.
That trend reversed itself in the cost of open-source code, researchers found. Open source projects between 500,000 and 1 million lines of code had a defect density of .44, which grew to .75 when those projects went over the 1 million line mark."
Meanwhile, open source projects like to refactor (somebody would say reinvent the wheel) forever and ever, constantly ripping out old code for new, so defect density is stable and simply rises in line with overall complexity (which obviously rises with project size).
I'd be curious to look also at developers' turnaround rates: once you leave a company you can't keep hacking on their code, which is something you can actually do with open-source. As old developers leave, their code lies untouched for fear of breaking anything, and again gets fossilised.
(I'm sure the sound code has few statically-detectable defects... even if it fails to produce anything audible for most people.)
My poor wording was an attempt to raise the point without eliciting a similar hundred+ responses as the last time it came up.