Repository Analysis

tokio-rs/tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

12.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of tokio-rs/tokio, a Rust project with 32,530 GitHub stars. SynthScan v2.0 examined 188,469 lines of code across 849 source files, recording 2712 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 12.5 places this repository in the Low 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).

12.5
Adjusted Score
12.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
32.5K
Stars
Rust
Language
188.5K
Lines of Code
849
Files
2.7K
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 2HIGH 1MEDIUM 35LOW 2674

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 2712 distinct pattern matches across 8 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.

Over-Commented Block2643 hits · 2158 pts
SeverityFileLineSnippetContext
LOWtokio-stream/src/pending.rs21/// immediately empty but returns no values.COMMENT
LOWtokio-stream/src/empty.rs21///COMMENT
LOWtokio-stream/src/lib.rs21//! an asynchronous version of the standard library's `Iterator` trait.COMMENT
LOWtokio-stream/src/lib.rs41//! while let Some(value) = stream.next().await {COMMENT
LOWtokio-stream/src/lib.rs61//! The opposite conversion from an [`AsyncRead`] into a `Stream` is alsoCOMMENT
LOWtokio-stream/src/iter.rs21/// simply always calls `iter.next()` and returns that.COMMENT
LOWtokio-stream/src/stream_close.rs1use crate::Stream;COMMENT
LOWtokio-stream/src/stream_close.rs21 /// # async fn main() {COMMENT
LOWtokio-stream/src/stream_ext.rs81///COMMENT
LOWtokio-stream/src/stream_ext.rs101/// ```COMMENT
LOWtokio-stream/src/stream_ext.rs121 /// crate.COMMENT
LOWtokio-stream/src/stream_ext.rs141 /// assert_eq!(stream.next().await, None);COMMENT
LOWtokio-stream/src/stream_ext.rs161 /// but returns a [`Result<Option<T>, E>`](Result) rather thanCOMMENT
LOWtokio-stream/src/stream_ext.rs181 /// assert_eq!(stream.try_next().await, Ok(Some(1)));COMMENT
LOWtokio-stream/src/stream_ext.rs201 /// wrapped version of it, similar to the existing `map` methods in theCOMMENT
LOWtokio-stream/src/stream_ext.rs221 F: FnMut(Self::Item) -> T,COMMENT
LOWtokio-stream/src/stream_ext.rs241 ///COMMENT
LOWtokio-stream/src/stream_ext.rs261 fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>COMMENT
LOWtokio-stream/src/stream_ext.rs281 /// returned by this method. To handle this, you can use `tokio::pin!` as inCOMMENT
LOWtokio-stream/src/stream_ext.rs301 /// assert_eq!(stream.next().await, Some(5));COMMENT
LOWtokio-stream/src/stream_ext.rs321 /// will break the fairness of the merging.COMMENT
LOWtokio-stream/src/stream_ext.rs341 /// # /*COMMENT
LOWtokio-stream/src/stream_ext.rs361 /// }) as Pin<Box<dyn Stream<Item = usize> + Send>>;COMMENT
LOWtokio-stream/src/stream_ext.rs381 ///COMMENT
LOWtokio-stream/src/stream_ext.rs401 Self: Sized,COMMENT
LOWtokio-stream/src/stream_ext.rs421 /// ```COMMENT
LOWtokio-stream/src/stream_ext.rs441 Filter::new(self, f)COMMENT
LOWtokio-stream/src/stream_ext.rs461 ///COMMENT
LOWtokio-stream/src/stream_ext.rs481COMMENT
LOWtokio-stream/src/stream_ext.rs501 ///COMMENT
LOWtokio-stream/src/stream_ext.rs521 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs541 /// }COMMENT
LOWtokio-stream/src/stream_ext.rs561 ///COMMENT
LOWtokio-stream/src/stream_ext.rs581 /// stream until the predicate `f` resolves to `false`. Once one elementCOMMENT
LOWtokio-stream/src/stream_ext.rs601 F: FnMut(&Self::Item) -> bool,COMMENT
LOWtokio-stream/src/stream_ext.rs621 /// assert_eq!(Some(10), stream.next().await);COMMENT
LOWtokio-stream/src/stream_ext.rs641 /// # ExamplesCOMMENT
LOWtokio-stream/src/stream_ext.rs661 }COMMENT
LOWtokio-stream/src/stream_ext.rs681 ///COMMENT
LOWtokio-stream/src/stream_ext.rs701 /// ```COMMENT
LOWtokio-stream/src/stream_ext.rs721 AllFuture::new(self, f)COMMENT
LOWtokio-stream/src/stream_ext.rs741 /// An empty stream returns `false`.COMMENT
LOWtokio-stream/src/stream_ext.rs761 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs781 }COMMENT
LOWtokio-stream/src/stream_ext.rs801 /// assert_eq!(stream.next().await, Some(1));COMMENT
LOWtokio-stream/src/stream_ext.rs821 /// Equivalent to:COMMENT
LOWtokio-stream/src/stream_ext.rs841 whereCOMMENT
LOWtokio-stream/src/stream_ext.rs861 ///COMMENT
LOWtokio-stream/src/stream_ext.rs881 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs901 /// let values: Result<Vec<i32>, &str> =COMMENT
LOWtokio-stream/src/stream_ext.rs921 T: FromStream<Self::Item>,COMMENT
LOWtokio-stream/src/stream_ext.rs941 /// This function consumes the stream passed into it and returns aCOMMENT
LOWtokio-stream/src/stream_ext.rs961 /// // When no items time out, we get the 3 elements in succession:COMMENT
LOWtokio-stream/src/stream_ext.rs981 /// assert_eq!(int_stream.try_next().await, Ok(None));COMMENT
LOWtokio-stream/src/stream_ext.rs1001 /// # }COMMENT
LOWtokio-stream/src/stream_ext.rs1021 /// becomes available before the deadline is reached, additional errors areCOMMENT
LOWtokio-stream/src/stream_ext.rs1041 /// use std::time::Duration;COMMENT
LOWtokio-stream/src/stream_ext.rs1061 /// // If we want to stop consuming the source stream the first time anCOMMENT
LOWtokio-stream/src/stream_ext.rs1081 /// tokio::pin!(timeout_stream);COMMENT
LOWtokio-stream/src/stream_ext.rs1101 ///COMMENT
2583 more matches not shown…
Decorative Section Separators23 hits · 87 pts
SeverityFileLineSnippetContext
MEDIUMtokio-stream/tests/stream_fused.rs9// ── map ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs25// ── filter ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs41// ── filter_map ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs57// ── skip ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs73// ── skip_while ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs89// ── take ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs114// ── take_while ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs132// ── map_while ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs152// ── then ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs171// ── chain ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs189// ── merge ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs144 // ┌────────────────────────────────────────────────────────┐COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs147 // ┌─────┐ │ `decode_eof` returns After returning │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs148 // Read 0 bytes ├─────▼──┴┐ `Ok(None)` ┌────────┐ ◄───┐ `None` ┌───▼─────┐COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs149 // ┌────────────────►│ Pausing ├───────────────────────►│ Paused ├─┐ └───────────┤ Errored │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs150 // │ └─────────┘ └─┬──▲───┘ │ └───▲───▲─┘COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs152 // ┌──────┐ │ `decode` returns `Some` │ └─────┘ │ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs153 // │ │ │ ┌──────┐ │ Pending │ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs154 // │ ┌────▼──┴─┐ Read n>0 bytes ┌┴──────▼─┐ read n>0 bytes │ read │ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs155 // └─┤ Reading ├───────────────►│ Framing │◄────────────────────────┘ │ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs156 // └──┬─▲────┘ └─────┬──┬┘ │ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs158 // │ └───decode` returns `None`──┘ └───────────────────────────────────────────────────────┘ │COMMENT
MEDIUMtokio-util/src/codec/framed_impl.rs160 // └────────────────────────────────────────────────────────────────────────────────────────────┘COMMENT
Redundant / Tautological Comments28 hits · 42 pts
SeverityFileLineSnippetContext
LOWtokio/src/net/udp.rs511 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs587 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs736 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs807 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1203 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1341 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1601 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1746 /// # Return valueCOMMENT
LOWtokio/src/net/unix/stream.rs282 /// # Return valueCOMMENT
LOWtokio/src/net/unix/stream.rs598 /// # Return valueCOMMENT
LOWtokio/src/net/unix/pipe.rs585 /// # Return valueCOMMENT
LOWtokio/src/net/unix/pipe.rs1137 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs260 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs356 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1168 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1208 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1243 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1272 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs335 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs543 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs855 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs375 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs682 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs1169 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs1473 /// # Return valueCOMMENT
LOWtokio/src/io/async_write.rs95 /// # Return valueCOMMENT
LOWtokio/src/io/util/copy_bidirectional.rs71/// # Return valueCOMMENT
LOWtokio/src/sync/oneshot.rs793 /// # Return valueCOMMENT
AI Slop Vocabulary11 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMtokio-util/src/io/sync_bridge.rs16/// might not fully leverage the async capabilities of the system.COMMENT
MEDIUMtokio-util/src/io/sync_bridge.rs121/// blocking and inefficient code. Instead, you can utilize an async compression libraryCOMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs81/// An ZST to allow [`super::registration_queue`] to utilize the [`Entry::extra_pointers`]COMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs112/// An ZST to allow [`super::cancellation_queue`] to utilize the [`Entry::cancel_pointers`]COMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs143/// An ZST to allow [`super::WakeQueue`] to utilize the [`Entry::extra_pointers`]COMMENT
MEDIUMtokio/src/runtime/task/trace/tree.rs14 /// There should only be one root, but the code is robust to multiple roots.COMMENT
MEDIUMtokio/src/sync/semaphore.rs200/// work, but it doesn't matter which test runs first. We can leverage aCOMMENT
MEDIUMtokio/src/sync/mod.rs129//! given time. Properly setting this value is key in implementing robustCOMMENT
MEDIUMtokio/src/process/mod.rs662 /// a [`Child`] handle where possible, and instead utilize `child.wait().await`COMMENT
MEDIUMexamples/print_each_packet.rs89 // Essentially here we're executing a new task to run concurrently,COMMENT
MEDIUMexamples/echo-tcp.rs57 // Essentially here we're executing a new task to run concurrently,COMMENT
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALtokio/src/runtime/scheduler/multi_thread/worker.rs645 let task = self.worker.handle.shared.owned.assert_owner(task);CODE
CRITICALtokio/src/runtime/scheduler/multi_thread/worker.rs764 let task = self.worker.handle.shared.owned.assert_owner(task);CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHtokio/src/runtime/metrics/histogram/h2_histogram.rs251 // this by one to ensure we are at least as granular as requested.COMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMtokio-util/src/codec/length_delimited.rs366//! Here is a simple example, given a `FramedWrite` with the followingCOMMENT
LOWexamples/udp-client.rs24//! Don't forget to pass `EOF` to the standard input of the client!COMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtokio/src/runtime/dump.rs237 /// Example usage:COMMENT
LOWtokio/src/macros/cfg.rs8/// ## Example usage:COMMENT