If you’ve been around open source for a while, perhaps your understanding of the quality of open source code is based on older projects like the infamously unstable OpenOffice.org codebase. Times have changed however and evidence of this can be found in the work of code improvement vendor Coverity. They recently announced that LibreOffice, (four years old this weekend and based on the old OpenOffice code), has a defect density of just 0.08, compared with similar sized open source projects which averages at 0.65 and proprietary code which averages at 0.71.
LibreOffice is an outlier, an extreme example of clean, defect free code, but it also fits into a larger trend. Since the publication of its 2013 Coverity Scan Open Source Report, Coverity has asserted that open source code quality now outpaces that of proprietary code. While an open source license doesn’t guarantee quality, it does allow for evaluation of quality and encourages collaborative efforts toward improvement. Which is why you can expect to see the trend noticed by Coverity continue over the coming years.