How do annotations affect Java code readability?
Eduardo Guerra, Everaldo Gomes, Jeferson Ferreira, Igor Wiese,, Phyllipe Lima, Marco Gerosa, Paulo Meirelles

TL;DR
This study investigates how code annotations in Java influence readability, revealing mixed developer opinions and highlighting that personal preferences and context significantly affect perceptions of annotations' readability impact.
Contribution
It provides the first systematic survey analyzing developer perceptions of annotations' effects on Java code readability across various annotation categories.
Findings
Preferences for annotations are highly varied among developers.
No clear consensus on whether annotations improve or hinder readability.
Developers' personal experience influences their perception of annotations.
Abstract
Context: Code annotations have gained widespread popularity in programming languages, offering developers the ability to attach metadata to code elements to define custom behaviors. Many modern frameworks and APIs use annotations to keep integration less verbose and located nearer to the corresponding code element. Despite these advantages, practitioners' anecdotal evidence suggests that annotations might negatively affect code readability. Objective: To better understand this effect, this paper systematically investigates the relationship between code annotations and code readability. Method: In a survey with software developers (n=332), we present 15 pairs of Java code snippets with and without code annotations. These pairs were designed considering five categories of annotation used in real-world Java frameworks and APIs. Survey participants selected the code snippet they considered…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Text Readability and Simplification · Software Reliability and Analysis Research
