Large-scale characterization of Java streams
-
Rosales, Eduardo
ORCID
Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
-
Basso, Matteo
Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
-
Rosà, Andrea
ORCID
Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
-
Binder, Walter
ORCID
Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
Show more…
Published in:
- Journal of software : practice and experience. - 2023, vol. 53, no. 9 , p. 1763-1792
English
Java streams are receiving the attention of developers targeting the Java virtual machine (JVM) as they ease the development of data-processing logic, while also favoring code extensibility and maintainability through a concise and declarative style based on functional programming. Recent studies aim to shedding light on how Java developers use streams. However, they consider only small sets of applications and mainly apply manual code inspection and static analysis techniques. As a result, the large-scale dynamic analysis of stream processing remains an open research question. In this article, we present the first large-scale empirical study on the use of streams in Java code exercised via unit tests. We present stream-analyzer, a novel dynamic program analysis (DPA) that collects runtime information and key metrics, which enable a fine-grained characterization of sequential and parallel stream processing. We use a fully automatic approach to massively apply our DPA for the analysis of open-source software projects hosted on GitHub. Our findings advance the understanding of the use of Java streams. Both the scale of our analysis and the profiling of dynamic information enable us to confirm with more confidence the outcome highlighted at a smaller scale by related work. Moreover, our study reports the popularity of many features of the Stream API and highlights multiple findings about runtime characteristics unique to streams, while also revealing inefficient stream processing and stream misuses. Finally, we present implications of our findings for developers of the Stream API, tool builders and researchers, and educators.
-
Collections
-
-
Language
-
-
Classification
-
Computer science and technology
-
License
-
CC BY
-
Open access status
-
hybrid
-
Identifiers
-
-
Persistent URL
-
https://n2t.net/ark:/12658/srd1326496
Statistics
Document views: 29
File downloads:
- Rosales_2023_WILEY_softwpractexp.pdf: 75