into different tools, e.g., Eclipse or IntelliJ. Similar to
Dacite, it visualizes the identified coverage informa-
tion in a tree-like table and enables source code anno-
tations. However, JaCoCo does not support data flow
analysis but focuses on other coverage metrics such
as branch coverage or line coverage. Moreover, each
IDE integration was developed separately and is not
based on the LSP (EclEmma, 2017).
The Language Server Protocol (LSP) has been
utilized for the integration of various programming
languages. Additionally, extensions for functionali-
ties that are not typically not needed for integrating
programming languages have emerged, e.g., in the
context of model checking or theorem proving (Rask
et al., 2021). However, to the best of our knowledge,
the LSP has not yet been applied to the area of code
coverage.
8 CONCLUSION AND OUTLOOK
Considering that there is a lack of appropriate tools
for the analysis of the data flow within a program,
this paper introduced an approach to visualize DUCs
within code editors based on the LSP. After present-
ing some background on how the data flow is ana-
lyzed, we outlined the system design. Then, we de-
scribed how the LSP is employed in our use case
and introduced protocol extensions for selected as-
pects enabling a more comprehensible visualization.
Based on this, we presented a prototype including im-
plementations of a language server and two language
clients (IntelliJ IDEA and VS Code). We specifically
outlined how the components interact based on the
LSP. We evaluated and validated our results based on
five benchmark examples and also pointed out related
work.
Future work should integrate the language server
with support for the custom extensions to additional
popular IDEs such as Eclipse in order to make it
greatly available for Java developers. Also, plugins
for build tools such as Maven
10
and Gradle
11
should
be implemented. This way, Dacite could be used as
part of the build pipeline and the analysis output (i.e.,
the XML file) could be used by third-party tools for
further applications. Moreover, by deriving the data
flow information during the execution, only those data
flows are considered that have been passed. Enabling
a visualization for this data flow is a first step for iden-
tifying data flow which was not passed. In the future,
we plan to integrate the dynamic analysis of Dacite
10
https://maven.apache.org
11
https://gradle.org
with symbolic execution to be able to identify the
data flow of every executable path of a given program
(Winkelmann et al., 2022). This way, DUCs which
were not covered by given JUnit test cases could be
identified and forwarded to the user.
REFERENCES
Allen, F. E. and Cocke, J. (1976). A program data flow
analysis procedure. Communications of the ACM,
19(3):137.
Beyer, D. (2021). Software verification: 10th comparative
evaluation (sv-comp 2021). Proc. TACAS (2). LNCS,
12652.
Bluemke, I. and Rembiszewski, A. (2009). Dataflow test-
ing of java programs with dfc. In IFIP Central and
East European Conference on Software Engineering
Techniques, pages 215–228. Springer.
Denaro, G., Pezze, M., and Vivanti, M. (2014). On the right
objectives of data flow testing. In 2014 IEEE Seventh
International Conference on Software Testing, Verifi-
cation and Validation, pages 71–80. IEEE.
EclEmma (2017). JaCoCo. https://www.jacoco.org/jacoco.
Last accessed November 14, 2022.
Frankl, P. G. and Weiss, S. N. (1993). An experimental
comparison of the effectiveness of branch testing and
data flow testing. IEEE Transactions on Software En-
gineering, 19(8):774–787.
Hutchins, M., Foster, H., Goradia, T., and Ostrand, T.
(1994). Experiments on the effectiveness of dataflow-
and control-flow-based test adequacy criteria. In Pro-
ceedings of 16th International conference on Software
engineering, pages 191–200. IEEE.
JSON-RPC Working Group (2013). JSON-RPC 2.0 Spec-
ification. https://www.jsonrpc.org/specification. Last
accessed November 14, 2022.
Metals (2022). Core Components and Native Compo-
nents. https://scalameta.org/metals/docs/integrations/
tree-view-protocol. Last accessed November 14,
2022.
Microsoft Corporation (2022a). Language
server extension guide. https://code.
visualstudio.com/api/language-extensions/
language-server-extension-guide. Last accessed
November 14, 2022.
Microsoft Corporation (2022b). Language Server Protocol
Specification - 3.17. https://microsoft.github.io/
language-server-protocol/specifications/lsp/3.17/
specification. Last accessed November 14, 2022.
Rask, J. K., Madsen, F. P., Battle, N., Macedo, H. D.,
and Larsen, P. G. (2021). The specification language
server protocol: A proposal for standardised LSP ex-
tensions. Electronic Proceedings in Theoretical Com-
puter Science, 338:3–18.
Su, T., Wu, K., Miao, W., Pu, G., He, J., Chen, Y., and
Su, Z. (2017). A survey on data-flow testing. ACM
Computing Surveys (CSUR), 50(1):1–35.
Visualizing Dynamic Data-Flow Analysis of Object-Oriented Programs Based on the Language Server Protocol
87