A Study of Scala Repositories on Github

Abstract

Functional programming appears to be enjoying a renaissance of interest for developing practical, “real-world” applications. Proponents have long maintained that the functional style is a better way to modularize programs and reduce complexity. What is new in this paper is we test this claim by studying the complexity of open source codes written in Scala, a modern language that unifies functional and object programming. We downloaded from GitHub, Inc., a portfolio of mostly “trending” Scala repositories that included the Scala compiler and standard library, much of them written in Scala; the Twitter, Inc., server and its support libraries; and many other repositories, several of them production-oriented and commercially inspired. In total we investigated approximately 22,000 source files with 2 millions lines of code and 223,000 methods written by hundreds of programmers. To analyze these sources, we developed a novel compiler kit that measures lines of code and adaptively learns to estimate the cyclomatic complexity of functional-object codes. The data show, first, lines of code and cyclomatic complexity are positively correlated as we expected but only weakly which we did not expect with Kendall’s t=0.258–0.274. Second, 75% of the Scala methods are straight-line, that is, they have the lowest possible cyclomatic complexity. Third, nearly 70% of methods have three or fewer lines. Fourth, the distributions of lines of code and cyclomatic complexity are both non-Gaussian (P<0.01), which is as surprising as it is interesting. These data may offer new insights into software complexity and the large-scale structure of applications including but not necessarily limited to Scala.

Authors and Affiliations

Ron Coleman, Matthew Johnson

Keywords

Related Articles

A Simple and Reliable Method for the Evaluation of the Exposed Field Near the GSM Antenna

The objective of this paper is to present a simple, accurate and very efficient method for the evaluation of the field in the vicinity of GSM antennas of the radio base-station in urban areas. The method is based on the...

Skill Evaluation for Newly Graduated Students Via Online Test

Every year in each university many students are graduated holding a first university degree. For example Bachelor degree in Computer Science. Most of those students have a motivation to continue with further studies to g...

Internal Threat Defense using Network Access Control and Intrusion Prevention System

This study aims to create a network security system that can mitigate attacks carried out by internal users and to reduce attacks from internal networks. Further, a network security system is expected to be able to overc...

Effects of Walls and Floors in Indoor Localization Using Tracking Algorithm

The advancement in wireless and mobile networks has led to an increase in location based services (LBS). LBS can be applied in many applications, such as vehicle systems, security systems, and patient tracking systems. T...

Impact of IP Addresses Localization on the Internet Dynamics Measurement

Many projects have sought to measure the dynamics of the Internet by using end-to-end measurement tools. The RADAR tool has been designed in this context. It consists in periodically tracing the routes from a monitor tow...

Download PDF file
  • EP ID EP110627
  • DOI 10.14569/IJACSA.2014.050721
  • Views 138
  • Downloads 0

How To Cite

Ron Coleman, Matthew Johnson (2014). A Study of Scala Repositories on Github. International Journal of Advanced Computer Science & Applications, 5(7), 141-148. https://europub.co.uk/articles/-A-110627