Sample

int-a2e2d577e310-SRC

Unmodified source class

Lines25

Scores

MethodScoreScale
Posnett0.5290–1; higher is more readable
Dorn0.6260–1; higher is more readable
Mi0.5610–1; higher is more readable
LLOC1Logical lines; fewer is more readable
DeepSeek V4 Pro180–20; mean of three runs
GPT-6.1 Sol19.330–20; mean of three runs
BTTF0.6050–1; higher is more readable

Views

Source code

package com.google.common.eventbus; import com.google.errorprone.annotations.Keep; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marks a method as an event subscriber. * * <p>The type of event will be indicated by the method's first (and only) parameter, which cannot * be primitive. If this annotation is applied to methods with zero parameters, or more than one * parameter, the object containing the method will not be able to register for event delivery from * the {@link EventBus}. * * <p>Unless also annotated with @{@link AllowConcurrentEvents}, event subscriber methods will be * invoked serially by each event bus that they are registered with. * * @author Cliff Biffle * @since 10.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Keep public @interface Subscribe {}

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.351.862−11.611
Source linesThe number of non-empty source lines.25+10
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.4.761−7.141

Intercept 8.87 + feature contributions = 0.118 (log-odds).
Score = sigmoid(0.118) = 0.529.

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.91.462+0.671
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.04+0.551
Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names.99−0.528
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.26+0.116
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.24.9−0.062

Intercept 0.07 + feature contributions = 0.514 (log-odds).
Score = sigmoid(0.514) = 0.626.

Score0.561
Score1
Run 1

This code is highly readable. The structure is simple and logical, consisting of a single annotation definition with clear documentation. Nesting is virtually nonexistent. The intent is unambiguous: it defines a method-level annotation for event subscription. The code is concise, avoiding unnecessary length. Action granularity is clean, with one annotation per line. Reading flow is natural, following standard Java conventions. While the Javadoc is thorough, some might find it slightly verbose, but it provides essential contract details. Overall, this is exemplary code.

Run 2

The code is highly readable. The structure is logical: package declaration, imports, Javadoc, and annotations are organized cleanly. Nesting is minimal since this is an annotation interface. The intent is clearly expressed through descriptive Javadoc that explains usage constraints and behavior. The code is concise — no unnecessary or redundant lines exist. Each annotation is on its own line, aligning with the one-action-per-line principle. Reading flow is natural, moving from general documentation to specific metadata and finally the declaration. Minor deductions: the long Javadoc could be slightly condensed, and the wildcard import pattern is avoided here but not applicable. Overall, this adheres strongly to readability best practices.

Run 3

The code is highly readable. It has a clear, logical structure: package declaration, imports, Javadoc, and annotations are well-organized. Nesting is nonexistent. The intent is explicit—defining a marker annotation for event subscribers—and the Javadoc thoroughly explains usage and constraints. Code length is minimal and appropriate for an annotation declaration. Action granularity follows standard conventions, with annotations placed on separate lines. Reading flow is natural, moving from package context to imports, documentation, metadata, and finally the annotation type. Minor deductions: the Javadoc could benefit from an example, and long lines in the Javadoc slightly reduce readability.

Run 1

Code Structure: Standard Java organization with package, imports, documentation, annotations, and declaration. Nesting: No nested logic; the empty annotation body is immediately understandable. Clarity of intent: Subscribe and its Javadoc clearly explain the purpose, parameter constraints, and concurrency behavior. Code length: Minimal implementation with useful, proportionate documentation. Action granularity: Each import and annotation occupies its own line; the compact empty declaration remains readable. Reading flow: Natural top-to-bottom progression from context to contract to implementation. A blank line between the package declaration and imports would slightly improve visual separation.

Run 2

Code Structure: Logically organized into package, imports, documentation, metadata annotations, and declaration. Nesting: No nested logic or unnecessary complexity. Clarity of intent: The Subscribe name and Javadoc clearly explain the annotation’s purpose, parameter requirements, and concurrency behavior. Code length: Minimal implementation with appropriately detailed documentation. Action granularity: Each import and metadata annotation occupies its own line; the empty declaration is suitably concise. Reading flow: Natural top-to-bottom progression makes the code easy to understand.

Run 3

Code Structure: Clearly organized into package, imports, documentation, metadata annotations, and declaration; blank lines between sections would improve separation. Nesting: No nested logic. Clarity of intent: Subscribe is descriptive, and the Javadoc clearly explains its purpose, parameter constraints, and concurrency behavior. Code length: Minimal implementation with appropriately detailed documentation. Action granularity: Each import and annotation occupies its own line; the empty declaration is appropriately compact. Reading flow: Natural top-to-bottom progression from dependencies to contract to declaration.