Sample
pyint-98a905660aaa-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.194 | 0–1; higher is more readable |
| Mi | 0.517 | 0–1; higher is more readable |
| LLOC | 117 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10.67 | 0–20; mean of three runs |
| BTTF | 0.303 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 7622.845 | −251.554 |
| Source linesThe number of non-empty source lines. | 228 | +91.2 |
| 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.419 | −6.629 |
Intercept 8.87 + feature contributions = -158.112 (log-odds).
Score = sigmoid(-158.112) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 229 | −7.072 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 181 | +5.523 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 181 | −3.733 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 227.875 | +2.775 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85.86 | +0.581 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.051 | +0.445 |
| 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. | 86.948 | −0.018 |
Intercept 0.07 + feature contributions = -1.427 (log-odds).
Score = sigmoid(-1.427) = 0.194.
| Score | 0.517 |
|---|
| Score | 117 |
|---|
Run 1
The code is severely obfuscated. Almost all method and variable names are nonsensical (validateState, sendData, loadResult, map, token, age), completely hiding their true purpose. This makes understanding the actions performed—like getting a feature, field count, or geometry—extremely difficult without cross-referencing the underlying C API. While the import structure and the class layout are logically organized, the clarity of intent is destroyed by these misleading names. Nesting is mostly flat, which is good, and code length is reasonable, but the gratuitous renaming of loop variables and parameters adds artificial cognitive load. Reading flow is disrupted by these nonsensical names, making even simple operations like iterating over features or reading properties impossible to follow naturally. The docstrings provide some help, but they cannot compensate for the pervasive, meaningless identifiers that appear to be deliberately changed to obscure functionality.
Run 2
The code is severely unreadable due to pervasive obfuscated naming (e.g., 'localMode' for a pointer, 'order' for index, 'open' for name, 'upload' for extent), which completely obscures the intent of properties and methods. The class inherits from 'GDALBase' but references undefined attributes like 'self._ptr', 'self.sendData' as a method parameter, and duplicate property names ('validateAddress' vs '_get_spatial_filter'), indicating broken and inconsistent code. Nesting is moderate but combined with ambiguous variable names ('token, item, region', 'step, node, flag, mode') and multiple actions per line in methods like '__getitem__', readability collapses. Docstrings describe concepts (e.g., spatial filter, field widths) but their identifiers do not match the described functionality. The code length is verbose with extensive comments that do not compensate for the misleading names. Action granularity is often poor, with multiple responsibilities in a single expression or loop. Overall, the lack of clear naming, inconsistent references, and mismatched documentation make the code extremely difficult to follow despite valid Python syntax.
Run 3
The code is highly obfuscated and unreadable. Variable and method names are misleading or meaningless (e.g., 'upload' for extent, 'sendData' for length, 'open' for name, 'validateState' for __getitem__). This severely obscures intent. Control flow is mostly flat, but the logic is tangled due to poor naming and inconsistent abstraction. The code also has dead or nonsensical parameters (e.g., 'score' in sendData), unexplained magic numbers, and inconsistent docstrings that do not match the actual operations. Property names like 'cancel', 'parseBuffer', and 'validateSession' further confuse the reader. While line length is mostly concise, the overall structure fails to communicate purpose, making the code very difficult to maintain or review.
Run 1
Code Structure: Logically organized into initialization, special methods, properties, and helpers, but spatial_filter references undefined accessor names, disrupting coherence. Nesting: Mostly shallow, with manageable conditionals and loops. Clarity of intent: Docstrings and comments explain GIS operations, but misleading names such as upload, cancel, sendData, and validateBalance obscure their actual purposes; generic variables and shadowing map add confusion. Code length: Individual methods are concise, though some comments repeat obvious behavior and field-access expressions are repetitive. Action granularity: Generally one action per statement; comprehensions and nested API calls occasionally combine several operations. Reading flow: Consistent formatting and clear section boundaries help, but readers must repeatedly consult documentation to interpret unrelated names. Overall, the structure is readable, while poor naming and inconsistent accessor references substantially reduce clarity.
Run 2
Code Structure: The class is logically divided into initialization, indexing, properties, and methods, with focused routines. Nesting: Mostly shallow, with manageable branching and loops. Clarity of intent: Severely weakened by misleading names such as sendData for feature count, upload for extent, and validateBalance for setting a spatial filter; arbitrary variable names and shadowing map add confusion. Docstrings and descriptive C API calls partially compensate. Code length: Generally appropriate for the wrapper functionality, though some comments repeat obvious behavior. Action granularity: Most lines perform one clear operation; nested API calls in comprehensions are somewhat denser. Reading flow: Formatting and section markers support navigation, but inconsistent naming forces frequent cross-referencing. The spatial_filter declaration references undefined getter/setter names rather than the methods present, further disrupting understanding.
Run 3
Code Structure: The class is logically organized into initialization, protocol methods, properties, and operations, although spatial_filter references undefined accessor names. Nesting: Generally shallow, with manageable conditional branches and loops. Clarity of intent: Severely weakened by misleading names such as sendData for feature count, upload for extent, and validateBalance for setting a spatial filter. Generic variables like map, age, and flag obscure meaning; map also shadows a built-in. Docstrings and explicit GDAL calls partially compensate. Code length: Most methods are concise, although repeated field-access expressions and some explanatory comments add bulk. Action granularity: Statements generally perform one action per line; comprehensions and nested API calls remain reasonably compact but require extra decoding. Reading flow: Consistent formatting and section markers help navigation, but readers must repeatedly reconcile names with documentation, and the mismatched spatial-filter accessors interrupt coherence.