Open source code quality as good as proprietary code quality
The 2011 Coverity Scan Open Source Integrity Report (Scan), a publicprivate sector research project, has reached the conclusion that open source code is as good in quality as that of proprietary software. The research project was started by Coverity and the US Department of Homeland Security in 2006. Researchers tested over 300 million lines of proprietary software code and over 37 million lines of open source software code to reach the conclusion.
The report analysed code from 45 of the most active Scan open source projects. It is worth mentioning here that an average open source project in Scan has 832,000 lines of code. The number of defects per thousand lines of code or the average defect density in the open source projects in Scan was 0.45. On the other hand, over 300 million lines of code from around 41 proprietary codebases were taken into account. An average codebase under analysis had 7.5 million lines of code. The average defect density in this case was found to be 0.64.
As per the average defect density of Coverity, both open source code quality and proprietary code quality proved to be better than the average for the software industry. The average of software industry estimates the defect density to be 1.0.
The researchers found that open source projects, including Linux 2.6, PHP 5.3, and Postgresql 9.1, had the superior code quality. They emphasised that these codes can be treated as industry benchmarks that had achieved defect densities of 0.62, 0.20 and 0.21, respectively.