Library support for Kotlin coroutines
This report summarizes scanner evidence for Kotlin/kotlinx.coroutines, a Kotlin project with 13,819 GitHub stars. SynthScan examined 131,205 lines of code across 1171 source files, recording 133 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 9.0 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 46 finding(s).
Are imports declared and package/API names verified? 87 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 133 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 133 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | docs/topics/coroutines-debugging.md | 191 | at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 323 | at kotlinx.coroutines.debug.internal.DebugProbesImpl.enhanceStackTraceWithThreadDumpImpl(DebugProbesImpl.kt:339) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 324 | at kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutinesSynchronized(DebugProbesImpl.kt:294) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 325 | at kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutines(DebugProbesImpl.kt:266) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 404 | at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 405 | at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 406 | at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 421 | at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 429 | at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 430 | at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 431 | at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 439 | at java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 451 | at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 452 | at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) | CODE |
| CRITICAL⚡ | docs/topics/coroutines-debugging.md | 453 | at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) | CODE |
| CRITICAL | docs/topics/coroutines-debugging.md | 511 | at java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269) | CODE |
| CRITICAL | …amicAgentJpmsTest/kotlin/DynamicAttachDebugJpmsTest.kt | 29 | * at kotlinx.coroutines.debug/kotlinx.coroutines.repackaged.net.bytebuddy.agent.Installer.getInstrumentation(Insta | COMMENT |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 155 | at kotlinx.coroutines.repackaged.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:374) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 156 | at kotlinx.coroutines.repackaged.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:342) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 157 | at kotlinx.coroutines.repackaged.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:328) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 158 | at kotlinx.coroutines.debug.internal.DebugProbesImpl.install(DebugProbesImpl.kt:39) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 213 | at com.android.builder.merge.DelegateIncrementalFileMergerOutput.create(DelegateIncrementalFileMergerOutput.java | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 215 | at com.android.builder.merge.IncrementalFileMerger.updateChangedFile(IncrementalFileMerger.java:242) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 216 | at com.android.builder.merge.IncrementalFileMerger.mergeChangedInputs(IncrementalFileMerger.java:203) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 217 | at com.android.builder.merge.IncrementalFileMerger.merge(IncrementalFileMerger.java:80) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 218 | at com.android.build.gradle.internal.tasks.MergeJavaResourcesDelegate.run(MergeJavaResourcesDelegate.kt:276) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 219 | at com.android.build.gradle.internal.tasks.MergeJavaResRunnable.run(MergeJavaResRunnable.kt:81) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 221 | at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 222 | at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:50) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 225 | at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 232 | at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 233 | at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 234 | at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 235 | at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36 | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/README.md | 236 | at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 28 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.oneMoreNestedMethod(SanitizedProbesTest. | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 29 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.nestedMethod(SanitizedProbesTest.kt:61)\ | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 35 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.testRecoveredStackTrace(SanitizedProbesT | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 38 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)\n" | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 55 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.testCoroutinesDump(SanitizedProbesTest.kt:56 | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 64 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.createActiveDeferred(SanitizedProbesTest | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 67 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)\n" + | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 70 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.testCoroutinesDump(SanitizedProbesTest.k | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 93 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.launchSelector(SanitizedProbesTest.kt:100)\n | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 96 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)\n" + | CODE |
| CRITICAL⚡ | kotlinx-coroutines-debug/test/SanitizedProbesTest.kt | 99 | "\tat definitely.not.kotlinx.coroutines.SanitizedProbesTest.testSelectBuilder(SanitizedProbesTest.kt:88) | CODE |
| CRITICAL | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 23 | "\tat java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)\n" + | CODE |
| CRITICAL | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 79 | "\tat java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)\n" + | CODE |
| CRITICAL | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 117 | "\tat java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)\n" + | CODE |
| CRITICAL⚡ | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 148 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.enhanceStackTraceWithThreadDumpImpl(DebugProbesI | CODE |
| CRITICAL⚡ | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 149 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutinesSynchronized(DebugProbesImpl.kt)\n | CODE |
| CRITICAL⚡ | …x-coroutines-debug/test/RunningThreadStackMergeTest.kt | 150 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutines(DebugProbesImpl.kt)\n" + | CODE |
| CRITICAL | kotlinx-coroutines-debug/test/DebugProbesTest.kt | 28 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)" | CODE |
| CRITICAL | kotlinx-coroutines-debug/test/DebugProbesTest.kt | 48 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt)\n" | CODE |
| CRITICAL | kotlinx-coroutines-debug/test/DebugProbesTest.kt | 69 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)\n" | CODE |
| CRITICAL⚡ | …oroutines-debug/test/DumpWithCreationStackTraceTest.kt | 22 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.enhanceStackTraceWithThreadDumpImpl(DebugProbesI | CODE |
| CRITICAL⚡ | …oroutines-debug/test/DumpWithCreationStackTraceTest.kt | 23 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutinesSynchronized(DebugProbesImpl.kt)\n | CODE |
| CRITICAL⚡ | …oroutines-debug/test/DumpWithCreationStackTraceTest.kt | 24 | "\tat kotlinx.coroutines.debug.internal.DebugProbesImpl.dumpCoroutines(DebugProbesImpl.kt)\n" + | CODE |
| CRITICAL | …/test/exceptions/StackTraceRecoveryNestedScopesTest.kt | 24 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)" | CODE |
| CRITICAL | …/test/exceptions/StackTraceRecoveryNestedScopesTest.kt | 96 | "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)") | CODE |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kotlinx-coroutines-core/common/src/JobSupport.kt | 901 | // final state -- when completed, for call to afterCompletion | COMMENT |
| LOW | kotlinx-coroutines-core/common/src/selects/Select.kt | 481 | * provided via [selectInRegistrationPhase] -- the algorithm | COMMENT |
| LOW | kotlinx-coroutines-core/common/src/selects/Select.kt | 561 | * coroutine to invoke [trySelect] while this `select` is still in REGISTRATION phase. | COMMENT |
| LOW | kotlinx-coroutines-core/common/src/selects/Select.kt | 641 | // Success! Store the resumption value and | COMMENT |
| LOW | kotlinx-coroutines-core/common/src/selects/Select.kt | 701 | val selectedClause = state.value as SelectImplementation<R>.ClauseData | COMMENT |
| LOW | kotlinx-coroutines-core/common/src/selects/SelectOld.kt | 21 | @PublishedApi | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 181 | } | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 281 | // Try to find the required segment if the initially obtained | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 421 | // Read the current cell state. | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 761 | val r = receivers.value | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 821 | if (segment.id != id) { | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 881 | // Read the segment reference before the counter increment; | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1041 | // The cell state should be updated according to its state machine; | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1101 | // suspended sender. Wait in a spin-loop until | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1161 | } | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1181 | // In case its value is lower than `b`, the `send(e)` | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1201 | // the linked list of segments is already closed, | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1241 | // Read the current cell state. | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1281 | b: Long | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1301 | // suspended in the cell operation is sender or receiver. | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1401 | val b = bufferEndCounter | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 1921 | // Close the linked list for further segment addition, | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2021 | // the variable below. If multiple exceptions are thrown, the first | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2261 | val r = receiversCounter | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2321 | state === INTERRUPTED_SEND -> return false | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2381 | // this case, as the closing/cancellation procedure may | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2441 | } else { | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2481 | completeCloseOrCancel() | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2821 | // ######################## | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2861 | cur === INTERRUPTED_SEND || cur === INTERRUPTED_RCV -> { | COMMENT |
| LOW | …coroutines-core/common/src/channels/BufferedChannel.kt | 2961 | private val IN_BUFFER = Symbol("SHOULD_BUFFER") | COMMENT |
| LOW | …oroutines-core/common/src/channels/BroadcastChannel.kt | 101 | // as, reputedly, it is the simplest synchronization scheme. | COMMENT |
| LOW | …oroutines-core/common/src/channels/BroadcastChannel.kt | 161 | override suspend fun send(element: E) { | COMMENT |
| LOW | …oroutines-core/common/src/channels/BroadcastChannel.kt | 201 | // Finish with success. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 65 | // Step 1: Create nodes and install them as completion handlers, they may fire! | COMMENT |
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 74 | // Step 2: Set disposer to each node | COMMENT |
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 77 | // Step 3: Now we can check if continuation is complete | COMMENT |
| LOW | …-coroutines-core/common/src/CancellableContinuation.kt | 157 | * The purpose of this function is to enable atomic delivery guarantees: either resumption succeeded, passing | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ui/kotlinx-coroutines-android/src/HandlerDispatcher.kt | 170 | // inlining `Boolean.hashCode()` for Android compatibility, as requested by Animal Sniffer | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 65 | // Step 1: Create nodes and install them as completion handlers, they may fire! | COMMENT |
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 74 | // Step 2: Set disposer to each node | COMMENT |
| LOW⚡ | kotlinx-coroutines-core/common/src/Await.kt | 77 | // Step 3: Now we can check if continuation is complete | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …coroutines-core/common/src/channels/BufferedChannel.kt | 773 | // the operation decides to suspend. This way, we can leverage | COMMENT |
| MEDIUM | …m/kotlin/kotlinx/coroutines/flow/TakeWhileBenchmark.kt | 51 | // Essentially the same code, but reusing the logic via collectWhile function | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kotlinx-coroutines-core/common/src/JobSupport.kt | 351 | // Notify parent but don't forget to check cancellation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kotlinx-coroutines-core/common/src/channels/Produce.kt | 243 | * ## Usage example | COMMENT |