Sample

int-d2bd1d351764-I12

Inline all eligible single-use intermediate local variables

Matched original source

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 Pro18.670–20; mean of three runs
GPT-6.1 Sol190–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

The code is highly readable. It has a clear, logical structure with imports at the top, followed by a comprehensive Javadoc explaining the annotation's purpose and constraints. The annotation definition is minimal and focused. Nesting is flat, with no unnecessary complexity. Clarity of intent is excellent, with clear documentation about parameter requirements and serial invocation behavior. The code is concise, containing no redundant elements. Action granularity is appropriate, with each annotation on its own line. Reading flow is natural, from imports to documentation to implementation. Minor deductions only for unused imports (Target, RetentionPolicy are used indirectly but ElementType is fully qualified).

Run 2

This code is highly readable. It has a clear, logical structure with standard package, import, and annotation declarations. The nesting is flat—there are no nested blocks. The Javadoc explains the purpose, constraints, and behavior concisely, making the intent unambiguous. The code length is minimal and appropriate for a marker annotation. Each action is on its own line, and the reading flow is natural: metadata annotations follow Javadoc, then the declaration. Minor deduction only because some readers may need to infer why @Keep is used, but overall this is exemplary annotation code.

Run 3

The code is highly readable. It is a concise annotation definition with a clear, single-purpose intent: marking methods as event subscribers. The structure is logical and flat—imports, Javadoc, annotations, and the declaration are ordered naturally. There is no nested logic, and each element is clearly separated. The Javadoc is thorough yet concise, explaining the parameter constraints, threading behavior, and referencing relevant classes. The use of standard annotations (@Retention, @Target, @Keep) is appropriate and self-explanatory. The code length is minimal and avoids unnecessary detail. Reading flow is natural, with the documentation preceding the declaration. Action granularity is effectively one logical concept per section, though the Javadoc is a block; this is acceptable for annotation definitions. The only minor deduction is that the long Javadoc could be slightly condensed, but it remains clear and informative.

Run 1

Code Structure: The package, imports, documentation, annotations, and declaration are logically organized. Nesting: There is no nested logic; the annotation declaration is flat. Clarity of intent: The name Subscribe and detailed Javadoc clearly explain its purpose, parameter requirements, and concurrency behavior. Code length: The implementation is minimal, and the documentation provides relevant context without unnecessary code. Action granularity: Each import and annotation occupies its own line, with no compound statements. Reading flow: The progression from context to documentation to declaration is natural. A blank line after the package declaration and between import groups would slightly improve visual separation.

Run 2

Code Structure: Logically organized into package, imports, documentation, metadata, and annotation declaration. Nesting: No nested logic; the empty annotation body is immediately understandable. Clarity of intent: The Subscribe name and detailed Javadoc clearly explain its purpose, parameter constraints, and concurrency behavior. Code length: Concise implementation with appropriately useful documentation. Action granularity: Each import and annotation occupies its own line, with no competing actions. Reading flow: Natural top-to-bottom progression; a blank line between the package declaration and imports would slightly improve visual separation.

Run 3

Code Structure: Logically organized into package, imports, documentation, annotation metadata, and declaration. Nesting: No nested logic, making the code immediately accessible. Clarity of intent: The Subscribe name and Javadoc clearly explain its purpose, parameter requirements, and concurrency behavior. Code length: Minimal implementation with appropriately detailed documentation. Action granularity: Each import and annotation occupies its own line; the empty annotation declaration is naturally concise. Reading flow: Conventional Java ordering makes the code easy to scan. A blank line between the package declaration and imports would slightly improve visual separation.