Power-Laws and Structure in Functional Programs
Ron Coleman, Matthew A. Johnson · 2014
We downloaded from GitHub, Inc., a portfolio of recently updated open source Scala projects containing 16,500 source files with 2.3 million lines of code and 223,000 methods written by hundreds of programmers. A related paper found in this "big data" of functional programs non-Gaussian distributions of lines of code and cyclomatic complexity and speculated that the distributions resembled those of phenomena known to be fractal in structure, following power laws. In this paper we show that power-laws are the best, most parsimonious explanation of the distributions according to R2 analysis and minimum description length principles. We show furthermore that the data are robust and the power-law explanations are persistent even when the largest project in the portfolio, the Scala compiler and standard library, is removed. To our knowledge these findings are the first such report in the literature of power-law distributions of software complexity in functional programs.