Characterizing the Usage, Evolution and Impact of Java Annotations in Practice

  title={Characterizing the Usage, Evolution and Impact of Java Annotations in Practice},
  author={Zhongxing Yu and Chenggang Bai and Lionel Seinturier and Monperrus Martin},
  journal={IEEE Transactions on Software Engineering},
Annotations have been formally introduced into Java since Java 5. Since then, 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 knowledge about the actual usage of annotations in practice, the changes made to annotations during software evolution, and the potential impact of annotations on code quality. To fill this gap, we perform the first large-scale… 

Studying Test Annotation Maintenance in the Wild

This work developed a tool to mine 82,810 commits and detect 23,936 instances of test annotation changes from 12 open-source Java projects, and creates a taxonomy by manually inspecting and classifying a sample of 368 test annotations changes and documenting the motivations driving these changes.

A Metadata Handling API for Framework Development: a Comparative Study

A novel API, named Esfinge Metadata, is proposed to assist in the development of frameworks based on metadata and applications based on custom annotations, which uses them to map metadata to class members.

DeepAnna: Deep Learning based Java Annotation Recommendation and Misuse Detection

An empirical study on Stack Overflow questions is conducted to investigate the major development frameworks that are involved in questions about Java annotations and the main problems encountered by developers in the use ofjava annotations and proposes DeepAnna, a deep learning based Java annotation recommendation and misuse detection approach.

Annotation practices in Android apps

  • Ajay Kumar JhaSarah Nadi
  • Computer Science
    2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM)
  • 2020
The density of annotations and the values of various other annotation metrics are notably less in Android apps than in Java projects, and developers declare custom annotations in different apps but with the same purpose, which presents an opportunity for annotation designers to create new annotations.

Understanding Software-2.0

This first large-scale quantitative and qualitative empirical study to shed light on how developers in Software-2.0 use ML libraries, and how this evolution affects their code is presented.

On the adoption, usage and evolution of Kotlin features in Android development

The goal of this work is to understand the usage of Kotlin features considering four aspects: i) which features are adopted, ii) what is the degree of adoption, iii) when are these features added into Android applications for the first time, and iv) how theusage of features evolves along with applications' evolution.

A Model to Enable the Reuse of Metadata-Based Frameworks in Adaptive Object Model Architectures

The proposed model can be successfully employed to use AOM entities with frameworks that were not designed for AOM applications, and can reduce the effort required to adopt an AOM architecture and be a facilitator in implementing more flexible and adaptive approaches.

API Usage Recommendation via Multi-View Heterogeneous Graph Representation Learning

A novel method named MEGA is proposed for improving the recommendation accuracy especially for the low-frequency APIs, and considers another two new heterogeneous graphs: global API co-occurrence graph enriched with the API frequency information and hierarchical structure graph enrich with the project component information.

Efficiency and Automation in Threat Analysis of Software Systems

It is found that the eSTRIDE approach can help focus the analysis and produce twice as many high-priority threats in the same time frame and a correspondence mapping is a key enabler for automatically checking the security compliance of the implemented system with the intended design.



How Annotations are Used in Java: An Empirical Study

An empirical study on how annotations are used on a corpus of 106 open-source Java systems, which has evaluated more than 160,000 annotations that have been applied to the source code of such systems.

Adoption and use of Java generics

This paper reports on the first empirical investigation into how Java generics have been integrated into open source software by automatically mining the history of 40 popular open source Java programs, traversing more than 650 million lines of code in the process.

Design Patterns for Annotation-based APIs

The present work aims to document patterns that describe recurrent solutions in the usage of code annotations for the creation of APIs so that API designers will have a broader range of tools to model the interaction between an application and a programming interface.

Mining billions of AST nodes to study actual and potential usage of Java language features

This study analyzes over 31k open-source Java projects representing over 9 million Java files, which when parsed contain over 18 billion AST nodes, to find uses of new Java language features over time and gives interesting insights.

Understanding the use of lambda expressions in Java

Interestingly, it is found that developers are using Java's built-in functional interfaces inefficiently, i.e., they prefer to use general functional interfaces over the specialized ones, overlooking the performance overheads that might be imposed.

Revisiting Assert Use in GitHub Projects

It is found that asserts have a small yet significant relationship with defect occurrence and developers who have added asserts to methods often have higher ownership of and experience with the methods than developers who did not add asserts.

aComment: mining annotations from comments and code to detect interrupt related concurrency bugs

This work proposed a new type of annotations - interrupt related annotations - and generated 96,821 such annotations for the Linux kernel with little manual effort and were used to automatically detect 9 real OS concurrency bugs (7 of which were previously unknown).

Challenges for Static Analysis of Java Reflection - Literature Review and Empirical Study

It is concluded that the need for unsound assumptions to resolve reflection is widely supported and for Java software engineers prioritizing on robustness, tactics to obtain more easy to analyze reflection code, and for static analysis tool builders a list of opportunities to have significant impact on real Java code are provided.

An empirical investigation into a large-scale Java open source code repository

This work poses 32 research questions, explains rationale behind them, and obtains facts from 2,080 randomly chosen Java applications from Sourceforge that find that most methods have one or zero arguments or they do not return any values.

Contracts in the Wild: A Study of Java Programs

This paper catalogue 25 techniques and tools for lightweight contract checking in Java, and presents the results of an empirical study looking at a dataset extracted from the 200 most popular projects found on Maven Central, constituting roughly 351,034 KLOC.