Outside the Sandbox: A Study of Input/Output Methods in Java

06/20/2023
by   Matúš Sulír, et al.
0

Programming languages often demarcate the internal sandbox, consisting of entities such as objects and variables, from the outside world, e.g., files or network. Although communication with the external world poses fundamental challenges for live programming, reversible debugging, testing, and program analysis in general, studies about this phenomenon are rare. In this paper, we present a preliminary empirical study about the prevalence of input/output (I/O) method usage in Java. We manually categorized 1435 native methods in a Java Standard Edition distribution into non-I/O and I/O-related methods, which were further classified into areas such as desktop or file-related ones. According to the static analysis of a call graph for 798 projects, about 57 methods potentially call I/O natives. The results of dynamic analysis on 16 benchmarks showed that 21 called an I/O native. We conclude that neglecting I/O is not a viable option for tool designers and suggest the integration of I/O-related metadata with source code to facilitate their querying.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset