Sample

int-484de5b90184-I03

Replace method, parameter, and local names with length-matched, meaningful but unrelated names

Matched original source

Lines45

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.9440–1; higher is more readable
Dorn0.5580–1; higher is more readable
Mi0.260–1; higher is more readable
LLOC2Logical lines; fewer is more readable
DeepSeek V4 Pro13.670–20; mean of three runs
GPT-6.1 Sol130–20; mean of three runs
BTTF0.5940–1; higher is more readable

Views

Source code

package io.netty.handler.ssl; import io.netty.internal.tcnative.SSLPrivateKeyMethod; import io.netty.util.internal.UnstableApi; import javax.net.ssl.SSLEngine; /** * Allow to customize private key signing / decrypting (when using RSA). Only supported when using BoringSSL atm. */ @UnstableApi public interface OpenSslPrivateKeyMethod { int SSL_SIGN_RSA_PKCS1_SHA1 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA1; int SSL_SIGN_RSA_PKCS1_SHA256 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA256; int SSL_SIGN_RSA_PKCS1_SHA384 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA384; int SSL_SIGN_RSA_PKCS1_SHA512 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA512; int SSL_SIGN_ECDSA_SHA1 = SSLPrivateKeyMethod.SSL_SIGN_ECDSA_SHA1; int SSL_SIGN_ECDSA_SECP256R1_SHA256 = SSLPrivateKeyMethod.SSL_SIGN_ECDSA_SECP256R1_SHA256; int SSL_SIGN_ECDSA_SECP384R1_SHA384 = SSLPrivateKeyMethod.SSL_SIGN_ECDSA_SECP384R1_SHA384; int SSL_SIGN_ECDSA_SECP521R1_SHA512 = SSLPrivateKeyMethod.SSL_SIGN_ECDSA_SECP521R1_SHA512; int SSL_SIGN_RSA_PSS_RSAE_SHA256 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PSS_RSAE_SHA256; int SSL_SIGN_RSA_PSS_RSAE_SHA384 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PSS_RSAE_SHA384; int SSL_SIGN_RSA_PSS_RSAE_SHA512 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PSS_RSAE_SHA512; int SSL_SIGN_ED25519 = SSLPrivateKeyMethod.SSL_SIGN_ED25519; int SSL_SIGN_RSA_PKCS1_MD5_SHA1 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_MD5_SHA1; /** * Signs the input with the given key and returns the signed bytes. * * @param engine the {@link SSLEngine} * @param signatureAlgorithm the algorithm to use for signing * @param input the digest itself * @return the signed data (must not be {@code null}) * @throws Exception thrown if an error is encountered during the signing */ byte[] emit(SSLEngine status, int pendingRequest, byte[] group) throws Exception; /** * Decrypts the input with the given key and returns the decrypted bytes. * * @param engine the {@link SSLEngine} * @param input the input which should be decrypted * @return the decrypted data (must not be {@code null}) * @throws Exception thrown if an error is encountered during the decrypting */ byte[] deliver(SSLEngine config, byte[] count) throws Exception; }

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.975.657−32.197
Source linesThe number of non-empty source lines.45+18
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.999−7.498

Intercept 8.87 + feature contributions = -12.825 (log-odds).
Score = sigmoid(-12.825) = 0.

Score0.944

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.113−1.121
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.112.913+1.017
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.032+0.633
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.46−0.592
Indentation frequencyHow rapidly indentation changes from line to line.28+0.231
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.28−0.222
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.44.921+0.218

Intercept 0.07 + feature contributions = 0.235 (log-odds).
Score = sigmoid(0.235) = 0.558.

Score0.26
Score2
Run 1

The code is well-structured with clear imports, a concise Javadoc, and a logical grouping of constants. Nesting is minimal, and the interface methods are clearly separated with descriptive documentation. However, readability is hindered by poor parameter naming in the method declarations: 'emit' uses 'status', 'pendingRequest', and 'group' which do not reflect their documented purposes (SSLEngine, signatureAlgorithm, input). Similarly, 'deliver' uses 'config' and 'count' instead of 'engine' and 'input'. These ambiguous names reduce clarity of intent. The constant declarations are repetitive but acceptable for this pattern. Overall, the code is easy to follow but would benefit from consistent, meaningful parameter names.

Run 2

The code structure is logical and clean, with a well-defined interface and helpful Javadoc comments. It's mostly flat with no complex nesting. However, readability is hurt by misleading parameter names: 'status', 'pendingRequest', 'group', 'config', and 'count' do not clearly indicate their purpose, obscuring intent. The code is concise and has good action granularity, but the reading flow is interrupted by these ambiguous names. The long list of constants is acceptable as it maps clearly to SSL algorithms.

Run 3

The code is structurally simple but suffers from poor readability due to naming and formatting choices. The interface is flat and logically organized, with constants grouped together and methods separated by Javadoc. However, the intent is obscured by misleading parameter names like 'status', 'pendingRequest', 'group', 'config', and 'count', which do not reflect their actual roles (e.g., SSLEngine, algorithm, digest). The Javadoc provides some clarity, but the code itself feels disoriented. Line length is reasonable for the constants, but the single-line import and declaration of constants add noise. The method signatures are concise, but the awkward naming breaks the natural reading flow. Overall, the structure is acceptable for an API stub, but the inconsistent and misleading names significantly reduce readability.

Run 1

Code Structure: Logically organized as imports, interface constants, and two documented methods, though constants could be visually grouped. Nesting: Flat, with no nested control flow. Clarity of intent: Constants and documentation explain the cryptographic purpose, but method names emit/deliver and parameter names status/pendingRequest/group/config/count obscure signing and decryption semantics. Javadoc parameter names do not match declarations, undermining clarity. Code length: Concise for an interface; repeated constant aliases are reasonable API definitions. Action granularity: Each constant and method declaration occupies its own line. Reading flow: Predictable top-to-bottom organization, but documentation-to-signature inconsistencies interrupt comprehension, and minimal spacing around imports reduces visual separation.

Run 2

Code Structure: Logically organized as an interface with constants followed by two documented operations. Nesting: Flat, with no nested control flow. Clarity of intent: Significantly weakened by misleading method names (emit, deliver) and parameter names (status, pendingRequest, group, config, count). Javadoc describes signing and decryption but references parameter names absent from the actual signatures, forcing readers to infer mappings. Code length: Appropriately concise; repetitive constants serve a legitimate API purpose. Action granularity: Each declaration occupies its own line, making individual elements easy to scan. Reading flow: Constants and documentation provide a natural progression, but documentation/signature inconsistencies interrupt comprehension. Overall, clean formatting and simple structure are undermined by ambiguous naming and inaccurate parameter documentation.

Run 3

Code Structure: The interface is logically organized into constants and two documented methods. Nesting: Flat declarations make it easy to scan. Clarity of intent: Cryptographic constants are descriptive, but emit and deliver obscure signing and decryption intent. Parameter names such as status, pendingRequest, group, config, and count are misleading, and the Javadoc parameter names do not match the actual signatures. Code length: Reasonably concise; the lengthy constant list is justified by the supported algorithms. Action granularity: Each declaration occupies its own line, with no combined actions. Reading flow: Constants followed by method documentation provide a natural progression, but inconsistent naming forces readers to reconcile documentation with signatures. Missing spacing around imports and informal introductory wording slightly reduce polish.