Case studies – Analyzing code quality of widely-known open-source projects

We analyzed three widely-known open-source repositories written in C# for maintainability issues. These repositories are Corefx (contains the .NET Core foundational libraries), Roslyn (the .NET Compiler Platform), and Mono (open source implementation of Microsoft’s .NET Framework). The purpose of the exercise is to understand the code-quality profile (mainly maintainability) of the widely-known open-source projects.

Summary of all the three case-studies is presented below.

Corefx Roslyn Mono
LOC 706,561 452,937 1,458,941
No. of namespace 577 465 464
No. of classes 10,439 3,739 10,231
Total design smells detected 5,073 1,850 8,182
Total implementation smells detected 21,320 13,029 43,097
Smell density (smells in 1K LOC) 7.18 4.08 5.61
Code duplication 3.64% 1.13% 11.03%

We have excluded test-code from the analysis.

Corefx

You may download the detailed results for all analyzed projects from here (in csv format packed in a zip file).


Roslyn

You may download the detailed results for all analyzed projects from here (in csv format packed in a zip file).


Mono

You may download the detailed results for all analyzed projects from here (in csv format packed in a zip file).