Sample

Schnappinger/diarymanagement/TBA.Exceptions.MessagesException

Human rating uses the original dataset scale.

Human4
Lines46

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett10–1; higher is more readable
95.3Δ 4.7
Scalabrino0.9270–1; higher is more readable
95.2Δ 4.8
Dorn0.9050–1; higher is more readable
96.7Δ 3.3
Mi0.7590–1; higher is more readable
92.1Δ 7.9
LLOC4Logical lines; fewer is more readable
87.0Δ 13.0
DeepSeek V4 Pro16.670–20; mean of three runs
59.9Δ 40.1
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 26.2
BTTF0.8020–1; higher is more readable
96.7Δ 3.3
Human41–4; original rating
100.0

Views

Source code

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package TBA.Exceptions; /** * * @author dmcgra */ public class MessagesException extends Exception { /** * Constructor does nothing */ public MessagesException() {} /** * This method passes message to super Exception * @param message */ public MessagesException(String message) { super(message); } /** * This method passes cause to super Exception * @param cause */ public MessagesException(Throwable cause) { super(cause); } /** * This method passes message and cause to super Exception * @param message * @param cause */ public MessagesException(String message, Throwable cause) { super(message, cause); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.46+18.4
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.267.96−8.843
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.336−6.504

Intercept 8.87 + feature contributions = 11.923 (log-odds).
Score = sigmoid(11.923) = 1.

Score0.927

Feature contributions

FeatureValueContribution
(log-odds)
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.60.935+1.084
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.039+0.566
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.43−0.486
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.28+0.231
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.44.597+0.214
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.60.913+0.178

Intercept 0.07 + feature contributions = 2.255 (log-odds).
Score = sigmoid(2.255) = 0.905.

Score0.759
Score4
Run 1

The code is highly readable, with clear separation between constructors, minimal nesting, and straightforward intent. Each constructor follows a single-purpose pattern, and the action granularity is excellent—one action per line. The only minor issues are the placeholder auto-generated template comment at the top, which adds noise, and slightly verbose Javadoc comments that state the obvious. Otherwise, the code is concise, logically organized, and easy to follow.

Run 2

The code is highly readable due to its simple, conventional structure. It defines a custom exception with four standard constructors, mirroring the typical Java exception pattern. Nesting is nonexistent, and each constructor contains a single, clear action (a super() call). Intent is unambiguous: it provides multiple ways to instantiate the exception. Although the file includes somewhat noisy auto-generated template comments and redundant Javadoc (e.g., “Constructor does nothing”), these are minor. The reading flow follows a logical progression from default constructor to those accepting message and cause, making it easy for any Java developer to understand immediately.

Run 3

The code is a simple custom exception class with a clear, conventional structure. It follows standard Java patterns with four overloaded constructors, each delegating to the appropriate superclass constructor. Nesting is nonexistent, and each constructor is a single, focused action. Intent is unambiguous: provide multiple ways to instantiate a MessagesException. The code length is appropriate for its purpose — not overly verbose, though the comment 'Constructor does nothing' is slightly misleading since the default constructor implicitly calls super(). The reading flow is natural, following the conventional constructor ordering. Minor deductions: the class lacks a serialVersionUID (a best practice for exceptions), and the default constructor comment could be improved. The placeholder template comment at the top is unnecessary noise but does not significantly harm readability. Overall, it is clean, idiomatic, and easy to understand.

Run 1

Code Structure: The class is logically organized, with four conventional exception constructors. Nesting: There is no unnecessary nesting; each constructor is simple and flat. Clarity of intent: Extending Exception and delegating to superclass constructors clearly communicates purpose, although MessagesException is a somewhat vague name. Code length: The implementation is concise, but the template header and repetitive Javadoc add unnecessary length. Action granularity: Each nonempty constructor contains one action per line. Reading flow: The constructor order is natural and easy to follow, though inconsistent indentation and the inline empty constructor slightly reduce visual consistency.

Run 2

Code Structure: The class is logically organized, with related constructor overloads grouped together. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Extending Exception and forwarding arguments to superclass constructors clearly communicates its purpose, though the class name provides limited domain context. Code length: The implementation is concise, but template boilerplate and repetitive comments add unnecessary length. Action granularity: Each constructor performs a single action, with no crowded statements. Reading flow: Constructor ordering is natural and predictable; slightly inconsistent indentation and largely redundant documentation mildly interrupt the flow.

Run 3

Code Structure: A logically organized exception class with related constructor overloads grouped together. Nesting: Minimal, limited to the class and constructor bodies. Clarity of intent: The class name, parameter names, and superclass calls clearly communicate its purpose; comments are mostly redundant, and parameter documentation is incomplete. Code length: Implementation is concise, but template boilerplate and repetitive comments add unnecessary length. Action granularity: Each constructor performs a single action, with superclass calls on separate lines. Reading flow: Constructor ordering progresses naturally from no arguments to message, cause, and both. Minor indentation inconsistencies and nonstandard package capitalization slightly reduce polish.