Sample

Schnappinger/aoi/artofillusion.animation.NullKeyframe

Human rating uses the original dataset scale.

Human4
Lines87

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.2070–1; higher is more readable
74.9Δ 21.5
Scalabrino0.8110–1; higher is more readable
65.1Δ 31.3
Dorn0.3790–1; higher is more readable
53.5Δ 42.9
Mi0.7340–1; higher is more readable
88.8Δ 7.6
LLOC18Logical lines; fewer is more readable
63.4Δ 33.0
DeepSeek V4 Pro17.330–20; mean of three runs
73.9Δ 22.4
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 22.6
BTTF0.6730–1; higher is more readable
73.3Δ 23.1
Human41–4; original rating
96.4

Views

Source code

/* Copyright (C) 2001-2002 by Peter Eastman This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ package artofillusion.animation; import java.io.*; /** This is a keyframes which contains no information. It is occasionally useful as a placeholder. */ public class NullKeyframe implements Keyframe { public NullKeyframe() { } /* Create a duplicate of this keyframe. */ public Keyframe duplicate() { return new NullKeyframe(); } /* Create a duplicate of this keyframe for a (possibly different) object. */ public Keyframe duplicate(Object owner) { return new NullKeyframe(); } /* Get the list of graphable values for this keyframe. */ public double [] getGraphValues() { return new double [0]; } /* Set the list of graphable values for this keyframe. */ public void setGraphValues(double values[]) { } /* These methods return a new Keyframe which is a weighted average of this one and one, two, or three others. */ public Keyframe blend(Keyframe o2, double weight1, double weight2) { return new NullKeyframe(); } public Keyframe blend(Keyframe o2, Keyframe o3, double weight1, double weight2, double weight3) { return new NullKeyframe(); } public Keyframe blend(Keyframe o2, Keyframe o3, Keyframe o4, double weight1, double weight2, double weight3, double weight4) { return new NullKeyframe(); } /* Determine whether this keyframe is identical to another one. */ public boolean equals(Keyframe k) { return (k instanceof NullKeyframe); } /* Write out a representation of this keyframe to a stream. */ public void writeToStream(DataOutputStream out) throws IOException { } /* Reconstructs the keyframe from its serialized representation. */ public NullKeyframe(DataInputStream in, Object parent) throws IOException { } }

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.1145.788−37.811
Source linesThe number of non-empty source lines.87+34.8
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.8−7.2

Intercept 8.87 + feature contributions = -1.341 (log-odds).
Score = sigmoid(-1.341) = 0.207.

Score0.811

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.87−2.044
Indentation frequencyHow rapidly indentation changes from line to line.77+1.926
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.125.931−1.669
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.77−1.346
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.125.989+1.228
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.85.756+0.789
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.04+0.55

Intercept 0.07 + feature contributions = -0.496 (log-odds).
Score = sigmoid(-0.496) = 0.379.

Score0.734
Score18
Run 1

The code is highly readable due to its clear, consistent structure and concise implementation. Each method is short, performs a single logical action, and is preceded by a descriptive comment, making intent unambiguous. The class is flat with negligible nesting, and the reading flow is natural: constructors, duplication, graph values, blending, comparison, and serialization follow a logical order. The code length is minimal and appropriate for a placeholder implementation. Minor deductions include redundant Javadoc-style comments that could be omitted, and empty method bodies (e.g., setGraphValues, writeToStream) which, while intentional, may require readers to infer the no-op behavior from context.

Run 2

The code is highly readable. It has a clear, flat structure with no deep nesting, and each method is concise and follows a logical order. Comments consistently explain the purpose of each method, which enhances clarity of intent. Action granularity is good: each method performs essentially one clear action (or intentionally none for a placeholder class). The reading flow is natural, moving from constructor, to duplication, to getters/setters, to blending, equality, and serialization. The only minor deductions are for the empty constructors and methods, which are necessary for the placeholder role but create some 'no-op' clutter, and the slight redundancy among the three blend methods. Overall, the code is straightforward, well-organized, and easy to follow.

Run 3

The code is highly readable due to its simple, flat structure and clear intent. Each method implements a single, well-defined action (duplicate, blend, equality check, serialization) with minimal nesting and no complex logic. The class serves as a placeholder, and its empty or trivial method bodies appropriately reflect that purpose. Comments concisely explain each method's role, enhancing understanding. The code length is minimal and proportional to its functionality. Reading flow is natural, with methods grouped logically by related operations. Minor deductions stem from minor inconsistencies, such as a missing @Override annotation (depends on Java version conventions) and unused parameters in blend methods and constructors, which could slightly reduce immediate clarity for some readers.

Run 1

Code Structure: A single-purpose class with logically grouped interface methods and helpful comments. Nesting: Completely flat method bodies, with no branching or loops. Clarity of intent: The class documentation clearly identifies a placeholder keyframe, making empty methods and ignored parameters understandable; the overloaded equals(Keyframe) could be mistaken for an override of equals(Object). Code length: Short implementations, though repeated comments, generous spacing, and similar overloads add some visual bulk. Action granularity: Each nonempty method performs one simple action per line. Reading flow: Consistent formatting and straightforward methods support easy scanning, with minor disruption from the deserialization constructor appearing last and its inconsistent indentation.

Run 2

Code Structure: Methods are logically grouped in a small, cohesive placeholder class, though placing both constructors together would improve organization. Nesting: Completely flat method bodies make the code easy to scan. Clarity of intent: The class documentation and descriptive method names establish its purpose; however, empty methods and ignored parameters could be explicitly documented as intentional. Code length: Concise implementations, with some repetitive comments and overloads required by the interface. Action granularity: Each nonempty method performs a single clear action, with no crowded statements. Reading flow: Consistent spacing and straightforward ordering support natural reading, slightly weakened by the final constructor's inconsistent indentation and long blend signatures.

Run 3

Code Structure: Methods are logically grouped around a simple placeholder implementation, though placing both constructors together would improve organization. Nesting: Completely flat method bodies make the code easy to scan. Clarity of intent: The class documentation and descriptive method names clearly convey its purpose; however, comments could better explain why inputs are ignored and serialization methods do nothing. Code length: The implementation is concise, with some repetitive comments and overloads required by the interface. Action granularity: Each nonempty method performs a single action per line. Reading flow: Consistent formatting and straightforward returns support natural reading, slightly weakened by long blend signatures and inconsistent indentation of the final constructor.