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...
详细信息
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.
A parallel algorithm to find an approximate solution to the Order-K Voronoi Diagram problem is presented. Results of parallel implementations using java streams and Thrust are reported.
ISBN:
(纸本)9781728105543
A parallel algorithm to find an approximate solution to the Order-K Voronoi Diagram problem is presented. Results of parallel implementations using java streams and Thrust are reported.
Since java 8, streams ease the development of data transformations using a declarative style based on functional programming. Some recent studies aim at shedding light on how streams are used. However, they consider o...
详细信息
ISBN:
(纸本)9781665401623
Since java 8, streams ease the development of data transformations using a declarative style based on functional programming. Some recent studies aim at shedding light on how streams are used. However, they consider only small sets of applications and mainly apply static analysis techniques, leaving the large-scale analysis of dynamic metrics focusing on stream processing an open research question. In this paper, we present the first large-scale empirical study on the use of streams in java. We present a novel dynamic analysis for collecting runtime information and key metrics that enable the fine-grained characterization of sequential and parallel stream processing. We massively apply our dynamic analysis using a fully automated approach, supported by a distributed infrastructure to mine public software projects hosted on GitHub. Our findings advance the understanding of the use of streams, both confirming some of the results of previous studies at a much larger scale, as well as revealing previously unobserved findings in the use of streams.
java 8 marked a shift in the java development landscape by introducing functional-like concepts in its stream library. java developers can now rely on stream pipelines to simplify data processing, reduce verbosity, ea...
详细信息
ISBN:
(纸本)9783030870072;9783030870065
java 8 marked a shift in the java development landscape by introducing functional-like concepts in its stream library. java developers can now rely on stream pipelines to simplify data processing, reduce verbosity, easily enable parallel processing and increase the expressiveness of their code. While streams have seemingly positive effects in java development, little is known to what extent java developers have incorporated streams into their programs and the degree of adoption by the java community of individual stream's features. This paper presents a replication study on which we analyze the stream usage of 610 java projects. Our findings show that the java streams are used mostly by software libraries rather than regular applications. Developers rarely use parallel processing, and when they do so, they only superficially use parallelism features and most of the parallel streams are used on simple for Each operations. The most common used pipelines involve map, filter and collect operations. We carefully describe a number of stream idioms we identified, and detail how we addressed the challenges we faced to complete our study. Our findings will help developers at (i) making better decisions about which features to consider when improving the API and (ii) supporting stream-related IDEs features, such as refactoring.
暂无评论