Characterizing the Usage and Impact of Java Annotations Over 1000+ Projects

05/04/2018
by   Zhongxing Yu, et al.
0

As a kind of meta-data feature, annotations have been formally introduced into Java since Java 5. Since the introduction, annotations have been widely used by the Java community for different purposes, such as compiler guidance and runtime processing. Despite the ever-growing use, there is still limited empirical evidence about how developers use annotations in practice and the impact of annotation use on software quality. To fill this gap, we perform the first large-scale empirical study about Java annotation uses on 1,094 open-source projects hosted on GitHub. Our study answers some fundamental questions about Java annotation use. First, we answer the question "annotate what?" and find that annotations are typically used to annotate 4 aspects of program elements. Second, we answer the question "how annotations evolve?" and identify 6 different annotation change types, their frequencies, and their characteristics. Third, we answer the question "who uses annotations?" and establish the relationships between annotation uses and code ownership and developer experience. In addition, we also use regression models to explore the correlation between annotation uses and code quality, and we find that annotations do have an impact on making code less error-prone.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/20/2023

Method Chaining Redux: An Empirical Study of Method Chaining in Java, Kotlin, and Python

There are possible benefits and drawbacks to chaining methods together, ...
research
07/03/2019

NullAway: Practical Type-Based Null Safety for Java

NullPointerExceptions (NPEs) are a key source of crashes in modern Java ...
research
07/10/2018

A modelling language for the effective design of Java annotations

This paper describes a new modelling language for the effective design o...
research
12/02/2018

Ann: A domain-specific language for the effective design and validation of Java annotations

This paper describes a new modelling language for the effective design a...
research
08/18/2023

How Do Java Developers Reuse StackOverflow Answers in Their GitHub Projects?

StackOverflow (SO) is a widely used question-and-answer (Q&A) website fo...
research
12/21/2021

CADV: A software visualization approach for code annotations distribution

Code annotations is a widely used feature in Java systems to configure c...
research
07/20/2021

Mono2Micro: A Practical and Effective Tool for Decomposing Monolithic Java Applications to Microservices

In migrating production workloads to cloud, enterprises often face the d...

Please sign up or login with your details

Forgot password? Click here to reset