Repository Analysis

dpkp/kafka-python

Python client for Apache Kafka

30.4 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of dpkp/kafka-python, a Python project with 5,903 GitHub stars. SynthScan v2.0 examined 81,477 lines of code across 466 source files, recording 2134 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 30.4 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

30.4
Adjusted Score
30.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.9K
Stars
Python
Language
81.5K
Lines of Code
466
Files
2.1K
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 2MEDIUM 162LOW 1970

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2134 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1344 hits · 1261 pts
SeverityFileLineSnippetContext
LOWtest/test_metrics.py126def test_hierarchical_sensors(metrics):CODE
LOWtest/test_metrics.py162def test_bad_sensor_hierarchy(metrics):CODE
LOWtest/test_metrics.py217def test_remove_inactive_metrics(mocker, time_keeper, metrics):CODE
LOWtest/test_metrics.py317def test_old_data_has_no_effect(mocker, time_keeper):CODE
LOWtest/test_codec.py34def test_snappy_detect_xerial():CODE
LOWtest/test_codec.py56def test_snappy_decode_xerial():CODE
LOWtest/test_codec.py71def test_snappy_encode_xerial():CODE
LOWtest/test_util.py21def test_topic_name_validation(topic_name, expectation):CODE
LOWtest/test_cluster.py268 def test_known_partition_returns_leader_and_epoch(self, cluster):CODE
LOWtest/test_cluster.py274 def test_unknown_topic_returns_none(self, cluster):CODE
LOWtest/test_cluster.py280 def test_unknown_partition_returns_none(self, cluster):CODE
LOWtest/test_cluster.py297 def test_updates_when_epoch_is_strictly_newer(self, cluster):CODE
LOWtest/test_cluster.py307 def test_noop_when_epoch_is_stale_or_equal(self, cluster):CODE
LOWtest/test_cluster.py316 def test_unknown_topic_or_partition_returns_false(self, cluster):CODE
LOWtest/test_cluster.py324 def test_rewires_broker_partitions(self, cluster):CODE
LOWtest/test_cluster.py332 def test_unknown_leader_id_minus_one_skips_broker_partitions_add(self, cluster):CODE
LOWtest/test_cluster.py401 def test_collect_hosts__with_spaces(self):CODE
LOWtest/test_cluster.py409 def test_collect_hosts__protocol(self):CODE
LOWtest/test_cluster.py419 def test_expands_multi_ip_host_to_canonical_names(self):CODE
LOWtest/test_cluster.py431 def test_deduplicates_canonical_names(self):CODE
LOWtest/test_cluster.py440 def test_falls_back_to_original_on_resolution_failure(self):CODE
LOWtest/test_cluster.py445 def test_missing_canonname_falls_back_to_input_host(self):CODE
LOWtest/test_cluster.py455 def test_default_does_not_expand_bootstrap(self):CODE
LOWtest/test_cluster.py462 def test_canonical_mode_expands_bootstrap(self):CODE
LOWtest/test_cluster.py477 def test_request_update_returns_future(self, cluster):CODE
LOWtest/test_cluster.py482 def test_request_update_deduplicates(self, cluster):CODE
LOWtest/test_cluster.py487 def test_request_update_new_future_after_done(self, cluster):CODE
LOWtest/test_cluster.py493 def test_request_update_sets_cluster_need_update(self, cluster):CODE
LOWtest/test_cluster.py497 def test_request_update_sends_metadata_request(self, manager, net):CODE
LOWtest/test_cluster.py131def _make_metadata_response_with_id(version, name, topic_id, partition=0,CODE
LOWtest/test_cluster.py179 def test_topic_id_unknown_returns_none(self, cluster):CODE
LOWtest/test_cluster.py202 def test_zero_uuid_not_indexed(self, cluster):CODE
LOWtest/test_cluster.py208 def test_recreation_resets_leader_epoch_and_updates_index(self, cluster, caplog):CODE
LOWtest/test_cluster.py225 def test_stable_id_keeps_leader_epoch(self, cluster):CODE
LOWtest/test_cluster.py232 def test_topic_drop_from_response_clears_index(self, cluster):CODE
LOWtest/test_cluster.py365 def test_collect_hosts__happy_path(self):CODE
LOWtest/test_cluster.py382 def test_collect_hosts__string_list(self):CODE
LOWtest/test_cluster.py509 def test_refresh_metadata_retries_no_node(self, manager, net):CODE
LOWtest/test_cluster.py521 def test_bootstrap_triggers_refresh_loop(self, manager, mocker):CODE
LOWtest/test_cluster.py531 def test_refresh_loop_spawned_once(self, manager):CODE
LOWtest/test_mock_broker.py57 def test_default_construction(self):CODE
LOWtest/test_mock_broker.py65 def test_set_metadata_with_topics(self):CODE
LOWtest/test_mock_broker.py80 def test_respond_queues_in_order(self):CODE
LOWtest/test_mock_broker.py92 def test_respond_fn_returning_none_sends_no_response(self):CODE
LOWtest/test_mock_broker.py134 def test_bootstrap_through_mock(self):CODE
LOWtest/test_mock_broker.py146 def test_metadata_with_topics(self):CODE
LOWtest/test_mock_broker.py219 def test_multiple_metadata_updates(self):CODE
LOWtest/test_mock_broker.py272 def test_fail_next_aborts_request(self):CODE
LOWtest/test_mock_broker.py296 def test_api_version_negotiation(self):CODE
LOWtest/test_mock_broker.py348 def test_admin_client_with_mock(self):CODE
LOWtest/test_mock_broker.py397 def test_default_construction(self):CODE
LOWtest/test_mock_broker.py407 def test_bootstrap_and_per_node_routing(self):CODE
LOWtest/test_mock_broker.py534 def test_add_group_elects_first_member_leader(self):CODE
LOWtest/test_mock_broker.py554 def test_trigger_rebalance_is_one_shot(self):CODE
LOWtest/testutil.py43def maybe_skip_unsupported_compression(compression_type):CODE
LOWtest/producer/test_producer.py16def test_default_api_timeout_smaller_than_request_timeout_raises():CODE
LOWtest/producer/test_producer.py38def test_kafka_producer_thread_close():CODE
LOWtest/producer/test_producer.py49def test_kafka_producer_context_manager_closes_on_exit():CODE
LOWtest/producer/test_producer.py58def test_partition_calls_partitioner_partition_with_cluster():CODE
LOWtest/producer/test_producer.py77def test_partition_explicit_partition_skips_partitioner():CODE
1284 more matches not shown…
Decorative Section Separators140 hits · 538 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_mock_broker.py48# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py115# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py117# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py380# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py382# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py56# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1341# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1343# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py142# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py144# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py359# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py361# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py441# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py443# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py607# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py609# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py718# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py720# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py825# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py827# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py995# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py997# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1216# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1218# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_users.py82# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_users.py84# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py53# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py55# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py168# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py170# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py278# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py280# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py442# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py444# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py734# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py736# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py860# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py862# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py529# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py531# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py138# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py140# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py199# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py201# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py259# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py261# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py318# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py320# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py367# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_transactions.py369# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py127# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py129# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py204# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py206# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_configs.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_configs.py47# ---------------------------------------------------------------------------COMMENT
80 more matches not shown…
Unused Imports230 hits · 216 pts
SeverityFileLineSnippetContext
LOWtest/test_cluster.py5CODE
LOWtest/test_mock_broker.py15CODE
LOWtest/test_mock_broker.py17CODE
LOWtest/producer/test_producer.py1CODE
LOWtest/producer/test_producer.py2CODE
LOWtest/producer/test_transaction_manager_mock_broker.py19CODE
LOWtest/producer/test_transaction_manager_mock_broker.py30CODE
LOWtest/producer/test_transaction_manager_mock_broker.py31CODE
LOWtest/producer/test_sender.py4CODE
LOWtest/net/test_inet.py268CODE
LOWtest/net/test_sasl_reauthentication.py6CODE
LOWtest/net/test_sasl_reauthentication.py189CODE
LOWtest/net/test_connection.py4CODE
LOWtest/net/test_compat.py2CODE
LOWtest/net/test_compat.py3CODE
LOWtest/net/test_manager.py3CODE
LOWtest/net/test_manager.py8CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/fixtures.py14CODE
LOWtest/admin/test_admin_topics.py6CODE
LOWtest/admin/test_admin_cluster_log_dirs.py1CODE
LOWtest/protocol/test_broker_version_data.py8CODE
LOWtest/protocol/test_stubs.py3CODE
LOWtest/protocol/test_stubs.py4CODE
LOWtest/protocol/test_stubs.py8CODE
LOWtest/protocol/test_stubs.py9CODE
LOWtest/protocol/test_api_compatibility.py2CODE
LOWtest/protocol/test_api_compatibility.py3CODE
LOWtest/protocol/test_api_compatibility.py5CODE
LOWtest/protocol/test_api_compatibility.py7CODE
LOWtest/protocol/old/test_compact.py4CODE
LOWtest/protocol/old/test_api.py3CODE
LOWtest/protocol/old/test_old_tagged_fields.py3CODE
LOWtest/protocol/old/test_types.py3CODE
LOWtest/protocol/old/test_old_fetch.py5CODE
LOWtest/protocol/old/test_old_api_versions.py5CODE
LOWtest/protocol/old/test_old_api_versions.py5CODE
LOWtest/protocol/old/test_old_api_versions.py7CODE
LOWtest/protocol/schemas/test_tagged_fields.py3CODE
LOWtest/protocol/schemas/test_codec_types.py7CODE
LOWtest/protocol/consumer/test_consumer_protocol.py3CODE
LOWtest/protocol/metadata/test_api_versions.py5CODE
LOWtest/consumer/test_coordinator.py20CODE
LOWtest/consumer/test_fetcher.py17CODE
LOWkafka/util.py1CODE
LOWkafka/__init__.py2CODE
LOWkafka/__init__.py13CODE
LOWkafka/__init__.py14CODE
LOWkafka/__init__.py15CODE
LOWkafka/__init__.py15CODE
LOWkafka/__init__.py18CODE
LOWkafka/__init__.py19CODE
LOWkafka/__init__.py19CODE
LOWkafka/__init__.py19CODE
LOWkafka/__init__.py19CODE
LOWkafka/__init__.py20CODE
LOWkafka/__init__.py20CODE
LOWkafka/__init__.py20CODE
170 more matches not shown…
Over-Commented Block171 hits · 170 pts
SeverityFileLineSnippetContext
LOW.readthedocs.yaml21 # builder: "dirhtml"COMMENT
LOWtest/mock_broker.py441 if api_version > self._api_versions_max:COMMENT
LOWtest/protocol/test_api_compatibility.py21# ApiVersionsRequest_v3 (with a client_id for the header)COMMENT
LOWtest/protocol/test_api_compatibility.py41 b'\x00' \COMMENT
LOWtest/protocol/test_api_compatibility.py221 decoded_data = NewApiVersionsResponse[3].decode(COMMENT
LOWtest/protocol/test_api_compatibility.py241 # data: CompactArray of SupportedFeatureKeyCOMMENT
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py61# |version| and |release|, also used in various other places throughout theCOMMENT
LOWdocs/conf.py81# directories to ignore when looking for source files.COMMENT
LOWdocs/conf.py121COMMENT
LOWdocs/conf.py141# Add any paths that contain custom static files (such as style sheets) here,COMMENT
LOWdocs/conf.py161COMMENT
LOWdocs/conf.py181# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.COMMENT
LOWdocs/conf.py221# the title page.COMMENT
LOWkafka/errors.py1001 # not complete.COMMENT
LOWkafka/producer/sender.py281 # If we have any nodes that are ready to send + have sendable data,COMMENT
LOWkafka/coordinator/consumer.py401 try:COMMENT
LOWkafka/coordinator/assignors/cooperative_sticky.py141 # Build the round-1 assignment: drop any partition that'sCOMMENT
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py61 # a mapping between consumers and their assigned partitions that is updated during assignment procedureCOMMENT
LOW…ordinator/assignors/sticky/StickyAssignorUserData.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/net/wakeup_notifier.py21 """COMMENT
LOWkafka/net/selector.py201 # longer than this many seconds. A coroutine that hits this thresholdCOMMENT
LOWkafka/record/memory_records.py1# This class takes advantage of the fact that all formats v0, v1 and v2 ofCOMMENT
LOWkafka/record/_crc32c.py1#!/usr/bin/env pythonCOMMENT
LOWkafka/record/legacy_records.py1# See:COMMENT
LOWkafka/record/legacy_records.py21# Value => bytesCOMMENT
LOWkafka/record/default_records.py1# See:COMMENT
LOWkafka/record/default_records.py21# ProducerEpoch => Int16COMMENT
LOWkafka/record/default_records.py41# the bytes that follow the CRC). It is located after the magic byte, whichCOMMENT
LOW…schemas/resources/DescribeTopicPartitionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…a/protocol/schemas/resources/DeleteRecordsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/MetadataRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/MetadataRequest.json21 "validVersions": "0-13",COMMENT
LOWkafka/protocol/schemas/resources/HeartbeatResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ProduceRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ProduceRequest.json21 // Versions 0-2 were removed in Apache Kafka 4.0, version 3 is the new baseline. Due to a bug in librdkafka,COMMENT
LOW…ka/protocol/schemas/resources/DeleteGroupsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…/schemas/resources/DescribeTopicPartitionsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/EndTxnRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…otocol/schemas/resources/AlterClientQuotasRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/DescribeGroupsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…fka/protocol/schemas/resources/LeaveGroupResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…mas/resources/DescribeUserScramCredentialsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/FindCoordinatorRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/FindCoordinatorRequest.json21 // Version 1 adds KeyType.COMMENT
LOW…tocol/schemas/resources/AddPartitionsToTxnRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…rotocol/schemas/resources/DescribeClusterResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…a/protocol/schemas/resources/SaslHandshakeRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/DescribeLogDirsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json21 // Versions 0-3 were removed in Apache Kafka 4.0, Version 4 is the new baseline.COMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json41 //COMMENT
LOW…ocol/schemas/resources/AlterReplicaLogDirsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…as/resources/DescribeUserScramCredentialsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…/protocol/schemas/resources/DescribeQuorumRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ResponseHeader.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…mas/resources/AlterPartitionReassignmentsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…ka/protocol/schemas/resources/ApiVersionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…ka/protocol/schemas/resources/ApiVersionsResponse.json21 //COMMENT
LOW…otocol/schemas/resources/CreatePartitionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
111 more matches not shown…
Excessive Try-Catch Wrapping79 hits · 90 pts
SeverityFileLineSnippetContext
LOWexample.py60 except Exception:CODE
LOWtest/mock_broker.py518 except Exception:CODE
LOWtest/mock_broker.py725 except Exception:CODE
LOWtest/producer/test_partitioner.py232 except Exception as exc:CODE
MEDIUMtest/producer/test_partitioner.py227def hammer():CODE
MEDIUMtest/producer/test_sender.py898def get_in_thread():CODE
MEDIUMtest/producer/test_sender.py941def get_in_thread():CODE
LOWtest/producer/test_sender.py901 except Exception as e:CODE
LOWtest/producer/test_sender.py944 except Exception as e:CODE
LOWtest/net/test_asyncio_backend.py92 except Exception as exc: # noqa: BLE001CODE
LOWtest/net/test_manager.py466 except Exception:CODE
LOWtest/integration/conftest.py127 except Exception:CODE
LOWtest/integration/conftest.py173 except Exception:CODE
LOWtest/integration/conftest.py219 except Exception:CODE
LOWtest/integration/conftest.py309 except Exception as e: # surfaced via spawn() / stop()CODE
MEDIUMtest/integration/conftest.py301def run(member=member, client_id=client_id):CODE
LOWkafka/cluster.py134 except Exception as exc:CODE
LOWkafka/cluster.py156 except Exception as exc:CODE
LOWkafka/cluster.py174 except Exception as exc:CODE
LOWkafka/future.py66 except Exception as e:CODE
LOWkafka/future.py89 except Exception as err:CODE
LOWkafka/future.py108 except Exception as e:CODE
LOWkafka/future.py127 except Exception as e:CODE
LOWkafka/future.py153 except Exception as e:CODE
LOWkafka/future.py160 except Exception as e:CODE
LOWkafka/producer/sender.py135 except Exception:CODE
LOWkafka/producer/sender.py150 except Exception:CODE
LOWkafka/producer/sender.py378 except Exception as e:CODE
MEDIUMkafka/producer/sender.py77def _maybe_remove_from_inflight_batches(self, batch):CODE
LOWkafka/producer/kafka.py743 except Exception:CODE
MEDIUMkafka/producer/kafka.py663def wrapper():CODE
LOWkafka/coordinator/consumer.py318 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py329 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py378 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py504 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py532 except Exception:CODE
LOWkafka/coordinator/consumer.py558 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py576 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py739 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py897 except Exception:CODE
LOWkafka/coordinator/consumer.py982 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py1121 except Exception as exc:CODE
LOWkafka/coordinator/base.py842 except Exception as exc:CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py626 except Exception:CODE
LOWkafka/net/inet.py53 except Exception:CODE
LOWkafka/net/selector.py173 except Exception:CODE
LOWkafka/net/selector.py557 except Exception as e:CODE
LOWkafka/net/selector.py562 except Exception:CODE
LOWkafka/net/selector.py805 except Exception:CODE
LOWkafka/net/selector.py809 except Exception:CODE
LOWkafka/net/selector.py828 except Exception:CODE
LOWkafka/net/selector.py832 except Exception:CODE
LOWkafka/net/selector.py850 except Exception as e:CODE
MEDIUMkafka/net/selector.py387def waiter():CODE
LOWkafka/net/connection.py287 except Exception:CODE
LOWkafka/net/connection.py379 except Exception as error:CODE
MEDIUMkafka/net/connection.py299def unpause(self, v):CODE
LOWkafka/net/manager.py172 except Exception as exc:CODE
LOWkafka/net/manager.py185 except Exception as exc:CODE
LOWkafka/net/manager.py255 except Exception as exc:CODE
19 more matches not shown…
Deep Nesting100 hits · 85 pts
SeverityFileLineSnippetContext
LOWtest/net/test_wakeup_notifier.py171CODE
LOWtest/integration/conftest.py284CODE
LOWtest/integration/test_consumer_integration.py90CODE
LOWtest/integration/test_consumer_integration.py168CODE
LOWtest/integration/fixtures.py285CODE
LOWtest/consumer/test_assignors.py812CODE
LOWkafka/cluster.py524CODE
LOWkafka/future.py45CODE
LOWkafka/future.py72CODE
LOWkafka/metrics/metrics.py118CODE
LOWkafka/metrics/metrics.py158CODE
LOWkafka/metrics/stats/rate.py88CODE
LOWkafka/producer/sender.py91CODE
LOWkafka/producer/sender.py161CODE
LOWkafka/producer/sender.py316CODE
LOWkafka/producer/sender.py530CODE
LOWkafka/producer/record_accumulator.py113CODE
LOWkafka/producer/record_accumulator.py203CODE
LOWkafka/producer/record_accumulator.py324CODE
LOWkafka/producer/record_accumulator.py423CODE
LOWkafka/producer/kafka.py684CODE
LOWkafka/producer/kafka.py1051CODE
LOWkafka/producer/transaction_manager.py64CODE
LOWkafka/producer/transaction_manager.py852CODE
LOWkafka/producer/transaction_manager.py941CODE
LOWkafka/producer/transaction_manager.py996CODE
LOWkafka/producer/transaction_manager.py1093CODE
LOWkafka/producer/transaction_manager.py1133CODE
LOWkafka/producer/transaction_manager.py1176CODE
LOWkafka/producer/transaction_manager.py1263CODE
LOWkafka/coordinator/consumer.py264CODE
LOWkafka/coordinator/consumer.py389CODE
LOWkafka/coordinator/consumer.py488CODE
LOWkafka/coordinator/consumer.py661CODE
LOWkafka/coordinator/consumer.py851CODE
LOWkafka/coordinator/consumer.py987CODE
LOWkafka/coordinator/consumer.py1126CODE
LOWkafka/coordinator/base.py963CODE
LOWkafka/coordinator/base.py1135CODE
LOWkafka/coordinator/assignors/cooperative_sticky.py113CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py176CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py227CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py281CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py334CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py397CODE
LOWkafka/net/selector.py100CODE
LOWkafka/net/selector.py503CODE
LOWkafka/net/selector.py678CODE
LOWkafka/net/selector.py694CODE
LOWkafka/net/selector.py836CODE
LOWkafka/net/socks5.py110CODE
LOWkafka/net/connection.py299CODE
LOWkafka/net/connection.py385CODE
LOWkafka/record/legacy_records.py188CODE
LOWkafka/record/legacy_records.py479CODE
LOWkafka/record/default_records.py111CODE
LOWkafka/record/default_records.py654CODE
LOWkafka/partitioner/sticky.py36CODE
LOWkafka/admin/_configs.py139CODE
LOWkafka/admin/_configs.py231CODE
40 more matches not shown…
Modern Structural Boilerplate32 hits · 32 pts
SeverityFileLineSnippetContext
LOWtest/service.py10__all__ = [CODE
LOWkafka/__init__.py27__all__ = [CODE
LOWkafka/metrics/metrics.py9logger = logging.getLogger(__name__)CODE
LOWkafka/metrics/__init__.py10__all__ = [CODE
LOWkafka/metrics/dict_reporter.py6logger = logging.getLogger(__name__)CODE
LOWkafka/metrics/stats/__init__.py12__all__ = [CODE
LOWkafka/producer/__init__.py3__all__ = [CODE
LOWkafka/net/__init__.py14__all__ = [CODE
LOWkafka/record/__init__.py3__all__ = ["MemoryRecords", "MemoryRecordsBuilder"]CODE
LOWkafka/partitioner/__init__.py6__all__ = [CODE
LOWkafka/admin/__init__.py18__all__ = [CODE
LOWkafka/protocol/sasl.py48__all__ = [CODE
LOWkafka/protocol/producer/produce.py15__all__ = [CODE
LOWkafka/protocol/producer/transaction.py23__all__ = [CODE
LOWkafka/protocol/admin/configs.py17__all__ = [CODE
LOWkafka/protocol/admin/users.py11__all__ = [CODE
LOWkafka/protocol/admin/transactions.py14__all__ = [CODE
LOWkafka/protocol/admin/client_quotas.py11__all__ = [CODE
LOWkafka/protocol/admin/groups.py20__all__ = [CODE
LOWkafka/protocol/admin/acl.py77__all__ = [CODE
LOWkafka/protocol/admin/topics.py44__all__ = [CODE
LOWkafka/protocol/admin/cluster.py25__all__ = [CODE
LOWkafka/protocol/schemas/fields/__init__.py7__all__ = ["BaseField", "SimpleField", "StructField", "ArrayField", "StructArrayField"]CODE
LOWkafka/protocol/schemas/fields/codecs/__init__.py8__all__ = [CODE
LOWkafka/protocol/consumer/fetch.py14__all__ = [CODE
LOWkafka/protocol/consumer/metadata.py28__all__ = [CODE
LOWkafka/protocol/consumer/group.py29__all__ = [CODE
LOWkafka/protocol/consumer/offsets.py70__all__ = [CODE
LOWkafka/protocol/metadata/metadata.py32__all__ = [CODE
LOWkafka/protocol/metadata/api_versions.py39__all__ = [CODE
LOWkafka/protocol/metadata/find_coordinator.py17__all__ = [CODE
LOWkafka/consumer/__init__.py3__all__ = [CODE
AI Slop Vocabulary9 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtest/producer/test_transaction_manager_mock_broker.py55# Test harnessCOMMENT
LOWtest/net/test_connection.py155 # Should not send any request -- just call _init_completeCOMMENT
LOWtest/consumer/test_fetcher.py557 # Don't actually block on the wakeup - just return as if the waitCOMMENT
LOWkafka/codec.py145 # buffer... likely a python-snappy bug, so just use a slice copyCOMMENT
MEDIUMkafka/net/manager.py99 # close(); a passed-in instance is left alone (so the unit-test harness,COMMENT
LOWkafka/net/sasl/gssapi.py67 # simply set QoP to 'auth' only (first octet). We reuse the max message size proposedCOMMENT
LOWkafka/net/sasl/gssapi.py82 # but instead we just set _is_authenticated. Since the plugin interface doesCOMMENT
LOWkafka/net/sasl/sspi.py92 # simply set QoP to 'auth' only (first octet). We reuse the max message size proposedCOMMENT
MEDIUMkafka/benchmarks/producer_performance.py55 # per-iteration harness overhead. With a well-optimizedCOMMENT
Cross-Language Confusion2 hits · 19 pts
SeverityFileLineSnippetContext
HIGHkafka/coordinator/assignors/sticky/sticky_assignor.py340 # if minimum and maximum numbers of partitions assigned to consumers differ by at most one return trueCOMMENT
HIGHkafka/protocol/schemas/fields/struct.py75 # Nested nullable struct (KIP-893): 1-byte INT8 prefix, -1 = null,COMMENT
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtest/__init__.py12 # Create a file handlerCOMMENT
MEDIUMtest/__init__.py16 # Create a formatter for the log messagesCOMMENT
MEDIUMtest/producer/test_record_accumulator.py133 # Create a retried batchCOMMENT
MEDIUMtest/producer/test_sender.py814 # Create a batch with large batch_size (simulating the original oversized batch)COMMENT
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMkafka/metrics/metrics.py65 # Creating a daemon thread to not block shutdownCOMMENT
Verbosity Indicators7 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/producer/test_transaction_manager_mock_broker.py322 # Step 1: enqueue the initial InitProducerIdHandler.COMMENT
LOWtest/producer/test_transaction_manager_mock_broker.py340 # Step 2: simulate the OUT_OF_ORDER_SEQUENCE_NUMBER recovery path.COMMENT
LOWtest/integration/fixtures.py88 # Step 1: Generate server keystoreCOMMENT
LOWtest/integration/fixtures.py94 # Step 2: Generate CA and truststoreCOMMENT
LOWtest/integration/fixtures.py102 # Step 3: Sign server cert with CACOMMENT
LOWkafka/net/connection.py439 # Step 1: SaslHandshake to negotiate mechanismCOMMENT
LOWkafka/net/connection.py454 # Step 2: SASL authentication exchangeCOMMENT
Structural Annotation Overuse7 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/producer/test_transaction_manager_mock_broker.py322 # Step 1: enqueue the initial InitProducerIdHandler.COMMENT
LOWtest/producer/test_transaction_manager_mock_broker.py340 # Step 2: simulate the OUT_OF_ORDER_SEQUENCE_NUMBER recovery path.COMMENT
LOWtest/integration/fixtures.py88 # Step 1: Generate server keystoreCOMMENT
LOWtest/integration/fixtures.py94 # Step 2: Generate CA and truststoreCOMMENT
LOWtest/integration/fixtures.py102 # Step 3: Sign server cert with CACOMMENT
LOWkafka/net/connection.py439 # Step 1: SaslHandshake to negotiate mechanismCOMMENT
LOWkafka/net/connection.py454 # Step 2: SASL authentication exchangeCOMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/integration/fixtures.py285CODE
LOWtest/integration/fixtures.py318CODE
LOWtest/admin/test_admin_cluster_quorum.py7CODE
LOWkafka/record/default_records.py544CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWkafka/record/legacy_records.py415 # Check if we have room for another messageCOMMENT
LOWkafka/record/default_records.py615 # Check if we can write this messageCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest/mock_broker.py400 async def handle_request(self, api_key, api_version, correlation_id, request_bytes):CODE