Public report of t8y2/dbx, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 14 November 2026, 16:26 UTC · Survey ID cd_2b9a01e9049047b7b77fbee599914b61

t8y2/dbx

Measured 14 November 2026, 16:19 UTC, at code version 0c01988

CAI score 52out of 100 At risk Up 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 1,609,755 lines of product code in 118 projects, tests not counted · Estimated rebuild effort: about 14.7 person-years · Weakest lens: Accessibility, 41

Findings by how serious they are

674 critical 9298 serious 380 minor

18 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 16:19 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

87of 87 dimensions measured by tools.
10301of 10352 findings point to an exact file and line, so you can open each one in the code. The other 51 concern the repository as a whole, such as missing documentation.
87dimensions across 9 lenses, read from 1,609,755 lines of product code in 118 projects.
Chapters

Executive summary

t8y2/dbx is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back in part because it has controls that only work with a mouse. It scores 52 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Accessibility, at 41, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 6 points. Fixing focus, motion and contrast comes next, worth about 4 points. Raising Accessibility to 65 would lift the score to about 59.

359 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eighty-three weaknesses in the code could be used by an attacker, and thirty-five known security holes in the packages the code depends on can be used by attackers. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and updating the vulnerable packages would close these risks. Limiting each secret to its own step would fix the 31 secrets exposed to more of the pipeline than needed, and the 18 passwords or keys in the code and the 11 passwords or keys in the code's history need replacing, with the old ones switched off. The 26 form fields without a label need a label.

The product code is 1,609,755 lines, about €2,100,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 41 · counts for 45%Code Health 54 · counts for 25%Security and Compliance 60 · counts for 14%Production Readiness 62 · counts for 8%Architecture 67 · counts for 4%Performance 76 · counts for 2%Maturity 78 · counts for 1%Event-Driven 100 · counts for 1%Event Sourcing 100 · counts for 0%

If Accessibility rose from 41 to 65, the lowest score rated Strong, the score would rise from 52 to about 59.

Code composition: what the lines of code are
Product code 90%Tests 10%
New since the last survey: 3413 findings

These 3413 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · main.plDebugSelectNativeTarget (cyclomatic 178) agents/drivers/oracle-go/pldebug_target.go
  • Cyclomatic Complexity · dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cyclomatic 152) REDACTED
  • Cyclomatic Complexity · plDebugNativePlan.render (cyclomatic 132) agents/drivers/oracle-go/pldebug_target_invoke.go
  • Cyclomatic Complexity · plDebugNativeEntry.mutateNativeBreakpoint (cyclomatic 127) agents/drivers/oracle-go/pldebug_breakpoint_write.go
  • Cyclomatic Complexity · main.plDebugParseNativeConstructors (cyclomatic 95) agents/drivers/oracle-go/pldebug_object_constructors.go
  • Cyclomatic Complexity · main.plDebugLoadNativeTypeGraphOnLoader (cyclomatic 86) agents/drivers/oracle-go/pldebug_type_graph.go
  • Cyclomatic Complexity · main.plDebugNativeDeclarations (cyclomatic 80) agents/drivers/oracle-go/pldebug_variables.go
  • Cyclomatic Complexity · main.applyCassandraURLParams (cyclomatic 79) agents/drivers/cassandra-go/config.go
  • Cyclomatic Complexity · main.plDebugScanNativeRoutinesMode (cyclomatic 79) agents/drivers/oracle-go/pldebug_routine.go
  • Cyclomatic Complexity · plDebugNativeNamedCall.result (cyclomatic 69) agents/drivers/oracle-go/pldebug_target_invoke.go
  • Cyclomatic Complexity · main.plDebugLoadNativeTargets (cyclomatic 68) agents/drivers/oracle-go/pldebug_target.go
  • Cyclomatic Complexity · main.plDebugNativeRoutineHeaderMode (cyclomatic 62) agents/drivers/oracle-go/pldebug_routine.go
  • Cyclomatic Complexity · dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial (cyclomatic 61) REDACTED
  • Cyclomatic Complexity · server.dispatch (cyclomatic 59) REDACTED
  • Cyclomatic Complexity · plDebugNativeEntry.inspectNativeCurrentProgram (cyclomatic 58) agents/drivers/oracle-go/pldebug_entry.go
  • Cyclomatic Complexity · plDebugNativeEntry.start (cyclomatic 57) agents/drivers/oracle-go/pldebug_manager.go
  • Cyclomatic Complexity · server.dispatch (cyclomatic 55) REDACTED
  • Cyclomatic Complexity · plDebugRecordDecoder.object (cyclomatic 53) agents/drivers/oracle-go/pldebug_object_input.go
  • Cyclomatic Complexity · plDebugNativeEntry.resolveNativeNamedSources (cyclomatic 51) agents/drivers/oracle-go/pldebug_source.go
  • Cyclomatic Complexity · main.plDebugNativeCallMatches (cyclomatic 50) agents/drivers/oracle-go/pldebug_target.go
  • Cyclomatic Complexity · plDebugNativeEntry.executeStatement (cyclomatic 49) REDACTED
  • Cyclomatic Complexity · plDebugNativeEntry.readNativeValues (cyclomatic 49) agents/drivers/oracle-go/pldebug_frame_value.go
  • Cyclomatic Complexity · main.ordinaryProxyMessage (cyclomatic 49) agents/drivers/rocketmq/proxy.go
  • Cyclomatic Complexity · mysqlGeneratePartitions.constrainMysqlGenerateColumns (cyclomatic 49) apps/desktop/src/lib/dataGrid/mysqlGeneratePartitions.ts
  • Cyclomatic Complexity · main.applyHiveParameters (cyclomatic 48) agents/drivers/argo-go/config.go
  • Cyclomatic Complexity · main.applyHiveParameters (cyclomatic 48) agents/drivers/hive-go/config.go
  • Cyclomatic Complexity · plDebugNativeEntry.nativeVariableNames (cyclomatic 48) agents/drivers/oracle-go/pldebug_variables.go
  • Cyclomatic Complexity · server.plDebugProbeOnConnection (cyclomatic 47) agents/drivers/oracle-go/pldebug_probe.go
  • Cyclomatic Complexity · plDebugNativeEntry.writeValue (cyclomatic 47) REDACTED
  • Cyclomatic Complexity · main.applyJavaDriverHOCON (cyclomatic 45) agents/drivers/cassandra-go/config_file.go
  • Cyclomatic Complexity · plDebugNativeEntry.cleanup (cyclomatic 45) agents/drivers/oracle-go/pldebug_manager.go
  • Cyclomatic Complexity · McpAccessPolicy::to_v1 (cyclomatic 44) crates/dbx-core/src/ai/mcp_access.rs
  • Cyclomatic Complexity · main.plDebugCompositeOutputTypes (cyclomatic 44) agents/drivers/oracle-go/pldebug_record_output.go
  • Cyclomatic Complexity · dbx_core::data::transfer::generate_create_table_ddl_with_source_profile (cyclomatic 43) crates/dbx-core/src/data/transfer.rs
  • Cyclomatic Complexity · main.readThriftValue (cyclomatic 43) agents/drivers/rabbitmq/thrift_binary.go
  • Cyclomatic Complexity · server.dispatch (cyclomatic 42) agents/drivers/kingbase-go/main.go
  • Cyclomatic Complexity · plDebugCollectionInitializer.collection (cyclomatic 41) agents/drivers/oracle-go/pldebug_collection_initialize.go
  • Cyclomatic Complexity · plDebugNativePlan.bind (cyclomatic 41) agents/drivers/oracle-go/pldebug_target_invoke.go
  • Cyclomatic Complexity · main.parseWKBGeometry (cyclomatic 41) agents/drivers/vastbase-go/spatial.go
  • Cyclomatic Complexity · DbxMcpServer::run_product_tool (cyclomatic 40) crates/dbx-mcp/src/server.rs
  • Cyclomatic Complexity · main.plDebugNativeMapStack (cyclomatic 40) agents/drivers/oracle-go/pldebug_stack.go
  • Cyclomatic Complexity · server.readExactTriggerRows (cyclomatic 40) agents/drivers/oracle-go/trigger_metadata.go
  • Cyclomatic Complexity · plDebugNativeEntry.applyNativeBreakpointRules (cyclomatic 40) agents/drivers/oracle-go/pldebug_breakpoint_rules.go
  • Cyclomatic Complexity · main.plDebugNativeRoutineParamMode (cyclomatic 39) agents/drivers/oracle-go/pldebug_routine.go
  • Cyclomatic Complexity · main.plDebugBuildNativeTypedSignaturePrepared (cyclomatic 39) agents/drivers/oracle-go/pldebug_typed_signature.go
  • Cyclomatic Complexity · plDebugNativeEntry.nativeExternalPackageVariableNames (cyclomatic 39) agents/drivers/oracle-go/pldebug_variables.go
  • Cyclomatic Complexity · connectionDeepLink.kafkaConnectionDraft (cyclomatic 39) REDACTED
  • Cyclomatic Complexity · server.buildCustomTypeDDL (cyclomatic 38) REDACTED
  • Cyclomatic Complexity · main.plDebugNativeSourceTokens (cyclomatic 38) agents/drivers/oracle-go/pldebug_routine.go
  • Cyclomatic Complexity · main.buildCustomTypeDDL (cyclomatic 38) agents/drivers/vastbase-go/vastbase_metadata.go
  • Cyclomatic Complexity · queryStore.useQueryStore.countQueryTotalRowsInBackground (cyclomatic 38) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · etcdSession.history (cyclomatic 37) agents/drivers/etcd-go/history.go
  • Cyclomatic Complexity · main.plDebugLegacyArgumentTree (cyclomatic 37) agents/drivers/oracle-go/pldebug_legacy_arguments.go
  • Cyclomatic Complexity · server.listConstraintsWithIdentity (cyclomatic 37) REDACTED
  • Cyclomatic Complexity · dataGridExecutedQuery.dataGridExecutedQueryConditions (cyclomatic 37) apps/desktop/src/lib/dataGrid/dataGridExecutedQuery.ts
  • Cyclomatic Complexity · main.sqlRequiresSessionAffinity (cyclomatic 36) agents/drivers/vastbase-go/connection_state.go
  • Cyclomatic Complexity · server.oracleUniqueIndexMetadata (cyclomatic 35) REDACTED
  • Cyclomatic Complexity · plDebugNativeEntry.snapshotLocked (cyclomatic 35) agents/drivers/oracle-go/pldebug_manager.go
  • Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 34) agents/drivers/iotdb/driver.go
  • Cyclomatic Complexity · plDebugNativeCapture.finishReferences (cyclomatic 34) agents/drivers/oracle-go/pldebug_output.go
  • Cyclomatic Complexity · dbx_core::data::database_export::export_postgres_all_schemas_sql_core (cyclomatic 33) REDACTED
  • Cyclomatic Complexity · main.plDebugLegacyCollectionFromSource (cyclomatic 33) agents/drivers/oracle-go/pldebug_legacy_declarations.go
  • Cyclomatic Complexity · server.prepareLegacyJob (cyclomatic 33) agents/drivers/oracle-go/native_jobs.go
  • Cyclomatic Complexity · plDebugRecordDecoder.record (cyclomatic 33) agents/drivers/oracle-go/pldebug_record_input.go
  • Cyclomatic Complexity · anotherRedisImport.connection (cyclomatic 33) apps/desktop/src/lib/imports/anotherRedisImport.ts
  • Cyclomatic Complexity · server.listConstraints (cyclomatic 32) REDACTED
  • Cyclomatic Complexity · main.plDebugNativeObjectCallables (cyclomatic 32) agents/drivers/oracle-go/pldebug_object_constructors.go
  • Cyclomatic Complexity · plDebugNativeTypeLoader.compiledSource (cyclomatic 32) agents/drivers/oracle-go/pldebug_legacy_source.go
  • Cyclomatic Complexity · main.openClient (cyclomatic 32) agents/drivers/zookeeper/connection.go
  • Cyclomatic Complexity · mcpAccessTree.buildMcpAccessTreeRows (cyclomatic 32) apps/desktop/src/lib/mcp/mcpAccessTree.ts
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers_with_table_owner (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · main.applyHOCONAuthentication (cyclomatic 31) agents/drivers/cassandra-go/config_file.go
  • Cyclomatic Complexity · plDebugNativeEntry.pendingCleanupContinuation (cyclomatic 31) agents/drivers/oracle-go/pldebug_drain.go
  • Cyclomatic Complexity · server.listConstraints (cyclomatic 31) agents/drivers/vastbase-go/vastbase_metadata.go
  • Cyclomatic Complexity · main.renderXuguTableDDL (cyclomatic 31) REDACTED
  • Cyclomatic Complexity · xuguWKBReader.geometry (cyclomatic 31) agents/drivers/xugu/spatial.go
  • Cyclomatic Complexity · Tablet.SetValueAt (cyclomatic 31) agents/go-common/iotdb-client-go/client/tablet.go
  • Cyclomatic Complexity · tableCopyTaskStore.useTableCopyTaskStore.run (cyclomatic 31) apps/desktop/src/stores/tableCopyTaskStore.ts
  • Cyclomatic Complexity · runtimeServer.dispatchNativeDebug (cyclomatic 30) agents/drivers/oracle-go/pldebug_manager.go
  • Cyclomatic Complexity · dbx_sql_core::sql::next_executable_sql_token_with_options (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · dbx_sql_data::query_result_sql::mysql_statement_references_session_variable (cyclomatic 29) crates/dbx-sql-data/src/query_result_sql.rs
  • Cyclomatic Complexity · main.buildTLSConfig (cyclomatic 29) agents/drivers/argo-go/config.go
  • Cyclomatic Complexity · kerberosConfig.finalize (cyclomatic 29) agents/drivers/cassandra-go/kerberos.go
  • Cyclomatic Complexity · main.buildTLSConfig (cyclomatic 29) agents/drivers/hive-go/config.go
  • Cyclomatic Complexity · main.plDebugDecodeCollectionEnvelope (cyclomatic 29) agents/drivers/oracle-go/pldebug_collection_input.go
  • Cyclomatic Complexity · main.errorResponse (cyclomatic 29) agents/drivers/oracle-go/rpc_errors.go
  • Cyclomatic Complexity · server.getExactTriggerSource (cyclomatic 29) agents/drivers/oracle-go/trigger_metadata.go
  • Cyclomatic Complexity · plDebugSession.setBreakpoints (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · dbx_sql_schema::schema_diff::mysql_charset::without_create_charset (cyclomatic 28) crates/dbx-sql-schema/src/schema_diff/mysql_charset.rs
  • Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 28) agents/drivers/hive-go/config.go
  • Cyclomatic Complexity · server.getObjectSource (cyclomatic 28) REDACTED
  • Cyclomatic Complexity · plDebugNativeEntry.executeTarget (cyclomatic 28) agents/drivers/oracle-go/pldebug_manager.go
  • Cyclomatic Complexity · SPNEGORoundTripper.RoundTrip (cyclomatic 28) agents/go-common/gosasl/http_spnego.go
  • Cyclomatic Complexity · connectionParameterDocument.parseConnectionParameters (cyclomatic 28) apps/desktop/src/lib/connection/connectionParameterDocument.ts
  • Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 27) agents/drivers/argo-go/config.go
  • Cyclomatic Complexity · etcdSession.leaseList (cyclomatic 27) agents/drivers/etcd-go/lease.go
  • Cyclomatic Complexity · main.plDebugEvaluateCondition (cyclomatic 27) agents/drivers/oracle-go/pldebug_condition.go
  • Cyclomatic Complexity · main.plDebugLegacyCollectionElementMatches (cyclomatic 27) agents/drivers/oracle-go/pldebug_legacy_type_graph.go
  • Cyclomatic Complexity · main.plDebugNativeSelectConstructor (cyclomatic 27) agents/drivers/oracle-go/pldebug_object_select.go
  • Cyclomatic Complexity · main.plDebugDecodeTimezoneInput (cyclomatic 27) agents/drivers/oracle-go/pldebug_timezone.go

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 4322 findings

These 4322 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · dbx_core::data::database_export::export_database_sql_core_inner (cyclomatic 130) REDACTED
  • Cyclomatic Complexity · database-env.validateRecipe (cyclomatic 63) scripts/database-env.mjs
  • Cyclomatic Complexity · sync-connection-types.validateDescriptor (cyclomatic 63) scripts/sync-connection-types.mjs
  • Cyclomatic Complexity · dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cyclomatic 53) REDACTED
  • Cyclomatic Complexity · run_proof.main (cyclomatic 52) scripts/ai-proxy-12277/run_proof.py
  • Cyclomatic Complexity · dbx_core::data::transfer::generate_create_table_ddl_with_column_quoting (cyclomatic 39) crates/dbx-core/src/data/transfer.rs
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · OraclePlSqlBlock::is_complete (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · dbx_sql_core::sql::first_executable_sql_token_with_options (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · database-env.main (cyclomatic 27) scripts/database-env.mjs
  • Cyclomatic Complexity · connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cyclomatic 25) apps/desktop/src/stores/connectionStore.ts
  • Cyclomatic Complexity · worker.runAggregation (cyclomatic 25) REDACTED
  • Cyclomatic Complexity · shortcutRegistry.normalizeShortcutSettings (cyclomatic 23) apps/desktop/src/lib/editor/shortcutRegistry.ts
  • Cyclomatic Complexity · sync-connection-types.loadConnectionProfiles (cyclomatic 22) scripts/sync-connection-types.mjs
  • Cyclomatic Complexity · mongoDocumentValues.formatMongoShellLiteral (cyclomatic 20) apps/desktop/src/lib/mongo/mongoDocumentValues.ts
  • Cyclomatic Complexity · useDataGridExport.useDataGridExport.captureFullResultProjection (cyclomatic 18) apps/desktop/src/composables/useDataGridExport.ts
  • Cyclomatic Complexity · objectBrowserRows.buildObjectBrowserRows (cyclomatic 18) apps/desktop/src/lib/table/objectBrowserRows.ts
  • Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionAssistantObjects (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts
  • Cyclomatic Complexity · dbx_core::data::database_export::list_postgres_export_sequences (cyclomatic 17) REDACTED
  • Cyclomatic Complexity · sqlCompletion.preferredKeywordsForCompletion (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts
  • Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reserveFileName (cyclomatic 16) apps/desktop/src/stores/savedSqlStore.ts
  • Cognitive Complexity · dbx_core::data::database_export::export_database_sql_core_inner (cognitive 298) REDACTED
  • Cognitive Complexity · dbx_core::data::transfer::generate_create_table_ddl_with_column_quoting (cognitive 86) crates/dbx-core/src/data/transfer.rs
  • Cognitive Complexity · run_proof.main (cognitive 84) scripts/ai-proxy-12277/run_proof.py
  • Cognitive Complexity · dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cognitive 81) REDACTED
  • Cognitive Complexity · database-env.validateRecipe (cognitive 81) scripts/database-env.mjs
  • Cognitive Complexity · sync-connection-types.validateDescriptor (cognitive 67) scripts/sync-connection-types.mjs
  • Cognitive Complexity · dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers (cognitive 63) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cognitive Complexity · dbx_sql_core::sql::first_executable_sql_token_with_options (cognitive 48) REDACTED
  • Cognitive Complexity · OraclePlSqlBlock::is_complete (cognitive 42) REDACTED
  • Cognitive Complexity · worker.runAggregation (cognitive 38) REDACTED
  • Cognitive Complexity · connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cognitive 31) apps/desktop/src/stores/connectionStore.ts
  • Cognitive Complexity · queryStore.useQueryStore.captureQueryResultExportRequest (cognitive 31) apps/desktop/src/stores/queryStore.ts
  • Cognitive Complexity · savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cognitive 24) apps/desktop/src/stores/savedSqlStore.ts
  • Cognitive Complexity · database-env.main (cognitive 24) scripts/database-env.mjs
  • Cognitive Complexity · dbx_sql_data::data_grid_sql::format_grid_assignment_sql_literal (cognitive 23) REDACTED
  • Cognitive Complexity · shortcutRegistry.normalizeShortcutSettings (cognitive 23) apps/desktop/src/lib/editor/shortcutRegistry.ts
  • Cognitive Complexity · redisKeyPattern.createRedisKeyPatternMatcher (cognitive 23) apps/desktop/src/lib/redis/redisKeyPattern.ts
  • Cognitive Complexity · executableStatementRangeCache.executableStartAfterLeadingDirective (cognitive 23) apps/desktop/src/lib/sql/executableStatementRangeCache.ts
  • Cognitive Complexity · ai-html-runtime-canary.main (cognitive 23) scripts/ai-html-runtime-canary.mjs
  • Cognitive Complexity · verify-plugin-cli-package.verifyDev (cognitive 23) scripts/verify-plugin-cli-package.mjs
  • Cognitive Complexity · sync-connection-types.loadConnectionProfiles (cognitive 22) scripts/sync-connection-types.mjs
  • Cognitive Complexity · mongoDocumentValues.formatMongoShellLiteral (cognitive 21) apps/desktop/src/lib/mongo/mongoDocumentValues.ts
  • Cognitive Complexity · dbx_core::schema::oracle_columns_via_sql (cognitive 20) crates/dbx-core/src/schema/mod.rs
  • Cognitive Complexity · connectionStore.useConnectionStore.loadElasticsearchIndices (cognitive 19) apps/desktop/src/stores/connectionStore.ts
  • Cognitive Complexity · database-env.allPortMappingsDefaultToLoopback (cognitive 19) scripts/database-env.mjs
  • Cognitive Complexity · NacosOpenApiAdmin::access_token (cognitive 17) crates/dbx-core/src/admin/nacos/http.rs
  • Cognitive Complexity · dbx_sql_schema::schema_diff::generate_schema_sync_sql_plan_with_oracle_ddl (cognitive 17) crates/dbx-sql-schema/src/schema_diff.rs
  • Cognitive Complexity · dbx::commands::mcp_cleanup::cleanup_directory (cognitive 17) src-tauri/src/commands/mcp_cleanup.rs
  • Cognitive Complexity · objectBrowserRows.buildObjectBrowserRows (cognitive 17) apps/desktop/src/lib/table/objectBrowserRows.ts
  • Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataXlsx (cognitive 16) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts
  • Cognitive Complexity · savedSqlStore.useSavedSqlStore.reserveFileName (cognitive 16) apps/desktop/src/stores/savedSqlStore.ts
  • God Classes · FunctionTooLong: dbx_core::data::database_export::export_database_sql_core_inner REDACTED
  • God Classes · TooManyFunctions: dbx::commands::app_settings src-tauri/src/commands/app_settings.rs
  • God Classes · FunctionTooLong: windows-installer.integration.main scripts/windows-installer.integration.mjs
  • God Classes · FunctionTooLong: dbx_core::data::transfer::generate_create_table_ddl_with_column_quoting crates/dbx-core/src/data/transfer.rs
  • God Classes · FunctionTooLong: editorThemes.createCustomTheme apps/desktop/src/lib/editor/editorThemes.ts
  • God Classes · FileTooLong: scripts/release.mjs scripts/release.mjs
  • Code Duplication · Near-duplicate member family (3 members, 30 shared lines) crates/dbx-driver-mysql/src/mysql.rs
  • Code Duplication · Near-duplicate member family (3 members, 18 shared lines) crates/dbx-driver-mongodb/src/mongo_shell.rs
  • Code Duplication · Near-duplicate member family (3 members, 17 shared lines) crates/dbx-web/src/routes/database_export.rs
  • Code Duplication · Near-duplicate member pair (56 shared lines) crates/dbx-web/src/routes/mongodb_import_export.rs
  • Code Duplication · Near-duplicate member pair (53 shared lines) crates/dbx-drivers/src/db/couchdb_driver.rs
  • Code Duplication · Near-duplicate member pair (40 shared lines) crates/dbx-core/src/admin/consul/blocking.rs
  • Code Duplication · Edited copy of a member (26 corresponding lines) crates/dbx-drivers/src/db/rqlite_driver.rs
  • Code Duplication · Edited copy of a member (23 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/schema.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) crates/dbx-driver-agent/src/agent_driver.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) REDACTED
  • Code Duplication · Members sharing a duplicated core (23 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs
  • Code Duplication · Members sharing a duplicated core (13 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai.rs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-driver-sqlserver/src/sqlserver.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/connection/jdbc.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/data/transfer.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-driver-mysql/src/mysql.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-core/src/object_source_sql.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-data/src/query_result_sql.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/schema_diff.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java
Rebuild cost: about €2,100,000 · Estimate
Cost to rebuild€710,000 to €3,600,000, for 11,839 to 37,557 hours of work, about 14.7 person-years for 8 to 28 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 52. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeVery large: 1,609,755 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 6 points · Medium effort · Keyboard semantics
2
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Raises the score by about 4 points · Medium effort · Visual & motion safety
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 2 points · Medium effort · Forms & labels

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €2,100,000 to build again, about 14.7 person-years of work. Its weakest lens is Accessibility, at 41 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 1,199,631 lines over the last 90 days, which is about 4,865,170 lines a year. At that pace, the extra work comes to an estimated 770.1 to 4620.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch @dbx-app/cli cli @dbx-app/mcp-server mcp-server @dbx-app/plugin-cli plugin-cli dbx dbx dbx-core dbx-core dbx->dbx-core dbx-mcp dbx-mcp dbx->dbx-mcp dbx-platform dbx-platform dbx->dbx-platform dbx-drivers dbx-drivers dbx-core->dbx-drivers dbx-core->dbx-platform dbx-sql dbx-sql dbx-core->dbx-sql dbx-types dbx-types dbx-core->dbx-types dbx-driver-agent dbx-driver-agent dbx-driver-agent->dbx-platform dbx-sql-core dbx-sql-core dbx-driver-agent->dbx-sql-core dbx-driver-agent->dbx-types dbx-driver-mysql dbx-driver-mysql dbx-driver-support dbx-driver-support dbx-driver-mysql->dbx-driver-support dbx-driver-mysql->dbx-sql-core dbx-sql-dialect dbx-sql-dialect dbx-driver-mysql->dbx-sql-dialect dbx-driver-mysql->dbx-types dbx-driver-postgres dbx-driver-postgres dbx-driver-postgres->dbx-driver-support dbx-driver-postgres->dbx-sql-core dbx-driver-postgres->dbx-types dbx-driver-sqlserver dbx-driver-sqlserver dbx-driver-sqlserver->dbx-driver-support dbx-driver-sqlserver->dbx-sql-core dbx-sql-data dbx-sql-data dbx-driver-sqlserver->dbx-sql-data dbx-driver-sqlserver->dbx-types dbx-driver-support->dbx-platform dbx-driver-support->dbx-types dbx-drivers->dbx-driver-agent dbx-drivers->dbx-driver-mysql dbx-drivers->dbx-driver-postgres dbx-drivers->dbx-driver-sqlserver dbx-drivers->dbx-driver-support dbx-drivers->dbx-platform dbx-drivers->dbx-sql-core dbx-drivers->dbx-sql-data dbx-drivers->dbx-sql-dialect dbx-drivers->dbx-types dbx-mcp->dbx-core dbx-sql->dbx-sql-core dbx-sql->dbx-sql-data dbx-sql->dbx-sql-dialect dbx-sql-schema dbx-sql-schema dbx-sql->dbx-sql-schema dbx-sql->dbx-types dbx-sql-core->dbx-types dbx-sql-data->dbx-sql-core dbx-sql-data->dbx-sql-dialect dbx-sql-data->dbx-types dbx-sql-dialect->dbx-types dbx-sql-schema->dbx-sql-core dbx-sql-schema->dbx-sql-dialect dbx-sql-schema->dbx-types github.com/beltran/gosasl gosasl __more__ +98 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

2030 modules, with 3188 dependencies between them. 12 loops run through 77 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1990 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 apps.desktop.src.docs.types2 apps.desktop.src.types.generated.databaseTypes3 com.dbx.agent4 dbx_ai_provider.ai5 dbx_driver_agent.startup_cleanup6 dbx_types.models.connection7 dbx_types.native_jobs8 dbx_types.types9 rumqttc.mqttbytes10 apps.desktop.src.lib.backend.tauri11 dbx_core.persistence.storage12 dbx_driver_agent.agent_driver13 dbx_sql_schema.table_structure_sql.types14 rumqttc15 apps.desktop.src.lib.export16 apps.desktop.src.types.database17 dbx_core.connection18 apps.desktop.src.components.editor19 apps.desktop.src.lib.ai20 apps.desktop.src.lib.backend21 apps.desktop.src.lib.connection22 apps.desktop.src.lib.dataGrid23 apps.desktop.src.lib.diagram24 apps.desktop.src.lib.mcp.mcpAccessTree25 apps.desktop.src.lib.plugins26 apps.desktop.src.stores.settingsStore27 dbx_core.query28 dbx_mcp.server29 dbx_web.state30 apps.desktop.src.composables31 apps.desktop.src.lib.app32 apps.desktop.src.lib.database33 apps.desktop.src.lib.editor34 apps.desktop.src.lib.sidebar35 apps.desktop.src.lib.sql36 apps.desktop.src.lib.table37 apps.desktop.src.stores38 dbx.commands.query39 dbx_core.data.transfer40 dbx_web.routes.query
1 apps.desktop.src.docs.types
2 apps.desktop.src.types.generated.databaseTypes
3 com.dbx.agent
4 dbx_ai_provider.ai
5 dbx_driver_agent.startup_cleanup
6 dbx_types.models.connection
7 dbx_types.native_jobs
8 dbx_types.types
9 rumqttc.mqttbytes
10 apps.desktop.src.lib.backend.tauri41
11 dbx_core.persistence.storage88
12 dbx_driver_agent.agent_driver611
13 dbx_sql_schema.table_structure_sql.types1
14 rumqttc1
15 apps.desktop.src.lib.export15
16 apps.desktop.src.types.database45
17 dbx_core.connection7114
18 apps.desktop.src.components.editor3
19 apps.desktop.src.lib.ai1225
20 apps.desktop.src.lib.backend4224182
21 apps.desktop.src.lib.connection7327
22 apps.desktop.src.lib.dataGrid4178
23 apps.desktop.src.lib.diagram232
24 apps.desktop.src.lib.mcp.mcpAccessTree2
25 apps.desktop.src.lib.plugins20
26 apps.desktop.src.stores.settingsStore21
27 dbx_core.query1555
28 dbx_mcp.server4131
29 dbx_web.state31
30 apps.desktop.src.composables229138
31 apps.desktop.src.lib.app1111
32 apps.desktop.src.lib.database2211433
33 apps.desktop.src.lib.editor172
34 apps.desktop.src.lib.sidebar711838
35 apps.desktop.src.lib.sql23461
36 apps.desktop.src.lib.table61325031
37 apps.desktop.src.stores12728112
38 dbx.commands.query11513
39 dbx_core.data.transfer13221
40 dbx_web.routes.query1184
Uses a module listed above itPart of a loopThe module itself
1 apps.desktop.src.docs.types2 apps.desktop.src.types.generated.databaseTypes3 com.dbx.agent4 dbx_ai_provider.ai5 dbx_driver_agent.startup_cleanup6 dbx_types.models.connection7 dbx_types.native_jobs8 dbx_types.types9 rumqttc.mqttbytes10 apps.desktop.src.lib.backend.tauri11 dbx_core.persistence.storage12 dbx_driver_agent.agent_driver13 dbx_sql_schema.table_structure_sql.types14 rumqttc15 apps.desktop.src.lib.export16 apps.desktop.src.types.database17 dbx_core.connection18 apps.desktop.src.components.editor19 apps.desktop.src.lib.ai20 apps.desktop.src.lib.backend21 apps.desktop.src.lib.connection22 apps.desktop.src.lib.dataGrid23 apps.desktop.src.lib.diagram24 apps.desktop.src.lib.mcp.mcpAccessTree25 apps.desktop.src.lib.plugins26 apps.desktop.src.stores.settingsStore27 dbx_core.query28 dbx_mcp.server29 dbx_web.state30 apps.desktop.src.composables31 apps.desktop.src.lib.app32 apps.desktop.src.lib.database33 apps.desktop.src.lib.editor34 apps.desktop.src.lib.sidebar35 apps.desktop.src.lib.sql36 apps.desktop.src.lib.table37 apps.desktop.src.stores38 dbx.commands.query39 dbx_core.data.transfer40 dbx_web.routes.queryapps.desktop.src.docs.types1apps.desktop.src.types.generated.databaseTypes2com.dbx.agent3dbx_ai_provider.ai4dbx_driver_agent.startup_cleanup5dbx_types.models.connection6dbx_types.native_jobs7dbx_types.types8rumqttc.mqttbytes9apps.desktop.src.lib.backend.tauri10dbx_core.persistence.storage11dbx_driver_agent.agent_driver12dbx_sql_schema.table_structure_sql.types13rumqttc14apps.desktop.src.lib.export15apps.desktop.src.types.database16dbx_core.connection17apps.desktop.src.components.editor18apps.desktop.src.lib.ai19apps.desktop.src.lib.backend20apps.desktop.src.lib.connection21apps.desktop.src.lib.dataGrid22apps.desktop.src.lib.diagram23apps.desktop.src.lib.mcp.mcpAccessTree24apps.desktop.src.lib.plugins25apps.desktop.src.stores.settingsStore26dbx_core.query27dbx_mcp.server28dbx_web.state29apps.desktop.src.composables30apps.desktop.src.lib.app31apps.desktop.src.lib.database32apps.desktop.src.lib.editor33apps.desktop.src.lib.sidebar34apps.desktop.src.lib.sql35apps.desktop.src.lib.table36apps.desktop.src.stores37dbx.commands.query38dbx_core.data.transfer39dbx_web.routes.query4041886111115457114312254224182732741782322202115554131312291381111221143317271183823461613250311272811211513132211184+1990 more modules (most-connected shown)

At a glance — Code Health · 54% · Adequate · gated by D1, D2 ·

At a glance — Architecture · 67% · Adequate · gated by R9 ·

At a glance — Maturity · 78% · Strong ·

At a glance — Readiness · 62% · Adequate · gated by D13, P7 ·

At a glance — Security · 60% · Adequate · gated by D28, D29 ·

At a glance — Event-Driven · 100% · Exemplary ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 41% · Weak · gated by AC4, AC6 ·

At a glance — Performance · 76% · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection615High / Critical
A03:2025 — Software Supply Chain Failures190High / Critical
A02:2025 — Security Misconfiguration31High / Critical
A07:2025 — Authentication Failures30High / Critical

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+6.3 ptsMediumKeyboard semantics
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+3.7 ptsMediumVisual & motion safety
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.5 ptsMediumForms & labels
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+2.0 ptsMediumText alternatives
Resolve the 18 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (2), REDACTED.+1.1 ptsMediumREDACTED Scanning
Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with queryStore.useQueryStore.executeTabSql (cyclomatic 601), settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 310).+0.6 ptsMediumCyclomatic Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+1.3 ptsMediumLarge Files
Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.+0.6 ptsLowDependency Hygiene

File quality

Per-file score 0–10 — a quality signature. Of 1382 files carrying findings, judged against the Preview bar: 2% slop · 10% mixed · 88% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.4SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.4SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.9SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.8SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.3SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: Critical CVE: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 674

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 9298

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 380

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 18

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 87 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 87 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D21D24D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX6AX9ED1ED3ED4ES1ES2M1M2M3M4P1P10P2P3P4P5P6P7PF1PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X14X15X16X18X19X2X21X22X24X25X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 10301 of 10352 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1dadb-91ac-7233-9725-f9eacfd0d39f.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 77.4% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 24,221 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 585 test source file(s) (.rs, .go, .java, .rb) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — the JavaScript/TypeScript suite (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/mcp-server/; node:test via `pnpm install --frozen-lockfile --ignore-scripts` in packages/plugin-cli/; node:test via `npm ci --ignore-scripts` in plugins/sdk/dev-host/) did not finish re-running within its budget: the tier's time budget ran out before a run finished.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Deploy/Dockerfile.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 32 of 33 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `.github/scripts/suggest-similar-issues.mjs`, `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java`, `apps/desktop/src/components/editor/queryEditorCodeMirrorRuntime.ts`, `apps/desktop/src/components/editor/queryEditorSqlExtensions.ts`, `apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts`, … (+60 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 941 further occurrence(s) are not listed individually; the score already reflects all 981.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 46 further occurrence(s) are not listed individually; the score already reflects all 86.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 426 further occurrence(s) are not listed individually; the score already reflects all 466.
  • AX6 Interface segregation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (deploy/docker-compose.yml). compose up failed (exit 17 — an image could not be built) — all -y --no-install-recommends build-essential cmake pkg-config perl python3-pip gcc-aarch64-linux-gnu libfontconfig-dev:arm64 libfreetype-dev:arm64 && pip3 install --break-system-packages ziglang && cargo install cargo-zigbuild && rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1; runtime evidence skipped.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go, Java, PHP, Python, Rust, Svelte components, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go, PHP, Python, Rust, Svelte components, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P2 Observability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 88 further occurrence(s) are not listed individually; the score already reflects all 128.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1617 further occurrence(s) are not listed individually; the score already reflects all 1657.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2413 further occurrence(s) are not listed individually; the score already reflects all 2453.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 250 further occurrence(s) are not listed individually; the score already reflects all 290.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 108 further occurrence(s) are not listed individually; the score already reflects all 148.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 479 further occurrence(s) are not listed individually; the score already reflects all 519.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X18 Disposal-pattern correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X19 Unrestored process-global state — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 16 further occurrence(s) are not listed individually; the score already reflects all 56.
  • X22 Contradicted release guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
  • X25 Inert configuration knob — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 486 further occurrence(s) are not listed individually; the score already reflects all 526.
  • X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 65 further occurrence(s) are not listed individually; the score already reflects all 105.

Repo exclusion declarations: 9 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

1815 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was queryStore.useQueryStore.executeTabSql at 601. A further 103 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PickleUnpickler.dispatch at 62 — they are counted neither in the figure above nor in this dimension's score. 40 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: apps/desktop/src/lib/redis/codec/pickle.ts (PickleUnpickler.dispatch at 62), apps/desktop/src/lib/connection/connectionPresentation.ts (connectionPresentation.connectionUrlPlaceholder at 54), REDACTED (server.dispatch at 42), REDACTED (Gbase8sAgent.mapColType at 41), agents/drivers/rocketmq/server.go (rocketMQAgent.dispatch at 37), and 35 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cyclomatic 152) · ×190REDACTED:5135
dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cyclomatic 181) · ×58crates/dbx-sql-schema/src/schema_diff.rs:6688
dbx_sql_core::sql::split_sql_statement_ranges_with_options (cyclomatic 81) · ×58REDACTED:1584
dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cyclomatic 37) · ×20crates/dbx-drivers/src/db/ssh_tunnel.rs:439
dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial (cyclomatic 61) · ×16REDACTED:2899

+ 1334 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with queryStore.useQueryStore.executeTabSql (cyclomatic 601), settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 310). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.0 to about 3.0/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

2523 method(s) exceeded the cognitive complexity threshold of 15; the worst was queryStore.useQueryStore.executeTabSql at 713.

dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cognitive 359) · ×313REDACTED:5135
dbx_sql_core::sql::split_sql_statement_ranges_with_options (cognitive 208) · ×85REDACTED:1584
dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 623) · ×84crates/dbx-sql-schema/src/schema_diff.rs:6688
dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cognitive 66) · ×39crates/dbx-drivers/src/db/ssh_tunnel.rs:439
dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial (cognitive 96) · ×32REDACTED:2899

+ 1687 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 56 bodies over 120 down to 120 or less in Cognitive Complexity — start with queryStore.useQueryStore.executeTabSql (cognitive 713), dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 623), dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cognitive 359). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 56 together lifts Cognitive Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.7 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

813 god class(es) detected.

FunctionTooLong: useDataGridExport.useDataGridExport · ×321apps/desktop/src/composables/useDataGridExport.ts:232
FileTooLong: data/transfer.rs · ×275crates/dbx-core/src/data/transfer.rs
ClassTooLong: DbxJdbcPlugin · ×68REDACTED:64
MethodTooLong: AppState.get_or_create_pool_for_session_inner_with_receipt · ×64REDACTED:3526
TooManyMethods: DbxJdbcPlugin · ×59REDACTED:64

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 321 FunctionTooLong finding(s) in God Classes — start with REDACTED (23), transfer.rs (9), connectionStore.ts (8). — One of this dimension's main actionable groups (321 warning-level).
  2. Resolve the 275 FileTooLong finding(s) in God Classes — start with REDACTED (4), lib.rs (4), REDACTED (3). — One of this dimension's main actionable groups (275 warning-level).
  3. Resolve the 68 ClassTooLong finding(s) in God Classes — start with REDACTED (4), backend.rs (2), descriptor.rs (2). — One of this dimension's main actionable groups (68 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication8.0 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

1868 duplicated block group(s) detected. 4.9 % of the production lines (78,616 of 1,609,755) are in a reported copy. A further 1205 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 54 of the 3073 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .ts (25% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (7 lines × 2) · ×156agents/drivers/duckdb/src/schema.rs:422
Duplicated block (5 lines × 2) · ×131agents/drivers/duckdb/src/schema.rs:248
Duplicated block (6 lines × 2) · ×129agents/drivers/duckdb/src/schema.rs:551
Duplicated block (9 lines × 2) · ×114crates/dbx-ai-provider/src/ai.rs:1658
Duplicated block (8 lines × 2) · ×112crates/dbx-ai-provider/src/ai_claude_code_cli.rs:279

+ 429 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 156 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED (12), REDACTED (7), mongo_driver.rs (6). — One of this dimension's main actionable groups (156 warning-level).
  2. Resolve the 131 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with REDACTED (6), kafka.rs (4), REDACTED (4). — One of this dimension's main actionable groups (131 warning-level).
  3. Resolve the 129 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mongodb_import_export.rs (8), REDACTED (4), REDACTED (4). — One of this dimension's main actionable groups (129 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.1 / 10Stronggated by 13 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Prevented

118 production modules (Gradle+Cargo+npm+Go), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 12 module(s) off the main sequence, with abstractness counted on 95 of the 118 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: dbx-formats · ×11
Unstable project dbx-drivers
Unstable project dbx-sql
Off the main sequence: dbx-agents:common

What to do

  1. Resolve the 11 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 1 Unstable project dbx-drivers finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project dbx-sql finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 7 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

7 of 474 classes have LCOM4 above 3.

Low cohesion: MqAdminConfig (LCOM4 6) · ×7crates/dbx-core/src/admin/mq/config.rs:61

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with connection.rs (2), config.rs, REDACTED. — One of this dimension's main actionable groups (7 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality10.0 / 10Stronggated by 15 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

1 skipped (1 with a documented reason), 2 zero-assertion, 13 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 24221 tests. Measured on the JavaScript/TypeScript suite only — at least 585 test source file(s) (.rs, .go, .java, .rb) went unread, so its test quality is unmeasured and is not in these counts.

Fixed-sleep synchronisation: compiled UI output waits for a successful build signal · ×13plugins/sdk/dev-host/tests/server.test.mjs:138
No assertions: preserves all original parameter bytes for every exported connection · ×2apps/desktop/src/lib/connection/__tests__/connectionParameterExport.live.spec.ts:11
Mock-dominated test: skips the substring lookup when the prefix search fills the result budget or the filter is short · ×108apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:494
Skipped (documented): (unnamed test)apps/desktop/src/lib/dataGrid/__tests__/mysqlGeneratePartitions.spec.ts:86

What to do

  1. Resolve the 108 Mock-dominated test finding(s) in Test Quality — start with useSidebarTreeExportRuntime.spec.ts (14), useDataGridExport.sqlColumns.spec.ts (8), QueryResultTransferDialog.spec.ts (8). — One of this dimension's main actionable groups (108 recommendation-level).
  2. Resolve the 13 Fixed-sleep synchronisation finding(s) in Test Quality — start with oracleForeignKeys.spec.ts (3), server.test.mjs, connectionStore.metadataLoading.spec.ts. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 2 No assertions finding(s) in Test Quality — start with connectionParameterExport.live.spec.ts, QueryEditor.kingbase.integration.spec.ts. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene8.6 7.7 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 90% · ceiling Verified

9 outdated, 0 author-deprecated direct Go module(s), 4 pinning or checksum defect(s). 48 of 48 direct requirement(s) were graded against proxy.golang.org (0 not served there, 5 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and REDACTED there.

Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test · ×3
No REDACTED committed (REDACTED)
Outdated: gitee.com/XuguDB/go-xugu-driver · ×9

What to do

  1. Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 No REDACTED committed (REDACTED) finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

15 secret(s) detected. 3 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

REDACTED

What to do

  1. Resolve the 18 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (18 issue-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 1052 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 7 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json and a Gradle build (build.gradle/build.gradle.kts), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots6.7 / 10Adequate✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: apps/desktop/src/stores/queryStore.ts (256×705=180480); apps/desktop/src/stores/settingsStore.ts (199×310=61690); apps/desktop/src/components/grid/DataGrid.vue (371×129=47859) Repeated repair below the complexity floor: crates/dbx-core/src/persistence/secret_codec.rs (18 of 20 changes were fixes); apps/desktop/src/lib/table/tableEditing.ts (10 of 14 changes were fixes); apps/desktop/src/lib/dataGrid/dataGridPagination.ts (10 of 14 changes were fixes)

Hotspot: apps/desktop/src/stores/queryStore.ts · ×284apps/desktop/src/stores/queryStore.ts:8415
Repeated repair: crates/dbx-core/src/persistence/secret_codec.rs · ×85crates/dbx-core/src/persistence/secret_codec.rs:76

What to do

  1. Resolve the 284 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), lib.rs (3), connection.rs (3). — One of this dimension's main actionable groups (284 warning-level).
  2. Resolve the 85 Repeated repair finding(s) in Churn × Complexity Hotspots — start with csv_export.rs (2), agents.rs (2), secret_codec.rs. — One of this dimension's main actionable groups (85 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

121 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is apps/desktop/src/lib/mongo/mongoCompletionTables.ts. Counted over 1855 of the 2665 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×9
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

3 deducted task-comment markers across 1334031 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×3crates/dbx-ai-provider/src/ai.rs:926

What to do

  1. Resolve the 3 TodoComment finding(s) in Explicit Debt — start with ai.rs, krb5.go, krb5_test.go. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality7.0 / 10Strong✓ Tool-verified

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 2 documentation facets pass in full; short on: F2 example. 212 document(s) read across 26 unit(s).

Documentation: no build, run or usage example · ×6packages/mcp-darwin-arm64/README.md:1

What to do

  1. Resolve the 6 Documentation finding(s) in Documentation Quality — start with README.md (6). — One of this dimension's main actionable groups (6 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundpackage.json:8

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency9.6 / 10Exemplary✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

11 naming inconsistencies among 2959 declarations measured against a convention their peers follow.

`ServiceID` spells `ID` where 2602 names in the project spell it `Id` · ×2apps/desktop/src/types/consul.ts:476
`genTSInsertRecordReq` spells `TS` where 24 names in the project spell it `Ts`agents/go-common/iotdb-client-go/client/session.go:886
`genTSInsertTabletReq` spells `TS` where 24 names in the project spell it `Ts`agents/go-common/iotdb-client-go/client/session.go:1478
`reconnectDialTimeoutMS` spells `MS` where 21 names in the project spell it `Ms`agents/go-common/iotdb-client-go/client/session.go:1592
`propertiesJSON` spells `JSON` where 236 names in the project spell it `Json`apps/desktop/src/lib/graph/neo4jGraph.ts:46

+ 5 more group(s) — more in Appendix A; the complete list is findings.md.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment Value9.8 8.4 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 86% · ceiling Documented

5 of 3128 judged comments only repeat the code they sit on (0.2 %). 641 comment(s) in another language or script were not judged.

redundant comment · ×5apps/desktop/src/composables/useQuickOpen.ts:688
doc comments repeat the namesREDACTED:1275

What to do

  1. Resolve the 5 redundant comment finding(s) in Comment Value — start with useQuickOpen.ts (2), api.ts, geometryPreview.ts. — One of this dimension's main actionable groups (5 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.4 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Documented

8 of 101 build units (Cargo, Go, Gradle, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

11 finding(s): 0 critical, 11 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 10 REDACTED finding(s) in Secrets (history) — start with REDACTED (8), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

615 finding(s): 0 critical, 500 high, 101 medium, 14 low. 359 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 82 file(s) — `.github/ISSUE_TEMPLATE/database_compatibility.yml`, `.github/scripts/prune-r2-releases.sh` (line 20), `.github/scripts/suggest-similar-issues.mjs` (line 48), `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java` (line 630, line 643), `agents/gradlew` (line 74, line 178), … (+77 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 16 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 37 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 53 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (5), REDACTED (5). — One of this dimension's main actionable groups (53 issue-level).
  2. Resolve the 24 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (6), REDACTED (3). — One of this dimension's main actionable groups (24 issue-level).
  3. No action in Static Analysis (SAST) — all 359 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (359 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

178 finding(s): 14 critical, 21 high, 141 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 59 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (31), REDACTED (26), REDACTED (2). — One of this dimension's main actionable groups (59 warning-level).
  2. Resolve the 21 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8), REDACTED (7), REDACTED (3). — One of this dimension's main actionable groups (21 issue-level).
  3. Resolve the 14 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (14 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security6.3 6.1 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 97% · ceiling Documented

31 finding(s): 0 critical, 3 high, 27 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 27 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (21), REDACTED (6). — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

25 of 1855 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is apps/desktop/src/lib/diagram/edge-obstacle-router.ts. Counted over 1855 of the 2665 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×25apps/desktop/src/lib/diagram/edge-obstacle-router.ts:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling8.8 / 10Adequategated by 12 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: AgentProtocol.java↔agent_driver.rs 100%; TreeItem.vue↔treeNodeIcon.ts 100%; http.ts↔document_cmd.rs 100%

Boundary-crossing change coupling: AgentProtocol.java ↔ agent_driver.rs · ×12agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1
Change coupling: tests.rs ↔ triggers.rs · ×27crates/dbx-sql-schema/src/table_structure_sql/tests.rs:1
Change-coupling hub: treeNodeIcon.ts → SidebarTreeRuntimeHost.vue, TreeItem.vue, connectionStore.ts · ×18apps/desktop/src/lib/sidebar/treeNodeIcon.ts

What to do

  1. Resolve the 12 Boundary-crossing change coupling finding(s) in Change Coupling — start with AgentProtocol.java (2), redis.rs (2), mongo.rs (2). — One of this dimension's main actionable groups (12 issue-level).
  2. Resolve the 27 Change coupling finding(s) in Change Coupling — start with RedisKeyBrowser.vue (2), DataGrid.vue (2), useDataGridExport.ts (2). — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 18 Change-coupling hub finding(s) in Change Coupling — start with treeNodeIcon.ts, http.ts, REDACTED. — One of this dimension's main actionable groups (18 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 27 platform declaration(s) and 149 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives5.5 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — apps/desktop/src/components/editor/AiAttachmentCard.vue:49
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×3) — apps/desktop/src/components/grid/DataGridCellDetailDialog.vue:226, apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:199, docs/components/landing/Starfield.tsx:212
  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — docs/components/DocsSidebarFooter.tsx:19

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels4.9 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×13) — apps/desktop/src/App.vue:6206, apps/desktop/src/App.vue:6211, apps/desktop/src/components/admin/DamengUserAdmin.vue:681, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×10) — apps/desktop/src/App.vue:6207, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:314, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:318, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×16) — apps/desktop/src/App.vue:6225, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:303, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:356, …
  • This <td> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. — apps/desktop/src/components/admin/ProcessListPanel.vue:819

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.4 / 10Strong✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — apps/desktop/index.html:2, dbx-er-diagram-architecture.html:3, docs/app/(root)/layout.tsx:34
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×4) — apps/desktop/src/components/admin/MySqlDashboard.vue:249, apps/desktop/src/components/debug/DebuggeeSqlPanel.vue:52, apps/desktop/src/components/redis/RedisDashboard.vue:510, …
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — apps/desktop/src/components/diagram/DiagramInspector.vue:420
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — dbx-er-diagram-architecture.html:699
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — plugins/sdk/cli/templates/svelte/index.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.6 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×23) — apps/desktop/src/components/admin/ProcessListPanel.vue:797, apps/desktop/src/components/admin/ProcessListPanel.vue:819, apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:318, …
  • This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — apps/desktop/src/components/ai/rich/AiHtmlPreview.vue:104
  • The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×4) — apps/desktop/src/components/diagram/LayerPanel.vue:407, apps/desktop/src/components/diagram/LayerPanel.vue:429, apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:2377, …
  • This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. (×3) — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:481, apps/desktop/src/components/diff/SchemaDiffRoutineList.vue:73, apps/desktop/src/components/layout/EditorGroupTabBar.vue:2528
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0". (×2) — apps/desktop/src/components/editor/EditorSettingsDialog.vue:12843, apps/desktop/src/components/grid/DataGrid.vue:16050
  • The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — apps/desktop/src/components/editor/TableStructurePeekDialog.vue:348, apps/desktop/src/components/editor/TableStructurePeekDialog.vue:354, apps/desktop/src/components/editor/TableStructurePeekDialog.vue:357
  • This <tr> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — apps/desktop/src/components/grid/DataGridTableInfoPanels.vue:139
  • This <img> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — apps/desktop/src/components/grid/ImagePreviewDialog.vue:223
  • This <div> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — apps/desktop/src/components/layout/AppToolbar.vue:623
  • The repo's own CSS styles .app-tab-scrollbar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/desktop/src/components/layout/EditorGroupTabBar.vue:2242

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness7.9 / 10Strong✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden. (×6) — apps/desktop/src/components/explain/ExplainPlanNodeTree.vue:63, apps/desktop/src/components/grid/DataGrid.vue:15931, apps/desktop/src/components/layout/StartupLoading.vue:16, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety3.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:303, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:356, apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227, …
  • <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×36) — apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:308, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:348, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:364, …

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition8.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `EditorToolbarActions` declares 32 required operations: `newQuery`, `databaseRequiredSignalFor`, `connectionRequiredSignalFor`, `captureExecutionSnapshot`, `toolbarExecute`, `toolbarExecuteAll`, `toolbarExecuteInNewResultTab`, `cancelExecution`, `explain`, `formatSql`, `compressSql`, `toggleSqlKeywordCase`, `saveSql`, `saveRoutineToDatabase`, `saveAllTabs`, `openSqlFile`, `importResultArchive`, `pasteSqlInCondition`, `multiExecute`, `previewChanges`, `changeConnection`, `changeCatalog`, `changeDatabase`, `changeSchema`, `setDefaultDatabase`, `clearDefaultDatabase`, `activateSettingsPage`, `closeSettingsPage`, `activateDriverStore`, `closeDriverStore`, `activatePluginCenter`, `closePluginCenter`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/components/layout/editorToolbarActions.ts:23
  • `QueryEditorSurfaceHandle` declares 24 required operations: `focusSqlEditor`, `focusSearch`, `focusWhere`, `openGoToColumn`, `refreshData`, `toggleResultsPane`, `refreshQueryEditorCompletionCache`, `handleModRTarget`, `requestQueryEditorExecute`, `requestQueryEditorExecuteAll`, `captureQueryEditorExecutionSnapshot`, `requestQueryEditorExecuteInNewResultTab`, `requestQueryEditorPreviewChanges`, `shouldBlockQueryEditorExecutionShortcut`, `cancelQueryEditorExecutionViewport`, `acceptQueryEditorExecutionViewport`, `pasteClipboardAsSqlInCondition`, `applyTableStructureChanges`, `insertRedisCommand`, `executeRedisCommand`, `isRedisConsoleReady`, `previewStatementRange`, `focusStatementRange`, `focusErrorPosition`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/components/layout/querySurfaces.ts:15
  • `UseDataGridLargeValuesOptions` declares 18 required operations: `gridScrollerElement`, `displayItemAt`, `getRowItem`, `tableColumnForGridColumn`, `formatCell`, `formatCellCached`, `scheduleCanvasDraw`, `clearCellFormatCache`, `invalidateResultEstimate`, `connectionIdentifierQuote`, `getConnectionConfig`, `uuid`, `translate`, `translateBackendError`, `appendDebugLog`, `toast`, `cloneRow`, `cloneRows`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/composables/useDataGridLargeValues.ts:52

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `InnerWebView.load_extensions` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — vendor/wry/src/webview2/mod.rs:1437

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
ED1 · Handler temporal coupling10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

ED3 · Event naming7.0 / 10Strong✓ Tool-verified

Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).

Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.

  • `benchmarkMetadata` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — REDACTED:59
  • `rpcError` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — REDACTED:51
  • `AgentEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — crates/dbx-ai-provider/src/agent_events.rs:8
  • `ReloadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — crates/dbx-sql-dialect/src/sql_dialect/hot_reload.rs:28
  • `DownloadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — vendor/tauri-plugin-updater/src/commands.rs:16
  • `PageLoadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — vendor/wry/src/lib.rs:2562
  • `SidebarLayoutMonitorEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:128

What to do

  • Name new events in the past tense: they record facts that already happened. Do not rename an event that is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it.
ED4 · Outbox / dual-write10.0 / 10Exemplary○ Nothing flagged

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)9.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 28/86 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `agents/drivers/access`, `agents/drivers/bigquery`, `agents/drivers/cache`, `agents/drivers/cassandra-go`, `agents/drivers/databend` and 53 more.
  • `REDACTED` reports through `console.*` at line 98 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:98
  • `REDACTED` reports through `console.*` at line 125 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:125
  • `REDACTED` reports through `console.*` at line 384 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:384
  • `REDACTED` reports through `console.*` at line 460 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:460
  • `REDACTED` reports through `console.*` at line 498 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:498
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 799 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:799
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 879 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:879
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 991 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:991
  • `apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts:67
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 216 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:216
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 598 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:598
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 667 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:667
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 742 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:742
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 754 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:754
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 909 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:909
  • `apps/desktop/src/lib/sql/errorPosition.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/errorPosition.ts:51
  • `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlHighlighter.ts:33
  • `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlHighlighter.ts:48
  • `apps/desktop/src/lib/sql/sqlRichText.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlRichText.ts:62
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:735
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 738 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:738
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 783 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:783
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 789 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:789
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 793 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:793
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 804 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:804
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 893 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:893
  • `apps/desktop/src/lib/savedSql/savedSqlLibraryEvents.ts` reports through `console.*` at line 16 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/savedSql/savedSqlLibraryEvents.ts:16
  • `apps/desktop/src/lib/savedSql/savedSqlLibraryEvents.ts` reports through `console.*` at line 28 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/savedSql/savedSqlLibraryEvents.ts:28
  • `apps/desktop/src/lib/query/queryCursorOffsetPagination.ts` reports through `console.*` at line 71 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:71
  • `apps/desktop/src/lib/query/queryCursorOffsetPagination.ts` reports through `console.*` at line 77 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:77
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 444 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:444
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 453 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:453
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 454 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:454
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 499 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:499
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:522
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 816 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:816
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 837 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:837
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 883 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:883
  • `REDACTED` reports through `console.*` at line 445 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:445

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — REDACTED:158, REDACTED:204, REDACTED:390, …
  • `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — agents/scripts/build_driver_zips.py:114
  • `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — crates/dbx-core/src/persistence/cloud_sync.rs:1890, crates/dbx-core/src/persistence/cloud_sync.rs:2000, crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:67
  • `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/dbx-core/src/persistence/cloud_sync.rs:2009
  • `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/dbx-driver-agent/src/agent_manager.rs:1588

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
PF1 · Benchmark discipline8.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

  • A Go testing.B suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — agents/drivers/zookeeper/integration_test.go

What to do

  • Call b.ReportAllocs() in the benchmarks, or run them with `go test -bench . -benchmem`, so allocation regressions are visible, not just time.
PF3 · Async & latency hygiene7.0 / 10Strong✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `enable_wal_mode` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — REDACTED:1829
  • `rmSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:43

What to do

  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication7.5 / 10Strong✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 357 duplicated blocks under apps/desktop/src/components/ have copies in at least two of the sibling directories admin, ai, auth, backup, chart, codeSnapshot (+40 more sibling(s) not listed) — 205 of them are reported below, and 152 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 357 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 357 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 357 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422
  • 221 duplicated blocks under apps/desktop/src/ have copies in at least two of the sibling directories components, composables, lib, stores, types — 135 of them are reported below, and 86 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 221 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 221 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 221 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/components/sidebar/TreeItem.vue:319
  • 149 duplicated blocks under apps/desktop/src/lib/ have copies in at least two of the sibling directories ai, app, backend, backup, cloudSync, codeSnapshot (+40 more sibling(s) not listed) — 95 of them are reported below, and 54 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 149 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 149 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 149 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/lib/app/documentJsonValues.ts:306
  • apps/desktop/src/lib/backend/http.ts:1670 · apps/desktop/src/lib/backend/tauri.ts:2110 — the two spans are one implementation copied and then locally edited — 1200 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/backend/http.ts:1670
  • apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 · apps/desktop/src/components/admin/DamengUserAdmin.vue:81 — the two spans are one implementation copied and then locally edited — 1634 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/admin/DamengRoleAdmin.vue:58
  • apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422 · apps/desktop/src/components/transfer/TransferTaskTree.vue:333 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422
  • apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 · apps/desktop/src/components/grid/DataGridSortBuilder.vue:49 — the two spans are one implementation copied and then locally edited — 1169 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78
  • apps/desktop/src/lib/metadata/objectDdlCache.ts:44 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:25 — the two spans are one implementation copied and then locally edited — 1086 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/metadata/objectDdlCache.ts:44
  • apps/desktop/src/components/admin/MySqlDashboard.vue:32 · apps/desktop/src/components/admin/PostgresDashboard.vue:29 — the two spans are one implementation copied and then locally edited — 1103 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/admin/MySqlDashboard.vue:32
  • apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 · apps/desktop/src/components/mq/rabbitmq/RabbitMqPoliciesPanel.vue:58 — the two spans are one implementation copied and then locally edited — 589 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84
  • apps/desktop/src/components/sidebar/TreeItem.vue:319 · apps/desktop/src/lib/sidebar/treeNodeIcon.ts:54 — the two spans are one implementation copied and then locally edited — 587 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/sidebar/TreeItem.vue:319
  • apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 · apps/desktop/src/components/grid/DataGridTextSortWorkbench.vue:28 — the two spans are one implementation copied and then locally edited — 610 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45
  • apps/desktop/src/lib/app/documentJsonValues.ts:306 · REDACTED:466 — the two spans are one implementation copied and then locally edited — 596 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/app/documentJsonValues.ts:306
  • apps/desktop/src/lib/metadata/objectDdlCache.ts:193 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:131 — the two spans are one implementation copied and then locally edited — 569 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/metadata/objectDdlCache.ts:193
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts:1253 · apps/desktop/src/lib/sql/sqlStatementRanges.ts:1487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1253
  • apps/desktop/src/components/ui/LightDropdown.vue:107 · apps/desktop/src/components/ui/LightDropdownMenu.vue:128 — the two spans are one implementation copied and then locally edited — 471 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/ui/LightDropdown.vue:107
  • apps/desktop/src/components/connection/ConnectionTreeSelect.vue:96 · apps/desktop/src/components/ui/searchable-select/SearchableSelect.vue:176 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/connection/ConnectionTreeSelect.vue:96
  • apps/desktop/src/lib/backend/http.ts:4391 · apps/desktop/src/lib/backend/tauri.ts:4528 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/backend/http.ts:4391
  • apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 · apps/desktop/src/components/mq/SendMessagePanel.vue:12 — the two spans are one implementation copied and then locally edited — 401 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12
  • apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 · apps/desktop/src/components/grid/GridSnapshotDialog.vue:29 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65
  • apps/desktop/src/components/sidebar/ConnectionTree.vue:1447 · apps/desktop/src/components/sidebar/ConnectionTree.vue:1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1447
  • apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 · apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:27 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20
  • apps/desktop/src/lib/sql/sqlFormatter.ts:633 · apps/desktop/src/lib/sql/sqlFormatter.ts:1004 — the two spans are one implementation copied and then locally edited — 473 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/sql/sqlFormatter.ts:633
  • apps/desktop/src/lib/sql/identifierSearch.ts:8 · apps/desktop/src/lib/sql/sqlCompletion.ts:7095 — the two spans are one implementation copied and then locally edited — 454 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/sql/identifierSearch.ts:8
  • apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 · apps/desktop/src/composables/useDataGridScrollbars.ts:44 — the two spans are one implementation copied and then locally edited — 260 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68
  • apps/desktop/src/lib/backend/tauri.ts:393 · apps/desktop/src/stores/settingsStore.ts:92 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — apps/desktop/src/lib/backend/tauri.ts:393
  • apps/desktop/src/components/generate/params/IdNumberParams.vue:37 · apps/desktop/src/lib/dataGrid/dataGenerate.ts:708 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — apps/desktop/src/components/generate/params/IdNumberParams.vue:37
  • apps/desktop/src/components/plugins/PluginFileManager.vue:190 · apps/desktop/src/composables/usePluginShortcutHeight.ts:64 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/plugins/PluginFileManager.vue:190
  • apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 · apps/desktop/src/lib/table/oracleRoutineRename.ts:53 — the two spans are one implementation copied and then locally edited — 541 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38
  • apps/desktop/src/stores/savedSqlStore.ts:1061 · apps/desktop/src/stores/transferTaskStore.ts:397 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/stores/savedSqlStore.ts:1061
  • apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 · apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:43 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380
  • apps/desktop/src/components/objects/ObjectBrowser.vue:5254 · apps/desktop/src/components/objects/ObjectSourceDialog.vue:277 — the two spans are one implementation copied and then locally edited — 282 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/objects/ObjectBrowser.vue:5254
  • apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 · apps/desktop/src/components/sidebar/VisibleSchemasDialog.vue:33 — the two spans are one implementation copied and then locally edited — 334 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20
  • apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 · apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:370 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160
  • apps/desktop/src/lib/backend/tauri.ts:6903 · apps/desktop/src/lib/backend/tauri.ts:6955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/lib/backend/tauri.ts:6903
  • apps/desktop/src/components/connection/ConnectionDialog.vue:7214 · apps/desktop/src/components/connection/TunnelProfileManager.vue:84 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/desktop/src/components/connection/ConnectionDialog.vue:7214
  • apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:879 · apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:879
  • apps/desktop/src/lib/backend/http.ts:3847 · apps/desktop/src/lib/backend/http.ts:3920 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/backend/http.ts:3847
  • apps/desktop/src/stores/queryStore.ts:2515 · apps/desktop/src/stores/queryStore.ts:2641 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — apps/desktop/src/stores/queryStore.ts:2515
  • apps/desktop/src/lib/backend/http.ts:2944 · apps/desktop/src/lib/backend/tauri.ts:542 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — apps/desktop/src/lib/backend/http.ts:2944

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.7 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • apps/desktop/src/lib/diagram/elk-layout.ts:1 imports elkjs/lib/elk.bundled.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/diagram/elk-layout.ts:1
  • apps/desktop/src/lib/sql/layout/internals.ts:60 imports sql-formatter/dist/esm/parser/createParser.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:60
  • apps/desktop/src/lib/sql/layout/internals.ts:61 imports sql-formatter/dist/esm/dialect.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:61
  • apps/desktop/src/lib/sql/layout/internals.ts:62 imports sql-formatter/dist/esm/allDialects.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:62
  • apps/desktop/src/lib/sql/layout/internals.ts:63 imports sql-formatter/dist/esm/formatter/ExpressionFormatter.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:63
  • apps/desktop/src/lib/sql/layout/internals.ts:64 imports sql-formatter/dist/esm/formatter/InlineLayout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:64
  • apps/desktop/src/lib/sql/layout/internals.ts:65 imports sql-formatter/dist/esm/formatter/Params.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:65
  • apps/desktop/src/lib/sql/layout/internals.ts:66 imports sql-formatter/dist/esm/formatter/Layout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:66
  • apps/desktop/src/lib/sql/layout/internals.ts:67 imports sql-formatter/dist/esm/formatter/Indentation.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:67
  • packages/app-tests/mongoShellCommand.test.ts:43 reaches past another workspace package's public entry into its internals with a relative path (../mongo-shell/src/json.ts) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/app-tests/mongoShellCommand.test.ts:43

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • executeTabSql has cyclomatic complexity 661 and cognitive complexity 870; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/queryStore.ts:8415
  • applyEditorSettingsPatch has cyclomatic complexity 308 and cognitive complexity 329; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/settingsStore.ts:3117
  • connectionConfigForSubmit has cyclomatic complexity 289 and cognitive complexity 366; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/connection/ConnectionDialog.vue:5087
  • send has cyclomatic complexity 241 and cognitive complexity 350; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/AiAssistant.vue:4100
  • toggle has cyclomatic complexity 221 and cognitive complexity 241; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:1004
  • dispatch has cyclomatic complexity 184 and cognitive complexity 287; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:664
  • normalizeEditorSettings has cyclomatic complexity 181 and cognitive complexity 171; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/settingsStore.ts:2081
  • fetchCapturedTabResultForExport has cyclomatic complexity 171 and cognitive complexity 242; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/queryStore.ts:11358
  • buildObjectSidebarMenu has cyclomatic complexity 149 and cognitive complexity 227; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:8334
  • handleKeydown has cyclomatic complexity 136 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/App.vue:4831
  • onGridKeydown has cyclomatic complexity 129 and cognitive complexity 133; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/grid/DataGrid.vue:12005
  • refreshSqlPreview has cyclomatic complexity 126 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/structure/TableStructureEditor.vue:3511
  • saveChanges has cyclomatic complexity 126 and cognitive complexity 150; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useDataGridEditor.ts:2464
  • performAsyncCompletionWithResult has cyclomatic complexity 123 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1700
  • prepareOracleTypeManagement has cyclomatic complexity 122 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/table/oracleTypeManagement.ts:230
  • openData has cyclomatic complexity 116 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38
  • buildDefaultGeneratorParams has cyclomatic complexity 109 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/dataGrid/dataGenerate.ts:1343
  • ensureTreeLoadedForTarget has cyclomatic complexity 109 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1977
  • getIconInfo has cyclomatic complexity 109 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/TreeItem.vue:278
  • (anonymous) has cyclomatic complexity 107 and cognitive complexity 150; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/connection/ConnectionDialog.vue:3320
  • loadTreeNodeChildren has cyclomatic complexity 107 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/connectionStore.ts:8971
  • indentRoutineBlocks has cyclomatic complexity 105 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sql/routineBlockLayout.ts:90
  • build has cyclomatic complexity 101 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sql/sqlCompletion.ts:2097
  • getSqlCompletionContext has cyclomatic complexity 101 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sql/sqlCompletion.ts:3053
  • loadStructure has cyclomatic complexity 98 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/structure/TableStructureEditor.vue:4249
  • splitSqlStatementRanges has cyclomatic complexity 97 and cognitive complexity 196; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sql/sqlStatementRanges.ts:411
  • provideSqlCompletions has cyclomatic complexity 96 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/useQueryEditorCompletion.ts:871
  • explainTabSql has cyclomatic complexity 95 and cognitive complexity 188; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/queryStore.ts:10386
  • queryResultTransferTargetType has cyclomatic complexity 95 and cognitive complexity 164; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/transfer/queryResultTransferValues.ts:158
  • readOceanbasePrimaryKeySnapshot has cyclomatic complexity 95 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111
  • getTreeNodeIconInfo has cyclomatic complexity 95 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sidebar/treeNodeIcon.ts:10
  • handleQuickOpenSelect has cyclomatic complexity 92 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/App.vue:4194
  • onReloadData has cyclomatic complexity 90 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useDataGridActions.ts:319
  • parseColumn has cyclomatic complexity 89 and cognitive complexity 171; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156
  • executeOracleConstraintPlan has cyclomatic complexity 88 and cognitive complexity 117; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/database/oracleConstraints.ts:720
  • drawCanvasDataGrid has cyclomatic complexity 88 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:442
  • (anonymous) has cyclomatic complexity 86 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:136
  • transfer has cyclomatic complexity 86 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/transfer/QueryResultTransferDialog.vue:284
  • runSchemaDiffSession has cyclomatic complexity 86 and cognitive complexity 107; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useSchemaDiffSession.ts:164
  • findSqlParameterOccurrences has cyclomatic complexity 85 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/sql/sqlParameters.ts:429
R3 · Large Files4.1 / 10Weak✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • apps/desktop/src/components/grid/DataGrid.vue has 17707 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/grid/DataGrid.vue:1
  • REDACTED has 14410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 14403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 14370 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/components/editor/EditorSettingsDialog.vue has 14187 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/EditorSettingsDialog.vue:1
  • REDACTED has 13747 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13712 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/i18n/locales/ko.ts has 13204 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/i18n/locales/ko.ts:1
  • REDACTED has 12545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 12495 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/stores/connectionStore.ts has 11609 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/connectionStore.ts:1
  • apps/desktop/src/i18n/locales/az.ts has 11601 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/i18n/locales/az.ts:1
  • apps/desktop/src/stores/queryStore.ts has 11592 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/queryStore.ts:1
  • REDACTED has 11500 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/components/connection/ConnectionDialog.vue has 11374 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/connection/ConnectionDialog.vue:1
  • apps/desktop/src/components/structure/TableStructureEditor.vue has 10287 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/structure/TableStructureEditor.vue:1
  • apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue has 8909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:1
  • apps/desktop/src/components/editor/AiAssistant.vue has 7898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/AiAssistant.vue:1
  • apps/desktop/src/components/objects/ObjectBrowser.vue has 7679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/objects/ObjectBrowser.vue:1
  • apps/desktop/src/lib/sql/sqlCompletion.ts has 6829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/sql/sqlCompletion.ts:1
  • apps/desktop/src/lib/backend/tauri.ts has 6239 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/backend/tauri.ts:1
  • apps/desktop/src/App.vue has 5940 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/App.vue:1
  • apps/desktop/src/lib/backend/http.ts has 5226 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/backend/http.ts:1
  • apps/desktop/src/components/redis/RedisKeyBrowser.vue has 4522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/redis/RedisKeyBrowser.vue:1
  • apps/desktop/src/components/layout/ContentArea.vue has 4012 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/layout/ContentArea.vue:1
  • apps/desktop/src/components/redis/RedisValueViewer.vue has 3997 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/redis/RedisValueViewer.vue:1
  • apps/desktop/src/components/nacos/NacosAdminConsole.vue has 3788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/nacos/NacosAdminConsole.vue:1
  • apps/desktop/src/stores/settingsStore.ts has 3491 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/settingsStore.ts:1
  • apps/desktop/src/components/editor/QueryEditor.vue has 3372 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/QueryEditor.vue:1
  • apps/desktop/src/components/document/DocumentBrowser.vue has 3333 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/document/DocumentBrowser.vue:1
  • apps/desktop/src/components/sidebar/ConnectionTree.vue has 3285 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1
  • apps/desktop/src/composables/useDataGridExport.ts has 3062 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/composables/useDataGridExport.ts:1
  • apps/desktop/src/types/database.ts has 2954 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/types/database.ts:1
  • apps/desktop/src/composables/useDataGridEditor.ts has 2873 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/composables/useDataGridEditor.ts:1
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts has 2809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1
  • apps/desktop/src/components/import/TableImportDialog.vue has 2693 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/import/TableImportDialog.vue:1
  • apps/desktop/src/components/layout/EditorGroupTabBar.vue has 2497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/layout/EditorGroupTabBar.vue:1
  • REDACTED has 2409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×22) — REDACTED:1, plugins/sdk/dev-host/ui/App.vue:1, REDACTED:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness8.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 97 application, 21 tooling and 2353 test entry point(s) detected in this repo. Gate removals on `pnpm run typecheck` — an undetected custom entry would make these reachable.
  • no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×14) — REDACTED, REDACTED, REDACTED, …
  • Nothing imports this binding — it is safe to review for removal. (×25) — apps/desktop/src/components/debug/plDebugLaunch.ts:46, apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:11, apps/desktop/src/composables/useSchemaDiffSession.ts:452, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
  • Declared in plugins/sdk/dev-host/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • apps/desktop/src/components/ui/badge/Badge.vue → apps/desktop/src/components/ui/badge/index.ts → apps/desktop/src/components/ui/badge/Badge.vue — apps/desktop/src/components/ui/badge/Badge.vue:8
  • apps/desktop/src/components/ui/button/Button.vue → apps/desktop/src/components/ui/button/index.ts → apps/desktop/src/components/ui/button/Button.vue — apps/desktop/src/components/ui/button/Button.vue:7
  • apps/desktop/src/components/ui/select/SelectContent.vue → apps/desktop/src/components/ui/select/index.ts → apps/desktop/src/components/ui/select/SelectContent.vue — apps/desktop/src/components/ui/select/SelectContent.vue:9
  • apps/desktop/src/components/ui/tabs/TabsList.vue → apps/desktop/src/components/ui/tabs/index.ts → apps/desktop/src/components/ui/tabs/TabsList.vue — apps/desktop/src/components/ui/tabs/TabsList.vue:8
  • apps/desktop/src/lib/backend/http.ts → apps/desktop/src/lib/backend/tauri.ts → apps/desktop/src/lib/backend/http.ts — apps/desktop/src/lib/backend/http.ts:1635
  • apps/desktop/src/lib/sql/sqlRisk.ts → apps/desktop/src/types/database.ts → apps/desktop/src/lib/database/oracleTriggerPlan.ts → apps/desktop/src/lib/database/productionExecutionGuard.ts → apps/desktop/src/lib/database/productionSafety.ts → apps/desktop/src/lib/sql/sqlRisk.ts (one verified cycle inside a mutually-dependent group of 31 files) — apps/desktop/src/lib/sql/sqlRisk.ts:5

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.5 / 10Adequate✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://analytics.unihub.top/script.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — docs/app/[lang]/layout.tsx:66
  • Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.) — docs/public/_headers:1

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
  • Add Content-Security-Policy, Strict-Transport-Security, X-Frame-Options beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
X1 · Async correctness8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`. — REDACTED:1847

What to do

  • Blocking `thread::sleep` inside an `async` body
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader5.2 / 10Adequate✓ Tool-verified

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

  • `column_count` is read from the bytes being parsed at line 417 (`u32::from_be_bytes`), then used to size a `Vec::with_capacity` at line 433 — and nowhere in its scope is `column_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `column_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:433
  • `len` is read from the bytes being parsed at line 3434 (`u32::from_le_bytes`), then used to size a `vec![…; n]` at line 3436 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — REDACTED:3436

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation5.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 17/72 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `finishOAuth` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`. — docs/worker.ts:233
  • `contributorAvatar` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`. — docs/worker.ts:288
  • `agentReleaseAsset` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`. — docs/worker.ts:312
  • `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/scripts/update-contributors.mjs:25
  • `fetchRegistry` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/lib/agentRegistrySource.ts:9
  • `requestDraft` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/components/issues/IssueSubmissionClient.tsx:271
  • `fetchDailyUniques` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:162
  • `fetchDownloadCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:209
  • `fetchWindowCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:264
  • `tokenFromWrangler` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — deploy/plugin-stats-worker/migrate-archive.mjs:147
  • `api` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — deploy/plugin-stats-worker/migrate-archive.mjs:177
  • `apiText` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — deploy/plugin-stats-worker/migrate-archive.mjs:195
  • `writeRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:571
  • `listRemoteRuntimeCacheMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:615
  • `pruneRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:627
  • `deleteRemoteRuntimeCacheOwner` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:641
  • `readRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:654
  • `deleteRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:672
  • `logoutWeb` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/startup/startupAuthentication.ts:23
  • `dataUrlToBlob` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:416
  • `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:434
  • `postQueryWithDiagnostics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:445
  • `get` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:494
  • `del` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:500
  • `put` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:506
  • `testConnectionWithInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:551
  • `installPluginPackage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:772
  • `installPluginPackageFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:789
  • `pluginAssetPayload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:944
  • `importJdbcDrivers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:969
  • `installJdbcPluginLocal` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:1017
  • `importAgentsFromZip` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:1109
  • `importAgentDriver` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:1141
  • `aiStream` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2391
  • `setMcpPluginScopeRule` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2643
  • `savePluginMcpGrant` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2665
  • `saveMcpGlobalPolicy` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2675
  • `saveWebMcpHttpSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2704
  • `rotateWebMcpToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2714

What to do

  • Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped4.8 / 10Weak✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `highlightedGrantsSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1306
  • `highlight(oracleVisibleSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1486
  • `highlight(directSql || t(incomplete ? 'oracleSecurity.incomplete' : 'oracleSecurity.noGrants'))` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/OracleSecurityDetails.vue:30
  • `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:176, apps/desktop/src/components/grid/GridSnapshotDialog.vue:156
  • `highlightedRawResponse` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/ElasticsearchJsonResponsePanel.vue:269
  • `highlightedJson(jsonTreeKeyText(node), node, 'key')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/JsonTree.vue:272
  • `highlightedJson(scalarText(node.value), node, 'value')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/JsonTree.vue:283
  • `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — apps/desktop/src/components/editor/AiAssistant.vue:7167, apps/desktop/src/components/editor/AiAssistant.vue:7216
  • `highlightedHead` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/DangerConfirmDialog.vue:159
  • `highlightedTail` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/DangerConfirmDialog.vue:163
  • `selectedAiPartnerDescriptionHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/EditorSettingsDialog.vue:12843
  • `highlight(selectedEntry.sql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/QueryHistory.vue:921
  • `highlight(selectedEntry.rollback_sql || '')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/QueryHistory.vue:931
  • `highlightedSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/SqlParameterDialog.vue:244
  • `highlightedHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/SqlPreviewPanel.vue:255
  • `hoverSqlHighlighter(sqlContent,isDark.value?"dark":"light")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/queryEditorHoverContent.ts:75
  • `highlightedCode` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/generate/ModelGenerateDialog.vue:227
  • `highlightedDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/grid/DataGrid.vue:17518
  • `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — apps/desktop/src/components/layout/UpdateDialog.vue:342
  • `renderedNotes` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/layout/UpdateDialog.vue:450
  • `highlight(item.sqlSnippet)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/lineage/FieldLineageDialog.vue:419
  • `markCellHtml(hit, column)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:772
  • `markCellHtml(hit, key)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:816
  • `highlightedTableDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/objects/ObjectBrowser.vue:7467
  • `highlight(renamePreviewSqlText)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/objects/ObjectBrowser.vue:7748
  • `sortIndicator('id')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:181
  • `sortIndicator('timestamp')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:182
  • `sortIndicator('duration_micros')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:183
  • `sortIndicator('command')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:184
  • `sortIndicator('client_addr')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:185
  • `sortIndicator('client_name')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:186
  • `formatChangelogItemHtml(item)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/settings/ChangelogPanel.vue:275
  • `highlight(renameObjectPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:383
  • `highlight(structurePreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:560
  • `highlight(createDatabasePreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:733
  • `highlight(editDatabasePropertiesPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:822
  • `highlight(schemaCommentPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:932
  • `activePreviewHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sql-file/SqlFileExecutionDialog.vue:1213

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard7.5 / 10Strong✓ Tool-verified

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

  • This condition tests `tokens` for emptiness and then indexes it on a branch that test does not reach. `tokens[0].Quoted` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `tokens` being empty — so an empty `tokens` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `tokens[1].word(" ")` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `tokens` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `tokens`. — agents/drivers/oracle-go/pldebug_legacy_declarations.go:102

What to do

  • Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.2 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×20) — plugins/sdk/dev-host/runtime.mjs:32, plugins/sdk/dev-host/ui/App.vue:344, REDACTED:1954, …
  • `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — plugins/sdk/dev-host/runtime.mjs:74
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×13) — plugins/sdk/dev-host/server.mjs:121, plugins/sdk/dev-host/server.mjs:723, apps/desktop/src/main.ts:110, …
  • `catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:1499
  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:4248, REDACTED:4257
  • `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:6525, REDACTED:6560
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:88

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging4.6 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info!` at line 1655 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1655
  • `info!` at line 1657 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1657
  • `info!` at line 1665 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1665
  • `error!` at line 1685 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1685
  • `error!` at line 1692 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1692
  • `error!` at line 1712 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1712
  • `error!` at line 1733 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1733

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types7.2 / 10Strong✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 3/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~2.5 `!` null assertions per 1k TypeScript source lines — 1272 assertion(s) across the 517454 source line(s) of the 1580 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: apps/desktop/src/stores/queryStore.ts (92), apps/desktop/src/components/transfer/queryResultTransferDdl.ts (39), apps/desktop/src/stores/connectionStore.ts (36). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health54%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture67%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity78%StrongSolid.
Readiness62%Adequate — gated by D13, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security60%Adequate — gated by D28, D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Accessibility41%Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance76%StrongSolid.
Unscored — 5 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • SC1 Supply-chain hygiene — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 38 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. PHP builds its object graph per request and shares none of it between requests. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — all -y --no-install-recommends build-essential cmake pkg-config perl python3-pip gcc-aarch64-linux-gnu libfontconfig-dev:arm64 libfreetype-dev:arm64 && pip3 install --break-system-packages ziglang && cargo install cargo-zigbuild && rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 65 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 312 value object(s); 5 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — no command-shaped messages detected — single-handler-per-command check not applicable
  • ED5 Idempotency — Not assessed, and this one is on us: 2 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 1932 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X12 Unreachable branch — X12 reached only 48% of this repository's production lines — rust (689,366 lines), go (96,310 lines), java (55,910 lines), php (470 lines), c (28 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — X13 reached only 48% of this repository's production lines — rust (689,366 lines), go (96,310 lines), java (55,910 lines), php (470 lines), c (28 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — X17 reached only 48% of this repository's production lines — rust (689,366 lines), go (96,310 lines), java (55,910 lines), php (470 lines), c (28 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — X26 reached only 10% of this repository's production lines — typescript (754,791 lines), rust (689,366 lines), javascript (9,258 lines), php (470 lines), c (28 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X27 Collection changed while being enumerated — X27 reached only 47% of this repository's production lines — typescript (754,791 lines), go (96,310 lines), javascript (9,258 lines), php (470 lines), c (28 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 674 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 334 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 28 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×22
  • <input> without a programmatic label apps/desktop/src/App.vue:6207 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/App.vue:6225 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:303 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:314 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:356 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DamengRoleAdmin.vue:334 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DamengUserAdmin.vue:497 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseJobAdmin.vue:816 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1417 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1467 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/MySqlDashboard.vue:246 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/ProcessListPanel.vue:754 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/ProcessListPanel.vue:761 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:288 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:289 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:290 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/XuguUserPermissions.vue:668 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/XuguUserPermissions.vue:878 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/auth/LoginPage.vue:154 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:264 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:282 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D30 · Dependency Vulnerabilities · High CVE · ×21
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×20
  • Click handler on a non-interactive <div> apps/desktop/src/components/diagram/DiagramSchemaSelect.vue:128 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diagram/LayerPanel.vue:334 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:172 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:213 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/dolt/DoltDiffTable.vue:245 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/AiAssistant.vue:6801 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/QueryEditorIntentionPopup.vue:30 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/ThemeCustomizerDialog.vue:472 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1332 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1337 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1342 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1347 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1352 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1357 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1362 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1391 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/generate/GeneratorSelect.vue:50 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/generate/GeneratorSelect.vue:59 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/grid/DataGrid.vue:16050 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
  • Click handler on a non-interactive <div> apps/desktop/src/components/grid/DataGridColumnHeader.vue:76 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D13 · REDACTED Scanning · Leaked secret · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×13
  • <label> that labels no control apps/desktop/src/App.vue:6206 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/App.vue:6211 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:681 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:714 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:719 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1416 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1426 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:279 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:202 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:239 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:249 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:253 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:271 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×12
  • Boundary-crossing change coupling: AgentProtocol.java ↔ agent_driver.rs agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1 — `agents/common/src/main/java/com/dbx/agent/AgentProtocol.java` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 100% of the time (21 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `f581bed2` fix(zookeeper): route all ensemble endpoints through transports; `2db28fc2` feat(mongodb): support db.collection.renameCollection() (at that commit the file was still `crates/dbx-drivers/src/db/agent_driver.rs`); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: redis.rs ↔ redis_cmd.rs crates/dbx-web/src/routes/redis.rs:1 — `crates/dbx-web/src/routes/redis.rs` (context crates) and `src-tauri/src/commands/redis_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 91% of the time (20 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `dbb83334` fix(redis): faithful raw byte command parsing and cluster crossslot p…; `43b6e218` feat(redis): download large Redis values; `0f9d32e1` feat(redis): edit hash fields — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo.rs ↔ mongo_cmd.rs crates/dbx-web/src/routes/mongo.rs:1 — `crates/dbx-web/src/routes/mongo.rs` (context crates) and `src-tauri/src/commands/mongo_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 82% of the time (28 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 28 shared commits counted here, the most recent 3 are `92ad8331` fix(mongo): error when querying a non-existent collection; `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne — run `git show` on any of them.
  • Boundary-crossing change coupling: AgentProtocol.java ↔ mongo_ops.rs agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1 — `agents/common/src/main/java/com/dbx/agent/AgentProtocol.java` (context agents) and `crates/dbx-core/src/query/mongo_ops.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 76% of the time (16 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection(); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: redis.rs ↔ lib.rs crates/dbx-web/src/routes/redis.rs:1 — `crates/dbx-web/src/routes/redis.rs` (context crates) and `src-tauri/src/lib.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 68% of the time (15 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `43b6e218` feat(redis): download large Redis values; `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo.rs ↔ lib.rs crates/dbx-web/src/routes/mongo.rs:1 — `crates/dbx-web/src/routes/mongo.rs` (context crates) and `src-tauri/src/lib.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 62% of the time (21 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne; `52c89267` feat(vector): support renaming Milvus collections — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo_driver.rs ↔ document_cmd.rs crates/dbx-driver-mongodb/src/mongo_driver.rs:1 — `crates/dbx-driver-mongodb/src/mongo_driver.rs` (context crates) and `src-tauri/src/commands/document_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3e9974b2` perf(mongodb): skip total count for explicit limit queries; `a5ce8510` feat(mongo): preserve BSON types when cloning and saving documents (at that commit the file was still `crates/dbx-core/src/db/mongo_driver.rs`); `c9764be9` fix(mongodb): support collation for find queries (at that commit the file was still `crates/dbx-core/src/db/mongo_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: main.rs ↔ mongo_cmd.rs crates/dbx-web/src/main.rs:1 — `crates/dbx-web/src/main.rs` (context crates) and `src-tauri/src/commands/mongo_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 59% of the time (20 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne; `52c89267` feat(vector): support renaming Milvus collections — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ mongo_ops.rs REDACTED:1 — `REDACTED` (context agents) and `crates/dbx-core/src/query/mongo_ops.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 58% of the time (18 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection(); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: main.rs ↔ redis_cmd.rs crates/dbx-web/src/main.rs:1 — `crates/dbx-web/src/main.rs` (context crates) and `src-tauri/src/commands/redis_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `43b6e218` feat(redis): download large Redis values; `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys — run `git show` on any of them.
  • Boundary-crossing change coupling: JsonRpcServer.java ↔ agent_driver.rs agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:1 — `agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `9cade987` fix(sql): harden SQL recognition, duplicate commits, and batch execut…; `0e414e63` fix(agent): recover JDBC connections after query timeouts (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`); `73120883` fix(dameng): separate materialized view metadata (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ agent_driver.rs REDACTED:1 — `REDACTED` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 52% of the time (16 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection() (at that commit the file was still `crates/dbx-drivers/src/db/agent_driver.rs`); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
D28 · Secrets (history) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×8
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/LayerPanel.vue:407 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/LayerPanel.vue:429 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:2377 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:348 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:354 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:357 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/grid/DataGridSearchBar.vue:216 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/layout/EditorGroupTabBar.vue:2242 — The repo's own CSS styles .app-tab-scrollbar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC5 · ARIA correctness · aria-hidden hides a focusable element · ×6
  • aria-hidden hides a focusable element apps/desktop/src/components/explain/ExplainPlanNodeTree.vue:63 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/grid/DataGrid.vue:15931 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/layout/StartupLoading.vue:16 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/plugins/PluginShortcutBar.vue:184 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/settings/McpCapabilityBrowser.vue:396 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/settings/McpCapabilityBrowser.vue:423 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×5
  • Import cycle (2 files) apps/desktop/src/components/ui/badge/Badge.vue:8 — apps/desktop/src/components/ui/badge/Badge.vue → apps/desktop/src/components/ui/badge/index.ts → apps/desktop/src/components/ui/badge/Badge.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/button/Button.vue:7 — apps/desktop/src/components/ui/button/Button.vue → apps/desktop/src/components/ui/button/index.ts → apps/desktop/src/components/ui/button/Button.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/select/SelectContent.vue:9 — apps/desktop/src/components/ui/select/SelectContent.vue → apps/desktop/src/components/ui/select/index.ts → apps/desktop/src/components/ui/select/SelectContent.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/tabs/TabsList.vue:8 — apps/desktop/src/components/ui/tabs/TabsList.vue → apps/desktop/src/components/ui/tabs/index.ts → apps/desktop/src/components/ui/tabs/TabsList.vue
  • Import cycle (2 files) apps/desktop/src/lib/backend/http.ts:1635 — apps/desktop/src/lib/backend/http.ts → apps/desktop/src/lib/backend/tauri.ts → apps/desktop/src/lib/backend/http.ts
AC2 · Forms & labels · <select> without a programmatic label · ×4
  • <select> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:318 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/MySqlDashboard.vue:194 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/PostgresDashboard.vue:215 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/XuguServerDashboard.vue:300 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Focusable <div> isn't keyboard-operable · ×3
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:481 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/diff/SchemaDiffRoutineList.vue:73 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/layout/EditorGroupTabBar.vue:2528 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <tr> · ×2
  • Click handler on a non-interactive <tr> apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:318 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <tr> apps/desktop/src/components/document/MongoGridFsBrowser.vue:338 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative apps/desktop/src/components/editor/AiAttachmentCard.vue:49 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC1 · Text alternatives · <svg role="img"> without an accessible name · ×1
  • <svg role="img"> without an accessible name docs/components/DocsSidebarFooter.tsx:19 — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels · Custom control named only by title on <td> · ×1
  • Custom control named only by title on <td> apps/desktop/src/components/admin/ProcessListPanel.vue:819 — This <td> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> plugins/sdk/cli/templates/svelte/index.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC4 · Keyboard semantics · Click handler on a non-interactive <th> · ×1
  • Click handler on a non-interactive <th> apps/desktop/src/components/admin/ProcessListPanel.vue:797 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <td> · ×1
  • Click handler on a non-interactive <td> apps/desktop/src/components/admin/ProcessListPanel.vue:819 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <p> · ×1
  • Click handler on a non-interactive <p> apps/desktop/src/components/editor/EditorSettingsDialog.vue:12843 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
AC4 · Keyboard semantics · Focusable <tr> isn't keyboard-operable · ×1
  • Focusable <tr> isn't keyboard-operable apps/desktop/src/components/grid/DataGridTableInfoPanels.vue:139 — This <tr> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <img> · ×1
  • Double-click handler on a non-interactive <img> apps/desktop/src/components/grid/ImagePreviewDialog.vue:223 — This <img> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> apps/desktop/src/components/layout/AppToolbar.vue:623 — This <div> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: InnerWebView.load_extensions vendor/wry/src/webview2/mod.rs:1437 — `InnerWebView.load_extensions` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (5 files) · ×1
  • Import cycle (5 files) apps/desktop/src/lib/sql/sqlRisk.ts:5 — apps/desktop/src/lib/sql/sqlRisk.ts → apps/desktop/src/types/database.ts → apps/desktop/src/lib/database/oracleTriggerPlan.ts → apps/desktop/src/lib/database/productionExecutionGuard.ts → apps/desktop/src/lib/database/productionSafety.ts → apps/desktop/src/lib/sql/sqlRisk.ts (one verified cycle inside a mutually-dependent group of 31 files)
Serious — 9298 finding(s)
D3 · God Classes · FunctionTooLong · ×321
  • FunctionTooLong: useDataGridExport.useDataGridExport apps/desktop/src/composables/useDataGridExport.ts:232 — FunctionTooLong — useDataGridExport runs 2228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2128 over it, 22.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridEditor.useDataGridEditor apps/desktop/src/composables/useDataGridEditor.ts:394 — FunctionTooLong — useDataGridEditor runs 1944 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1844 over it, 19.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx::run src-tauri/src/lib.rs:1860 — FunctionTooLong — dbx::run runs 1323 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1223 over it, 13.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useQueryEditorCompletion.useQueryEditorCompletion apps/desktop/src/components/editor/useQueryEditorCompletion.ts:175 — FunctionTooLong — useQueryEditorCompletion runs 1304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1204 over it, 13.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::table_import::import_table_file_core REDACTED:7844 — FunctionTooLong — dbx_core::data::table_import::import_table_file_core runs 1204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1104 over it, 12.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_web::serve crates/dbx-web/src/main.rs:520 — FunctionTooLong — dbx_web::serve runs 1048 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 948 over it, 10.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::database_export::export_database_sql_core_inner_with_phases REDACTED:5135 — FunctionTooLong — dbx_core::data::database_export::export_database_sql_core_inner_with_phases runs 972 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 872 over it, 9.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:117 — FunctionTooLong — useSidebarDatabaseSpecificMutationRuntime runs 913 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 813 over it, 9.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: settingsStore.useSettingsStore apps/desktop/src/stores/settingsStore.ts:2559 — FunctionTooLong — useSettingsStore runs 878 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 778 over it, 8.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: savedSqlStore.useSavedSqlStore apps/desktop/src/stores/savedSqlStore.ts:219 — FunctionTooLong — useSavedSqlStore runs 788 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 688 over it, 7.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSqlExecution.useSqlExecution apps/desktop/src/composables/useSqlExecution.ts:175 — FunctionTooLong — useSqlExecution runs 757 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 657 over it, 7.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::transfer::transfer_table_inner crates/dbx-core/src/data/transfer.rs:13155 — FunctionTooLong — dbx_core::data::transfer::transfer_table_inner runs 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 635 over it, 7.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSidebarTreeExportRuntime.useSidebarTreeExportRuntime apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:128 — FunctionTooLong — useSidebarTreeExportRuntime runs 705 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 605 over it, 7.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::table_export::export_table_data_core_inner REDACTED:1691 — FunctionTooLong — dbx_core::data::table_export::export_table_data_core_inner runs 654 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridActions.useDataGridActions apps/desktop/src/composables/useDataGridActions.ts:47 — FunctionTooLong — useDataGridActions runs 640 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 540 over it, 6.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::transfer_runner::run_transfer crates/dbx-core/src/data/transfer_runner.rs:86 — FunctionTooLong — dbx_core::data::transfer_runner::run_transfer runs 620 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 520 over it, 6.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useQuickOpen.useQuickOpen apps/desktop/src/composables/useQuickOpen.ts:320 — FunctionTooLong — useQuickOpen runs 610 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 510 over it, 6.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: DriversClient.DriversClient docs/app/[lang]/drivers/DriversClient.tsx:216 — FunctionTooLong — DriversClient runs 593 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 493 over it, 5.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl crates/dbx-sql-schema/src/schema_diff.rs:6688 — FunctionTooLong — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl runs 574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 474 over it, 5.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridLargeValues.useDataGridLargeValues apps/desktop/src/composables/useDataGridLargeValues.ts:115 — FunctionTooLong — useDataGridLargeValues runs 556 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 456 over it, 5.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useExportTracker.useExportTracker apps/desktop/src/composables/useExportTracker.ts:478 — FunctionTooLong — useExportTracker runs 538 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 438 over it, 5.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createMockHost plugins/sdk/dev-host/server.mjs:77 — FunctionTooLong — createMockHost runs 538 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 438 over it, 5.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridSelection.useDataGridSelection apps/desktop/src/composables/useDataGridSelection.ts:52 — FunctionTooLong — useDataGridSelection runs 533 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 433 over it, 5.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::query::do_execute_typed REDACTED:1916 — FunctionTooLong — dbx_core::query::do_execute_typed runs 500 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 400 over it, 5.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx::commands::connection::test_connection_with_info_impl src-tauri/src/commands/connection.rs:1636 — FunctionTooLong — dbx::commands::connection::test_connection_with_info_impl runs 494 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 394 over it, 4.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 296 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_core · ×313
  • dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cognitive 359) REDACTED:5135 — dbx_core::data::database_export::export_database_sql_core_inner_with_phases has cognitive complexity 359 (threshold 15). Drivers by points: if/else 100 (248 pts), match/switch 19 (49 pts), loops 19 (34 pts), boolean chains 28 (nesting depth added 193). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::table_export::export_table_data_core_inner (cognitive 199) REDACTED:1691 — dbx_core::data::table_export::export_table_data_core_inner has cognitive complexity 199 (threshold 15). Drivers by points: if/else 72 (171 pts), loops 8 (18 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 112). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::table_import::import_table_file_core (cognitive 196) REDACTED:7844 — dbx_core::data::table_import::import_table_file_core has cognitive complexity 196 (threshold 15). Drivers by points: if/else 58 (108 pts), match/switch 31 (64 pts), boolean chains 15, loops 5 (9 pts) (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_table_inner (cognitive 191) crates/dbx-core/src/data/transfer.rs:13155 — dbx_core::data::transfer::transfer_table_inner has cognitive complexity 191 (threshold 15). Drivers by points: if/else 85 (120 pts), boolean chains 34, match/switch 12 (25 pts), loops 6 (12 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_mysql_schema_objects (cognitive 176) crates/dbx-core/src/data/transfer.rs:10183 — dbx_core::data::transfer::transfer_mysql_schema_objects has cognitive complexity 176 (threshold 15). Drivers by points: if/else 26 (104 pts), match/switch 8 (43 pts), loops 5 (23 pts), boolean chains 6 (nesting depth added 131). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::schema::oracle_routines::plan::build_plan_with_tables (cognitive 155) crates/dbx-core/src/schema/oracle_routines/plan.rs:815 — dbx_core::schema::oracle_routines::plan::build_plan_with_tables has cognitive complexity 155 (threshold 15). Drivers by points: if/else 45 (103 pts), match/switch 7 (21 pts), boolean chains 19, loops 7 (12 pts) (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::query_result_export::export_query_result_core_inner (cognitive 146) REDACTED:1168 — dbx_core::data::query_result_export::export_query_result_core_inner has cognitive complexity 146 (threshold 15). Drivers by points: if/else 71 (121 pts), boolean chains 14, loops 3 (8 pts), match/switch 2 (3 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::list_tables_once (cognitive 133) crates/dbx-core/src/schema/mod.rs:2729 — dbx_core::schema::list_tables_once has cognitive complexity 133 (threshold 15). Drivers by points: if/else 61 (111 pts), boolean chains 15, match/switch 3 (7 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_ddl_indexes::prepare_schema_sync_oracle_ddl_core (cognitive 130) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:365 — dbx_core::schema::oracle_ddl_indexes::prepare_schema_sync_oracle_ddl_core has cognitive complexity 130 (threshold 15). Drivers by points: if/else 28 (91 pts), loops 5 (18 pts), match/switch 5 (17 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::dameng::run_steps (cognitive 113) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:388 — dbx_core::schema::native_jobs::operations::dameng::run_steps has cognitive complexity 113 (threshold 15). Drivers by points: if/else 51 (93 pts), boolean chains 18, loops 1, match/switch 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info (cognitive 110) crates/dbx-core/src/schema/mod.rs:18743 — dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info has cognitive complexity 110 (threshold 15). Drivers by points: if/else 46 (81 pts), loops 10 (14 pts), boolean chains 13, match/switch 1 (2 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::run_claimed (cognitive 110) crates/dbx-core/src/schema/native_jobs/operations.rs:777 — dbx_core::schema::native_jobs::operations::run_claimed has cognitive complexity 110 (threshold 15). Drivers by points: if/else 48 (85 pts), match/switch 5 (14 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer_runner::run_transfer (cognitive 105) crates/dbx-core/src/data/transfer_runner.rs:86 — dbx_core::data::transfer_runner::run_transfer has cognitive complexity 105 (threshold 15). Drivers by points: if/else 53 (83 pts), match/switch 10 (17 pts), boolean chains 3, loops 2 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::scheduler::transition::run (cognitive 104) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:535 — dbx_core::schema::native_jobs::operations::scheduler::transition::run has cognitive complexity 104 (threshold 15). Drivers by points: if/else 47 (86 pts), boolean chains 12, match/switch 2 (5 pts), loops 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::query::snapshot_export::write_snapshot_export_with_fetch (cognitive 102) crates/dbx-core/src/query/snapshot_export.rs:70 — dbx_core::query::snapshot_export::write_snapshot_export_with_fetch has cognitive complexity 102 (threshold 15). Drivers by points: if/else 31 (83 pts), loops 6 (14 pts), boolean chains 5 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::ai::agent_loop::run_agent_loop_inner (cognitive 101) crates/dbx-core/src/ai/agent_loop.rs:210 — dbx_core::ai::agent_loop::run_agent_loop_inner has cognitive complexity 101 (threshold 15). Drivers by points: if/else 33 (57 pts), match/switch 9 (23 pts), loops 9 (19 pts), boolean chains 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_mongodb_table (cognitive 96) crates/dbx-core/src/data/transfer.rs:11933 — dbx_core::data::transfer::transfer_mongodb_table has cognitive complexity 96 (threshold 15). Drivers by points: if/else 30 (74 pts), loops 3 (11 pts), match/switch 2 (9 pts), boolean chains 2 (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::transfer::generate_create_table_ddl_with_source_profile (cognitive 95) crates/dbx-core/src/data/transfer.rs:5104 — dbx_core::data::transfer::generate_create_table_ddl_with_source_profile has cognitive complexity 95 (threshold 15). Drivers by points: if/else 27 (73 pts), boolean chains 11, match/switch 5 (8 pts), loops 2 (3 pts) (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::query::do_execute_typed (cognitive 95) REDACTED:1916 — dbx_core::query::do_execute_typed has cognitive complexity 95 (threshold 15). Drivers by points: if/else 41 (73 pts), match/switch 9 (19 pts), boolean chains 3 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::list_objects_once (cognitive 95) crates/dbx-core/src/schema/mod.rs:8934 — dbx_core::schema::list_objects_once has cognitive complexity 95 (threshold 15). Drivers by points: if/else 43 (73 pts), boolean chains 12, match/switch 4 (10 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes (cognitive 87) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:701 — dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes has cognitive complexity 87 (threshold 15). Drivers by points: if/else 26 (50 pts), boolean chains 30, match/switch 3 (5 pts), loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery (cognitive 87) crates/dbx-core/src/schema/oracle_routines/plan/recovery/package_recovery.rs:60 — dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery has cognitive complexity 87 (threshold 15). Drivers by points: if/else 28 (54 pts), match/switch 5 (16 pts), boolean chains 11, loops 4 (6 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::map_column_type (cognitive 84) crates/dbx-core/src/data/transfer.rs:4743 — dbx_core::data::transfer::map_column_type has cognitive complexity 84 (threshold 15). Drivers by points: match/switch 24 (47 pts), if/else 22 (33 pts), boolean chains 4 (nesting depth added 34). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection (cognitive 76) crates/dbx-core/src/persistence/cloud_sync.rs:1236 — dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (52 pts), boolean chains 16, loops 4 (6 pts), match/switch 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::query::execute_in_manual_transaction_with_options (cognitive 75) REDACTED:7085 — dbx_core::query::execute_in_manual_transaction_with_options has cognitive complexity 75 (threshold 15). Drivers by points: if/else 35 (60 pts), match/switch 3 (8 pts), boolean chains 6, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 288 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×284
  • Hotspot: apps/desktop/src/stores/queryStore.ts apps/desktop/src/stores/queryStore.ts:8415 — apps/desktop/src/stores/queryStore.ts changed 256 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 705 in queryStore.useQueryStore.executeTabSql at line 8415. 147 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/stores/queryStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/stores/settingsStore.ts apps/desktop/src/stores/settingsStore.ts:3117 — apps/desktop/src/stores/settingsStore.ts changed 199 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 310 in settingsStore.useSettingsStore.applyEditorSettingsPatch at line 3117. 30 of those changes were fix/bug commits, and the other 169 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/stores/settingsStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/grid/DataGrid.vue apps/desktop/src/components/grid/DataGrid.vue:12005 — apps/desktop/src/components/grid/DataGrid.vue changed 371 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 129 in onGridKeydown at line 12005. 184 of those changes were fix/bug commits, and the other 187 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGrid.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:1004 — apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue changed 186 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 221 in toggle at line 1004. 72 of those changes were fix/bug commits, and the other 114 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/connection/ConnectionDialog.vue apps/desktop/src/components/connection/ConnectionDialog.vue:5087 — apps/desktop/src/components/connection/ConnectionDialog.vue changed 124 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 289 in connectionConfigForSubmit at line 5087. 58 of those changes were fix/bug commits, and the other 66 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/connection/ConnectionDialog.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/App.vue apps/desktop/src/App.vue:4831 — apps/desktop/src/App.vue changed 238 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 136 in handleKeydown at line 4831. 102 of those changes were fix/bug commits, and the other 136 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/App.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/stores/connectionStore.ts apps/desktop/src/stores/connectionStore.ts:8971 — apps/desktop/src/stores/connectionStore.ts changed 180 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in connectionStore.useConnectionStore.loadTreeNodeChildren at line 8971. 89 of those changes were fix/bug commits, and the other 91 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/stores/connectionStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-core/src/data/transfer.rs crates/dbx-core/src/data/transfer.rs:13155 — crates/dbx-core/src/data/transfer.rs changed 155 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in dbx_core::data::transfer::transfer_table_inner at line 13155. 65 of those changes were fix/bug commits, and the other 90 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-core/src/data/transfer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/editor/AiAssistant.vue apps/desktop/src/components/editor/AiAssistant.vue:4100 — apps/desktop/src/components/editor/AiAssistant.vue changed 68 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 241 in send at line 4100. 29 of those changes were fix/bug commits, and the other 39 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/editor/AiAssistant.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-core/src/schema/mod.rs crates/dbx-core/src/schema/mod.rs:2729 — crates/dbx-core/src/schema/mod.rs changed 167 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in dbx_core::schema::list_tables_once at line 2729. 65 of those changes were fix/bug commits, and the other 102 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-core/src/schema/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:5135 — REDACTED changed 82 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 152 in dbx_core::data::database_export::export_database_sql_core_inner_with_phases at line 5135. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/structure/TableStructureEditor.vue apps/desktop/src/components/structure/TableStructureEditor.vue:3511 — apps/desktop/src/components/structure/TableStructureEditor.vue changed 96 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 126 in refreshSqlPreview at line 3511. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/structure/TableStructureEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:3526 — REDACTED changed 113 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in AppState::get_or_create_pool_for_session_inner_with_receipt at line 3526. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/sidebar/ConnectionTree.vue apps/desktop/src/components/sidebar/ConnectionTree.vue:1977 — apps/desktop/src/components/sidebar/ConnectionTree.vue changed 93 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in ensureTreeLoadedForTarget at line 1977. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/sidebar/ConnectionTree.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/lib/sql/sqlCompletion.ts apps/desktop/src/lib/sql/sqlCompletion.ts:3053 — apps/desktop/src/lib/sql/sqlCompletion.ts changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in sqlCompletion.getSqlCompletionContext at line 3053. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/sql/sqlCompletion.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1916 — REDACTED changed 122 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in dbx_core::query::do_execute_typed at line 1916. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src-tauri/src/lib.rs src-tauri/src/lib.rs:1860 — src-tauri/src/lib.rs changed 156 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in dbx::run at line 1860. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- src-tauri/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-sql-schema/src/schema_diff.rs crates/dbx-sql-schema/src/schema_diff.rs:6688 — crates/dbx-sql-schema/src/schema_diff.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 181 in dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl at line 6688. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-sql-schema/src/schema_diff.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/sidebar/TreeItem.vue apps/desktop/src/components/sidebar/TreeItem.vue:278 — apps/desktop/src/components/sidebar/TreeItem.vue changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in getIconInfo at line 278. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/sidebar/TreeItem.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/objects/ObjectBrowser.vue apps/desktop/src/components/objects/ObjectBrowser.vue:3111 — apps/desktop/src/components/objects/ObjectBrowser.vue changed 138 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in confirmRename at line 3111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/objects/ObjectBrowser.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:664 — REDACTED changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 178 in PluginHostBridge.dispatch at line 664. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/composables/useDataGridExport.ts apps/desktop/src/composables/useDataGridExport.ts:1215 — apps/desktop/src/composables/useDataGridExport.ts changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 118 in useDataGridExport.useDataGridExport.exportLocalSnapshot at line 1215. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/composables/useDataGridExport.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/editor/QueryEditor.vue apps/desktop/src/components/editor/QueryEditor.vue:888 — apps/desktop/src/components/editor/QueryEditor.vue changed 169 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in selectStarExpansionTargetForView at line 888. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/editor/QueryEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:7844 — REDACTED changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 117 in dbx_core::data::table_import::import_table_file_core at line 7844. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/lib/settings/settingsTransfer.ts apps/desktop/src/lib/settings/settingsTransfer.ts:661 — apps/desktop/src/lib/settings/settingsTransfer.ts changed 84 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in settingsTransfer.parseSettingsTransferFile at line 661. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/settings/settingsTransfer.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 259 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×275
  • FileTooLong: data/transfer.rs crates/dbx-core/src/data/transfer.rs — FileTooLong — 10584 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 449 free functions. The bar is 500 significant lines; this is 10084 over it, 21.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: stores/queryStore.ts apps/desktop/src/stores/queryStore.ts — FileTooLong — 9074 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: useQueryStore (1189-12278). The bar is 500 significant lines; this is 8574 over it, 18.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: stores/connectionStore.ts apps/desktop/src/stores/connectionStore.ts — FileTooLong — 8909 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: useConnectionStore (487-12305). The bar is 500 significant lines; this is 8409 over it, 17.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: schema/mod.rs crates/dbx-core/src/schema/mod.rs — FileTooLong — 8802 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 408 free functions. The bar is 500 significant lines; this is 8302 over it, 17.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 8125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 436 free functions. The bar is 500 significant lines; this is 7625 over it, 16.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 7794 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: Storage (16 blocks, 266-9725), declaring 149 free functions. The bar is 500 significant lines; this is 7294 over it, 15.59× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6910 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 237 free functions. The bar is 500 significant lines; this is 6410 over it, 13.82× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6317 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: AppState (2 blocks, 491-7860), declaring 112 free functions. The bar is 500 significant lines; this is 5817 over it, 12.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/mysql.rs crates/dbx-driver-mysql/src/mysql.rs — FileTooLong — 5838 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 325 free functions. The bar is 500 significant lines; this is 5338 over it, 11.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 5722 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 215 free functions. The bar is 500 significant lines; this is 5222 over it, 11.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/server.rs crates/dbx-mcp/src/server.rs — FileTooLong — 5278 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: DbxMcpServer (5 blocks, 951-6031), declaring 78 free functions. The bar is 500 significant lines; this is 4778 over it, 10.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/schema_diff.rs crates/dbx-sql-schema/src/schema_diff.rs — FileTooLong — 5171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 148 free functions. The bar is 500 significant lines; this is 4671 over it, 10.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4873 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DbxJdbcPlugin (64-6804). The bar is 500 significant lines; this is 4373 over it, 9.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: backend/tauri.ts apps/desktop/src/lib/backend/tauri.ts — FileTooLong — 4736 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4236 over it, 9.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sql/sqlCompletion.ts apps/desktop/src/lib/sql/sqlCompletion.ts — FileTooLong — 4637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4137 over it, 9.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4466 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 170 free functions. The bar is 500 significant lines; this is 3966 over it, 8.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4388 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3888 over it, 8.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4053 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3553 over it, 8.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/dbx-driver-redis/src/lib.rs — FileTooLong — 3956 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 229 free functions. The bar is 500 significant lines; this is 3456 over it, 7.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: backend/http.ts apps/desktop/src/lib/backend/http.ts — FileTooLong — 3879 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3379 over it, 7.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3611 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 197 free functions. The bar is 500 significant lines; this is 3111 over it, 7.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/ai.rs crates/dbx-ai-provider/src/ai.rs — FileTooLong — 3525 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 150 free functions. The bar is 500 significant lines; this is 3025 over it, 7.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: nacos/http.rs crates/dbx-core/src/admin/nacos/http.rs — FileTooLong — 3332 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: NacosOpenApiAdmin (3 blocks, 167-3436), declaring 69 free functions. The bar is 500 significant lines; this is 2832 over it, 6.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/sqlserver.rs crates/dbx-driver-sqlserver/src/sqlserver.rs — FileTooLong — 3282 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 195 free functions. The bar is 500 significant lines; this is 2782 over it, 6.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/agent_driver.rs crates/dbx-driver-agent/src/agent_driver.rs — FileTooLong — 3207 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 80 free functions. The bar is 500 significant lines; this is 2707 over it, 6.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 250 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_core · ×190
  • dbx_core::data::database_export::export_database_sql_core_inner_with_phases (cyclomatic 152) REDACTED:5135 — dbx_core::data::database_export::export_database_sql_core_inner_with_phases has cyclomatic complexity 152 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::transfer_table_inner (cyclomatic 123) crates/dbx-core/src/data/transfer.rs:13155 — dbx_core::data::transfer::transfer_table_inner has cyclomatic complexity 123 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::table_import::import_table_file_core (cyclomatic 117) REDACTED:7844 — dbx_core::data::table_import::import_table_file_core has cyclomatic complexity 117 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::map_column_type (cyclomatic 107) crates/dbx-core/src/data/transfer.rs:4743 — dbx_core::data::transfer::map_column_type has cyclomatic complexity 107 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_core::schema::list_tables_once (cyclomatic 87) crates/dbx-core/src/schema/mod.rs:2729 — dbx_core::schema::list_tables_once has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::query_result_export::export_query_result_core_inner (cyclomatic 79) REDACTED:1168 — dbx_core::data::query_result_export::export_query_result_core_inner has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::table_export::export_table_data_core_inner (cyclomatic 79) REDACTED:1691 — dbx_core::data::table_export::export_table_data_core_inner has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::query::do_execute_typed (cyclomatic 78) REDACTED:1916 — dbx_core::query::do_execute_typed has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_routines::plan::build_plan_with_tables (cyclomatic 73) crates/dbx-core/src/schema/oracle_routines/plan.rs:815 — dbx_core::schema::oracle_routines::plan::build_plan_with_tables has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info (cyclomatic 65) crates/dbx-core/src/schema/mod.rs:18743 — dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes (cyclomatic 65) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:701 — dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer_runner::run_transfer (cyclomatic 61) crates/dbx-core/src/data/transfer_runner.rs:86 — dbx_core::data::transfer_runner::run_transfer has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::dameng::run_steps (cyclomatic 59) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:388 — dbx_core::schema::native_jobs::operations::dameng::run_steps has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::list_objects_once (cyclomatic 57) crates/dbx-core/src/schema/mod.rs:8934 — dbx_core::schema::list_objects_once has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::ai::agent_loop::run_agent_loop_inner (cyclomatic 55) crates/dbx-core/src/ai/agent_loop.rs:210 — dbx_core::ai::agent_loop::run_agent_loop_inner has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::get_columns_core_for_session_inner_with_pool (cyclomatic 55) crates/dbx-core/src/schema/mod.rs:9821 — dbx_core::schema::get_columns_core_for_session_inner_with_pool has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::run_claimed (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations.rs:777 — dbx_core::schema::native_jobs::operations::run_claimed has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::scheduler::transition::run (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:535 — dbx_core::schema::native_jobs::operations::scheduler::transition::run has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection (cyclomatic 51) crates/dbx-core/src/persistence/cloud_sync.rs:1236 — dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::query::pl_debug::pl_debug_operate_submission_core (cyclomatic 48) crates/dbx-core/src/query/pl_debug.rs:1431 — dbx_core::query::pl_debug::pl_debug_operate_submission_core has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery (cyclomatic 47) crates/dbx-core/src/schema/oracle_routines/plan/recovery/package_recovery.rs:60 — dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::escape_value_typed (cyclomatic 45) crates/dbx-core/src/data/transfer.rs:3956 — dbx_core::data::transfer::escape_value_typed has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::query_result_export::try_export_mysql_query_result_stream (cyclomatic 43) REDACTED:1845 — dbx_core::data::query_result_export::try_export_mysql_query_result_stream has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_core::data::transfer::generate_create_table_ddl_with_source_profile (cyclomatic 43) crates/dbx-core/src/data/transfer.rs:5104 — dbx_core::data::transfer::generate_create_table_ddl_with_source_profile has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_type_evolution::table_guard (cyclomatic 43) crates/dbx-core/src/schema/oracle_type_evolution.rs:409 — dbx_core::schema::oracle_type_evolution::table_guard has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 165 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×156
  • Duplicated block (7 lines × 2) agents/drivers/duckdb/src/schema.rs:422 — agents/drivers/duckdb/src/schema.rs:422-428 | crates/dbx-core/src/schema/mod.rs:8543-8549 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/dbx-ai-provider/src/ai.rs:4168 — crates/dbx-ai-provider/src/ai.rs:4168-4174 | crates/dbx-ai-provider/src/ai.rs:4269-4275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4168` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/mqtt/client.rs:928 — crates/dbx-core/src/admin/mqtt/client.rs:928-934 | crates/dbx-core/src/admin/mqtt/client.rs:958-964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mqtt/client.rs:928` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:988 — crates/dbx-core/src/admin/nacos/http.rs:988-994 | crates/dbx-core/src/admin/nacos/http.rs:1050-1056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:988` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:1666 — crates/dbx-core/src/admin/nacos/http.rs:1666-1672 | crates/dbx-core/src/admin/nacos/http.rs:1693-1699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:1666` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `first_page` to `NacosRoleList` in one and `NacosPermissionList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:3023 — crates/dbx-core/src/admin/nacos/http.rs:3023-3029 | crates/dbx-core/src/admin/nacos/http.rs:3062-3068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/connection/jdbc.rs:904 — crates/dbx-core/src/connection/jdbc.rs:904-910 | crates/dbx-core/src/connection/jdbc.rs:1056-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/connection/jdbc.rs:904` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) REDACTED:7493 — REDACTED:7493-7499 | REDACTED:7537-7543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:8935 — REDACTED:8935-8941 | REDACTED:112-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8935` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:983 — REDACTED:983-989 | crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:688-694 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:687` calls `is_some` and `REDACTED:982` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/data/sqlite_backup.rs:97 — crates/dbx-core/src/data/sqlite_backup.rs:97-103 | crates/dbx-driver-agent/src/agent_service.rs:2779-2785 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/sqlite_backup.rs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/data/transfer.rs:3428 — crates/dbx-core/src/data/transfer.rs:3428-3434 | crates/dbx-core/src/data/transfer.rs:14264-14270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:3428` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/persistence/credential_reset.rs:85 — crates/dbx-core/src/persistence/credential_reset.rs:85-91 | crates/dbx-core/src/persistence/credential_reset.rs:146-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) REDACTED:2938 — REDACTED:2938-2944 | REDACTED:5074-5080 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2938` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) REDACTED:3029 — REDACTED:3029-3035 | REDACTED:3044-3050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3029` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:6158 — REDACTED:6158-6164 | crates/dbx-core/src/persistence/storage/type_execution_receipts.rs:61-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) REDACTED:6799 — REDACTED:6799-6805 | REDACTED:7013-7019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6799` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:3334 — REDACTED:3334-3340 | REDACTED:4065-4071 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:6857 — REDACTED:6857-6863 | REDACTED:6903-6909 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6857` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:231 — crates/dbx-core/src/schema/mod.rs:231-237 | crates/dbx-core/src/schema/mod.rs:258-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:1139 — crates/dbx-core/src/schema/mod.rs:1139-1145 | crates/dbx-core/src/schema/mod.rs:8273-8279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:2703 — crates/dbx-core/src/schema/mod.rs:2703-2710 | crates/dbx-core/src/schema/mod.rs:14568-14574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:2703` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:3235 — crates/dbx-core/src/schema/mod.rs:3235-3241 | crates/dbx-core/src/schema/mod.rs:3256-3262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:10355 — crates/dbx-core/src/schema/mod.rs:10355-10361 | crates/dbx-core/src/schema/mod.rs:10493-10499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:10355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:12296 — crates/dbx-core/src/schema/mod.rs:12296-12303 | crates/dbx-core/src/schema/mod.rs:12373-12379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:12296` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 131 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×131
  • Duplicated block (5 lines × 2) agents/drivers/duckdb/src/schema.rs:248 — agents/drivers/duckdb/src/schema.rs:248-252 | agents/drivers/duckdb/src/schema.rs:371-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/schema.rs:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai.rs:2944 — crates/dbx-ai-provider/src/ai.rs:2944-2948 | crates/dbx-ai-provider/src/ai.rs:3110-3115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:457 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:457-461 | crates/dbx-ai-provider/src/ai_codex_cli.rs:991-995 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codex_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:457` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai_cli_agent.rs:553 — crates/dbx-ai-provider/src/ai_cli_agent.rs:553-557 | crates/dbx-ai-provider/src/ai_cli_agent.rs:592-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:383 — crates/dbx-core/src/admin/consul/blocking.rs:383-387 | crates/dbx-core/src/admin/consul/txn.rs:376-380 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/consul/blocking.rs:383` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/consul/client.rs:178 — crates/dbx-core/src/admin/consul/client.rs:178-182 | crates/dbx-core/src/admin/consul/client.rs:210-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:152 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:152-156 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:218-222 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1154 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1154-1158 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1369-1373 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:623 — crates/dbx-core/src/admin/nacos/http.rs:623-627 | crates/dbx-core/src/admin/nacos/http.rs:649-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:623` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:4033 — crates/dbx-core/src/admin/nacos/http.rs:4033-4037 | crates/dbx-core/src/admin/nacos/http.rs:4097-4101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:4033` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1212 — crates/dbx-core/src/data/mongodb_import_export.rs:1212-1216 | crates/dbx-core/src/data/mongodb_import_export.rs:1252-1256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/mongodb_import_export.rs:1212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:1634 — REDACTED:1634-1639 | REDACTED:2544-2548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1634` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:1306 — REDACTED:1306-1310 | REDACTED:2151-2155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:1353 — REDACTED:1353-1357 | REDACTED:1457-1461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1353` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:3087 — crates/dbx-core/src/persistence/cloud_sync.rs:3087-3091 | crates/dbx-core/src/persistence/cloud_sync.rs:3111-3115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:5121 — REDACTED:5121-5125 | REDACTED:8137-8142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5121` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/query/two_phase_commit.rs:193 — crates/dbx-core/src/query/two_phase_commit.rs:193-197 | crates/dbx-core/src/query/two_phase_commit.rs:353-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/safety/production_safety.rs:1179 — crates/dbx-core/src/safety/production_safety.rs:1179-1183 | crates/dbx-core/src/safety/production_safety.rs:1189-1193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/schema/mod.rs:13003 — crates/dbx-core/src/schema/mod.rs:13003-13007 | crates/dbx-drivers/src/db/questdb.rs:229-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `result` to `db::QueryResult` in one and `QueryResult` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/dameng/rename.rs:131 — crates/dbx-core/src/schema/native_jobs/operations/dameng/rename.rs:131-135 | crates/dbx-core/src/schema/native_jobs/operations/observation.rs:84-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/native_jobs/operations/dameng/rename.rs:131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/schema/oracle_routines/plan/package.rs:185 — crates/dbx-core/src/schema/oracle_routines/plan/package.rs:185-189 | crates/dbx-core/src/schema/oracle_routines/plan/package.rs:211-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/oracle_routines/plan/package.rs:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:195 — REDACTED:195-199 | crates/dbx-core/src/schema/oracle_type_evolution.rs:467-471 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:195` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/schema/oracle_type_details.rs:109 — crates/dbx-core/src/schema/oracle_type_details.rs:109-113 | crates/dbx-core/src/schema/oracle_type_management.rs:130-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/oracle_type_details.rs:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/skills/mod.rs:270 — crates/dbx-core/src/skills/mod.rs:270-274 | crates/dbx-core/src/skills/mod.rs:684-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) crates/dbx-driver-agent/src/agent_offline_export.rs:754 — crates/dbx-driver-agent/src/agent_offline_export.rs:754-758 | crates/dbx-driver-agent/src/agent_offline_export.rs:859-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • + 106 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×129
  • Duplicated block (6 lines × 2) agents/drivers/duckdb/src/schema.rs:551 — agents/drivers/duckdb/src/schema.rs:551-556 | crates/dbx-drivers/src/db/sqlite.rs:1789-1794 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) agents/drivers/duckdb/src/sql.rs:361 — agents/drivers/duckdb/src/sql.rs:361-366 | crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:23-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_codex_cli.rs:107 — crates/dbx-ai-provider/src/ai_codex_cli.rs:107-113 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:248-253 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_cursor_cli.rs:235 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:235-240 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:285-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:173 — crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:173-178 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:184-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:184` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `mut` in one and `&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) crates/dbx-cli/src/main.rs:497 — crates/dbx-cli/src/main.rs:497-502 | crates/dbx-cli/src/main.rs:549-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-cli/src/main.rs:497` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:777 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:777-782 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1368-1373 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/admin/mqtt/client.rs:490 — crates/dbx-core/src/admin/mqtt/client.rs:490-495 | crates/dbx-core/src/admin/mqtt/client.rs:632-637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1285 — crates/dbx-core/src/data/mongodb_import_export.rs:1285-1290 | crates/dbx-core/src/data/mongodb_import_export.rs:1306-1312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/mongodb_import_export.rs:1285` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) REDACTED:3158 — REDACTED:3158-3163 | REDACTED:3256-3261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/data/transfer.rs:7520 — crates/dbx-core/src/data/transfer.rs:7520-7525 | crates/dbx-core/src/data/transfer.rs:7794-7799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:1017 — REDACTED:1017-1022 | REDACTED:1084-1089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1017` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) REDACTED:6161 — REDACTED:6161-6166 | REDACTED:8995-9000 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:8452 — REDACTED:8452-8466 | REDACTED:10152-10157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8452` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) REDACTED:5064 — REDACTED:5064-5069 | crates/dbx-driver-elasticsearch/src/lib.rs:2583-2588 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/query/redis_ops.rs:338 — crates/dbx-core/src/query/redis_ops.rs:338-343 | crates/dbx-core/src/query/redis_ops.rs:370-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:338` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/query/redis_ops.rs:376` calls `transpose` and `crates/dbx-core/src/query/redis_ops.rs:344` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/oracle_routines.rs:382 — crates/dbx-core/src/schema/oracle_routines.rs:382-387 | crates/dbx-core/src/schema/oracle_routines/readback.rs:64-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/oracle_routines.rs:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/oracle_routines/transfer/packages.rs:716 — crates/dbx-core/src/schema/oracle_routines/transfer/packages.rs:716-721 | crates/dbx-core/src/schema/oracle_routines/transfer/packages/pending.rs:160-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/skills/mod.rs:263 — crates/dbx-core/src/skills/mod.rs:263-268 | crates/dbx-core/src/skills/mod.rs:677-682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/dbx-driver-agent/src/agent_driver.rs:524 — crates/dbx-driver-agent/src/agent_driver.rs:524-529 | crates/dbx-driver-agent/src/agent_driver.rs:583-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-agent/src/agent_driver.rs:524` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-driver-agent/src/agent_driver.rs:523` calls `kill` and `crates/dbx-driver-agent/src/agent_driver.rs:582` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/dbx-driver-elasticsearch/src/lib.rs:451 — crates/dbx-driver-elasticsearch/src/lib.rs:451-456 | crates/dbx-drivers/src/db/solr_driver.rs:144-149 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-elasticsearch/src/lib.rs:451` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:1452 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1452-1457 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1689-1694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:1452` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) REDACTED:1935 — REDACTED:1935-1940 | REDACTED:1979-1984 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1935` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:1947 — REDACTED:1947-1954 | REDACTED:1991-1996 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1947` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:2513 — REDACTED:2513-2518 | REDACTED:2732-2737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2513` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 104 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×114
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai.rs:1658 — crates/dbx-ai-provider/src/ai.rs:1658-1666 | crates/dbx-ai-provider/src/ai.rs:1688-1696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:1658` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361-369 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:766-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_cursor_cli.rs:338 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:338-346 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:562-570 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_cursor_cli.rs` and `crates/dbx-ai-provider/src/ai_opencode_cli.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_cursor_cli.rs:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_opencode_cli.rs:612 — crates/dbx-ai-provider/src/ai_opencode_cli.rs:612-620 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:637-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_opencode_cli.rs:612` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:1013 — crates/dbx-core/src/admin/nacos/http.rs:1013-1021 | crates/dbx-core/src/admin/nacos/http.rs:1035-1043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:1013` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:2433 — crates/dbx-core/src/admin/nacos/http.rs:2433-2441 | crates/dbx-core/src/admin/nacos/http.rs:2473-2481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `req` to `NacosNamespaceCreate` in one and `NacosNamespaceUpdate` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/ai/agent_tools.rs:902 — crates/dbx-core/src/ai/agent_tools.rs:902-910 | crates/dbx-core/src/ai/agent_tools.rs:1004-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:2437 — REDACTED:2437-2445 | REDACTED:2483-2491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:3728 — REDACTED:3728-3736 | src-tauri/src/commands/connection.rs:2391-2399 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/cloudflare_d1/import.rs:29 — crates/dbx-core/src/data/cloudflare_d1/import.rs:29-37 | REDACTED:4958-4966 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) REDACTED:1400 — REDACTED:1400-1408 | REDACTED:3743-3751 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:3741` calls `get` and `REDACTED:1399` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) REDACTED:1615 — REDACTED:1615-1623 | REDACTED:3602-3610 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1615` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:910 — crates/dbx-core/src/data/mongodb_import_export.rs:910-918 | crates/dbx-core/src/data/mongodb_import_export.rs:1545-1553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/mongodb_import_export.rs:910` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:3037 — crates/dbx-core/src/data/mongodb_import_export.rs:3037-3045 | crates/dbx-core/src/data/mongodb_import_export.rs:3277-3285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/mongodb_import_export.rs:3037` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:1359 — REDACTED:1359-1367 | REDACTED:1463-1471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/transfer.rs:5791 — crates/dbx-core/src/data/transfer.rs:5791-5799 | crates/dbx-core/src/data/transfer.rs:5918-5926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:5791` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:6557 — REDACTED:6557-6565 | REDACTED:6580-6588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6557` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:8580 — REDACTED:8580-8588 | REDACTED:9428-9436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8580` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:2822 — REDACTED:2822-2830 | REDACTED:2853-2861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2822` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:7205 — REDACTED:7205-7213 | REDACTED:7432-7440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/agent_pg_sequences.rs:53 — crates/dbx-core/src/schema/agent_pg_sequences.rs:53-61 | crates/dbx-core/src/schema/kingbase.rs:100-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/exact_metadata.rs:159 — crates/dbx-core/src/schema/exact_metadata.rs:159-167 | crates/dbx-core/src/schema/exact_metadata.rs:192-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/mod.rs:10551 — crates/dbx-core/src/schema/mod.rs:10551-10559 | crates/dbx-core/src/schema/mod.rs:10628-10636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:10551` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/mod.rs:11105 — crates/dbx-core/src/schema/mod.rs:11105-11113 | crates/dbx-core/src/schema/mod.rs:11140-11148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:11105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/mod.rs:17992 — crates/dbx-core/src/schema/mod.rs:17992-18000 | crates/dbx-core/src/schema/mod.rs:18504-18512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 89 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×112
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:279 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:279-286 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:358-365 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:397 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:397-404 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:508-515 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:516` calls `codebuddy_legacy_effort_levels`, `as_ref` and `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:405` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_codex_cli.rs:391 — crates/dbx-ai-provider/src/ai_codex_cli.rs:391-398 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:373-380 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:4024 — crates/dbx-core/src/admin/nacos/http.rs:4024-4031 | crates/dbx-core/src/admin/nacos/http.rs:4088-4095 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:344 — REDACTED:344-351 | crates/dbx-formats/src/text_export.rs:110-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/data/transfer.rs:11099 — crates/dbx-core/src/data/transfer.rs:11099-11106 | crates/dbx-core/src/data/transfer.rs:11132-11139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:11099` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) REDACTED:10242 — REDACTED:10242-10249 | REDACTED:10407-10414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:10242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/document_ops.rs:576 — crates/dbx-core/src/query/document_ops.rs:576-583 | crates/dbx-core/src/query/mongo_ops.rs:563-570 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/document_ops.rs:576` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/document_ops.rs:601 — crates/dbx-core/src/query/document_ops.rs:601-608 | crates/dbx-core/src/query/document_ops.rs:646-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:2212 — REDACTED:2212-2219 | REDACTED:2408-2415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2212` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:2392 — REDACTED:2392-2399 | REDACTED:2423-2430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:7342 — REDACTED:7342-7349 | REDACTED:7370-7377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/redis_ops.rs:194 — crates/dbx-core/src/query/redis_ops.rs:194-201 | crates/dbx-core/src/query/redis_ops.rs:1332-1339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:313 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:313-320 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:344-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/oracle_ddl_indexes.rs:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/schema/oracle_type_details.rs:80 — crates/dbx-core/src/schema/oracle_type_details.rs:80-87 | crates/dbx-core/src/schema/oracle_type_management.rs:107-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/dbx-driver-agent/src/agent_driver.rs:354 — crates/dbx-driver-agent/src/agent_driver.rs:354-361 | crates/dbx-driver-agent/src/agent_driver.rs:383-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-agent/src/agent_manager.rs:1310 — crates/dbx-driver-agent/src/agent_manager.rs:1310-1317 | crates/dbx-driver-agent/src/agent_manager.rs:1333-1340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-agent/src/agent_manager.rs:1310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:594 — crates/dbx-driver-mongodb/src/mongo_driver.rs:594-601 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1867-1874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:1867` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:2861 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2861-2868 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2884-2891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:2861` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:1879 — REDACTED:1879-1886 | REDACTED:9022-9029 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1879` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:5488 — REDACTED:5488-5495 | REDACTED:10330-10337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-redis/src/lib.rs:5534 — crates/dbx-driver-redis/src/lib.rs:5534-5541 | crates/dbx-driver-redis/src/lib.rs:5560-5567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-redis/src/lib.rs:5534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:2465 — crates/dbx-driver-sqlserver/src/sqlserver.rs:2465-2472 | crates/dbx-driver-sqlserver/src/sqlserver.rs:2524-2531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-sqlserver/src/sqlserver.rs:2465` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:16 — crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:16-23 | REDACTED:2112-2119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/dbx-drivers/src/db/duckdb_worker_process.rs:513 — crates/dbx-drivers/src/db/duckdb_worker_process.rs:513-520 | crates/dbx-drivers/src/db/duckdb_worker_process.rs:561-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 87 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×106
  • Duplicated block (10 lines × 2) agents/drivers/duckdb/src/schema.rs:484 — agents/drivers/duckdb/src/schema.rs:484-493 | agents/drivers/duckdb/src/schema.rs:534-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/schema.rs:484` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-ai-provider/src/ai.rs:4272 — crates/dbx-ai-provider/src/ai.rs:4272-4281 | crates/dbx-ai-provider/src/ai.rs:5161-5170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/admin/mqtt/client.rs:523 — crates/dbx-core/src/admin/mqtt/client.rs:523-532 | crates/dbx-core/src/admin/mqtt/client.rs:665-674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mqtt/client.rs:523` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:3156 — crates/dbx-core/src/admin/nacos/http.rs:3156-3165 | crates/dbx-core/src/admin/nacos/http.rs:3172-3181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:3156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/connection/jdbc.rs:990 — crates/dbx-core/src/connection/jdbc.rs:990-999 | crates/dbx-core/src/connection/jdbc.rs:1070-1079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/connection/jdbc.rs:990` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) REDACTED:3083 — REDACTED:3083-3092 | REDACTED:3124-3133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3083` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:3919 — REDACTED:3919-3928 | src-tauri/src/commands/connection.rs:2520-2529 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) REDACTED:7863 — REDACTED:7863-7872 | crates/dbx-driver-support/src/http_tunnel.rs:143-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) REDACTED:8235 — REDACTED:8235-8244 | REDACTED:8276-8285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8235` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:1348 — REDACTED:1348-1357 | REDACTED:3374-3383 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1348` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:3371` calls `get` and `REDACTED:1345` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) REDACTED:1437 — REDACTED:1437-1446 | REDACTED:2312-2321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:914 — REDACTED:914-923 | REDACTED:1018-1027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:7359 — REDACTED:7359-7368 | crates/dbx-core/src/data/transfer.rs:7238-7247 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7359` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/data/transfer.rs:5705 — crates/dbx-core/src/data/transfer.rs:5705-5714 | crates/dbx-core/src/data/transfer.rs:5836-5845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/data/transfer.rs:9518 — crates/dbx-core/src/data/transfer.rs:9518-9527 | crates/dbx-core/src/schema/mod.rs:248-257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:9518` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:5503 — REDACTED:5503-5512 | REDACTED:5534-5544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5503` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) REDACTED:10024 — REDACTED:10024-10033 | REDACTED:10107-10116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:10023` calls `update_app_settings_key_in_tx` and `REDACTED:10106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) REDACTED:5656 — REDACTED:5656-5665 | REDACTED:6050-6059 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/query/pl_debug/transport.rs:243 — crates/dbx-core/src/query/pl_debug/transport.rs:243-252 | crates/dbx-core/src/query/pl_debug/transport.rs:280-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/pl_debug/transport.rs:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/mod.rs:8817 — crates/dbx-core/src/schema/mod.rs:8817-8826 | crates/dbx-core/src/schema/mod.rs:8851-8860 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:8817` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/native_jobs/operations.rs:97 — crates/dbx-core/src/schema/native_jobs/operations.rs:97-106 | crates/dbx-core/src/schema/native_jobs/operations.rs:133-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/native_jobs/operations.rs:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/oracle_routines/execution.rs:94 — crates/dbx-core/src/schema/oracle_routines/execution.rs:94-103 | crates/dbx-core/src/schema/oracle_routines/execution.rs:177-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6125 — crates/dbx-driver-mysql/src/mysql.rs:6125-6134 | crates/dbx-driver-mysql/src/mysql.rs:6334-6343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:9493 — REDACTED:9493-9502 | REDACTED:9859-9868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:9493` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) crates/dbx-driver-redis/src/lib.rs:5342 — crates/dbx-driver-redis/src/lib.rs:5342-5351 | crates/dbx-driver-redis/src/lib.rs:5414-5423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-redis/src/lib.rs:5342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 81 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×85
  • Repeated repair: crates/dbx-core/src/persistence/secret_codec.rs crates/dbx-core/src/persistence/secret_codec.rs:76 — crates/dbx-core/src/persistence/secret_codec.rs changed 20 times in last 90 days and 18 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is SecretCodec::create_credential_recovery_key at line 76), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(dbx-core): 修掉 secret_codec 的 clippy 报错 (#14835)”; “fix(windows): mirror secret-store key into a DPAPI-protected recovery file”; “fix(windows): add recovery for missing credential encryption keys”; “fix(migration): preserve portable keys across devices”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-core/src/persistence/secret_codec.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/table/tableEditing.ts apps/desktop/src/lib/table/tableEditing.ts:44 — apps/desktop/src/lib/table/tableEditing.ts changed 14 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is tableEditing.editablePrimaryKeys at line 44), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(postgres): block tuple locator on Greenplum, Cloudberry, Hologres”; “fix(grid): allow keyless editing in Oracle query results”; “fix(doris): keep UNIQUE KEY columns unique-only and scope the nullable row id”; “fix(doris): recognize composite unique keys as table row identifiers”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/table/tableEditing.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/dataGrid/dataGridPagination.ts apps/desktop/src/lib/dataGrid/dataGridPagination.ts:138 — apps/desktop/src/lib/dataGrid/dataGridPagination.ts changed 14 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is dataGridPagination.hasCompleteLocalDataGridResult at line 138), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): treat short first page as incomplete when known total”; “fix(grid): drop full-grid overlay during total row count”; “fix(mysql): disable next page via read only probe”; “fix(grid): keep unpaginated query results on a single page”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/dataGrid/dataGridPagination.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/DataGridCellDetailPanel.vue apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:91 — apps/desktop/src/components/grid/DataGridCellDetailPanel.vue changed 17 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is (anonymous) at line 91), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): support geometry and WKT preview by selection”; “fix(grid): follow boolean text setting in editor and detail views”; “fix(grid): make cell detail layout responsive”; “fix(grid): preview text stored in Oracle BLOB cells”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGridCellDetailPanel.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/tabs/tabResultCache.ts apps/desktop/src/lib/tabs/tabResultCache.ts:819 — apps/desktop/src/lib/tabs/tabResultCache.ts changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is tabResultCache.buildTabResultSnapshot at line 819), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mysql): add read-only decoding for legacy text encodings”; “fix(query): paginate multi-statement query results”; “fix(mysql): disable next page via read only probe”; “fix(grid): speed up join header comments and show type lengths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/tabs/tabResultCache.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/objects/DdlViewDialog.vue apps/desktop/src/components/objects/DdlViewDialog.vue:293 — apps/desktop/src/components/objects/DdlViewDialog.vue changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is loadDdl at line 293), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(oracle): preserve explicit DDL owner and trigger completeness”; “fix(oceanbase): preserve object paging and completion metadata identity”; “fix(editor): copy editor text with CRLF line endings on Windows”; “fix(grid): qualify generated save and copy SQL with database name”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/objects/DdlViewDialog.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:992 — REDACTED changed 12 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is Gbase8sAgent.overrideLocaleParams at line 992), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gbase8s): load column defaults from sysdefaults with literal decoding”; “fix(gbase8s): discover and display views without owner prefix (#12302) (#12510)”; “fix(gbase8s): strip NUL characters from column defaults and table DDL”; “fix(gbase8s): resolve extended column types from sysxtdtypes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/app_settings.rs src-tauri/src/commands/app_settings.rs:129 — src-tauri/src/commands/app_settings.rs changed 13 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dbx::commands::app_settings::set_promoted_build at line 129), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(about): show promoted stable version in macOS About panel”; “fix(window): restore main window geometry in logical units on macOS”; “fix(desktop): keep macOS icon independent from app theme”; “fix(desktop): keep the macOS app icon dark in dark theme”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- src-tauri/src/commands/app_settings.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/DataGridToolbar.vue apps/desktop/src/components/grid/DataGridToolbar.vue:55 — apps/desktop/src/components/grid/DataGridToolbar.vue changed 13 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is toolbarTriggerElement at line 55), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): separate row and column deletion actions”; “fix(grid): start auto-refresh when selecting an interval”; “fix(grid): use destructive color for delete row toolbar”; “fix(grid): anchor toolbar overlay menus to their trigger buttons”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGridToolbar.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/plugins/PluginWorkbenchTab.vue apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:60 — apps/desktop/src/components/plugins/PluginWorkbenchTab.vue changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is refresh at line 60), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "fix(plugins): preserve inactive workbench tab layout geometry" (#13831)”; “fix(plugins): preserve inactive workbench tab layout geometry”; “fix(connection): block passive reconnect for user-closed connections”; “fix(plugins): self-heal restored plugin pages silently”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/plugins/PluginWorkbenchTab.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-plugin-runtime/src/plugins/runtime.rs crates/dbx-plugin-runtime/src/plugins/runtime.rs:1000 — crates/dbx-plugin-runtime/src/plugins/runtime.rs changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is UserInputSpec::parse at line 1000), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(plugin-sdk): encode nil capabilities as [] and tolerate null on initialize (#14973)”; “fix(jdbc): explain Java 21 requirement on older plugin launches”; “fix(plugin): preserve reconnected sidecar sessions”; “fix(plugins): coordinate sidecar cleanup across hosts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-plugin-runtime/src/plugins/runtime.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/database/databaseTableDataCapabilities.ts apps/desktop/src/lib/database/databaseTableDataCapabilities.ts:306 — apps/desktop/src/lib/database/databaseTableDataCapabilities.ts changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is databaseTableDataCapabilities.defaultTableDataCapability at line 306), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): allow row inserts on generic JDBC connections”; “fix(databend): save grid edits without an explicit transaction”; “fix(grid): edit keyless postgres tables via ctid row locator”; “fix(duckdb): save grid batch edits without a transaction”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/database/databaseTableDataCapabilities.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/dataGrid/dataGridDetail.ts apps/desktop/src/lib/dataGrid/dataGridDetail.ts:106 — apps/desktop/src/lib/dataGrid/dataGridDetail.ts changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is dataGridDetail.buildDataGridCellDetail at line 106), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mysql): add read-only decoding for legacy text encodings”; “fix(cassandra): render collection values as CQL literals”; “fix(mysql): copy varbinary text values as raw strings”; “fix(grid): copy NULL cells as empty fields”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/dataGrid/dataGridDetail.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/mcp.rs src-tauri/src/commands/mcp.rs:1290 — src-tauri/src/commands/mcp.rs changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is dbx::commands::mcp::mcp_native_binary_path_for at line 1290), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mysql): add read-only decoding for legacy text encodings”; “fix(mcp): stop linux shell probes from suspending tauri dev”; “fix(mcp): clean stale Windows replacement temporary files (#13010)”; “fix(mcp): update pnpm-installed MCP server with @latest”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- src-tauri/src/commands/mcp.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: plugins/sdk/cli/src/lib.rs plugins/sdk/cli/src/lib.rs:797 — plugins/sdk/cli/src/lib.rs changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is dbx_plugin_cli::create_project at line 797), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(plugin-cli): honor CARGO_BUILD_TARGET artifact paths when packaging”; “fix(plugins): cache release builds and align scaffold workflows”; “fix(plugin-cli): isolate Go backend module builds”; “fix(plugin-cli): normalize Windows Go workspace paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- plugins/sdk/cli/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/migration/SecurityMigrationWizard.vue apps/desktop/src/components/migration/SecurityMigrationWizard.vue:31 — apps/desktop/src/components/migration/SecurityMigrationWizard.vue changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is (anonymous) at line 31), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(windows): add recovery for missing credential encryption keys”; “fix(migration): preserve portable keys across devices”; “fix(secrets): unlock REDACTED Service items on retry”; “fix(migration): preserve credential errors and recover failure states”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/migration/SecurityMigrationWizard.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:69 — agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is IrisAgent.resultValue at line 69), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): enable table data editing and add-row for Cache / IRIS”; “fix(iris): display %Boolean columns as stored 1/0 values”; “fix(intersystems): read out-of-range integers via BigDecimal”; “fix(iris): raise jdbc query prefetch for large results”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/TemporalCellEditor.vue apps/desktop/src/components/grid/TemporalCellEditor.vue:180 — apps/desktop/src/components/grid/TemporalCellEditor.vue changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is flushInputValue at line 180), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): commit temporal value editor on blur like CodeMirror sibling”; “fix(grid): save value editor and cell detail edits via Ctrl+S”; “fix(grid): commit and save temporal cell edits on Ctrl+S”; “fix(grid): keep tz-aware Now values and duckdb lockfile in sync”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/TemporalCellEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-core/src/data/csv_export.rs crates/dbx-core/src/data/csv_export.rs:107 — crates/dbx-core/src/data/csv_export.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is dbx_core::data::csv_export::write_table_csv_pages at line 107), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): refresh desktop connection list after MCP mutations”; “fix(neo4j): pick node identity function by server version”; “fix(export): mark NULL as \N in CSV and TSV exports”; “fix(cassandra): use cursor pagination for table data and exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-core/src/data/csv_export.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/transfer.rs src-tauri/src/commands/transfer.rs:23 — src-tauri/src/commands/transfer.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dbx::commands::transfer::start_transfer at line 23), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mysql): add read-only decoding for legacy text encodings”; “fix(data): harden transfer and comparison workflows”; “fix(transfer): clear FK-linked target children first on overwrite”; “fix(doris): preserve aggregate-state bytes in query results”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- src-tauri/src/commands/transfer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-formats/src/csv_export.rs crates/dbx-formats/src/csv_export.rs:200 — crates/dbx-formats/src/csv_export.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is dbx_formats::csv_export::push_csv_value_with_quote_mode at line 200), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(csv): count decimal significant digits across separator”; “fix(clipboard): keep @-prefixed non-ASCII text verbatim”; “fix(grid): keep plain negative numeric text cells unguarded on copy”; “fix(export): neutralize formula injection in CSV/TSV exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- crates/dbx-formats/src/csv_export.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/export/exportFormats.ts apps/desktop/src/lib/export/exportFormats.ts:29 — apps/desktop/src/lib/export/exportFormats.ts changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is exportFormats.formatTsv at line 29), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(export): mark NULL as \N in CSV and TSV exports”; “fix(grid): copy cells containing double quotes verbatim”; “fix(sqlserver): wrap identity inserts with SET IDENTITY_INSERT”; “fix(xugu): preserve spatial SRIDs in exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/lib/export/exportFormats.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/composables/useDataGridColumnResize.ts apps/desktop/src/composables/useDataGridColumnResize.ts:149 — apps/desktop/src/composables/useDataGridColumnResize.ts changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is useDataGridColumnResize.useDataGridColumnResize.initColumnWidths at line 149), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): refit automatic widths on query runs and refreshes”; “fix(grid): invalidate only auto-calculated column widths on font or density changes (#12913)”; “fix(grid): size columns by sampled values and distribute spare width”; “fix(grid): guard DataGrid startup initialization”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/composables/useDataGridColumnResize.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/layout/WelcomeScreen.vue apps/desktop/src/components/layout/WelcomeScreen.vue:62 — apps/desktop/src/components/layout/WelcomeScreen.vue changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is welcomeConnectionSubtitle at line 62), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(update): show stable version for promoted beta builds”; “fix(sidebar): consolidate search options and shorten Redis import labels (#13682)”; “fix(home): polish intro page details and settings highlight”; “fix(theme): allow background image to show in dark mode and IDE themes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/components/layout/WelcomeScreen.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/composables/useDataGridTableMetadataLoaders.ts apps/desktop/src/composables/useDataGridTableMetadataLoaders.ts:206 — apps/desktop/src/composables/useDataGridTableMetadataLoaders.ts changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is useDataGridTableMetadataLoaders.useDataGridTableMetadataLoaders.fetchTableOwner at line 206), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ddl): refresh definitions after external schema changes, keep drafts”; “fix(oceanbase): preserve object paging and completion metadata identity”; “fix(metadata): resolve visible schema for query DDL and loads”; “fix(grid): qualify generated save and copy SQL with database name”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 21:11:37 +08:00' --until='2026-11-14 21:11:37 +08:00' --full-history --no-merges -- apps/desktop/src/composables/useDataGridTableMetadataLoaders.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 60 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_core · ×85
  • dbx_sql_core::sql::split_sql_statement_ranges_with_options (cognitive 208) REDACTED:1584 — dbx_sql_core::sql::split_sql_statement_ranges_with_options has cognitive complexity 208 (threshold 15). Drivers by points: if/else 54 (166 pts), boolean chains 28, loops 3 (12 pts), match/switch 1 (2 pts) (nesting depth added 122). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained (cognitive 111) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1564 — dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained has cognitive complexity 111 (threshold 15). Drivers by points: if/else 32 (71 pts), boolean chains 18, loops 9 (13 pts), match/switch 3 (9 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata (cognitive 104) crates/dbx-sql-core/src/query_execution_sql.rs:1365 — dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata has cognitive complexity 104 (threshold 15). Drivers by points: if/else 30 (74 pts), loops 5 (18 pts), boolean chains 7, match/switch 1 (5 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl (cognitive 94) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:724 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl has cognitive complexity 94 (threshold 15). Drivers by points: if/else 33 (62 pts), boolean chains 18, loops 5 (8 pts), match/switch 2 (6 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_trigger::analyze (cognitive 94) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:409 — dbx_sql_core::object_source_sql::oracle_trigger::analyze has cognitive complexity 94 (threshold 15). Drivers by points: if/else 42 (56 pts), boolean chains 31, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits (cognitive 93) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:600 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits has cognitive complexity 93 (threshold 15). Drivers by points: if/else 17 (62 pts), boolean chains 16, match/switch 2 (8 pts), loops 3 (7 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::oracle_view_rename::rewrite_hints (cognitive 84) crates/dbx-sql-core/src/oracle_view_rename.rs:479 — dbx_sql_core::oracle_view_rename::rewrite_hints has cognitive complexity 84 (threshold 15). Drivers by points: if/else 23 (64 pts), boolean chains 10, loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges (cognitive 82) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:956 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges has cognitive complexity 82 (threshold 15). Drivers by points: if/else 24 (65 pts), boolean chains 11, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_references (cognitive 79) crates/dbx-sql-core/src/object_source_sql.rs:211 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_references has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (52 pts), boolean chains 12, loops 5 (10 pts), match/switch 1 (5 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql_diagnostics::redact_literals (cognitive 73) crates/dbx-sql-core/src/sql_diagnostics.rs:37 — dbx_sql_core::sql_diagnostics::redact_literals has cognitive complexity 73 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 7 (21 pts), boolean chains 9 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass (cognitive 72) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:94 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass has cognitive complexity 72 (threshold 15). Drivers by points: if/else 28 (61 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::mysql_routine_tokens (cognitive 71) REDACTED:2454 — dbx_sql_core::sql::mysql_routine_tokens has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (60 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers_with_table_owner (cognitive 63) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:363 — dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers_with_table_owner has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (41 pts), boolean chains 11, loops 5 (11 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql_analysis::spark_datasource_clause_removals (cognitive 63) crates/dbx-sql-core/src/sql_analysis.rs:613 — dbx_sql_core::sql_analysis::spark_datasource_clause_removals has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (57 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::oracle_plsql_tokens_fallback (cognitive 62) REDACTED:4695 — dbx_sql_core::sql::oracle_plsql_tokens_fallback has cognitive complexity 62 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 6 (16 pts), boolean chains 5 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl (cognitive 60) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:471 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 6 (15 pts), boolean chains 10 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::cypher_read_only::is_proven_read_only_cypher (cognitive 58) crates/dbx-sql-core/src/cypher_read_only.rs:25 — dbx_sql_core::cypher_read_only::is_proven_read_only_cypher has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5 (13 pts), boolean chains 11, match/switch 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::statements (cognitive 53) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:277 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::statements has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl (cognitive 52) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1252 — dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (11 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::sqlserver_control_flow_batch_boundary (cognitive 52) REDACTED:3901 — dbx_sql_core::sql::sqlserver_control_flow_batch_boundary has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (45 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::next_executable_sql_token_with_options (cognitive 48) REDACTED:3734 — dbx_sql_core::sql::next_executable_sql_token_with_options has cognitive complexity 48 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 7 (16 pts), boolean chains 15 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::sqlserver_top_level_tokens (cognitive 46) REDACTED:2076 — dbx_sql_core::sql::sqlserver_top_level_tokens has cognitive complexity 46 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 6 (16 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::validate_oracle_object_source (cognitive 45) crates/dbx-sql-core/src/object_source_sql.rs:736 — dbx_sql_core::object_source_sql::validate_oracle_object_source has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 10, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_core::object_source_sql::rewrite_oracle_table_references (cognitive 44) crates/dbx-sql-core/src/object_source_sql.rs:369 — dbx_sql_core::object_source_sql::rewrite_oracle_table_references has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 14, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches (cognitive 44) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:71 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 2 (5 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 60 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_schema · ×84
  • dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 623) crates/dbx-sql-schema/src/schema_diff.rs:6688 — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl has cognitive complexity 623 (threshold 15). Drivers by points: if/else 135 (507 pts), match/switch 10 (48 pts), loops 13 (39 pts), boolean chains 29 (nesting depth added 436). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan (cognitive 257) crates/dbx-sql-schema/src/native_job_changes/transitions.rs:130 — dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan has cognitive complexity 257 (threshold 15). Drivers by points: if/else 85 (168 pts), boolean chains 37, loops 14 (36 pts), match/switch 6 (16 pts) (nesting depth added 115). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes (cognitive 234) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:16 — dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes has cognitive complexity 234 (threshold 15). Drivers by points: if/else 60 (180 pts), match/switch 9 (32 pts), boolean chains 14, loops 5 (8 pts) (nesting depth added 146). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl (cognitive 193) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs:74 — dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl has cognitive complexity 193 (threshold 15). Drivers by points: if/else 77 (144 pts), boolean chains 29, loops 7 (12 pts), match/switch 6 (8 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::columns::build_column_sql (cognitive 164) crates/dbx-sql-schema/src/table_structure_sql/columns.rs:29 — dbx_sql_schema::table_structure_sql::columns::build_column_sql has cognitive complexity 164 (threshold 15). Drivers by points: if/else 62 (123 pts), boolean chains 29, match/switch 2 (7 pts), loops 3 (5 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::generate_create_table_sql (cognitive 97) crates/dbx-sql-schema/src/schema_diff.rs:5877 — dbx_sql_schema::schema_diff::generate_create_table_sql has cognitive complexity 97 (threshold 15). Drivers by points: if/else 38 (84 pts), loops 5 (6 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes (cognitive 85) crates/dbx-sql-schema/src/table_structure_sql/oracle_foreign_keys.rs:10 — dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes has cognitive complexity 85 (threshold 15). Drivers by points: if/else 26 (69 pts), boolean chains 9, loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::starrocks_layout::build (cognitive 85) crates/dbx-sql-schema/src/table_structure_sql/starrocks_layout.rs:36 — dbx_sql_schema::table_structure_sql::starrocks_layout::build has cognitive complexity 85 (threshold 15). Drivers by points: if/else 24 (57 pts), boolean chains 14, match/switch 4 (10 pts), loops 2 (4 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan (cognitive 84) crates/dbx-sql-schema/src/native_job_changes/creation.rs:32 — dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan has cognitive complexity 84 (threshold 15). Drivers by points: if/else 35 (70 pts), boolean chains 8, loops 3, match/switch 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations (cognitive 82) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:20 — dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (70 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::native_job_changes::dameng::parts::plan_entries (cognitive 76) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:570 — dbx_sql_schema::native_job_changes::dameng::parts::plan_entries has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 9 (20 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::native_job_mutation_plan (cognitive 75) crates/dbx-sql-schema/src/native_job_changes.rs:233 — dbx_sql_schema::native_job_changes::native_job_mutation_plan has cognitive complexity 75 (threshold 15). Drivers by points: if/else 32 (60 pts), match/switch 4 (9 pts), boolean chains 6 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::diff_columns_with_identifier_options (cognitive 68) crates/dbx-sql-schema/src/schema_diff.rs:3490 — dbx_sql_schema::schema_diff::diff_columns_with_identifier_options has cognitive complexity 68 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 5 (10 pts), boolean chains 6 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::indexes::build_index_sql (cognitive 68) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:7 — dbx_sql_schema::table_structure_sql::indexes::build_index_sql has cognitive complexity 68 (threshold 15). Drivers by points: if/else 22 (62 pts), boolean chains 5, loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::prepare_schema_diff (cognitive 66) crates/dbx-sql-schema/src/schema_diff.rs:2118 — dbx_sql_schema::schema_diff::prepare_schema_diff has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (47 pts), loops 5 (9 pts), boolean chains 8, match/switch 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::consume_postgres_cast_type (cognitive 65) crates/dbx-sql-schema/src/schema_diff.rs:5240 — dbx_sql_schema::schema_diff::consume_postgres_cast_type has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (55 pts), match/switch 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql (cognitive 65) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:557 — dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (52 pts), match/switch 3 (8 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::generate_permission_sync_sql (cognitive 63) crates/dbx-sql-schema/src/schema_diff.rs:1882 — dbx_sql_schema::schema_diff::generate_permission_sync_sql has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (60 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements (cognitive 61) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:577 — dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements has cognitive complexity 61 (threshold 15). Drivers by points: if/else 41 (43 pts), boolean chains 14, match/switch 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_schema::schema_diff::order_diffs_for_execution (cognitive 54) crates/dbx-sql-schema/src/schema_diff.rs:6557 — dbx_sql_schema::schema_diff::order_diffs_for_execution has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 8 (15 pts), match/switch 3 (8 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change (cognitive 53) crates/dbx-sql-schema/src/table_structure_sql/existing_primary_key.rs:8 — dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 18 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::starrocks_partition::validate (cognitive 49) crates/dbx-sql-schema/src/table_structure_sql/starrocks_partition.rs:88 — dbx_sql_schema::table_structure_sql::starrocks_partition::validate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 7, loops 3 (7 pts), match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql (cognitive 48) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:24 — dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 14, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::diff_schema (cognitive 45) crates/dbx-sql-schema/src/schema_diff.rs:2450 — dbx_sql_schema::schema_diff::diff_schema has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (37 pts), loops 6, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::dameng::parts::apply_changes (cognitive 43) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:225 — dbx_sql_schema::native_job_changes::dameng::parts::apply_changes has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 4 (5 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 59 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×73
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:630 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:630-640 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:873-883 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/kafka.rs:630` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1391 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1391-1401 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1411-1421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1391` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1410` calls `thrift_message_type`, `u8` and `crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1390` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/nacos/access_control.rs:182 — crates/dbx-core/src/admin/nacos/access_control.rs:182-192 | crates/dbx-core/src/admin/nacos/access_control.rs:206-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/access_control.rs:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/ai/plugin_tools.rs:844 — crates/dbx-core/src/ai/plugin_tools.rs:844-854 | crates/dbx-mcp/src/plugin_tools.rs:139-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/ai/plugin_tools.rs:844` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:6592 — REDACTED:6592-6602 | REDACTED:7781-7791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6592` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) REDACTED:8271 — REDACTED:8271-8281 | REDACTED:8288-8298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:6024 — REDACTED:6024-6034 | crates/dbx-driver-postgres/src/text_encoding.rs:185-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6024` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:4384 — REDACTED:4384-4394 | REDACTED:4551-4561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4384` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:4713 — REDACTED:4713-4723 | REDACTED:4780-4790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4713` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:8519 — REDACTED:8519-8529 | REDACTED:8556-8566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8519` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:1138 — REDACTED:1138-1148 | REDACTED:1166-1176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/query/redis_ops.rs:1120 — crates/dbx-core/src/query/redis_ops.rs:1120-1130 | crates/dbx-core/src/query/redis_ops.rs:1159-1169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:1120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/observation.rs:262 — crates/dbx-core/src/schema/native_jobs/operations/observation.rs:262-272 | crates/dbx-core/src/schema/native_jobs/operations/observation.rs:280-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/native_jobs/operations/observation.rs:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:2152 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2152-2162 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2175-2185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:2152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-driver-mongodb/src/mongo_driver.rs:2151` calls `Err` and `crates/dbx-driver-mongodb/src/mongo_driver.rs:2174` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5647 — crates/dbx-driver-mysql/src/mysql.rs:5647-5657 | crates/dbx-driver-mysql/src/mysql_compatible.rs:202-212 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:5647` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-driver-redis/src/lib.rs:3324 — crates/dbx-driver-redis/src/lib.rs:3324-3334 | crates/dbx-driver-redis/src/lib.rs:3451-3461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1916 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1916-1926 | crates/dbx-sql-data/src/query_result_sql.rs:3167-3177 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-sqlserver/src/sqlserver.rs:1916` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) crates/dbx-drivers/src/db/proxy_tunnel.rs:381 — crates/dbx-drivers/src/db/proxy_tunnel.rs:381-391 | crates/dbx-drivers/src/db/proxy_tunnel.rs:412-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/proxy_tunnel.rs:381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:329 — crates/dbx-drivers/src/db/rqlite_driver.rs:329-340 | crates/dbx-drivers/src/db/turso_driver.rs:423-433 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:329` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/backend.rs:1322 — crates/dbx-mcp/src/backend.rs:1322-1332 | src-tauri/src/commands/app_settings.rs:282-292 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/backend.rs:1322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `plugin_id` to `&str` in one and `String` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/server.rs:2839 — crates/dbx-mcp/src/server.rs:2839-2849 | crates/dbx-mcp/src/server.rs:4440-4450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/server.rs:5551 — crates/dbx-mcp/src/server.rs:5551-5561 | crates/dbx-mcp/src/server.rs:5763-5773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:5551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/session.rs:103 — crates/dbx-mcp/src/session.rs:103-113 | crates/dbx-mcp/src/session.rs:123-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/json.rs:22 — crates/dbx-sql-data/src/data_grid_extractors/json.rs:22-32 | crates/dbx-sql-data/src/data_grid_extractors/json.rs:41-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:636 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:636-646 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:882-892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:636` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • + 48 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×68
  • ClassTooLong: DbxJdbcPlugin REDACTED:64 — ClassTooLong — 4813 significant lines (blank, comment-only and punctuation-only lines excluded), 324 methods. The bar is 400 significant lines; this is 4413 over it, 12.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Storage REDACTED:266 — ClassTooLong — 4647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 237 methods, 16 blocks, lines 266-9725. The bar is 400 significant lines; this is 4247 over it, 11.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppState REDACTED:491 — ClassTooLong — 4352 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 182 methods, 2 blocks, lines 491-7860. The bar is 400 significant lines; this is 3952 over it, 10.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DbxMcpServer crates/dbx-mcp/src/server.rs:951 — ClassTooLong — 3566 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 97 methods, 5 blocks, lines 951-6031. The bar is 400 significant lines; this is 3166 over it, 8.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DamengAgent REDACTED:68 — ClassTooLong — 2458 significant lines (blank, comment-only and punctuation-only lines excluded), 194 methods. The bar is 400 significant lines; this is 2058 over it, 6.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NacosOpenApiAdmin crates/dbx-core/src/admin/nacos/http.rs:167 — ClassTooLong — 2289 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 66 methods, 3 blocks, lines 167-3436. The bar is 400 significant lines; this is 1889 over it, 5.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useDataGridExport apps/desktop/src/composables/useDataGridExport.ts:1 — ClassTooLong — 2228 significant lines (blank, comment-only and punctuation-only lines excluded), 138 methods. The bar is 400 significant lines; this is 1828 over it, 5.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KafkaAgent agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:42 — ClassTooLong — 2183 significant lines (blank, comment-only and punctuation-only lines excluded), 140 methods. The bar is 400 significant lines; this is 1783 over it, 5.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useDataGridEditor apps/desktop/src/composables/useDataGridEditor.ts:1 — ClassTooLong — 1944 significant lines (blank, comment-only and punctuation-only lines excluded), 166 methods. The bar is 400 significant lines; this is 1544 over it, 4.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MongoAgent REDACTED:102 — ClassTooLong — 1913 significant lines (blank, comment-only and punctuation-only lines excluded), 156 methods. The bar is 400 significant lines; this is 1513 over it, 4.78× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: server REDACTED:647 — ClassTooLong — 1886 significant lines (blank, comment-only and punctuation-only lines excluded), 134 methods, 97 blocks, lines 647-6437. The bar is 400 significant lines; this is 1486 over it, 4.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: server REDACTED:663 — ClassTooLong — 1745 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods, 82 blocks, lines 663-5470. The bar is 400 significant lines; this is 1345 over it, 4.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlDebugSession agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:52 — ClassTooLong — 1648 significant lines (blank, comment-only and punctuation-only lines excluded), 120 methods. The bar is 400 significant lines; this is 1248 over it, 4.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JdbcConnectionPoolRegistry agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:42 — ClassTooLong — 1576 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 1176 over it, 3.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useQueryEditorCompletion apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1 — ClassTooLong — 1304 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 904 over it, 3.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AgentDriverClient crates/dbx-driver-agent/src/agent_driver.rs:1165 — ClassTooLong — 1256 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 131 methods, 4 blocks, lines 1165-4397. The bar is 400 significant lines; this is 856 over it, 3.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlDebugTarget agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:33 — ClassTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 819 over it, 3.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: plDebugSession REDACTED:831 — ClassTooLong — 1073 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods, 58 blocks, lines 831-5740. The bar is 400 significant lines; this is 673 over it, 2.68× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WebBackend crates/dbx-mcp/src/backend.rs:615 — ClassTooLong — 1027 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 4 blocks, lines 615-2855. The bar is 400 significant lines; this is 627 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JdbcExecutor agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:25 — ClassTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 580 over it, 2.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Gbase8sAgent REDACTED:36 — ClassTooLong — 973 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 573 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useSidebarDatabaseSpecificMutationRuntime apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:1 — ClassTooLong — 913 significant lines (blank, comment-only and punctuation-only lines excluded), 91 methods. The bar is 400 significant lines; this is 513 over it, 2.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PostgresLikeAgent agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:13 — ClassTooLong — 855 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 455 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: plDebugNativeEntry agents/drivers/oracle-go/pldebug_manager.go:32 — ClassTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods, 16 blocks, lines 32-1246. The bar is 400 significant lines; this is 418 over it, 2.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Session agents/go-common/iotdb-client-go/client/session.go:74 — ClassTooLong — 817 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods, 56 blocks, lines 74-1691. The bar is 400 significant lines; this is 417 over it, 2.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 43 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×64
  • MethodTooLong: AppState.get_or_create_pool_for_session_inner_with_receipt REDACTED:3526 — MethodTooLong — get_or_create_pool_for_session_inner_with_receipt runs 631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 531 over it, 6.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebBackend.execute_mongo_command crates/dbx-mcp/src/backend.rs:2377 — MethodTooLong — execute_mongo_command runs 402 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 302 over it, 4.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeMappingMatrix.build_rules crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:630 — MethodTooLong — build_rules runs 386 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 286 over it, 3.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DialectCapabilityDescriptor.for_dialect crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:223 — MethodTooLong — for_dialect runs 366 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 266 over it, 3.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JsonRpcServer.dispatch agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — MethodTooLong — dispatch runs 335 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 235 over it, 3.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginHostBridge.dispatch REDACTED:664 — MethodTooLong — dispatch runs 326 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 226 over it, 3.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: plDebugNativePlan.render agents/drivers/oracle-go/pldebug_target_invoke.go:138 — MethodTooLong — render runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxMcpServer.execute_query crates/dbx-mcp/src/server.rs:2660 — MethodTooLong — execute_query runs 257 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SqlStatementSplitter.push_chunk_with_control REDACTED:753 — MethodTooLong — push_chunk_with_control runs 256 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.remove_stale_connection_pool REDACTED:5555 — MethodTooLong — remove_stale_connection_pool runs 255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxMcpServer.execute_batch_request crates/dbx-mcp/src/server.rs:3059 — MethodTooLong — execute_batch_request runs 251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BackupService.export_job crates/dbx-core/src/scheduled_backup/engine.rs:154 — MethodTooLong — export_job runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DialectYaml.from_descriptor_with_caps REDACTED:689 — MethodTooLong — from_descriptor_with_caps runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: plDebugNativeEntry.mutateNativeBreakpoint agents/drivers/oracle-go/pldebug_breakpoint_write.go:46 — MethodTooLong — mutateNativeBreakpoint runs 222 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 122 over it, 2.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.refresh_connections REDACTED:7165 — MethodTooLong — refresh_connections runs 218 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Storage.inspect_data_migration_with_error_cache REDACTED:1918 — MethodTooLong — inspect_data_migration_with_error_cache runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlDebugCompositeOutput.helperDeclarations agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — MethodTooLong — helperDeclarations runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: plDebugNativeEntry.start agents/drivers/oracle-go/pldebug_manager.go:377 — MethodTooLong — start runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PickleUnpickler.dispatch apps/desktop/src/lib/redis/codec/pickle.ts:114 — MethodTooLong — dispatch runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: server.dispatch REDACTED:1107 — MethodTooLong — dispatch runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: server.dispatch REDACTED:1051 — MethodTooLong — dispatch runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxMcpServer.run_product_tool crates/dbx-mcp/src/server.rs:1062 — MethodTooLong — run_product_tool runs 163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MysqlDumpBinaryLiteralNormalizer.normalize REDACTED:1734 — MethodTooLong — normalize runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.prepare_connection_transport_with_claimant REDACTED:4553 — MethodTooLong — prepare_connection_transport_with_claimant runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentRuntimeClient.call_typed_with_policy crates/dbx-driver-agent/src/agent_driver.rs:234 — MethodTooLong — call_typed_with_policy runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 39 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×62
  • Duplicated block (12 lines × 2) crates/dbx-ai-provider/src/ai.rs:2591 — crates/dbx-ai-provider/src/ai.rs:2591-2602 | crates/dbx-ai-provider/src/ai.rs:4227-4238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-cli/src/main.rs:484 — crates/dbx-cli/src/main.rs:484-495 | crates/dbx-cli/src/main.rs:524-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:1381 — REDACTED:1381-1392 | REDACTED:3729-3740 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) REDACTED:5729 — REDACTED:5729-5740 | REDACTED:6404-6415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5729` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) REDACTED:2298 — REDACTED:2298-2309 | REDACTED:2500-2511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2298` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) REDACTED:327 — REDACTED:327-338 | REDACTED:3135-3146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-core/src/data/transfer.rs:10537 — crates/dbx-core/src/data/transfer.rs:10537-10548 | crates/dbx-core/src/data/transfer.rs:10641-10652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:10537` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-core/src/data/transfer_runner.rs:314 — crates/dbx-core/src/data/transfer_runner.rs:314-325 | crates/dbx-core/src/data/transfer_runner.rs:359-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer_runner.rs:314` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:4831 — REDACTED:4831-4842 | REDACTED:4939-4950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4831` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:7747 — REDACTED:7747-7758 | REDACTED:7807-7818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7747` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:2273 — REDACTED:2273-2284 | REDACTED:2293-2304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2273` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:2712 — crates/dbx-driver-agent/src/agent_service.rs:2712-2723 | crates/dbx-driver-agent/src/driver_delta.rs:140-151 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) crates/dbx-driver-elasticsearch/src/lib.rs:1780 — crates/dbx-driver-elasticsearch/src/lib.rs:1780-1791 | crates/dbx-drivers/src/db/solr_driver.rs:445-456 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:64 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:64-75 | crates/dbx-drivers/src/salesforce_oauth.rs:143-154 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2433 — crates/dbx-driver-mysql/src/mysql.rs:2433-2444 | REDACTED:3598-3609 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:2433` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6093 — crates/dbx-driver-mysql/src/mysql.rs:6093-6104 | crates/dbx-driver-mysql/src/mysql.rs:6462-6473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6093` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:2687 — REDACTED:2687-2698 | REDACTED:2719-2730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2687` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) REDACTED:9550 — REDACTED:9550-9561 | REDACTED:9603-9614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:9550` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-sql-core/src/sql_analysis.rs:648 — crates/dbx-sql-core/src/sql_analysis.rs:648-659 | crates/dbx-sql-core/src/sql_analysis.rs:676-687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) crates/dbx-sql-core/src/sql_editability.rs:515 — crates/dbx-sql-core/src/sql_editability.rs:515-526 | crates/dbx-sql-core/src/sql_editability.rs:631-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/sql_editability.rs:515` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:594 — crates/dbx-sql-data/src/query_result_sql.rs:594-605 | crates/dbx-sql-data/src/query_result_sql.rs:3090-3101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/query_result_sql.rs:594` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-sql-data/src/query_result_sql.rs:3089` calls `Some` and `crates/dbx-sql-data/src/query_result_sql.rs:593` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1365 — crates/dbx-sql-data/src/query_result_sql.rs:1365-1376 | crates/dbx-sql-data/src/query_result_sql.rs:2892-2903 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/query_result_sql.rs:1365` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) crates/dbx-web/src/routes/etcd.rs:379 — crates/dbx-web/src/routes/etcd.rs:379-390 | crates/dbx-web/src/routes/etcd.rs:424-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/etcd.rs:379` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) crates/dbx-web/src/routes/export_download.rs:47 — crates/dbx-web/src/routes/export_download.rs:47-58 | crates/dbx-web/src/routes/nacos.rs:995-1006 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/nacos.rs:995` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/dbx-driver-agent/src/agent_runtime.rs:435 — crates/dbx-driver-agent/src/agent_runtime.rs:435-446 | crates/dbx-driver-agent/src/agent_runtime.rs:468-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 37 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×59
  • TooManyMethods: DbxJdbcPlugin REDACTED:64 — TooManyMethods — 324 methods. The bar is 30 methods; this is 294 over it, 10.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Storage REDACTED:266 — TooManyMethods — 237 methods, declared across 3 files: REDACTED (229), persistence/credential_reset.rs (5), storage/type_execution_receipts.rs (3). The bar is 30 methods; this is 207 over it, 7.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DamengAgent REDACTED:68 — TooManyMethods — 194 methods. The bar is 30 methods; this is 164 over it, 6.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppState REDACTED:491 — TooManyMethods — 182 methods, declared across 2 files: REDACTED (181), connection/parameters.rs (1). The bar is 30 methods; this is 152 over it, 6.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OceanBaseOracleAgent agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:66 — TooManyMethods — 163 methods. The bar is 30 methods; this is 133 over it, 5.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MongoAgent REDACTED:102 — TooManyMethods — 156 methods. The bar is 30 methods; this is 126 over it, 5.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: KafkaAgent agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:42 — TooManyMethods — 140 methods. The bar is 30 methods; this is 110 over it, 4.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: server REDACTED:647 — TooManyMethods — 134 methods, declared across 14 files: REDACTED (96), oracle-go/dbms_output.go (10), oracle-go/trigger_metadata.go (6), oracle-go/native_jobs.go (4), +10 more file(s). The bar is 30 methods; this is 104 over it, 4.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentDriverClient crates/dbx-driver-agent/src/agent_driver.rs:1165 — TooManyMethods — 131 methods. The bar is 30 methods; this is 101 over it, 4.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlDebugSession agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:52 — TooManyMethods — 120 methods. The bar is 30 methods; this is 90 over it, 4.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: server agents/drivers/kingbase-go/main.go:137 — TooManyMethods — 98 methods, declared across 3 files: REDACTED (62), kingbase-go/main.go (29), kingbase-go/routine_metadata.go (7). The bar is 30 methods; this is 68 over it, 3.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DbxMcpServer crates/dbx-mcp/src/server.rs:951 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: server REDACTED:663 — TooManyMethods — 89 methods, declared across 3 files: REDACTED (81), xugu/type_members.go (6), xugu/package_members.go (2). The bar is 30 methods; this is 59 over it, 2.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Gbase8sAgent REDACTED:36 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AbstractJdbcAgent agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:19 — TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JdbcExecutor agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:25 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SqlServerLegacyAgent agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:34 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: server agents/drivers/vastbase-go/main.go:144 — TooManyMethods — 68 methods, declared across 4 files: vastbase-go/vastbase_metadata.go (41), vastbase-go/main.go (22), vastbase-go/connection_state.go (3), vastbase-go/runtime_pool.go (2). The bar is 30 methods; this is 38 over it, 2.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConsulClient crates/dbx-core/src/admin/consul/client.rs:16 — TooManyMethods — 66 methods, declared across 9 files: consul/agent.rs (17), consul/client.rs (17), consul/kv.rs (10), consul/session.rs (8), +5 more file(s). The bar is 30 methods; this is 36 over it, 2.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NacosOpenApiAdmin crates/dbx-core/src/admin/nacos/http.rs:167 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: plDebugSession REDACTED:831 — TooManyMethods — 63 methods, declared across 2 files: REDACTED (61), oracle-go/pldebug_native_bridge.go (2). The bar is 30 methods; this is 33 over it, 2.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: IoTDBRpcDataSet agents/go-common/iotdb-client-go/client/rpcdataset.go:15 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentManager crates/dbx-driver-agent/src/agent_manager.rs:881 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlDebugTarget agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:33 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Session agents/go-common/iotdb-client-go/client/session.go:74 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 34 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×59
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 34 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_sql_schema · ×58
  • dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cyclomatic 181) crates/dbx-sql-schema/src/schema_diff.rs:6688 — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl has cyclomatic complexity 181 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan (cyclomatic 136) crates/dbx-sql-schema/src/native_job_changes/transitions.rs:130 — dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan has cyclomatic complexity 136 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl (cyclomatic 115) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs:74 — dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl has cyclomatic complexity 115 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::columns::build_column_sql (cyclomatic 99) crates/dbx-sql-schema/src/table_structure_sql/columns.rs:29 — dbx_sql_schema::table_structure_sql::columns::build_column_sql has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes (cyclomatic 84) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:16 — dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_jobs::references::native_job_reference_queries (cyclomatic 58) crates/dbx-sql-schema/src/native_jobs/references.rs:5 — dbx_sql_schema::native_jobs::references::native_job_reference_queries has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::schema_diff::generate_create_table_sql (cyclomatic 50) crates/dbx-sql-schema/src/schema_diff.rs:5877 — dbx_sql_schema::schema_diff::generate_create_table_sql has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql (cyclomatic 49) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:24 — dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements (cyclomatic 47) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:577 — dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_schema::table_structure_sql::starrocks_layout::build (cyclomatic 46) crates/dbx-sql-schema/src/table_structure_sql/starrocks_layout.rs:36 — dbx_sql_schema::table_structure_sql::starrocks_layout::build has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan (cyclomatic 45) crates/dbx-sql-schema/src/native_job_changes/creation.rs:32 — dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::native_job_mutation_plan (cyclomatic 41) crates/dbx-sql-schema/src/native_job_changes.rs:233 — dbx_sql_schema::native_job_changes::native_job_mutation_plan has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::scheduler_attribute_steps (cyclomatic 40) crates/dbx-sql-schema/src/native_job_changes.rs:518 — dbx_sql_schema::native_job_changes::scheduler_attribute_steps has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change (cyclomatic 40) crates/dbx-sql-schema/src/table_structure_sql/existing_primary_key.rs:8 — dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes (cyclomatic 38) crates/dbx-sql-schema/src/table_structure_sql/oracle_foreign_keys.rs:10 — dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::consume_postgres_cast_type (cyclomatic 36) crates/dbx-sql-schema/src/schema_diff.rs:5240 — dbx_sql_schema::schema_diff::consume_postgres_cast_type has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::dameng::parts::plan_entries (cyclomatic 34) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:570 — dbx_sql_schema::native_job_changes::dameng::parts::plan_entries has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::prepare_schema_diff (cyclomatic 34) crates/dbx-sql-schema/src/schema_diff.rs:2118 — dbx_sql_schema::schema_diff::prepare_schema_diff has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:557 — dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::validate_unique (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:315 — dbx_sql_schema::table_structure_sql::oracle_constraints::validate_unique has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:20 — dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::create_index_sql (cyclomatic 32) crates/dbx-sql-schema/src/schema_diff.rs:4808 — dbx_sql_schema::schema_diff::create_index_sql has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_schema::table_structure_sql::starrocks_partition::validate (cyclomatic 31) crates/dbx-sql-schema/src/table_structure_sql/starrocks_partition.rs:88 — dbx_sql_schema::table_structure_sql::starrocks_partition::validate has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_jobs::native_job_catalog_queries (cyclomatic 30) crates/dbx-sql-schema/src/native_jobs.rs:80 — dbx_sql_schema::native_jobs::native_job_catalog_queries has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::schema_diff::diff_columns_with_identifier_options (cyclomatic 30) crates/dbx-sql-schema/src/schema_diff.rs:3490 — dbx_sql_schema::schema_diff::diff_columns_with_identifier_options has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 33 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_sql_core · ×58
  • dbx_sql_core::sql::split_sql_statement_ranges_with_options (cyclomatic 81) REDACTED:1584 — dbx_sql_core::sql::split_sql_statement_ranges_with_options has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_trigger::analyze (cyclomatic 72) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:409 — dbx_sql_core::object_source_sql::oracle_trigger::analyze has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained (cyclomatic 66) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1564 — dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl (cyclomatic 57) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:724 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::validate_oracle_object_source (cyclomatic 45) crates/dbx-sql-core/src/object_source_sql.rs:736 — dbx_sql_core::object_source_sql::validate_oracle_object_source has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_references (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql.rs:211 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_references has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:600 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata (cyclomatic 41) crates/dbx-sql-core/src/query_execution_sql.rs:1365 — dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges (cyclomatic 38) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:956 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::oracle_view_rename::rewrite_hints (cyclomatic 37) crates/dbx-sql-core/src/oracle_view_rename.rs:479 — dbx_sql_core::oracle_view_rename::rewrite_hints has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::build_executable_object_source_statements_with_mysql_validation_name (cyclomatic 36) crates/dbx-sql-core/src/object_source_sql.rs:520 — dbx_sql_core::object_source_sql::build_executable_object_source_statements_with_mysql_validation_name has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass (cyclomatic 35) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:94 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql::mysql_routine_tokens (cyclomatic 33) REDACTED:2454 — dbx_sql_core::sql::mysql_routine_tokens has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::cypher_read_only::is_proven_read_only_cypher (cyclomatic 32) crates/dbx-sql-core/src/cypher_read_only.rs:25 — dbx_sql_core::cypher_read_only::is_proven_read_only_cypher has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers_with_table_owner (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:363 — dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers_with_table_owner has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1252 — dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::rewrite_oracle_table_references (cyclomatic 30) crates/dbx-sql-core/src/object_source_sql.rs:369 — dbx_sql_core::object_source_sql::rewrite_oracle_table_references has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql_analysis::spark_datasource_clause_removals (cyclomatic 30) crates/dbx-sql-core/src/sql_analysis.rs:613 — dbx_sql_core::sql_analysis::spark_datasource_clause_removals has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql_diagnostics::redact_literals (cyclomatic 30) crates/dbx-sql-core/src/sql_diagnostics.rs:37 — dbx_sql_core::sql_diagnostics::redact_literals has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl (cyclomatic 29) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:471 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql::next_executable_sql_token_with_options (cyclomatic 29) REDACTED:3734 — dbx_sql_core::sql::next_executable_sql_token_with_options has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_self_references (cyclomatic 28) crates/dbx-sql-core/src/object_source_sql.rs:2167 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_self_references has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches (cyclomatic 28) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:71 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::parse_specification (cyclomatic 26) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:729 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::parse_specification has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql (cyclomatic 25) crates/dbx-sql-core/src/object_source_sql.rs:1309 — dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 33 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×53
  • Edited copy of a member (11 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:140 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:140-150 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:152-162 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/admin/nacos/access_control.rs:85 — crates/dbx-core/src/admin/nacos/access_control.rs:85-95 | crates/dbx-core/src/ai/agent_tools.rs:74-85 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-web/src/routes/cloud_sync.rs:277 — crates/dbx-web/src/routes/cloud_sync.rs:277-287 | crates/dbx-web/src/routes/cloud_sync.rs:501-522 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-web/src/routes/plugins.rs:234 — crates/dbx-web/src/routes/plugins.rs:234-244 | crates/dbx-web/src/routes/plugins.rs:332-346 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:71 — agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:71-83 | agents/common/src/main/java/com/dbx/agent/QueryResult.java:69-79 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) agents/drivers/vastbase-go/spatial.go:151 — agents/drivers/vastbase-go/spatial.go:151-161 | agents/drivers/xugu/spatial.go:227-237 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/connection/session_credentials.rs:123 — crates/dbx-core/src/connection/session_credentials.rs:123-133 | crates/dbx-core/src/connection/session_credentials.rs:154-164 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-drivers/src/db/solr_driver.rs:816 — crates/dbx-drivers/src/db/solr_driver.rs:816-826 | crates/dbx-drivers/src/db/solr_driver.rs:828-838 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/persistence/secret_codec.rs:291 — crates/dbx-core/src/persistence/secret_codec.rs:291-306 | crates/dbx-core/src/persistence/secret_codec.rs:789-799 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:1244 — REDACTED:1244-1254 | REDACTED:1260-1273 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-sql-core/src/sql_risk.rs:630 — crates/dbx-sql-core/src/sql_risk.rs:630-640 | crates/dbx-sql-core/src/sql_risk.rs:652-665 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:3879 — REDACTED:3879-3890 | REDACTED:3892-3902 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/admin/consul/acl.rs:350 — crates/dbx-core/src/admin/consul/acl.rs:350-360 | crates/dbx-core/src/admin/consul/enterprise.rs:298-311 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:2145 — REDACTED:2145-2155 | REDACTED:2588-2599 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/schema/native_jobs/references.rs:106 — crates/dbx-core/src/schema/native_jobs/references.rs:106-116 | crates/dbx-core/src/schema/native_jobs/service.rs:733-744 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-ai-provider/src/ai_opencode_cli.rs:304 — crates/dbx-ai-provider/src/ai_opencode_cli.rs:304-314 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:210-221 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-driver-redis/src/lib.rs:2465 — crates/dbx-driver-redis/src/lib.rs:2465-2480 | crates/dbx-driver-redis/src/lib.rs:2493-2503 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-ai-provider/src/ai.rs:1175 — crates/dbx-ai-provider/src/ai.rs:1175-1189 | crates/dbx-ai-provider/src/ai.rs:1191-1201 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/query/pl_debug/compilation.rs:64 — crates/dbx-core/src/query/pl_debug/compilation.rs:64-74 | crates/dbx-core/src/query/pl_debug/inspection.rs:261-271 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-driver-agent/src/agent_service.rs:563 — crates/dbx-driver-agent/src/agent_service.rs:563-576 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1193-1203 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-sql-core/src/object_source_sql.rs:2134 — crates/dbx-sql-core/src/object_source_sql.rs:2134-2145 | crates/dbx-sql-core/src/object_source_sql.rs:2346-2356 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:628 — crates/dbx-core/src/connection/connection_secrets.rs:628-641 | REDACTED:10436-10446 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:1891 — REDACTED:1891-1901 | REDACTED:2004-2015 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-core/src/query/document_ops.rs:415 — crates/dbx-core/src/query/document_ops.rs:415-425 | crates/dbx-core/src/query/mongo_ops.rs:933-943 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/dbx-web/src/routes/plugins.rs:249 — crates/dbx-web/src/routes/plugins.rs:249-259 | crates/dbx-web/src/routes/plugins.rs:264-274 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×51
  • Edited copy of a member (7 corresponding lines) src-tauri/src/commands/cloud_sync.rs:239 — src-tauri/src/commands/cloud_sync.rs:239-245 | src-tauri/src/commands/cloud_sync.rs:419-426 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:3177 — crates/dbx-core/src/persistence/cloud_sync.rs:3177-3183 | crates/dbx-core/src/persistence/state_persistence.rs:541-547 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) agents/drivers/tdengine/src/driver.rs:814 — agents/drivers/tdengine/src/driver.rs:814-820 | agents/drivers/tdengine/src/driver.rs:826-844 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-sql-schema/src/schema_diff.rs:5857 — crates/dbx-sql-schema/src/schema_diff.rs:5857-5864 | crates/dbx-sql-schema/src/schema_diff.rs:5869-5875 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/app_settings.rs:277 — crates/dbx-web/src/routes/app_settings.rs:277-283 | crates/dbx-web/src/routes/app_settings.rs:288-294 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:350 — crates/dbx-web/src/routes/mongodb_import_export.rs:350-356 | crates/dbx-web/src/routes/table_import.rs:401-407 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:307 — REDACTED:307-313 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:354-360 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-ai-provider/src/ai_codex_cli.rs:321 — crates/dbx-ai-provider/src/ai_codex_cli.rs:321-327 | src-tauri/src/commands/mcp.rs:1435-1441 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:3209 — REDACTED:3209-3215 | REDACTED:5646-5652 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:420 — crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:420-426 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:428-439 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:131 — plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:131-137 | plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:355-361 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) agents/drivers/duckdb/src/schema.rs:590 — agents/drivers/duckdb/src/schema.rs:590-597 | crates/dbx-core/src/schema/mod.rs:14132-14138 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/redis.rs:441 — crates/dbx-web/src/routes/redis.rs:441-447 | crates/dbx-web/src/routes/redis.rs:478-484 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:558 — REDACTED:558-564 | REDACTED:597-604 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1244 — crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1244-1250 | crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:107-119 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) plugins/sdk/packager/src/main.rs:560 — plugins/sdk/packager/src/main.rs:560-566 | plugins/sdk/packager/src/main.rs:568-578 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/mq.rs:1104 — crates/dbx-web/src/routes/mq.rs:1104-1110 | crates/dbx-web/src/routes/mq.rs:1142-1148 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-core/src/schema/oracle_type_details.rs:107 — crates/dbx-core/src/schema/oracle_type_details.rs:107-113 | crates/dbx-core/src/schema/oracle_type_management.rs:128-134 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) agents/drivers/access/src/main/java/com/dbx/agent/access/AccessAgent.java:97 — agents/drivers/access/src/main/java/com/dbx/agent/access/AccessAgent.java:97-103 | REDACTED:1348-1357 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:229 — crates/dbx-web/src/routes/mongodb_import_export.rs:229-235 | crates/dbx-web/src/routes/table_import.rs:249-255 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/schema.rs:227 — crates/dbx-web/src/routes/schema.rs:227-238 | crates/dbx-web/src/routes/schema.rs:1267-1273 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:479 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:479-485 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:716-722 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-core/src/schema/mod.rs:1062 — crates/dbx-core/src/schema/mod.rs:1062-1068 | crates/dbx-core/src/schema/normalization.rs:59-69 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/dbx-web/src/routes/document_store.rs:761 — crates/dbx-web/src/routes/document_store.rs:761-767 | crates/dbx-web/src/routes/document_store.rs:772-778 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src-tauri/src/commands/plugins.rs:494 — src-tauri/src/commands/plugins.rs:494-500 | src-tauri/src/commands/plugins.rs:507-513 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 26 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×51
  • Duplicated block (13 lines × 2) agents/drivers/duckdb/src/sql.rs:207 — agents/drivers/duckdb/src/sql.rs:207-219 | agents/drivers/duckdb/src/sql.rs:332-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-ai-provider/src/ai.rs:4171 — crates/dbx-ai-provider/src/ai.rs:4171-4183 | crates/dbx-ai-provider/src/ai.rs:4900-4912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262-274 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:336-348 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:370 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:370-382 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:481-493 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) REDACTED:5641 — REDACTED:5641-5653 | REDACTED:5659-5671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5641` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:8475 — REDACTED:8475-8487 | REDACTED:9006-9018 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:8474` calls `excel_path_streams_incrementally` and `REDACTED:9004` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/data/transfer.rs:5943 — crates/dbx-core/src/data/transfer.rs:5943-5955 | crates/dbx-core/src/data/transfer.rs:5994-6006 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:5943` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/data/transfer_runner.rs:152 — crates/dbx-core/src/data/transfer_runner.rs:152-164 | crates/dbx-core/src/data/transfer_runner.rs:207-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer_runner.rs:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:1124 — REDACTED:1124-1136 | REDACTED:1152-1164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:1180 — crates/dbx-core/src/schema/mod.rs:1180-1192 | crates/dbx-core/src/schema/mod.rs:1204-1216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:1180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:9867 — crates/dbx-core/src/schema/mod.rs:9867-9879 | crates/dbx-core/src/schema/mod.rs:9903-9915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:9867` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:10251 — crates/dbx-core/src/schema/mod.rs:10251-10263 | crates/dbx-core/src/schema/normalization.rs:127-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) crates/dbx-driver-support/src/ddl_scan.rs:74 — crates/dbx-driver-support/src/ddl_scan.rs:74-86 | crates/dbx-driver-support/src/ddl_scan.rs:111-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-support/src/ddl_scan.rs:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:1023 — crates/dbx-drivers/src/db/ssh_tunnel.rs:1023-1035 | crates/dbx-drivers/src/db/ssh_tunnel.rs:1038-1050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/ssh_tunnel.rs:1023` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-mcp/src/server.rs:4038 — crates/dbx-mcp/src/server.rs:4038-4050 | crates/dbx-mcp/src/server.rs:4383-4395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:4038` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:27 — crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:27-39 | crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:104-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:337 — crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:337-349 | crates/dbx-sql-schema/src/table_structure_sql/columns.rs:701-713 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:337` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-tauri-schema/src/commands.rs:267 — crates/dbx-tauri-schema/src/commands.rs:267-279 | crates/dbx-tauri-schema/src/commands.rs:380-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-tauri-schema/src/commands.rs:267` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) crates/dbx-web/src/routes/etcd.rs:401 — crates/dbx-web/src/routes/etcd.rs:401-413 | src-tauri/src/commands/etcd_cmd.rs:266-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) crates/dbx-web/src/routes/etcd.rs:443 — crates/dbx-web/src/routes/etcd.rs:443-455 | src-tauri/src/commands/etcd_cmd.rs:299-311 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/mcp_bridge.rs:1814 — src-tauri/src/commands/mcp_bridge.rs:1814-1826 | src-tauri/src/commands/mcp_bridge.rs:2077-2089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/mcp_bridge.rs:1814` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/mcp_bridge.rs:2169 — src-tauri/src/commands/mcp_bridge.rs:2169-2181 | src-tauri/src/commands/mcp_bridge.rs:2411-2423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/mcp_bridge.rs:2169` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:198 — crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:198-210 | crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:796-808 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/dbx-web/src/routes/query_result_export.rs:79 — crates/dbx-web/src/routes/query_result_export.rs:79-91 | src-tauri/src/commands/query_result_export.rs:334-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/query_result_export.rs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) plugins/sdk/packager/src/main.rs:87 — plugins/sdk/packager/src/main.rs:87-99 | plugins/sdk/packager/src/main.rs:213-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/sdk/packager/src/main.rs:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 26 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×49
  • Edited copy of a member (10 corresponding lines) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:1027 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:1027-1036 | crates/dbx-core/src/admin/mq/adapters/pulsar_version.rs:438-447 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-web/src/routes/mongo.rs:398 — crates/dbx-web/src/routes/mongo.rs:398-407 | crates/dbx-web/src/routes/vector.rs:73-82 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) agents/drivers/argo-go/config.go:997 — agents/drivers/argo-go/config.go:997-1006 | agents/drivers/hive-go/config.go:1037-1046 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:813 — crates/dbx-driver-mysql/src/mysql.rs:813-823 | crates/dbx-driver-mysql/src/mysql.rs:825-834 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-drivers/src/db/couchdb_driver.rs:140 — crates/dbx-drivers/src/db/couchdb_driver.rs:140-149 | crates/dbx-drivers/src/db/couchdb_driver.rs:383-395 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-driver-postgres/src/text_encoding.rs:707 — crates/dbx-driver-postgres/src/text_encoding.rs:707-716 | crates/dbx-driver-postgres/src/text_encoding.rs:721-733 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-core/src/schema/native_jobs/details.rs:23 — crates/dbx-core/src/schema/native_jobs/details.rs:23-32 | REDACTED:263-272 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-core/src/schema/native_jobs/operations.rs:237 — crates/dbx-core/src/schema/native_jobs/operations.rs:237-246 | crates/dbx-plugin-runtime/src/plugins/host.rs:148-158 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:5227 — REDACTED:5227-5239 | REDACTED:5464-5473 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:6156 — REDACTED:6156-6166 | REDACTED:8991-9000 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:117 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:117-128 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:131-140 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:484 — REDACTED:484-494 | crates/dbx-drivers/src/db/solr_driver.rs:99-108 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:157 — crates/dbx-drivers/src/db/meilisearch_driver.rs:157-167 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:458-467 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:130 — crates/dbx-drivers/src/db/meilisearch_driver.rs:130-139 | crates/dbx-drivers/src/db/rqlite_driver.rs:445-457 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:4179 — crates/dbx-driver-mysql/src/mysql.rs:4179-4188 | REDACTED:4498-4507 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:1079 — REDACTED:1079-1088 | agents/drivers/vastbase-go/vastbase_metadata.go:904-913 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-cli/src/agent_skill.rs:297 — crates/dbx-cli/src/agent_skill.rs:297-307 | crates/dbx-core/src/data/dameng_dump.rs:142-151 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:78 — REDACTED:78-92 | crates/dbx-drivers/src/db/turso_driver.rs:38-47 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:502 — REDACTED:502-511 | crates/dbx-core/src/schema/mod.rs:1574-1584 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:1061 — REDACTED:1061-1070 | REDACTED:1082-1094 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-core/src/ai/agent_kv.rs:1202 — crates/dbx-core/src/ai/agent_kv.rs:1202-1211 | crates/dbx-web/src/routes/mongodb_dump.rs:76-85 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-web/src/routes/query.rs:1456 — crates/dbx-web/src/routes/query.rs:1456-1466 | src-tauri/src/commands/query.rs:1073-1082 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src-tauri/src/commands/ssh_prompt.rs:48 — src-tauri/src/commands/ssh_prompt.rs:48-61 | src-tauri/src/commands/ssh_prompt.rs:74-83 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:2920 — REDACTED:2920-2929 | REDACTED:4080-4089 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/dbx-core/src/admin/consul/capabilities.rs:169 — crates/dbx-core/src/admin/consul/capabilities.rs:169-178 | crates/dbx-core/src/admin/consul/capabilities.rs:199-208 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 24 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×47
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:3132 — crates/dbx-core/src/persistence/cloud_sync.rs:3132-3158 | crates/dbx-core/src/persistence/cloud_sync.rs:3160-3175 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:2886 — REDACTED:2886-2898 | REDACTED:2965-2978 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/schema/providers/native.rs:222 — crates/dbx-core/src/schema/providers/native.rs:222-234 | crates/dbx-core/src/schema/providers/native.rs:240-252 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-drivers/src/db/couchdb_driver.rs:702 — crates/dbx-drivers/src/db/couchdb_driver.rs:702-714 | crates/dbx-drivers/src/db/solr_driver.rs:1075-1087 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/persistence/config/governance.rs:225 — crates/dbx-core/src/persistence/config/governance.rs:225-237 | crates/dbx-core/src/persistence/config/governance.rs:239-251 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/schema/mod.rs:10674 — crates/dbx-core/src/schema/mod.rs:10674-10686 | crates/dbx-core/src/schema/mod.rs:10827-10841 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src-tauri/src/commands/plugins.rs:192 — src-tauri/src/commands/plugins.rs:192-206 | src-tauri/src/commands/plugins.rs:241-253 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) agents/drivers/duckdb/src/schema.rs:102 — agents/drivers/duckdb/src/schema.rs:102-118 | agents/drivers/duckdb/src/schema.rs:126-138 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-formats/src/text_export.rs:15 — crates/dbx-formats/src/text_export.rs:15-27 | crates/dbx-formats/src/text_export.rs:29-43 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:145 — REDACTED:145-159 | REDACTED:161-173 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:2805 — REDACTED:2805-2817 | REDACTED:3547-3564 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:157 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:157-169 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:648-664 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:1435 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1435-1447 | crates/dbx-sql-data/src/query_result_sql.rs:2050-2064 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:301 — crates/dbx-core/src/query/mongo_ops.rs:301-313 | crates/dbx-core/src/query/mongo_ops.rs:641-658 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-drivers/src/db/cloudberry.rs:146 — crates/dbx-drivers/src/db/cloudberry.rs:146-165 | crates/dbx-drivers/src/db/opentenbase.rs:112-124 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/schema/mod.rs:3234 — crates/dbx-core/src/schema/mod.rs:3234-3246 | crates/dbx-core/src/schema/mod.rs:3255-3267 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) agents/drivers/tdengine/src/config.rs:127 — agents/drivers/tdengine/src/config.rs:127-141 | agents/drivers/tdengine/src/config.rs:143-155 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:3420 — REDACTED:3420-3435 | agents/drivers/vastbase-go/vastbase_metadata.go:2269-2281 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:2680 — REDACTED:2680-2692 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:927-943 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-web/src/routes/export_download.rs:46 — crates/dbx-web/src/routes/export_download.rs:46-58 | crates/dbx-web/src/routes/nacos.rs:992-1006 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2034 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2034-2051 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:471-483 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1268 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1268-1280 | REDACTED:2756-2769 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-driver-agent/src/agent_manager.rs:126 — crates/dbx-driver-agent/src/agent_manager.rs:126-138 | crates/dbx-driver-agent/src/agent_service.rs:652-664 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:987 — crates/dbx-core/src/admin/nacos/http.rs:987-999 | crates/dbx-core/src/admin/nacos/http.rs:1049-1067 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:542 — crates/dbx-core/src/connection/connection_secrets.rs:542-554 | REDACTED:10278-10290 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 22 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×47
  • Edited copy of a member (8 corresponding lines) src-tauri/src/commands/query.rs:448 — src-tauri/src/commands/query.rs:448-455 | src-tauri/src/commands/query.rs:479-489 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:174 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:174-181 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:183-192 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:10631 — REDACTED:10631-10643 | REDACTED:11213-11220 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:1845 — REDACTED:1845-1852 | REDACTED:5111-5118 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/mq.rs:633 — crates/dbx-web/src/routes/mq.rs:633-640 | crates/dbx-web/src/routes/mq.rs:659-666 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/mq.rs:768 — crates/dbx-web/src/routes/mq.rs:768-775 | crates/dbx-web/src/routes/mq.rs:781-788 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:9348 — REDACTED:9348-9357 | REDACTED:9707-9714 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-driver-support/src/http_tunnel.rs:248 — crates/dbx-driver-support/src/http_tunnel.rs:248-261 | crates/dbx-driver-support/src/http_tunnel.rs:282-289 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:6945 — REDACTED:6945-6952 | REDACTED:6954-6962 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-driver-agent/src/agent_service.rs:3718 — crates/dbx-driver-agent/src/agent_service.rs:3718-3725 | crates/dbx-driver-agent/src/agent_service.rs:3727-3734 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:68 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:68-75 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:145-152 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/mq.rs:1195 — crates/dbx-web/src/routes/mq.rs:1195-1202 | src-tauri/src/commands/mq_cmd.rs:608-615 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/mq.rs:1208 — crates/dbx-web/src/routes/mq.rs:1208-1218 | crates/dbx-web/src/routes/mq.rs:1263-1270 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:322 — REDACTED:322-329 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:410-420 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:328 — crates/dbx-driver-mongodb/src/mongo_driver.rs:328-335 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1166-1173 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/query_result_export.rs:133 — crates/dbx-web/src/routes/query_result_export.rs:133-140 | crates/dbx-web/src/routes/table_export.rs:121-128 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-core/src/data/transfer_rebuild.rs:620 — crates/dbx-core/src/data/transfer_rebuild.rs:620-628 | crates/dbx-core/src/data/transfer_rebuild.rs:639-646 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/schema.rs:166 — crates/dbx-web/src/routes/schema.rs:166-174 | crates/dbx-web/src/routes/schema.rs:215-222 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:137 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:137-144 | crates/dbx-drivers/src/salesforce_oauth.rs:210-217 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:2116 — crates/dbx-driver-mysql/src/mysql.rs:2116-2123 | crates/dbx-driver-mysql/src/mysql.rs:2972-2980 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-core/src/admin/consul/mesh/config_entries.rs:30 — crates/dbx-core/src/admin/consul/mesh/config_entries.rs:30-37 | crates/dbx-core/src/admin/consul/mesh/config_entries.rs:44-51 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:4570 — crates/dbx-core/src/admin/nacos/http.rs:4570-4577 | REDACTED:489-496 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-core/src/schema/agent_pg_sequences.rs:70 — crates/dbx-core/src/schema/agent_pg_sequences.rs:70-77 | crates/dbx-core/src/schema/kingbase.rs:117-124 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/dbx-web/src/routes/redis.rs:906 — crates/dbx-web/src/routes/redis.rs:906-913 | crates/dbx-web/src/routes/redis.rs:918-929 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src-tauri/src/commands/mcp_http_server.rs:80 — src-tauri/src/commands/mcp_http_server.rs:80-87 | src-tauri/src/commands/update_cache.rs:214-221 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 22 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×47
  • Duplicated block (14 lines × 2) agents/drivers/duckdb/src/sql.rs:82 — agents/drivers/duckdb/src/sql.rs:82-95 | crates/dbx-drivers/src/db/duckdb_sql.rs:98-111 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) REDACTED:5069 — REDACTED:5069-5082 | REDACTED:5109-5122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5069` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) REDACTED:7808 — REDACTED:7808-7821 | REDACTED:7836-7849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7808` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) REDACTED:5819 — REDACTED:5819-5832 | REDACTED:5888-5901 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5819` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer.rs:967 — crates/dbx-core/src/data/transfer.rs:967-980 | crates/dbx-core/src/data/transfer.rs:987-1000 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:967` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer.rs:12714 — crates/dbx-core/src/data/transfer.rs:12714-12727 | crates/dbx-core/src/data/transfer/overwrite_clear.rs:38-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:12714` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer/oracle_table_contract.rs:39 — crates/dbx-core/src/data/transfer/oracle_table_contract.rs:39-52 | crates/dbx-core/src/data/transfer/oracle_table_contract.rs:76-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer_runner.rs:216 — crates/dbx-core/src/data/transfer_runner.rs:216-229 | crates/dbx-core/src/data/transfer_runner.rs:324-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer_runner.rs:216` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) REDACTED:1758 — REDACTED:1758-1771 | REDACTED:1792-1805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/query/mongo_ops.rs:1539 — crates/dbx-core/src/query/mongo_ops.rs:1539-1552 | crates/dbx-mcp/src/backend.rs:3028-3041 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/mongo_ops.rs:1539` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1471 — crates/dbx-sql-data/src/query_result_sql.rs:1471-1484 | crates/dbx-sql-data/src/query_result_sql.rs:1610-1623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/query_result_sql.rs:1471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-web/src/routes/document_store.rs:473 — crates/dbx-web/src/routes/document_store.rs:473-486 | crates/dbx-web/src/routes/mongo.rs:800-813 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) src-tauri/src/commands/transfer.rs:64 — src-tauri/src/commands/transfer.rs:64-77 | src-tauri/src/commands/transfer.rs:120-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-drivers/src/db/dynamodb_driver.rs:845 — crates/dbx-drivers/src/db/dynamodb_driver.rs:845-858 | crates/dbx-drivers/src/db/dynamodb_driver.rs:905-918 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/dynamodb_driver.rs:845` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) REDACTED:1667 — REDACTED:1667-1680 | REDACTED:3613-3626 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:203 — crates/dbx-drivers/src/db/rqlite_driver.rs:203-216 | crates/dbx-drivers/src/db/turso_driver.rs:264-277 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:373 — crates/dbx-web/src/routes/mongodb_import_export.rs:373-386 | crates/dbx-web/src/routes/table_import.rs:425-438 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer_runner.rs:392 — crates/dbx-core/src/data/transfer_runner.rs:392-405 | crates/dbx-core/src/data/transfer_runner.rs:458-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer_runner.rs:392` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-driver-support/src/http_tunnel.rs:38 — crates/dbx-driver-support/src/http_tunnel.rs:38-51 | crates/dbx-driver-support/src/http_tunnel.rs:80-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-support/src/http_tunnel.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/dbx-mcp/src/backend.rs:2424 — crates/dbx-mcp/src/backend.rs:2424-2437 | crates/dbx-mcp/src/backend.rs:2447-2460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/backend.rs:2424` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:612 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:612-625 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:780-793 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172-185 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:301-314 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1227 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1227-1240 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1486-1499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1500` calls `put` and `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1241` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) agents/drivers/argo-go/config.go:1026 — agents/drivers/argo-go/config.go:1026-1039 | agents/drivers/hive-go/config.go:1066-1079 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) agents/drivers/argo-go/config.go:1216 — agents/drivers/argo-go/config.go:1216-1229 | agents/drivers/hive-go/config.go:1256-1269 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 22 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×43
  • Edited copy of a member (12 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:3845 — crates/dbx-driver-mysql/src/mysql.rs:3845-3867 | crates/dbx-types/src/metadata_filter.rs:63-74 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/consul.rs:1320 — crates/dbx-web/src/routes/consul.rs:1320-1331 | crates/dbx-web/src/routes/consul.rs:1520-1537 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-drivers/src/db/couchdb_driver.rs:41 — crates/dbx-drivers/src/db/couchdb_driver.rs:41-52 | crates/dbx-drivers/src/db/solr_driver.rs:63-74 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/drivers/kingbase-go/main.go:1162 — agents/drivers/kingbase-go/main.go:1162-1177 | agents/drivers/vastbase-go/main.go:1025-1036 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:1612 — REDACTED:1612-1623 | REDACTED:3599-3610 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:4952 — REDACTED:4952-4963 | REDACTED:5019-5033 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/agents.rs:110 — crates/dbx-web/src/routes/agents.rs:110-121 | crates/dbx-web/src/routes/agents.rs:127-144 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-formats/src/sql_file_zip_package.rs:112 — crates/dbx-formats/src/sql_file_zip_package.rs:112-125 | src-tauri/src/commands/local_backup.rs:221-232 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:213 — crates/dbx-web/src/routes/mongodb_import_export.rs:213-224 | crates/dbx-web/src/routes/table_import.rs:227-244 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-drivers/src/db/cloudberry.rs:83 — crates/dbx-drivers/src/db/cloudberry.rs:83-96 | crates/dbx-drivers/src/db/cloudberry.rs:245-256 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-drivers/src/db/proxy_tunnel.rs:319 — crates/dbx-drivers/src/db/proxy_tunnel.rs:319-330 | crates/dbx-drivers/src/db/proxy_tunnel.rs:332-343 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:1383 — REDACTED:1383-1394 | REDACTED:1401-1412 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:562 — REDACTED:562-573 | REDACTED:186-197 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-core/src/data/transfer.rs:4176 — crates/dbx-core/src/data/transfer.rs:4176-4187 | crates/dbx-core/src/data/transfer.rs:4226-4240 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:78 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:78-90 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:164-175 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/drivers/oracle-go/dbms_output.go:477 — agents/drivers/oracle-go/dbms_output.go:477-489 | agents/drivers/oracle-go/dbms_output.go:498-509 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:643 — crates/dbx-core/src/connection/connection_secrets.rs:643-654 | REDACTED:3637-3651 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:2125 — REDACTED:2125-2136 | REDACTED:402-415 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:1801 — REDACTED:1801-1812 | REDACTED:631-642 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/schema.rs:460 — crates/dbx-web/src/routes/schema.rs:460-471 | crates/dbx-web/src/routes/schema.rs:503-514 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:176 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:176-187 | REDACTED:4684-4699 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/redis.rs:489 — crates/dbx-web/src/routes/redis.rs:489-500 | crates/dbx-web/src/routes/redis.rs:505-518 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-web/src/routes/redis.rs:425 — crates/dbx-web/src/routes/redis.rs:425-436 | crates/dbx-web/src/routes/redis.rs:462-473 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:166 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:166-177 | crates/dbx-drivers/src/salesforce_oauth.rs:236-248 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/dbx-core/src/host/changelog.rs:123 — crates/dbx-core/src/host/changelog.rs:123-134 | crates/dbx-core/src/host/update.rs:212-224 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 18 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×42
  • Duplicated block (15 lines × 2) crates/dbx-ai-provider/src/ai.rs:3175 — crates/dbx-ai-provider/src/ai.rs:3175-3189 | crates/dbx-ai-provider/src/ai.rs:3194-3208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/dbx-ai-provider/src/ai.rs:4016 — crates/dbx-ai-provider/src/ai.rs:4016-4030 | crates/dbx-ai-provider/src/ai.rs:4715-4729 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4016` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:670 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:670-684 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:690-704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:1949 — REDACTED:1949-1963 | REDACTED:1978-1992 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:3148 — REDACTED:3148-3162 | REDACTED:3243-3257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3148` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/data/transfer.rs:15036 — crates/dbx-core/src/data/transfer.rs:15036-15050 | crates/dbx-core/src/data/transfer.rs:15059-15073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:2445 — REDACTED:2445-2459 | crates/dbx-core/src/query/sqlserver_agent_batch.rs:66-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) REDACTED:4631 — REDACTED:4631-4645 | REDACTED:4678-4692 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:4695` calls `should_continue_batch_after_error` and `REDACTED:4646` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) REDACTED:7381 — REDACTED:7381-7395 | REDACTED:7598-7612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:1400 — crates/dbx-core/src/schema/mod.rs:1400-1414 | crates/dbx-core/src/schema/mod.rs:1419-1433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:1400` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/schema/mod.rs:1418` calls `sqlserver_table_comment_sql` and `crates/dbx-core/src/schema/mod.rs:1435` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:2995 — crates/dbx-core/src/schema/mod.rs:2995-3009 | crates/dbx-core/src/schema/mod.rs:3040-3054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:2995` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:18438 — crates/dbx-core/src/schema/mod.rs:18438-18452 | crates/dbx-core/src/schema/mod.rs:18455-18469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/state_calibrator.rs:468 — crates/dbx-core/src/schema/state_calibrator.rs:468-482 | crates/dbx-core/src/schema/state_calibrator.rs:491-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/state_calibrator.rs:468` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) REDACTED:10874 — REDACTED:10874-10888 | REDACTED:10924-10938 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:10874` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1821 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1821-1835 | crates/dbx-sql-data/src/query_result_sql.rs:3065-3079 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-sqlserver/src/sqlserver.rs:1821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1933 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1933-1947 | crates/dbx-sql-data/src/query_result_sql.rs:3191-3205 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:573 — crates/dbx-drivers/src/db/ssh_tunnel.rs:573-587 | crates/dbx-drivers/src/db/ssh_tunnel.rs:612-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/ssh_tunnel.rs:573` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-drivers/src/db/ssh_tunnel.rs:593` calls `server_offers_password` and `crates/dbx-drivers/src/db/ssh_tunnel.rs:627` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) crates/dbx-drivers/src/db/victoriametrics_driver.rs:355 — crates/dbx-drivers/src/db/victoriametrics_driver.rs:355-369 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:396-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/victoriametrics_driver.rs:355` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) REDACTED:3699 — REDACTED:3699-3713 | REDACTED:3750-3764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:902 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:902-916 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1030-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:902` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/dialect_types.rs:30 — crates/dbx-sql-dialect/src/sql_dialect/dialect_types.rs:30-44 | REDACTED:950-964 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) src-tauri/src/commands/cloud_sync.rs:173 — src-tauri/src/commands/cloud_sync.rs:173-187 | src-tauri/src/commands/cloud_sync.rs:357-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src-tauri/src/commands/cloud_sync.rs:172` calls `as_deref` and `src-tauri/src/commands/cloud_sync.rs:356` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) REDACTED:2969 — REDACTED:2969-2983 | REDACTED:3004-3019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2969` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/data/transfer.rs:7461 — crates/dbx-core/src/data/transfer.rs:7461-7475 | crates/dbx-core/src/data/transfer.rs:7554-7568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:7461` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) REDACTED:941 — REDACTED:941-955 | REDACTED:1506-1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:941` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 17 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×41
  • Edited copy of a member (9 corresponding lines) crates/dbx-web/src/routes/mongo.rs:384 — crates/dbx-web/src/routes/mongo.rs:384-392 | crates/dbx-web/src/routes/vector.rs:59-67 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/data/transfer.rs:2073 — crates/dbx-core/src/data/transfer.rs:2073-2081 | crates/dbx-core/src/data/transfer.rs:2087-2097 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/connection/jdbc.rs:449 — crates/dbx-core/src/connection/jdbc.rs:449-457 | crates/dbx-core/src/connection/jdbc.rs:521-530 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-ai-provider/src/ai_codex_cli.rs:309 — crates/dbx-ai-provider/src/ai_codex_cli.rs:309-318 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:350-358 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/admin/consul/mesh/intentions.rs:147 — crates/dbx-core/src/admin/consul/mesh/intentions.rs:147-155 | crates/dbx-core/src/admin/consul/mesh/intentions.rs:161-169 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-tauri-schema/src/commands.rs:661 — crates/dbx-tauri-schema/src/commands.rs:661-669 | crates/dbx-tauri-schema/src/commands.rs:679-687 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/ai/agent_loop.rs:1616 — crates/dbx-core/src/ai/agent_loop.rs:1616-1624 | crates/dbx-core/src/ai/agent_loop.rs:1717-1727 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:268 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:268-276 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:157-168 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-web/src/routes/redis.rs:675 — crates/dbx-web/src/routes/redis.rs:675-691 | crates/dbx-web/src/routes/redis.rs:696-704 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/schema/oracle_routines/references.rs:18 — crates/dbx-core/src/schema/oracle_routines/references.rs:18-26 | crates/dbx-core/src/schema/oracle_routines/transfer/packages/external_types.rs:4-12 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-driver-support/src/http_tunnel.rs:124 — crates/dbx-driver-support/src/http_tunnel.rs:124-132 | crates/dbx-drivers/src/db/proxy_tunnel.rs:85-93 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/drivers/nebula-go/graph_display.go:9 — agents/drivers/nebula-go/graph_display.go:9-17 | agents/drivers/neo4j-go/graph.go:75-83 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/common/src/main/java/com/dbx/agent/JdbcDatabaseInfo.java:70 — agents/common/src/main/java/com/dbx/agent/JdbcDatabaseInfo.java:70-78 | REDACTED:1084-1092 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-ai-provider/src/ai_cli_agent.rs:481 — crates/dbx-ai-provider/src/ai_cli_agent.rs:481-489 | crates/dbx-ai-provider/src/ai_cli_agent.rs:1036-1045 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/common/src/main/java/com/dbx/agent/ExecuteQueryParams.java:55 — agents/common/src/main/java/com/dbx/agent/ExecuteQueryParams.java:55-63 | agents/common/src/main/java/com/dbx/agent/QueryPageParams.java:65-74 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-core/src/connection/session_credentials.rs:189 — crates/dbx-core/src/connection/session_credentials.rs:189-197 | crates/dbx-core/src/connection/session_credentials.rs:199-209 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:367 — crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:367-375 | crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:625-633 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:1565 — crates/dbx-drivers/src/db/meilisearch_driver.rs:1565-1573 | crates/dbx-drivers/src/db/meilisearch_driver.rs:1597-1606 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:593 — crates/dbx-driver-mongodb/src/mongo_driver.rs:593-601 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1863-1874 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) agents/common/src/main/java/com/dbx/agent/ExecuteQueryOptions.java:63 — agents/common/src/main/java/com/dbx/agent/ExecuteQueryOptions.java:63-71 | agents/common/src/main/java/com/dbx/agent/QueryPageOptions.java:73-82 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-ai-provider/src/ai_codex_cli.rs:390 — crates/dbx-ai-provider/src/ai_codex_cli.rs:390-398 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:372-380 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) REDACTED:343 — REDACTED:343-351 | crates/dbx-formats/src/text_export.rs:109-117 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-driver-redis/src/lib.rs:4310 — crates/dbx-driver-redis/src/lib.rs:4310-4318 | crates/dbx-driver-redis/src/lib.rs:4847-4855 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-mcp/src/session.rs:159 — crates/dbx-mcp/src/session.rs:159-167 | crates/dbx-mcp/src/session.rs:171-179 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/dbx-sql-data/src/query_result_sql.rs:2405 — crates/dbx-sql-data/src/query_result_sql.rs:2405-2416 | crates/dbx-sql-data/src/query_result_sql.rs:2444-2452 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 16 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×40
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1306 — `highlightedGrantsSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1486 — `highlight(oracleVisibleSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/OracleSecurityDetails.vue:30 — `highlight(directSql || t(incomplete ? 'oracleSecurity.incomplete' : 'oracleSecurity.noGrants'))` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:176 — `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/ElasticsearchJsonResponsePanel.vue:269 — `highlightedRawResponse` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/JsonTree.vue:272 — `highlightedJson(jsonTreeKeyText(node), node, 'key')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/JsonTree.vue:283 — `highlightedJson(scalarText(node.value), node, 'value')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/AiAssistant.vue:7167 — `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/AiAssistant.vue:7216 — `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/DangerConfirmDialog.vue:159 — `highlightedHead` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/DangerConfirmDialog.vue:163 — `highlightedTail` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/EditorSettingsDialog.vue:12843 — `selectedAiPartnerDescriptionHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/QueryHistory.vue:921 — `highlight(selectedEntry.sql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/QueryHistory.vue:931 — `highlight(selectedEntry.rollback_sql || '')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/SqlParameterDialog.vue:244 — `highlightedSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/SqlPreviewPanel.vue:255 — `highlightedHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/queryEditorHoverContent.ts:75 — `hoverSqlHighlighter(sqlContent,isDark.value?"dark":"light")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/generate/ModelGenerateDialog.vue:227 — `highlightedCode` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/grid/DataGrid.vue:17518 — `highlightedDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/grid/GridSnapshotDialog.vue:156 — `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/layout/UpdateDialog.vue:342 — `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped apps/desktop/src/components/layout/UpdateDialog.vue:450 — `renderedNotes` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/lineage/FieldLineageDialog.vue:419 — `highlight(item.sqlSnippet)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:772 — `markCellHtml(hit, column)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:816 — `markCellHtml(hit, key)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 15 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_drivers · ×39
  • dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cognitive 66) crates/dbx-drivers/src/db/ssh_tunnel.rs:439 — dbx_drivers::db::ssh_tunnel::connect_and_authenticate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (44 pts), match/switch 6 (14 pts), boolean chains 7, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::normalize_sqlite_sql (cognitive 64) crates/dbx-drivers/src/db/sqlite.rs:2780 — dbx_drivers::db::sqlite::normalize_sqlite_sql has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 6 (18 pts), boolean chains 9 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::tokenize_entry (cognitive 60) crates/dbx-drivers/src/db/sqlite.rs:2377 — dbx_drivers::db::sqlite::tokenize_entry has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 5 (13 pts), boolean chains 4 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::ssh_tunnel::forward_loop (cognitive 54) crates/dbx-drivers/src/db/ssh_tunnel.rs:1386 — dbx_drivers::db::ssh_tunnel::forward_loop has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 8 (20 pts), loops 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns (cognitive 48) crates/dbx-drivers/src/db/sqlite.rs:1963 — dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql (cognitive 45) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:9 — dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql has cognitive complexity 45 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 6 (18 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::strip_sql_comments (cognitive 42) crates/dbx-drivers/src/db/sqlite.rs:2119 — dbx_drivers::db::sqlite::strip_sql_comments has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (13 pts), boolean chains 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::couchdb_driver::get_columns (cognitive 37) crates/dbx-drivers/src/db/couchdb_driver.rs:151 — dbx_drivers::db::couchdb_driver::get_columns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (10 pts), match/switch 2 (9 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_drivers::db::couchdb_driver::couchdb_docs_to_table (cognitive 36) crates/dbx-drivers/src/db/couchdb_driver.rs:533 — dbx_drivers::db::couchdb_driver::couchdb_docs_to_table has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), match/switch 3 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::solr_docs_to_table (cognitive 36) crates/dbx-drivers/src/db/solr_driver.rs:910 — dbx_drivers::db::solr_driver::solr_docs_to_table has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), match/switch 3 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::extract_create_table_body (cognitive 36) crates/dbx-drivers/src/db/sqlite.rs:2050 — dbx_drivers::db::sqlite::extract_create_table_body has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 4 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::parse_column_definition (cognitive 36) crates/dbx-drivers/src/db/sqlite.rs:2244 — dbx_drivers::db::sqlite::parse_column_definition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_drivers::db::duckdb_sql::split_sql_statements (cognitive 33) crates/dbx-drivers/src/db/duckdb_sql.rs:11 — dbx_drivers::db::duckdb_sql::split_sql_statements has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 9, loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::dynamodb_driver::json_to_attribute_value (cognitive 33) crates/dbx-drivers/src/db/dynamodb_driver.rs:1446 — dbx_drivers::db::dynamodb_driver::json_to_attribute_value has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (32 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_drivers::db::sqlite::split_table_body_entries (cognitive 32) crates/dbx-drivers/src/db/sqlite.rs:2181 — dbx_drivers::db::sqlite::split_table_body_entries has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::proxy_tunnel::test_proxy_endpoint (cognitive 29) crates/dbx-drivers/src/db/proxy_tunnel.rs:518 — dbx_drivers::db::proxy_tunnel::test_proxy_endpoint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_drivers::db::salesforce_driver::apply_fields_function_limit (cognitive 27) REDACTED:896 — dbx_drivers::db::salesforce_driver::apply_fields_function_limit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, loops 2 (nesting depth added 10). Of this number, 19 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement (cognitive 26) crates/dbx-drivers/src/db/dynamodb_driver.rs:473 — dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::translate_field_operator_filter (cognitive 24) crates/dbx-drivers/src/db/solr_driver.rs:426 — dbx_drivers::db::solr_driver::translate_field_operator_filter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (9 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::translate_solr_document_filter_value (cognitive 23) crates/dbx-drivers/src/db/solr_driver.rs:519 — dbx_drivers::db::solr_driver::translate_solr_document_filter_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::sqlite_unistr_text (cognitive 23) crates/dbx-drivers/src/db/sqlite.rs:416 — dbx_drivers::db::sqlite::sqlite_unistr_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv (cognitive 23) crates/dbx-drivers/src/db/ssh_proxy_command.rs:55 — dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::complete_sql_statements (cognitive 22) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:92 — dbx_drivers::db::cloudflare_d1::sql_lexer::complete_sql_statements has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal (cognitive 22) crates/dbx-drivers/src/db/transport_layer_tunnel.rs:263 — dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, match/switch 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::salesforce_oauth::wait_for_callback (cognitive 21) crates/dbx-drivers/src/salesforce_oauth.rs:309 — dbx_drivers::salesforce_oauth::wait_for_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 14 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: finishOAuth docs/worker.ts:233 — `finishOAuth` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`.
  • Async function without AbortSignal: contributorAvatar docs/worker.ts:288 — `contributorAvatar` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`.
  • Async function without AbortSignal: agentReleaseAsset docs/worker.ts:312 — `agentReleaseAsset` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`.
  • Async function without AbortSignal: request docs/scripts/update-contributors.mjs:25 — `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchRegistry docs/lib/agentRegistrySource.ts:9 — `fetchRegistry` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: requestDraft docs/components/issues/IssueSubmissionClient.tsx:271 — `requestDraft` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchDailyUniques REDACTED:162 — `fetchDailyUniques` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchDownloadCounts REDACTED:209 — `fetchDownloadCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchWindowCounts REDACTED:264 — `fetchWindowCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: tokenFromWrangler deploy/plugin-stats-worker/migrate-archive.mjs:147 — `tokenFromWrangler` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: api deploy/plugin-stats-worker/migrate-archive.mjs:177 — `api` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: apiText deploy/plugin-stats-worker/migrate-archive.mjs:195 — `apiText` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: writeRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:571 — `writeRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: listRemoteRuntimeCacheMetadata apps/desktop/src/lib/tabs/tabResultCache.ts:615 — `listRemoteRuntimeCacheMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: pruneRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:627 — `pruneRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: deleteRemoteRuntimeCacheOwner apps/desktop/src/lib/tabs/tabResultCache.ts:641 — `deleteRemoteRuntimeCacheOwner` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: readRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:654 — `readRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: deleteRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:672 — `deleteRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: logoutWeb apps/desktop/src/lib/startup/startupAuthentication.ts:23 — `logoutWeb` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: dataUrlToBlob apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:416 — `dataUrlToBlob` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: post apps/desktop/src/lib/backend/http.ts:434 — `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: postQueryWithDiagnostics apps/desktop/src/lib/backend/http.ts:445 — `postQueryWithDiagnostics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: get apps/desktop/src/lib/backend/http.ts:494 — `get` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: del apps/desktop/src/lib/backend/http.ts:500 — `del` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: put apps/desktop/src/lib/backend/http.ts:506 — `put` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • + 14 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×38
  • Duplicated block (16 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:1081 — crates/dbx-core/src/admin/nacos/http.rs:1081-1096 | crates/dbx-core/src/admin/nacos/http.rs:1110-1125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:1081` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/dbx-core/src/connection/connection_secrets.rs:991 — crates/dbx-core/src/connection/connection_secrets.rs:991-1006 | crates/dbx-core/src/persistence/cloud_sync.rs:2464-2479 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `crates/dbx-core/src/persistence/cloud_sync.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/persistence/cloud_sync.rs:2480` calls `as_deref` and `crates/dbx-core/src/connection/connection_secrets.rs:1007` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) REDACTED:3843 — REDACTED:3843-3858 | src-tauri/src/commands/connection.rs:2504-2519 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) REDACTED:1675 — REDACTED:1675-1690 | REDACTED:2177-2192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1675` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) REDACTED:1191 — REDACTED:1191-1206 | REDACTED:1255-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:1210` calls `buffered_statement_bytes`, `sql_file_statement_batch_is_full` and `REDACTED:1271` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) REDACTED:5461 — REDACTED:5461-5476 | REDACTED:5480-5495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/dbx-core/src/schema/mod.rs:10193 — crates/dbx-core/src/schema/mod.rs:10193-10208 | crates/dbx-core/src/schema/normalization.rs:103-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1727 — crates/dbx-sql-data/src/query_result_sql.rs:1727-1742 | crates/dbx-sql-data/src/query_result_sql.rs:1827-1842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:649 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:649-664 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:895-910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:649` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:811 — crates/dbx-sql-schema/src/schema_diff.rs:811-826 | crates/dbx-sql-schema/src/schema_diff.rs:833-848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:811` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/dbx-web/src/routes/agents.rs:473 — crates/dbx-web/src/routes/agents.rs:473-488 | src-tauri/src/commands/agents.rs:363-378 — before extracting anything, compare `crates/dbx-web/src/routes/agents.rs` and `src-tauri/src/commands/agents.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:389 — crates/dbx-web/src/routes/mongodb_import_export.rs:389-404 | crates/dbx-web/src/routes/table_import.rs:441-456 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:3084 — crates/dbx-driver-mysql/src/mysql.rs:3084-3099 | crates/dbx-driver-mysql/src/mysql.rs:3122-3137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:3084` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/dbx-core/src/ai/agent_tools.rs:466 — crates/dbx-core/src/ai/agent_tools.rs:466-482 | crates/dbx-core/src/ai/agent_tools.rs:630-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/ai/agent_tools.rs:630` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:5091 — REDACTED:5091-5106 | REDACTED:5121-5136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5091` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:919 — REDACTED:919-934 | REDACTED:1484-1499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/config.go:736 — agents/drivers/argo-go/config.go:736-751 | agents/drivers/hive-go/config.go:776-791 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) REDACTED:31 — REDACTED:31-46 | REDACTED:31-46 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/main.go:220 — agents/drivers/argo-go/main.go:220-235 | agents/drivers/hive-go/main.go:220-235 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:220` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/metadata.go:709 — agents/drivers/argo-go/metadata.go:709-724 | agents/drivers/hive-go/metadata.go:720-735 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:709` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/query.go:391 — agents/drivers/argo-go/query.go:391-406 | agents/drivers/hive-go/query.go:394-409 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/query.go:446 — agents/drivers/argo-go/query.go:446-461 | agents/drivers/hive-go/query.go:449-464 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) REDACTED:483 — REDACTED:483-498 | REDACTED:483-498 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) agents/drivers/etcd-go/kv.go:482 — agents/drivers/etcd-go/kv.go:482-497 | agents/drivers/etcd2-go/kv.go:393-408 — `agents/drivers/etcd-go/kv.go` and `agents/drivers/etcd2-go/kv.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 134 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) REDACTED:1062 — REDACTED:1062-1077 | agents/drivers/vastbase-go/vastbase_metadata.go:887-902 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 13 more in this group — see findings.md.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×36
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:308 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:348 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:364 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:317 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:371 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:533 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:480 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:567 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:789 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:791 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:930 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:994 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:1072 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:1120 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1203 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1232 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1301 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1342 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1438 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/MySqlDashboard.vue:207 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/PostgresDashboard.vue:228 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:735 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:748 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:765 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:902 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×36
  • Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/schema.rs:732 — crates/dbx-web/src/routes/schema.rs:732-747 | crates/dbx-web/src/routes/schema.rs:752-767 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-driver-agent/src/agent_driver.rs:2716 — crates/dbx-driver-agent/src/agent_driver.rs:2716-2735 | crates/dbx-driver-agent/src/agent_driver.rs:2779-2796 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/schema.rs:832 — crates/dbx-web/src/routes/schema.rs:832-846 | crates/dbx-web/src/routes/schema.rs:851-876 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-plugin-runtime/src/plugins/installer.rs:1131 — crates/dbx-plugin-runtime/src/plugins/installer.rs:1131-1146 | crates/dbx-plugin-runtime/src/plugins/marketplace.rs:796-810 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-ai-provider/src/ai_codex_cli.rs:106 — crates/dbx-ai-provider/src/ai_codex_cli.rs:106-123 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:247-261 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1245 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1245-1259 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1266-1284 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/mcp_policy.rs:237 — crates/dbx-web/src/routes/mcp_policy.rs:237-251 | src-tauri/src/commands/mcp_bridge.rs:1284-1298 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:2690 — crates/dbx-driver-mysql/src/mysql.rs:2690-2704 | crates/dbx-driver-mysql/src/mysql.rs:2769-2783 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:247 — REDACTED:247-261 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:301-320 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:315 — crates/dbx-drivers/src/db/meilisearch_driver.rs:315-329 | crates/dbx-drivers/src/db/meilisearch_driver.rs:1037-1059 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:4003 — REDACTED:4003-4018 | REDACTED:8324-8338 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:148 — crates/dbx-driver-mongodb/src/mongo_shell.rs:148-162 | crates/dbx-driver-mongodb/src/mongo_shell.rs:164-178 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:380 — REDACTED:380-401 | REDACTED:320-334 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) agents/drivers/oracle-go/pldebug_statement.go:96 — agents/drivers/oracle-go/pldebug_statement.go:96-110 | agents/drivers/oracle-go/pldebug_statement.go:120-134 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-cli/src/main.rs:751 — crates/dbx-cli/src/main.rs:751-776 | crates/dbx-cli/src/main.rs:783-797 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-core/src/query/document_ops.rs:642 — crates/dbx-core/src/query/document_ops.rs:642-656 | crates/dbx-core/src/query/document_ops.rs:698-712 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-mcp/src/server.rs:5235 — crates/dbx-mcp/src/server.rs:5235-5252 | crates/dbx-mcp/src/server.rs:5257-5271 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-mcp/src/session.rs:102 — crates/dbx-mcp/src/session.rs:102-116 | crates/dbx-mcp/src/session.rs:122-136 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-mcp/src/server.rs:7426 — crates/dbx-mcp/src/server.rs:7426-7440 | crates/dbx-mcp/src/server.rs:7442-7456 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:278 — REDACTED:278-292 | REDACTED:326-340 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) agents/drivers/xugu/spatial.go:456 — agents/drivers/xugu/spatial.go:456-470 | agents/drivers/xugu/spatial.go:472-486 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:336 — agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:336-350 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:353-367 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:3229 — REDACTED:3229-3243 | REDACTED:8066-8084 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/mcp_policy.rs:266 — crates/dbx-web/src/routes/mcp_policy.rs:266-280 | src-tauri/src/commands/mcp_bridge.rs:1326-1342 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:8399 — REDACTED:8399-8413 | REDACTED:8419-8435 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 11 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×35
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×35
  • Edited copy of a member (6 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:3642 — crates/dbx-driver-mysql/src/mysql.rs:3642-3647 | crates/dbx-driver-mysql/src/mysql_compatible.rs:130-136 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:306 — crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:306-313 | crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:315-320 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:663 — crates/dbx-core/src/persistence/cloud_sync.rs:663-670 | crates/dbx-plugin-runtime/src/plugins/manifest.rs:2177-2182 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) agents/drivers/duckdb/src/wire.rs:212 — agents/drivers/duckdb/src/wire.rs:212-217 | crates/dbx-drivers/src/db/duckdb_worker_protocol.rs:57-62 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-drivers/src/db/vector_driver.rs:341 — crates/dbx-drivers/src/db/vector_driver.rs:341-346 | crates/dbx-drivers/src/db/vector_driver.rs:385-390 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src-tauri/src/commands/mcp.rs:1562 — src-tauri/src/commands/mcp.rs:1562-1567 | src-tauri/src/commands/mcp.rs:1639-1644 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-types/src/models/connection.rs:1202 — crates/dbx-types/src/models/connection.rs:1202-1207 | crates/dbx-types/src/models/connection.rs:1209-1216 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src-tauri/src/commands/external_db.rs:27 — src-tauri/src/commands/external_db.rs:27-32 | src-tauri/src/commands/external_sql.rs:64-69 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-mcp/src/server.rs:2045 — crates/dbx-mcp/src/server.rs:2045-2050 | crates/dbx-mcp/src/server.rs:2136-2150 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-sql-data/src/query_result_sql.rs:2550 — crates/dbx-sql-data/src/query_result_sql.rs:2550-2555 | crates/dbx-sql-data/src/query_result_sql.rs:3051-3056 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) REDACTED:1573 — REDACTED:1573-1578 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1443-1448 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-core/src/admin/consul/enterprise.rs:256 — crates/dbx-core/src/admin/consul/enterprise.rs:256-262 | crates/dbx-core/src/admin/consul/enterprise.rs:268-273 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-core/src/admin/consul/mesh/peering.rs:82 — crates/dbx-core/src/admin/consul/mesh/peering.rs:82-87 | crates/dbx-core/src/admin/consul/mesh/peering.rs:92-97 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:1617 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1617-1622 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1624-1629 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-driver-agent/src/startup_cleanup.rs:105 — crates/dbx-driver-agent/src/startup_cleanup.rs:105-110 | crates/dbx-driver-agent/src/startup_cleanup.rs:112-117 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:1511 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1511-1516 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2627-2632 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-mcp/src/backend.rs:1585 — crates/dbx-mcp/src/backend.rs:1585-1590 | crates/dbx-mcp/src/backend.rs:1597-1602 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-mcp/src/server.rs:2013 — crates/dbx-mcp/src/server.rs:2013-2018 | crates/dbx-mcp/src/server.rs:2112-2126 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) REDACTED:3291 — REDACTED:3291-3296 | crates/dbx-driver-agent/src/agent_service.rs:3671-3678 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:139 — crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:139-144 | REDACTED:2703-2708 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:145 — agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:145-150 | agents/common/src/main/java/com/dbx/agent/QueryResult.java:129-134 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:294 — crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:294-300 | crates/dbx-sql-schema/src/table_structure_sql/util.rs:22-27 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeJobSession.java:147 — plugins/jdbc/src/main/java/app/dbx/jdbc/NativeJobSession.java:147-152 | plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:88-93 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeJobSession.java:64 — plugins/jdbc/src/main/java/app/dbx/jdbc/NativeJobSession.java:64-69 | plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:116-121 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/dbx-driver-agent/src/agent_driver.rs:1135 — crates/dbx-driver-agent/src/agent_driver.rs:1135-1140 | crates/dbx-plugin-runtime/src/plugins/runtime.rs:1204-1209 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 10 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×34
  • Swallowed exception (empty catch) plugins/sdk/dev-host/runtime.mjs:32 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/runtime.mjs:74 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/server.mjs:121 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/server.mjs:723 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/ui/App.vue:344 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1954 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2147 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2151 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2170 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2174 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2363 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2393 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/main.ts:110 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/main.ts:121 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:748 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:752 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1010 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1037 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1089 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1113 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3131 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3155 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3178 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3214 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3282 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×33
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:84 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:84-93 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:161-170 | crates/dbx-ai-provider/src/ai_codex_cli.rs:372-387 | crates/dbx-ai-provider/src/ai_grok_cli.rs:131-140 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:95 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:95-118 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:172-195 | crates/dbx-ai-provider/src/ai_codex_cli.rs:342-365 | crates/dbx-ai-provider/src/ai_grok_cli.rs:142-168 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:152 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:152-158 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:232-238 | crates/dbx-ai-provider/src/ai_grok_cli.rs:202-208 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:84-90 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:260 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:260-297 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:334-372 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:751-798 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:222-262 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:259 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:259-271 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:336-355 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:369-381 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:387-403 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/connection/jdbc.rs:914 — crates/dbx-core/src/connection/jdbc.rs:914-947 | crates/dbx-core/src/connection/jdbc.rs:986-1004 | crates/dbx-core/src/connection/jdbc.rs:1066-1084 | crates/dbx-plugin-runtime/src/plugins.rs:197-255 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/data/transfer.rs:10192 — crates/dbx-core/src/data/transfer.rs:10192-10423 | crates/dbx-core/src/data/transfer.rs:10444-10548 | crates/dbx-core/src/data/transfer.rs:10591-10652 | crates/dbx-core/src/data/transfer.rs:10666-10779 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:5396 — REDACTED:5396-5519 | REDACTED:6183-6225 | REDACTED:6495-6560 | REDACTED:10058-10112 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:6183 — REDACTED:6183-6225 | REDACTED:6495-6560 | REDACTED:8057-8117 | REDACTED:8120-8153 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:950 — crates/dbx-core/src/schema/mod.rs:950-1049 | crates/dbx-core/src/schema/mod.rs:2741-3193 | crates/dbx-core/src/schema/mod.rs:8946-9267 | crates/dbx-core/src/schema/mod.rs:9832-10169 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:10848 — crates/dbx-core/src/schema/mod.rs:10848-10866 | crates/dbx-core/src/schema/mod.rs:11079-11090 | crates/dbx-core/src/schema/mod.rs:11204-11215 | crates/dbx-core/src/schema/mod.rs:11223-11234 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-driver-elasticsearch/src/lib.rs:2017 — crates/dbx-driver-elasticsearch/src/lib.rs:2017-2031 | crates/dbx-drivers/src/db/couchdb_driver.rs:491-505 | crates/dbx-drivers/src/db/solr_driver.rs:855-869 | crates/dbx-sql-core/src/query_execution_sql.rs:801-815 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-driver-mysql/src/mysql.rs:6937 — crates/dbx-driver-mysql/src/mysql.rs:6937-6980 | crates/dbx-driver-mysql/src/mysql.rs:6991-7034 | REDACTED:2671-2707 | REDACTED:2716-2751 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:50 — REDACTED:50-72 | crates/dbx-drivers/src/db/influxdb3_driver.rs:74-86 | crates/dbx-drivers/src/db/influxdb_driver.rs:99-111 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:138-150 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:96 — REDACTED:96-119 | crates/dbx-drivers/src/db/influxdb3_driver.rs:88-111 | crates/dbx-drivers/src/db/influxdb_driver.rs:129-152 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:152-175 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:287 — REDACTED:287-322 | crates/dbx-drivers/src/db/rqlite_driver.rs:155-195 | crates/dbx-drivers/src/db/sqlite.rs:2496-2602 | crates/dbx-drivers/src/db/turso_driver.rs:216-256 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-drivers/src/db/sqlite.rs:1508 — crates/dbx-drivers/src/db/sqlite.rs:1508-1560 | crates/dbx-drivers/src/db/sqlite.rs:1562-1637 | crates/dbx-drivers/src/db/sqlite.rs:2604-2649 | crates/dbx-drivers/src/db/sqlite.rs:2651-2746 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-core/src/object_source_sql.rs:211 — crates/dbx-sql-core/src/object_source_sql.rs:211-367 | crates/dbx-sql-core/src/object_source_sql.rs:369-496 | crates/dbx-sql-core/src/object_source_sql.rs:742-892 | crates/dbx-sql-core/src/object_source_sql.rs:2173-2292 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-data/src/query_result_sql.rs:1673 — crates/dbx-sql-data/src/query_result_sql.rs:1673-1719 | crates/dbx-sql-data/src/query_result_sql.rs:1726-1824 | crates/dbx-sql-data/src/query_result_sql.rs:1826-1879 | crates/dbx-sql-data/src/query_result_sql.rs:1938-2048 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/schema_diff.rs:3784 — crates/dbx-sql-schema/src/schema_diff.rs:3784-3880 | crates/dbx-sql-schema/src/schema_diff.rs:4095-4145 | crates/dbx-sql-schema/src/schema_diff.rs:4220-4287 | crates/dbx-sql-schema/src/schema_diff.rs:4289-4334 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:561 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:561-705 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:748-804 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:931-976 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1146-1195 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:806 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:806-853 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:931-976 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1146-1195 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1201-1257 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs:2479 — src-tauri/src/commands/mcp_bridge.rs:2479-2505 | src-tauri/src/commands/mcp_bridge.rs:2507-2532 | src-tauri/src/commands/mcp_bridge.rs:2910-2964 | src-tauri/src/commands/mcp_bridge.rs:2966-3033 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29-55 | agents/common/src/main/java/com/dbx/agent/ConfiguredJdbcAgent.java:132-159 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:129-152 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:197-230 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:276 — agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:276-284 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:935-946 | REDACTED:3041-3052 | REDACTED:6611-6619 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • + 8 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_data · ×32
  • dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial (cognitive 96) REDACTED:2899 — dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial has cognitive complexity 96 (threshold 15). Drivers by points: if/else 55 (84 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::mysql_statement_references_session_variable (cognitive 78) crates/dbx-sql-data/src/query_result_sql.rs:548 — dbx_sql_data::query_result_sql::mysql_statement_references_session_variable has cognitive complexity 78 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 6 (20 pts), boolean chains 7 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_data::data_grid_sql::build_data_grid_save_statements (cognitive 68) REDACTED:1846 — dbx_sql_data::data_grid_sql::build_data_grid_save_statements has cognitive complexity 68 (threshold 15). Drivers by points: if/else 28 (48 pts), boolean chains 9, loops 4 (7 pts), match/switch 1 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::build_sorted_query_sql (cognitive 55) crates/dbx-sql-data/src/query_result_sql.rs:668 — dbx_sql_data::query_result_sql::build_sorted_query_sql has cognitive complexity 55 (threshold 15). Drivers by points: if/else 31 (41 pts), boolean chains 11, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::query_result_sql::build_query_pagination_execution_plan (cognitive 52) crates/dbx-sql-data/src/query_result_sql.rs:146 — dbx_sql_data::query_result_sql::build_query_pagination_execution_plan has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 13, match/switch 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements (cognitive 50) REDACTED:2106 — dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (44 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements (cognitive 48) crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:15 — dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::top_level_sql_tokens (cognitive 45) crates/dbx-sql-data/src/query_result_sql.rs:3064 — dbx_sql_data::query_result_sql::top_level_sql_tokens has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (13 pts), boolean chains 7 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::oceanbase_blob_literals (cognitive 33) REDACTED:4354 — dbx_sql_data::data_grid_sql::oceanbase_blob_literals has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_data::data_grid_sql::validate_data_grid_save (cognitive 31) REDACTED:1450 — dbx_sql_data::data_grid_sql::validate_data_grid_save has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_sql_data::data_grid_extractors::copy_formats::write_dbunit (cognitive 29) crates/dbx-sql-data/src/data_grid_extractors/copy_formats.rs:10 — dbx_sql_data::data_grid_extractors::copy_formats::write_dbunit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection (cognitive 29) crates/dbx-sql-data/src/query_result_sql.rs:1504 — dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters (cognitive 28) REDACTED:640 — dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 8, match/switch 4 (5 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::data_grid_extractors::copy_formats::write_php (cognitive 26) crates/dbx-sql-data/src/data_grid_extractors/copy_formats.rs:79 — dbx_sql_data::data_grid_extractors::copy_formats::write_php has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_tdengine_sql::build_tdengine_data_grid_save_statements (cognitive 25) crates/dbx-sql-data/src/data_grid_tdengine_sql.rs:6 — dbx_sql_data::data_grid_tdengine_sql::build_tdengine_data_grid_save_statements has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::sql_server_count_sql (cognitive 25) crates/dbx-sql-data/src/query_result_sql.rs:1938 — dbx_sql_data::query_result_sql::sql_server_count_sql has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, match/switch 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::query_result_sql::iotdb_tree_count_sql (cognitive 24) crates/dbx-sql-data/src/query_result_sql.rs:1726 — dbx_sql_data::query_result_sql::iotdb_tree_count_sql has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 6 (9 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_sql::format_grid_assignment_sql_literal_with_spatial (cognitive 23) REDACTED:2788 — dbx_sql_data::data_grid_sql::format_grid_assignment_sql_literal_with_spatial has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::build_count_query_sql (cognitive 23) crates/dbx-sql-data/src/query_result_sql.rs:433 — dbx_sql_data::query_result_sql::build_count_query_sql has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_extractors::sql::write_sql_deletes_inserts (cognitive 22) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:328 — dbx_sql_data::data_grid_extractors::sql::write_sql_deletes_inserts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_iotdb_sql::build_iotdb_data_grid_rollback_statements (cognitive 21) crates/dbx-sql-data/src/data_grid_iotdb_sql.rs:42 — dbx_sql_data::data_grid_iotdb_sql::build_iotdb_data_grid_rollback_statements has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::line_has_open_line_comment (cognitive 21) crates/dbx-sql-data/src/query_result_sql.rs:2878 — dbx_sql_data::query_result_sql::line_has_open_line_comment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::last_qualified_identifier_component (cognitive 20) REDACTED:2601 — dbx_sql_data::data_grid_sql::last_qualified_identifier_component has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_extractors::delimited::write_dsv (cognitive 18) crates/dbx-sql-data/src/data_grid_extractors/delimited.rs:19 — dbx_sql_data::data_grid_extractors::delimited::write_dsv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::leading_execution_hint_prefix (cognitive 18) crates/dbx-sql-data/src/query_result_sql.rs:1412 — dbx_sql_data::query_result_sql::leading_execution_hint_prefix has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×31
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:1534 — crates/dbx-core/src/query/mongo_ops.rs:1534-1552 | crates/dbx-mcp/src/backend.rs:3025-3041 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:383 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:383-405 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:631-646 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:2249 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2249-2264 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2271-2286 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/data/transfer.rs:9471 — crates/dbx-core/src/data/transfer.rs:9471-9486 | crates/dbx-core/src/data/transfer.rs:9494-9509 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) agents/drivers/duckdb/src/schema.rs:19 — agents/drivers/duckdb/src/schema.rs:19-42 | agents/drivers/duckdb/src/schema.rs:78-93 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:5051 — REDACTED:5051-5066 | REDACTED:5938-5953 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:757 — crates/dbx-core/src/persistence/cloud_sync.rs:757-772 | src-tauri/src/commands/plugin_storage.rs:104-121 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:62 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:62-77 | crates/dbx-drivers/src/salesforce_oauth.rs:141-156 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-web/src/routes/mongo.rs:413 — crates/dbx-web/src/routes/mongo.rs:413-428 | crates/dbx-web/src/routes/vector.rs:88-103 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:2313 — REDACTED:2313-2339 | agents/drivers/vastbase-go/vastbase_metadata.go:1704-1719 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:69 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:69-84 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:246-265 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-mcp/src/backend.rs:1259 — crates/dbx-mcp/src/backend.rs:1259-1277 | crates/dbx-mcp/src/backend.rs:1753-1768 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:69 — crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:69-86 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:821-836 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:242 — REDACTED:242-257 | agents/drivers/zookeeper/sasl.go:153-168 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-ai-provider/src/ai.rs:2218 — crates/dbx-ai-provider/src/ai.rs:2218-2233 | crates/dbx-ai-provider/src/ai.rs:2253-2275 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/data/transfer.rs:965 — crates/dbx-core/src/data/transfer.rs:965-980 | crates/dbx-core/src/data/transfer.rs:985-1000 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) agents/common/src/main/java/com/dbx/agent/MetadataListConstraints.java:206 — agents/common/src/main/java/com/dbx/agent/MetadataListConstraints.java:206-221 | REDACTED:3975-3990 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/scheduled_backup/store.rs:306 — crates/dbx-core/src/scheduled_backup/store.rs:306-321 | crates/dbx-core/src/scheduled_backup/store.rs:432-451 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:2285 — REDACTED:2285-2300 | REDACTED:2703-2728 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) agents/go-common/go-gssapi/krb5/message_token.go:190 — agents/go-common/go-gssapi/krb5/message_token.go:190-208 | agents/go-common/go-gssapi/krb5/message_token.go:423-438 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:7358 — REDACTED:7358-7373 | crates/dbx-core/src/data/transfer.rs:7237-7254 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/data/mongodb_import_export.rs:2771 — crates/dbx-core/src/data/mongodb_import_export.rs:2771-2788 | crates/dbx-core/src/data/mongodb_import_export.rs:2793-2808 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/schema/mod.rs:14245 — crates/dbx-core/src/schema/mod.rs:14245-14260 | crates/dbx-core/src/schema/mod.rs:14506-14521 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:2139 — REDACTED:2139-2155 | REDACTED:2162-2177 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:4060 — REDACTED:4060-4081 | REDACTED:3344-3359 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×31
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/schema/mod.rs:13361 — crates/dbx-core/src/schema/mod.rs:13361-13374 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:599-636 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/connection/jdbc.rs:782 — crates/dbx-core/src/connection/jdbc.rs:782-795 | src-tauri/src/commands/app_settings.rs:744-758 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:2775 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2775-2788 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2876-2891 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/schema/mod.rs:12902 — crates/dbx-core/src/schema/mod.rs:12902-12916 | crates/dbx-drivers/src/metadata.rs:3-16 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:189 — agents/common/src/main/java/com/dbx/agent/QueryPageResult.java:189-204 | agents/common/src/main/java/com/dbx/agent/QueryResult.java:221-234 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:879 — REDACTED:879-892 | REDACTED:1363-1381 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/admin/consul/client.rs:168 — crates/dbx-core/src/admin/consul/client.rs:168-184 | crates/dbx-core/src/admin/consul/client.rs:204-217 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:2048 — REDACTED:2048-2063 | REDACTED:2421-2434 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/drivers/kingbase-go/main.go:222 — agents/drivers/kingbase-go/main.go:222-235 | REDACTED:1092-1105 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/schema/mod.rs:1863 — crates/dbx-core/src/schema/mod.rs:1863-1876 | crates/dbx-driver-mysql/src/ob_oracle.rs:205-218 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/query/plugin_data.rs:167 — crates/dbx-core/src/query/plugin_data.rs:167-180 | REDACTED:555-574 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:3525 — REDACTED:3525-3538 | crates/dbx-core/src/query/snapshot_export.rs:52-68 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2671 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2671-2694 | REDACTED:313-326 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:3557 — REDACTED:3557-3570 | REDACTED:3891-3904 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:182 — crates/dbx-drivers/src/db/meilisearch_driver.rs:182-196 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:189-202 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-web/src/routes/mq.rs:721 — crates/dbx-web/src/routes/mq.rs:721-736 | crates/dbx-web/src/routes/mq.rs:1165-1178 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:8229 — REDACTED:8229-8244 | REDACTED:8287-8300 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-ai-provider/src/ai_effort.rs:334 — crates/dbx-ai-provider/src/ai_effort.rs:334-351 | crates/dbx-ai-provider/src/ai_effort.rs:353-366 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-web/src/routes/tab_runtime_cache.rs:57 — crates/dbx-web/src/routes/tab_runtime_cache.rs:57-70 | src-tauri/src/commands/tab_runtime_cache.rs:39-52 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/drivers/rabbitmq/operations.go:503 — agents/drivers/rabbitmq/operations.go:503-521 | agents/drivers/rabbitmq/operations.go:794-807 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/drivers/vastbase-go/spatial.go:77 — agents/drivers/vastbase-go/spatial.go:77-90 | agents/drivers/xugu/spatial.go:146-159 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-core/src/schema/mod.rs:8318 — crates/dbx-core/src/schema/mod.rs:8318-8331 | crates/dbx-core/src/schema/mod.rs:8338-8351 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:5935 — crates/dbx-driver-mysql/src/mysql.rs:5935-5948 | crates/dbx-driver-mysql/src/mysql.rs:5969-5987 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/dbx-web/src/routes/mq.rs:1468 — crates/dbx-web/src/routes/mq.rs:1468-1482 | crates/dbx-web/src/routes/mq.rs:1498-1511 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) agents/drivers/kingbase-go/main.go:1082 — agents/drivers/kingbase-go/main.go:1082-1096 | REDACTED:4197-4210 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×31
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/docs/dbml.rs:238 — crates/dbx-core/src/data/docs/dbml.rs:238-244 | crates/dbx-core/src/data/docs/dbml.rs:286-291 | crates/dbx-core/src/data/docs/dbml.rs:307-313 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/docs/dbml.rs:238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/transfer.rs:9407 — crates/dbx-core/src/data/transfer.rs:9407-9412 | crates/dbx-core/src/data/transfer.rs:9473-9478 | crates/dbx-core/src/data/transfer.rs:9496-9501 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:9407` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/transfer.rs:10475 — crates/dbx-core/src/data/transfer.rs:10475-10480 | crates/dbx-core/src/data/transfer.rs:10623-10628 | crates/dbx-core/src/data/transfer.rs:10720-10725 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/query/redis_ops.rs:18 — crates/dbx-core/src/query/redis_ops.rs:18-23 | crates/dbx-core/src/query/redis_ops.rs:64-69 | crates/dbx-core/src/query/redis_ops.rs:143-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-mcp/src/server.rs:3971 — crates/dbx-mcp/src/server.rs:3971-3976 | crates/dbx-mcp/src/server.rs:4561-4566 | crates/dbx-mcp/src/server.rs:4690-4695 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-sql-data/src/query_result_sql.rs:1738 — crates/dbx-sql-data/src/query_result_sql.rs:1738-1743 | crates/dbx-sql-data/src/query_result_sql.rs:1838-1843 | crates/dbx-sql-data/src/query_result_sql.rs:2020-2025 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/query_result_sql.rs:1738` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-sql-data/src/query_result_sql.rs:1736` calls `is_some` and `crates/dbx-sql-data/src/query_result_sql.rs:2018` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:6802 — crates/dbx-sql-schema/src/schema_diff.rs:6802-6807 | crates/dbx-sql-schema/src/schema_diff.rs:6853-6858 | crates/dbx-sql-schema/src/schema_diff.rs:6880-6885 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:6802` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-web/src/routes/database_export.rs:177 — crates/dbx-web/src/routes/database_export.rs:177-182 | crates/dbx-web/src/routes/query_result_export.rs:157-162 | crates/dbx-web/src/routes/table_export.rs:142-147 — before extracting anything, compare `crates/dbx-web/src/routes/database_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:70 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:70-75 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:147-152 | crates/dbx-ai-provider/src/ai_grok_cli.rs:117-122 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `command` to `&ClaudeCodeCommandSpec` in one and `&CodeBuddyCommandSpec` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361-366 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:766-771 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:247-252 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` and `crates/dbx-ai-provider/src/ai_qoder_cli.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2716 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2716-2721 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2761-2766 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2781-2786 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-driver-mongodb/src/mongo_driver.rs:2722` calls `Some`, `find_and_modify_array_filters`, `as_ref` and `crates/dbx-driver-mongodb/src/mongo_driver.rs:2767` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2823 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2823-2828 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2860-2865 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2883-2888 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-driver-mongodb/src/mongo_driver.rs:2829` calls `Some`, `find_and_modify_array_filters`, `as_ref` and `crates/dbx-driver-mongodb/src/mongo_driver.rs:2866` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:3088 — crates/dbx-driver-mysql/src/mysql.rs:3088-3093 | crates/dbx-driver-mysql/src/mysql.rs:3126-3131 | crates/dbx-driver-mysql/src/mysql.rs:3273-3278 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-plugin-runtime/src/plugins/installer.rs:956 — crates/dbx-plugin-runtime/src/plugins/installer.rs:956-961 | crates/dbx-plugin-runtime/src/plugins/installer.rs:983-988 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1026-1031 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-plugin-runtime/src/plugins/installer.rs:956` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) crates/dbx-sql-core/src/query_execution_sql.rs:612 — crates/dbx-sql-core/src/query_execution_sql.rs:612-617 | crates/dbx-sql-core/src/query_execution_sql.rs:658-663 | crates/dbx-sql-core/src/query_execution_sql.rs:716-721 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:77 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:77-82 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:154-159 | crates/dbx-ai-provider/src/ai_grok_cli.rs:124-129 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `command` to `&ClaudeCodeCommandSpec` in one and `&CodeBuddyCommandSpec` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_codex_cli.rs:434 — crates/dbx-ai-provider/src/ai_codex_cli.rs:434-439 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:411-416 | src-tauri/src/commands/mcp.rs:1647-1652 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:348 — crates/dbx-driver-mongodb/src/mongo_shell.rs:348-353 | crates/dbx-web/src/routes/mcp_policy.rs:30-35 | src-tauri/src/commands/mcp_bridge.rs:1538-1543 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-sql-core/src/object_source_sql.rs:233 — crates/dbx-sql-core/src/object_source_sql.rs:233-238 | crates/dbx-sql-core/src/object_source_sql.rs:389-394 | crates/dbx-sql-core/src/object_source_sql.rs:2184-2189 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/object_source_sql.rs:233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) crates/dbx-mcp/src/backend.rs:1228 — crates/dbx-mcp/src/backend.rs:1228-1233 | crates/dbx-mcp/src/backend.rs:1261-1266 | crates/dbx-mcp/src/backend.rs:1287-1292 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/backend.rs:1228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) REDACTED:7666 — REDACTED:7666-7671 | REDACTED:7749-7754 | REDACTED:7809-7814 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/admin/consul/client.rs:50 — crates/dbx-core/src/admin/consul/client.rs:50-55 | crates/dbx-core/src/ai/agent_kv.rs:1243-1248 | crates/dbx-mcp/src/backend.rs:698-703 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/consul/client.rs:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/schema/mod.rs:11098 — crates/dbx-core/src/schema/mod.rs:11098-11103 | crates/dbx-core/src/schema/mod.rs:11133-11138 | crates/dbx-core/src/schema/mod.rs:11168-11173 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:11098` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2526 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2526-2531 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2746-2751 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2844-2849 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326-331 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:356-361 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:385-390 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×29
  • Edited copy of a member (4 corresponding lines) crates/dbx-web/src/auth.rs:60 — crates/dbx-web/src/auth.rs:60-63 | crates/dbx-web/src/routes/plugins.rs:28-32 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:44 — crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:44-48 | src-tauri/src/commands/mcp.rs:683-686 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) REDACTED:8912 — REDACTED:8912-8915 | crates/dbx-driver-agent/src/agent_manager.rs:911-915 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-drivers/src/db/influxdb_driver.rs:37 — crates/dbx-drivers/src/db/influxdb_driver.rs:37-49 | REDACTED:26-29 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) REDACTED:300 — REDACTED:300-303 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:375-382 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-ai-provider/src/ai.rs:5315 — crates/dbx-ai-provider/src/ai.rs:5315-5318 | crates/dbx-core/src/connection/connection_secrets.rs:84-87 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-core/src/data/sqlite_backup.rs:112 — crates/dbx-core/src/data/sqlite_backup.rs:112-115 | crates/dbx-driver-agent/src/agent_service.rs:2794-2797 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-web/src/routes/layout.rs:24 — crates/dbx-web/src/routes/layout.rs:24-27 | crates/dbx-web/src/routes/schema_cache.rs:38-41 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-ai-provider/src/ai.rs:5310 — crates/dbx-ai-provider/src/ai.rs:5310-5313 | crates/dbx-core/src/persistence/history.rs:147-150 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-core/src/admin/nacos/access_control.rs:80 — crates/dbx-core/src/admin/nacos/access_control.rs:80-83 | crates/dbx-core/src/admin/nacos/search.rs:19-22 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-tauri-consul/src/commands.rs:238 — crates/dbx-tauri-consul/src/commands.rs:238-241 | src-tauri/src/commands/zookeeper_cmd.rs:44-47 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-web/src/routes/connection.rs:497 — crates/dbx-web/src/routes/connection.rs:497-500 | crates/dbx-web/src/routes/plugins.rs:426-429 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-core/src/admin/consul/acl.rs:429 — crates/dbx-core/src/admin/consul/acl.rs:429-432 | crates/dbx-core/src/admin/consul/enterprise.rs:317-320 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) REDACTED:1768 — REDACTED:1768-1771 | crates/dbx-core/src/query/query_cancel.rs:450-453 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-core/src/schema/mod.rs:11966 — crates/dbx-core/src/schema/mod.rs:11966-11969 | crates/dbx-core/src/schema/providers/native.rs:358-361 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-drivers/src/db/sqlite.rs:2114 — crates/dbx-drivers/src/db/sqlite.rs:2114-2117 | crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:616-619 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-drivers/src/db/sqlite.rs:3023 — crates/dbx-drivers/src/db/sqlite.rs:3023-3026 | crates/dbx-sqlite-worker/src/runtime.rs:246-249 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:227 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:227-230 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:208-211 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:80 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:80-83 | crates/dbx-drivers/src/salesforce_oauth.rs:171-174 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-web/src/routes/ai.rs:141 — crates/dbx-web/src/routes/ai.rs:141-145 | crates/dbx-web/src/routes/cloud_sync.rs:203-206 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-web/src/routes/ai.rs:235 — crates/dbx-web/src/routes/ai.rs:235-239 | crates/dbx-web/src/routes/cloud_sync.rs:348-351 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) agents/drivers/argo-go/config.go:1132 — agents/drivers/argo-go/config.go:1132-1135 | agents/drivers/hive-go/config.go:1172-1175 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) agents/drivers/argo-go/metadata.go:568 — agents/drivers/argo-go/metadata.go:568-571 | agents/drivers/hive-go/metadata.go:579-582 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) REDACTED:3203 — REDACTED:3203-3206 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:699-702 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/dbx-core/src/ai/plugin_mcp.rs:304 — crates/dbx-core/src/ai/plugin_mcp.rs:304-307 | crates/dbx-mcp/src/backend.rs:824-827 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 4 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×27
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×27
  • Change coupling: tests.rs ↔ triggers.rs crates/dbx-sql-schema/src/table_structure_sql/tests.rs:1 — `crates/dbx-sql-schema/src/table_structure_sql/tests.rs` and `crates/dbx-sql-schema/src/table_structure_sql/triggers.rs` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9d38961a` fix(dameng): load and edit triggers in table structure; `e18c6001` fix(oracle): add trigger operations in structure edit; `5a74925d` fix(oracle): extract trigger body from driver source when cloning (at that commit the files were still `crates/dbx-sql/src/table_structure_sql/tests.rs` and `crates/dbx-sql/src/table_structure_sql/triggers.rs`) — run `git show` on any of them.
  • Change coupling: columns.rs ↔ tests.rs crates/dbx-sql-schema/src/table_structure_sql/columns.rs:1 — `crates/dbx-sql-schema/src/table_structure_sql/columns.rs` and `crates/dbx-sql-schema/src/table_structure_sql/tests.rs` change together 85% of the time (22 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `95d3e800` fix(hana): expose table rename and column comments; `fd3be84b` feat(hana): enable table rename and structure editing; `05a57cbf` fix(sqlserver): drop default constraint before dropping a column — run `git show` on any of them.
  • Change coupling: explainPlan.ts ↔ query_execution_sql.rs apps/desktop/src/lib/diagram/explainPlan.ts:1 — `apps/desktop/src/lib/diagram/explainPlan.ts` and `crates/dbx-sql-core/src/query_execution_sql.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `3c4075a8` feat(opengauss): support the explain button with plain-text EXPLAIN; `32789b1d` feat(xugu): support visual estimated execution plans; `06fc0df2` feat(oceanbase-oracle): support graphical execution plans (at that commit the file was still `crates/dbx-sql/src/query_execution_sql.rs`) — run `git show` on any of them.
  • Change coupling: layout.tsx ↔ LandingFooter.tsx docs/app/[lang]/layout.tsx:1 — `docs/app/[lang]/layout.tsx` and `docs/components/landing/LandingFooter.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a3038e25` docs: raise advertised database count from 90+ to 100+; `d766228b` feat(site): polish dark theme, typography, and docs nav; `28c0977a` docs: bump app size claim to 25 MB — run `git show` on any of them.
  • Change coupling: exportFormats.ts ↔ REDACTED apps/desktop/src/lib/export/exportFormats.ts:1 — `apps/desktop/src/lib/export/exportFormats.ts` and `REDACTED` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `1d07cb05` feat(export): add portable standard SQL inserts; `d715b16b` fix(sqlserver): wrap identity inserts with SET IDENTITY_INSERT; `d17ce466` feat(export): honor exclude-primary-keys in SQL script exports (at that commit the file was still `crates/dbx-core/src/table_export.rs`) — run `git show` on any of them.
  • Change coupling: LandingFooter.tsx ↔ metadata.ts docs/components/landing/LandingFooter.tsx:1 — `docs/components/landing/LandingFooter.tsx` and `docs/lib/metadata.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a3038e25` docs: raise advertised database count from 90+ to 100+; `28c0977a` docs: bump app size claim to 25 MB; `d53c855b` feat(docs): update database coverage to 90+ — run `git show` on any of them.
  • Change coupling: DocumentBrowser.vue ↔ document_cmd.rs apps/desktop/src/components/document/DocumentBrowser.vue:1 — `apps/desktop/src/components/document/DocumentBrowser.vue` and `src-tauri/src/commands/document_cmd.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a5ce8510` feat(mongo): preserve BSON types when cloning and saving documents; `c9764be9` fix(mongodb): support collation for find queries; `78a61334` fix(elasticsearch): preserve legacy type on delete — run `git show` on any of them.
  • Change coupling: DriverStoreDialog.vue ↔ agents.rs apps/desktop/src/components/config/DriverStoreDialog.vue:1 — `apps/desktop/src/components/config/DriverStoreDialog.vue` and `crates/dbx-web/src/routes/agents.rs` change together 59% of the time (13 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `da95bd43` fix(updates): auto-continue client upgrade on update-all; `c712be3e` feat(agent): support cancelling installs and upgrades; `8737114d` fix(jdbc): include managed drivers in offline bundles — run `git show` on any of them.
  • Change coupling: queryStore.ts ↔ mongo_cmd.rs apps/desktop/src/stores/queryStore.ts:1 — `apps/desktop/src/stores/queryStore.ts` and `src-tauri/src/commands/mongo_cmd.rs` change together 59% of the time (20 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `3e9974b2` perf(mongodb): skip total count for explicit limit queries; `a78fc48a` feat(mongodb): support find explain in the SQL editor; `f78dc1ba` feat(mongodb): support bulkWrite — run `git show` on any of them.
  • Change coupling: RedisKeyBrowser.vue ↔ redis_cmd.rs apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — `apps/desktop/src/components/redis/RedisKeyBrowser.vue` and `src-tauri/src/commands/redis_cmd.rs` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `168f2a47` feat(redis): support renaming keys; `31f0b7d6` feat(redis): add stream consumer group monitoring; `ba81fa44` feat(redis): support multiple value formats in viewer (#2766) — run `git show` on any of them.
  • Change coupling: ContentArea.vue ↔ tabResultCache.ts apps/desktop/src/components/layout/ContentArea.vue:1 — `apps/desktop/src/components/layout/ContentArea.vue` and `apps/desktop/src/lib/tabs/tabResultCache.ts` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `741b10b4` fix(grid): speed up join header comments and show type lengths; `66007187` feat(neo4j): expand node query properties into result columns; `237064f9` fix(grid): budget large-value previews by segment and show executed SQL — run `git show` on any of them.
  • Change coupling: DataGrid.vue ↔ tabResultCache.ts apps/desktop/src/components/grid/DataGrid.vue:1 — `apps/desktop/src/components/grid/DataGrid.vue` and `apps/desktop/src/lib/tabs/tabResultCache.ts` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `a10bd55a` fix(mysql): disable next page via read only probe; `741b10b4` fix(grid): speed up join header comments and show type lengths; `66007187` feat(neo4j): expand node query properties into result columns — run `git show` on any of them.
  • Change coupling: useDataGridExport.ts ↔ useSidebarTreeExportRuntime.ts apps/desktop/src/composables/useDataGridExport.ts:1 — `apps/desktop/src/composables/useDataGridExport.ts` and `apps/desktop/src/composables/useSidebarTreeExportRuntime.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `0fce8f44` feat(export): reveal exported file from completion toast; `87546f8e` fix(export): honor database name setting in table SQL export; `ce5217bd` fix(csv): stop wrapping exported dates in equals-prefixed formulas — run `git show` on any of them.
  • Change coupling: sidebarTreeItemLayout.ts ↔ connectionStore.ts apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts:1 — `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts` and `apps/desktop/src/stores/connectionStore.ts` change together 56% of the time (19 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `b8f39f9c` feat(oracle): add dblink completion, tree view and management; `ec4f8582` feat(dameng): add user and role administration; `6ea009a5` fix(connection): refresh and display connection notes — run `git show` on any of them.
  • Change coupling: connection_secrets.rs ↔ REDACTED crates/dbx-core/src/connection/connection_secrets.rs:1 — `crates/dbx-core/src/connection/connection_secrets.rs` and `REDACTED` change together 55% of the time (17 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `2929b1c0` feat(hive): add Kerberos connection options (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`); `d815a16b` feat(redis): move scan page size to connections (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`); `40c93b9d` feat(connection): add visible schema filtering (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`) — run `git show` on any of them.
  • Change coupling: DataGrid.vue ↔ exportFormats.ts apps/desktop/src/components/grid/DataGrid.vue:1 — `apps/desktop/src/components/grid/DataGrid.vue` and `apps/desktop/src/lib/export/exportFormats.ts` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `d715b16b` fix(sqlserver): wrap identity inserts with SET IDENTITY_INSERT; `ab35a5b1` feat(export): add SQL INSERT batch or single-row mode; `e9fea304` fix(xugu): preserve spatial SRIDs in exports — run `git show` on any of them.
  • Change coupling: connectionPresentation.ts ↔ REDACTED apps/desktop/src/lib/connection/connectionPresentation.ts:1 — `apps/desktop/src/lib/connection/connectionPresentation.ts` and `REDACTED` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `264f5c48` feat(influxdb3): add influxdb 3 engine over http (at that commit the file was still `crates/dbx-core/src/connection.rs`); `50e6476c` fix(meilisearch): preserve proxy paths and secure REST requests (at that commit the file was still `crates/dbx-core/src/connection.rs`); `336fbe09` feat(gaussdb): support multi-host connections (at that commit the file was still `crates/dbx-core/src/connection.rs`) — run `git show` on any of them.
  • Change coupling: RedisValueViewer.vue ↔ redis_cmd.rs apps/desktop/src/components/redis/RedisValueViewer.vue:1 — `apps/desktop/src/components/redis/RedisValueViewer.vue` and `src-tauri/src/commands/redis_cmd.rs` change together 50% of the time (13 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `43b6e218` feat(redis): download large Redis values; `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys — run `git show` on any of them.
  • Change coupling: RedisKeyBrowser.vue ↔ redis.rs apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — `apps/desktop/src/components/redis/RedisKeyBrowser.vue` and `crates/dbx-web/src/routes/redis.rs` change together 50% of the time (11 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `168f2a47` feat(redis): support renaming keys; `31f0b7d6` feat(redis): add stream consumer group monitoring; `fc9f97b6` fix(redis): speed up large key scans — run `git show` on any of them.
  • Change coupling: RedisValueViewer.vue ↔ redis.rs apps/desktop/src/components/redis/RedisValueViewer.vue:1 — `apps/desktop/src/components/redis/RedisValueViewer.vue` and `crates/dbx-web/src/routes/redis.rs` change together 50% of the time (11 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `43b6e218` feat(redis): download large Redis values; `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys — run `git show` on any of them.
  • Change coupling: TreeItem.vue ↔ objectSourceEditor.ts apps/desktop/src/components/sidebar/TreeItem.vue:1 — `apps/desktop/src/components/sidebar/TreeItem.vue` and `apps/desktop/src/lib/table/objectSourceEditor.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `668919a7` fix(gbase8s): make view source saves safer; `f16454a4` fix(app): preserve object source formatting (at that commit the file was still `apps/desktop/src/lib/objectSourceEditor.ts`); `da00405e` fix(db): support routine rename editing (at that commit the file was still `apps/desktop/src/lib/objectSourceEditor.ts`) — run `git show` on any of them.
  • Change coupling: EditorSettingsDialog.vue ↔ ai_cli_agent.rs apps/desktop/src/components/editor/EditorSettingsDialog.vue:1 — `apps/desktop/src/components/editor/EditorSettingsDialog.vue` and `crates/dbx-ai-provider/src/ai_cli_agent.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d3947d24` feat(ai): add Claude Code CLI provider (at that commit the file was still `crates/dbx-core/src/ai_cli_agent.rs`); `5a666b1f` fix(ai): improve assistant execution and MCP settings (at that commit the file was still `crates/dbx-core/src/ai_cli_agent.rs`); `034cce47` fix(ai): Codex CLI provider reliability fixes for DBX Desktop (at that commit the file was still `crates/dbx-core/src/ai_cli_agent.rs`) — run `git show` on any of them.
  • Change coupling: TableStructureEditor.vue ↔ triggers.rs apps/desktop/src/components/structure/TableStructureEditor.vue:1 — `apps/desktop/src/components/structure/TableStructureEditor.vue` and `crates/dbx-sql-schema/src/table_structure_sql/triggers.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `e18c6001` fix(oracle): add trigger operations in structure edit; `d96da5de` fix(sqlserver): edit triggers with events and disabled state (at that commit the file was still `crates/dbx-core/src/table_structure_sql/triggers.rs`); `fdaef625` feat(oracle): support safe trigger structure editing (at that commit the file was still `crates/dbx-core/src/table_structure_sql/triggers.rs`) — run `git show` on any of them.
  • Change coupling: useDataGridExport.ts ↔ REDACTED apps/desktop/src/composables/useDataGridExport.ts:1 — `apps/desktop/src/composables/useDataGridExport.ts` and `crates/dbx-sql-data/src/data_grid_extractors/sql.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `1dd7535d` feat(export): format SQL Server spatial columns with STGeomFromText; `e3d5d141` fix(grid): keep manual primary keys in exclude-PK insert copies (at that commit the file was still `crates/dbx-core/src/data_grid_extractors/sql.rs`); `9fc77215` fix(kingbase): honor connection identifier quotes in exports (at that commit the file was still `crates/dbx-core/src/data_grid_extractors/sql.rs`) — run `git show` on any of them.
  • Change coupling: useSidebarDatabaseSpecificMutationRuntime.ts ↔ main.rs apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:1 — `apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts` and `crates/dbx-web/src/main.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5b937388` feat(meilisearch): add index creation; `52c89267` feat(vector): support renaming Milvus collections; `439f2c26` feat(milvus): add database and collection deletion — run `git show` on any of them.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×27
  • Edited copy of a member (20 corresponding lines) crates/dbx-core/src/schema/native_jobs/operations/dameng/rename.rs:111 — crates/dbx-core/src/schema/native_jobs/operations/dameng/rename.rs:111-135 | crates/dbx-core/src/schema/native_jobs/operations/observation.rs:69-88 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:4025 — REDACTED:4025-4044 | REDACTED:4054-4074 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:3982 — REDACTED:3982-4001 | REDACTED:11002-11040 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:123 — crates/dbx-driver-mongodb/src/mongo_driver.rs:123-142 | crates/dbx-types/src/models/connection.rs:2370-2390 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:3642 — REDACTED:3642-3667 | REDACTED:3669-3688 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-ai-provider/src/ai.rs:2943 — crates/dbx-ai-provider/src/ai.rs:2943-2962 | crates/dbx-ai-provider/src/ai.rs:3109-3131 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:388 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:388-409 | REDACTED:3854-3873 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-core/src/schema/exact_metadata.rs:158 — crates/dbx-core/src/schema/exact_metadata.rs:158-178 | crates/dbx-core/src/schema/exact_metadata.rs:191-210 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:642 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:642-669 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:111-130 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:485 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:485-512 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:857-876 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-core/src/data/mongodb_import_export.rs:1284 — crates/dbx-core/src/data/mongodb_import_export.rs:1284-1303 | crates/dbx-core/src/data/mongodb_import_export.rs:1305-1325 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:2350 — REDACTED:2350-2369 | REDACTED:2381-2400 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/go-common/iotdb-client-go/client/rpcdataset.go:442 — agents/go-common/iotdb-client-go/client/rpcdataset.go:442-461 | agents/go-common/iotdb-client-go/client/rpcdataset.go:479-502 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:4581 — REDACTED:4581-4602 | REDACTED:4718-4737 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/common/src/main/java/com/dbx/agent/MetadataListConstraints.java:137 — agents/common/src/main/java/com/dbx/agent/MetadataListConstraints.java:137-156 | agents/common/src/main/java/com/dbx/agent/MetadataListConstraints.java:158-177 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:66 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:66-85 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:182-207 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:663 — crates/dbx-core/src/connection/connection_secrets.rs:663-682 | REDACTED:10337-10360 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:86 — REDACTED:86-105 | agents/drivers/zookeeper/main.go:48-71 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/drivers/etcd-go/lease.go:298 — agents/drivers/etcd-go/lease.go:298-318 | agents/drivers/etcd-go/lease.go:320-339 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-sql-schema/src/sql_parser/git.rs:68 — crates/dbx-sql-schema/src/sql_parser/git.rs:68-87 | crates/dbx-sql-schema/src/sql_parser/git.rs:178-197 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:262 — crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:262-281 | crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:393-415 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) agents/go-common/go-gssapi/krb5/keyinfo.go:56 — agents/go-common/go-gssapi/krb5/keyinfo.go:56-75 | agents/go-common/go-gssapi/krb5/keyinfo.go:98-117 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:2010 — REDACTED:2010-2036 | agents/drivers/vastbase-go/vastbase_metadata.go:1280-1299 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) REDACTED:2139 — REDACTED:2139-2159 | REDACTED:2445-2464 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/dbx-core/src/data/transfer.rs:6398 — crates/dbx-core/src/data/transfer.rs:6398-6420 | REDACTED:2819-2838 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×27
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:433 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:433-439 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:722-728 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:494-500 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:433` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-core/src/admin/mq/token.rs:115 — crates/dbx-core/src/admin/mq/token.rs:115-121 | crates/dbx-core/src/admin/nacos/archive.rs:253-259 | crates/dbx-driver-mysql/src/mysql.rs:1158-1164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/token.rs:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) REDACTED:1354 — REDACTED:1354-1360 | crates/dbx-core/src/data/transfer.rs:4498-4504 | REDACTED:3380-3386 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) REDACTED:2312 — REDACTED:2312-2318 | REDACTED:2325-2331 | REDACTED:2371-2377 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-driver-agent/src/agent_service.rs:4462 — crates/dbx-driver-agent/src/agent_service.rs:4462-4468 | crates/dbx-driver-agent/src/agent_service.rs:4480-4486 | crates/dbx-driver-agent/src/agent_service.rs:4494-4500 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-agent/src/agent_service.rs:4462` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-formats/src/csv_export.rs:326 — crates/dbx-formats/src/csv_export.rs:326-332 | crates/dbx-formats/src/csv_export.rs:405-411 | crates/dbx-formats/src/csv_export.rs:437-443 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-formats/src/csv_export.rs:326` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:1515 — crates/dbx-sql-schema/src/schema_diff.rs:1515-1521 | crates/dbx-sql-schema/src/schema_diff.rs:1527-1533 | crates/dbx-sql-schema/src/schema_diff.rs:1539-1545 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:1515` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:717 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:717-723 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:896-902 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:940-946 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:717` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 3) REDACTED:1339 — REDACTED:1339-1345 | REDACTED:1358-1364 | crates/dbx-core/src/data/transfer.rs:4502-4508 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:1403 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1403-1409 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1533-1539 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1641-1647 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:1403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-web/src/routes/query_result_export.rs:67 — crates/dbx-web/src/routes/query_result_export.rs:67-73 | crates/dbx-web/src/routes/sql_file.rs:366-372 | crates/dbx-web/src/routes/table_export.rs:68-74 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:480 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:480-486 | crates/dbx-ai-provider/src/ai_codex_cli.rs:1013-1019 | crates/dbx-ai-provider/src/ai_grok_cli.rs:702-708 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codex_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:558 — REDACTED:558-564 | crates/dbx-drivers/src/db/rqlite_driver.rs:408-414 | crates/dbx-drivers/src/db/turso_driver.rs:653-659 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) src-tauri/src/commands/connection.rs:2988 — src-tauri/src/commands/connection.rs:2988-2994 | src-tauri/src/commands/connection.rs:3036-3044 | src-tauri/src/commands/plugins.rs:150-156 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/connection.rs:2988` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src-tauri/src/commands/connection.rs:3000` calls `emit` and `src-tauri/src/commands/connection.rs:3046` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai.rs:1659 — crates/dbx-ai-provider/src/ai.rs:1659-1665 | crates/dbx-ai-provider/src/ai.rs:1674-1680 | crates/dbx-ai-provider/src/ai.rs:1689-1695 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122-128 | crates/dbx-ai-provider/src/ai_grok_cli.rs:172-178 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:54-60 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/dbx-web/src/routes/mongodb_import_export.rs:258 — crates/dbx-web/src/routes/mongodb_import_export.rs:258-264 | crates/dbx-web/src/routes/nacos.rs:934-940 | crates/dbx-web/src/routes/table_import.rs:280-286 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/mongodb_import_export.rs:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:659 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:659-665 | REDACTED:218-224 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2DriverLoader.java:36-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:48 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:48-54 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:57-63 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:116-122 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) agents/drivers/cassandra-go/metadata.go:573 — agents/drivers/cassandra-go/metadata.go:573-580 | REDACTED:1809-1815 | agents/drivers/vastbase-go/vastbase_metadata.go:1129-1135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/metadata.go:573` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) agents/drivers/oracle-go/pldebug_target.go:602 — agents/drivers/oracle-go/pldebug_target.go:602-608 | agents/drivers/oracle-go/pldebug_target.go:624-630 | agents/drivers/oracle-go/pldebug_target.go:645-651 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oracle-go/pldebug_target.go:602` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) agents/go-common/iotdb-client-go/client/session.go:221 — agents/go-common/iotdb-client-go/client/session.go:221-227 | agents/go-common/iotdb-client-go/client/session.go:283-289 | agents/go-common/iotdb-client-go/client/session.go:1621-1627 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) REDACTED:466 — REDACTED:466-472 | REDACTED:466-472 | agents/drivers/rabbitmq/thrift_binary.go:81-87 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) REDACTED:474 — REDACTED:474-480 | REDACTED:474-480 | agents/drivers/rabbitmq/thrift_binary.go:97-103 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) agents/drivers/oracle-go/pldebug_target.go:587 — agents/drivers/oracle-go/pldebug_target.go:587-593 | agents/drivers/oracle-go/pldebug_target.go:609-615 | agents/drivers/oracle-go/pldebug_target.go:631-637 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oracle-go/pldebug_target.go:587` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×26
  • Duplicated block (5 lines × 3) agents/drivers/duckdb/src/sql.rs:42 — agents/drivers/duckdb/src/sql.rs:42-46 | crates/dbx-drivers/src/db/duckdb_sql.rs:54-58 | REDACTED:2119-2123 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) agents/drivers/duckdb/src/sql.rs:239 — agents/drivers/duckdb/src/sql.rs:239-243 | agents/drivers/duckdb/src/sql.rs:361-365 | crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:23-27 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:231 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:231-236 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:312-316 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:204-208 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&ClaudeCodeRunOptions` in one and `&CodeBuddyRunOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:309` calls `insert`, `to_string`, `String` and `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:228` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/persistence/secret_codec.rs:295 — crates/dbx-core/src/persistence/secret_codec.rs:295-299 | crates/dbx-core/src/persistence/secret_codec.rs:792-796 | crates/dbx-core/src/persistence/secret_codec.rs:806-810 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/persistence/secret_codec.rs:295` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) REDACTED:2588 — REDACTED:2588-2592 | REDACTED:2937-2941 | REDACTED:5073-5077 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2588` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/schema/mod.rs:894 — crates/dbx-core/src/schema/mod.rs:894-898 | crates/dbx-core/src/schema/mod.rs:957-961 | crates/dbx-core/src/schema/mod.rs:9280-9284 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:894` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/schema/mod.rs:953` calls `as_ref`, `is_some_and`, `visible_schema_filter` and `crates/dbx-core/src/schema/mod.rs:893` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:5184 — crates/dbx-driver-mysql/src/mysql.rs:5184-5188 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:93-97 | crates/dbx-driver-mysql/src/starrocks.rs:140-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:5184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/connection/connection_secrets.rs:903 — crates/dbx-core/src/connection/connection_secrets.rs:903-907 | crates/dbx-core/src/persistence/cloud_sync.rs:2849-2853 | REDACTED:10448-10452 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `crates/dbx-core/src/persistence/cloud_sync.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) REDACTED:357 — REDACTED:357-361 | REDACTED:1108-1112 | REDACTED:170-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:537 — crates/dbx-driver-mongodb/src/mongo_shell.rs:537-541 | crates/dbx-web/src/routes/mcp_policy.rs:219-223 | src-tauri/src/commands/mcp_bridge.rs:1727-1731 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:543 — crates/dbx-driver-mongodb/src/mongo_shell.rs:543-547 | crates/dbx-web/src/routes/mcp_policy.rs:225-229 | src-tauri/src/commands/mcp_bridge.rs:1733-1737 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_cursor_cli.rs:105 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:105-110 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:156-161 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:229-233 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_cursor_cli.rs` and `crates/dbx-ai-provider/src/ai_opencode_cli.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-drivers/src/db/influxdb3_driver.rs:80 — crates/dbx-drivers/src/db/influxdb3_driver.rs:80-84 | crates/dbx-drivers/src/db/influxdb_driver.rs:105-109 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:144-148 — before extracting anything, compare `crates/dbx-drivers/src/db/influxdb3_driver.rs` and `crates/dbx-drivers/src/db/influxdb_driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/influxdb3_driver.rs:80` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/persistence/state_persistence.rs:397 — crates/dbx-core/src/persistence/state_persistence.rs:397-401 | crates/dbx-core/src/persistence/state_persistence.rs:425-429 | crates/dbx-core/src/persistence/state_persistence.rs:449-453 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/persistence/state_persistence.rs:397` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/schema/oracle_routines/readback.rs:234 — crates/dbx-core/src/schema/oracle_routines/readback.rs:234-238 | crates/dbx-core/src/schema/oracle_routines/readback.rs:306-310 | crates/dbx-core/src/schema/oracle_routines/transfer/packages.rs:541-545 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/admin/nacos/service.rs:57 — crates/dbx-core/src/admin/nacos/service.rs:57-61 | crates/dbx-core/src/admin/nacos/service.rs:533-537 | crates/dbx-core/src/admin/nacos/service.rs:545-549 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-agent/src/agent_service.rs:1962 — crates/dbx-driver-agent/src/agent_service.rs:1962-1966 | crates/dbx-driver-agent/src/agent_service.rs:1993-1997 | crates/dbx-driver-agent/src/agent_service.rs:3129-3133 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2339 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2339-2343 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2698-2702 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2808-2812 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:509 — crates/dbx-driver-mongodb/src/mongo_shell.rs:509-513 | crates/dbx-web/src/routes/mcp_policy.rs:191-195 | src-tauri/src/commands/mcp_bridge.rs:1699-1703 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457-461 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1902-1906 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255-259 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) REDACTED:2127 — REDACTED:2127-2131 | REDACTED:3304-3308 | REDACTED:3397-3401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:224 — agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:224-228 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:264-268 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:531-535 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:224` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) agents/drivers/oracle-go/pldebug_entry.go:257 — agents/drivers/oracle-go/pldebug_entry.go:257-261 | agents/drivers/oracle-go/pldebug_stack.go:207-211 | agents/drivers/oracle-go/pldebug_variables.go:20-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) agents/go-common/iotdb-client-go/client/session.go:805 — agents/go-common/iotdb-client-go/client/session.go:805-809 | agents/go-common/iotdb-client-go/client/session.go:839-843 | agents/go-common/iotdb-client-go/client/session.go:871-875 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/go-common/iotdb-client-go/client/session.go:805` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) REDACTED:1228 — REDACTED:1228-1232 | REDACTED:1163-1167 | REDACTED:1175-1179 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 1 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_driver_mysql · ×25
  • dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn (cognitive 61) crates/dbx-driver-mysql/src/mysql.rs:6280 — dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (53 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::find_if_not_exists_clause (cognitive 51) crates/dbx-driver-mysql/src/mysql.rs:7735 — dbx_driver_mysql::mysql::find_if_not_exists_clause has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (13 pts), boolean chains 11 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::ob_oracle::get_object_source (cognitive 40) crates/dbx-driver-mysql/src/ob_oracle.rs:454 — dbx_driver_mysql::ob_oracle::get_object_source has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 1 (4 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_mysql::mysql::mysql_async_url (cognitive 35) crates/dbx-driver-mysql/src/mysql.rs:3262 — dbx_driver_mysql::mysql::mysql_async_url has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5, match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_value_to_json_with_data_charset (cognitive 30) crates/dbx-driver-mysql/src/mysql.rs:1010 — dbx_driver_mysql::mysql::mysql_value_to_json_with_data_charset has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::list_objects (cognitive 30) crates/dbx-driver-mysql/src/mysql.rs:4897 — dbx_driver_mysql::mysql::list_objects has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 7 (17 pts), if/else 9 (12 pts), boolean chains 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql::completion_assistant_search (cognitive 29) crates/dbx-driver-mysql/src/mysql.rs:3869 — dbx_driver_mysql::mysql::completion_assistant_search has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_non_result_batch_on_conn (cognitive 29) crates/dbx-driver-mysql/src/mysql.rs:7552 — dbx_driver_mysql::mysql::execute_non_result_batch_on_conn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql_compatible::indexes_from_create_table_ddl (cognitive 27) crates/dbx-driver-mysql/src/mysql_compatible.rs:287 — dbx_driver_mysql::mysql_compatible::indexes_from_create_table_ddl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::ssl_fallback_url (cognitive 26) crates/dbx-driver-mysql/src/mysql.rs:3018 — dbx_driver_mysql::mysql::ssl_fallback_url has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::parse_mysql_enum_values (cognitive 25) crates/dbx-driver-mysql/src/mysql.rs:5482 — dbx_driver_mysql::mysql::parse_mysql_enum_values has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (11 pts), loops 4 (7 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments (cognitive 25) crates/dbx-driver-mysql/src/mysql.rs:7900 — dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (12 pts), boolean chains 7, if/else 3 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • dbx_driver_mysql::mysql::mysql_bounded_value_preview (cognitive 24) crates/dbx-driver-mysql/src/mysql.rs:1260 — dbx_driver_mysql::mysql::mysql_bounded_value_preview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_result_set_with_text_protocol_on_conn (cognitive 22) crates/dbx-driver-mysql/src/mysql.rs:6063 — dbx_driver_mysql::mysql::execute_result_set_with_text_protocol_on_conn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::resolve_doris_opaque_column_types (cognitive 21) crates/dbx-driver-mysql/src/mysql.rs:517 — dbx_driver_mysql::mysql::resolve_doris_opaque_column_types has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_column_type_name (cognitive 21) crates/dbx-driver-mysql/src/mysql.rs:928 — dbx_driver_mysql::mysql::mysql_column_type_name has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql_data_charset::data_charset_from_params (cognitive 20) crates/dbx-driver-mysql/src/mysql_data_charset.rs:37 — dbx_driver_mysql::mysql_data_charset::data_charset_from_params has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::split_mysql_session_variables (cognitive 19) crates/dbx-driver-mysql/src/mysql.rs:2809 — dbx_driver_mysql::mysql::split_mysql_session_variables has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_result_set_with_prepared_protocol_on_conn (cognitive 19) crates/dbx-driver-mysql/src/mysql.rs:6544 — dbx_driver_mysql::mysql::execute_result_set_with_prepared_protocol_on_conn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_connection_time_zone (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:2874 — dbx_driver_mysql::mysql::mysql_connection_time_zone has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::list_objects_for_browser (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:5003 — dbx_driver_mysql::mysql::list_objects_for_browser has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_query_on_conn_with_limits_progress_resolved (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:7321 — dbx_driver_mysql::mysql::execute_query_on_conn_with_limits_progress_resolved has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode (cognitive 17) crates/dbx-driver-mysql/src/mysql.rs:2224 — dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback (cognitive 16) crates/dbx-driver-mysql/src/mysql.rs:1967 — dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_mysql::mysql::mysql_tls_url (cognitive 16) crates/dbx-driver-mysql/src/mysql.rs:2400 — dbx_driver_mysql::mysql::mysql_tls_url has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×25
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×25
  • Edited copy of a member (3 corresponding lines) crates/dbx-mcp/src/server.rs:7336 — crates/dbx-mcp/src/server.rs:7336-7338 | src-tauri/src/webview2_preflight.rs:1158-1160 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/ai/skill_tools.rs:172 — crates/dbx-core/src/ai/skill_tools.rs:172-181 | crates/dbx-types/src/models/connection.rs:1069-1071 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) agents/drivers/tdengine/src/driver.rs:992 — agents/drivers/tdengine/src/driver.rs:992-996 | crates/dbx-sql-dialect/src/sql_dialect/type_rewrite.rs:29-31 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:409 — crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:409-412 | crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:528-530 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-ai-provider/src/ai_cursor_cli.rs:140 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:140-142 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:211-213 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/skills/mod.rs:175 — crates/dbx-core/src/skills/mod.rs:175-177 | src-tauri/src/commands/ssh_keys.rs:36-38 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src-tauri/src/commands/external_db.rs:56 — src-tauri/src/commands/external_db.rs:56-61 | src-tauri/src/commands/external_sql.rs:183-185 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) REDACTED:287 — REDACTED:287-289 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:19-22 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/schema/native_jobs/details.rs:19 — crates/dbx-core/src/schema/native_jobs/details.rs:19-21 | crates/dbx-core/src/schema/oracle_type_details.rs:115-117 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:134 — crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:134-140 | crates/dbx-sql-core/src/oracle_view_rename.rs:223-225 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) agents/drivers/argo-go/metadata.go:172 — agents/drivers/argo-go/metadata.go:172-174 | agents/drivers/hive-go/metadata.go:172-174 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-ai-provider/src/ai_effort.rs:433 — crates/dbx-ai-provider/src/ai_effort.rs:433-436 | crates/dbx-core/src/persistence/cloud_sync.rs:672-674 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-cli/src/main.rs:744 — crates/dbx-cli/src/main.rs:744-749 | REDACTED:4691-4693 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:2542 — crates/dbx-driver-sqlserver/src/sqlserver.rs:2542-2544 | crates/dbx-sql-schema/src/table_structure_sql/comments.rs:64-66 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) REDACTED:1084 — REDACTED:1084-1090 | REDACTED:752-754 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/admin/consul/kv.rs:534 — crates/dbx-core/src/admin/consul/kv.rs:534-536 | crates/dbx-core/src/admin/consul/txn.rs:407-409 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-driver-mysql/src/ob_oracle.rs:63 — crates/dbx-driver-mysql/src/ob_oracle.rs:63-65 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4125-4129 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-plugin-runtime/src/plugins/installer.rs:1290 — crates/dbx-plugin-runtime/src/plugins/installer.rs:1290-1292 | plugins/sdk/packager/src/main.rs:654-656 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:319 — crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:319-321 | crates/dbx-sql-schema/src/table_structure_sql/columns.rs:683-685 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-web/src/routes/consul.rs:654 — crates/dbx-web/src/routes/consul.rs:654-656 | crates/dbx-web/src/routes/etcd.rs:79-81 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/query/plugin_data.rs:220 — crates/dbx-core/src/query/plugin_data.rs:220-222 | REDACTED:526-528 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-formats/src/sql_file_zip_package.rs:33 — crates/dbx-formats/src/sql_file_zip_package.rs:33-38 | src-tauri/src/commands/background_image.rs:35-37 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src-tauri/src/commands/external_db.rs:21 — src-tauri/src/commands/external_db.rs:21-23 | src-tauri/src/commands/external_sql.rs:156-158 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/schema/mod.rs:12100 — crates/dbx-core/src/schema/mod.rs:12100-12102 | crates/dbx-core/src/schema/providers/native.rs:390-392 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/dbx-core/src/ai/agent_kv.rs:1688 — crates/dbx-core/src/ai/agent_kv.rs:1688-1690 | REDACTED:3427-3429 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×25
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:121 — crates/dbx-core/src/admin/consul/blocking.rs:121-137 | crates/dbx-core/src/admin/consul/blocking.rs:176-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `ConsulBlockingRequest` in one and `ConsulDomainWatchRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:519 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:519-535 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:756-772 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:796 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:796-812 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1062-1078 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/kafka.rs:796` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1872 — crates/dbx-core/src/data/mongodb_import_export.rs:1872-1888 | crates/dbx-core/src/data/mongodb_import_export.rs:1947-1963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/mongodb_import_export.rs:1947` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:627 — crates/dbx-drivers/src/db/couchdb_driver.rs:627-643 | crates/dbx-drivers/src/db/solr_driver.rs:1004-1020 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/couchdb_driver.rs:627` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `start` to `Instant` in one and `std::time::Instant` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1281 — crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1281-1297 | crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1652-1668 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1281` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/dbx-sql-core/src/query_execution_sql.rs:1302 — crates/dbx-sql-core/src/query_execution_sql.rs:1302-1318 | crates/dbx-sql-core/src/query_execution_sql.rs:1384-1400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/query_execution_sql.rs:1302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:158 — crates/dbx-web/src/routes/mongodb_import_export.rs:158-174 | crates/dbx-web/src/routes/table_import.rs:164-180 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/mongodb_import_export.rs:158` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-web/src/routes/table_import.rs:161` calls `Some` and `crates/dbx-web/src/routes/mongodb_import_export.rs:156` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) src-tauri/src/commands/mongodb_dump.rs:43 — src-tauri/src/commands/mongodb_dump.rs:43-59 | src-tauri/src/commands/mongodb_dump.rs:74-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/mongodb_dump.rs:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `MongoDatabaseDumpRequest` in one and `MongoDatabaseRestoreRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1174 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1174-1190 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1343-1359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) agents/drivers/argo-go/config.go:456 — agents/drivers/argo-go/config.go:456-472 | agents/drivers/hive-go/config.go:463-479 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) agents/drivers/argo-go/metadata.go:1009 — agents/drivers/argo-go/metadata.go:1009-1025 | agents/drivers/hive-go/metadata.go:1020-1036 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) agents/drivers/etcd-go/kv.go:533 — agents/drivers/etcd-go/kv.go:533-549 | agents/drivers/etcd2-go/kv.go:444-460 — `agents/drivers/etcd-go/kv.go` and `agents/drivers/etcd2-go/kv.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 134 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:1043 — REDACTED:1043-1059 | agents/drivers/vastbase-go/vastbase_metadata.go:868-884 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:1095 — REDACTED:1095-1111 | agents/drivers/vastbase-go/vastbase_metadata.go:920-936 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1095` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) REDACTED:2915 — REDACTED:2915-2931 | agents/drivers/vastbase-go/vastbase_metadata.go:1864-1880 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (17 lines × 2) agents/drivers/kingbase-go/main.go:460 — agents/drivers/kingbase-go/main.go:460-476 | agents/drivers/neo4j-go/main.go:467-483 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/neo4j-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 23 separate duplicated blocks between them, totalling at least 248 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:460` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) REDACTED:2140 — REDACTED:2140-2156 | REDACTED:2446-2462 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2157` calls `boolParam` and `REDACTED:2463` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) REDACTED:2303 — REDACTED:2303-2319 | REDACTED:2731-2747 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:4661 — REDACTED:4661-4677 | REDACTED:3960-3976 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4661` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) agents/drivers/rabbitmq/thrift_binary.go:326 — agents/drivers/rabbitmq/thrift_binary.go:326-342 | agents/drivers/rabbitmq/thrift_binary.go:364-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/rabbitmq/thrift_binary.go:326` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) agents/go-common/iotdb-client-go/client/session.go:908 — agents/go-common/iotdb-client-go/client/session.go:908-924 | agents/go-common/iotdb-client-go/client/session.go:928-944 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/go-common/iotdb-client-go/client/session.go:908` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) REDACTED:354 — REDACTED:354-370 | REDACTED:354-370 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:744 — REDACTED:744-760 | agents/drivers/vastbase-go/vastbase_metadata.go:569-585 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (17 lines × 2) REDACTED:113 — REDACTED:113-129 | REDACTED:113-129 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D2 · Cognitive Complexity · dbx · ×24
  • dbx::run (cognitive 107) src-tauri/src/lib.rs:1860 — dbx::run has cognitive complexity 107 (threshold 15). Drivers by points: if/else 54 (97 pts), match/switch 4 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::connection::test_connection_with_info_impl (cognitive 96) src-tauri/src/commands/connection.rs:1636 — dbx::commands::connection::test_connection_with_info_impl has cognitive complexity 96 (threshold 15). Drivers by points: match/switch 19 (51 pts), if/else 21 (37 pts), boolean chains 8 (nesting depth added 48). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx::commands::connection::connect_db_inner (cognitive 57) src-tauri/src/commands/connection.rs:2312 — dbx::commands::connection::connect_db_inner has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (39 pts), match/switch 5 (12 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::list_sql_files::scan_sql_files_with_diagnostics (cognitive 39) src-tauri/src/commands/list_sql_files.rs:254 — dbx::commands::list_sql_files::scan_sql_files_with_diagnostics has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::handle_sql_approval (cognitive 39) src-tauri/src/commands/mcp_bridge.rs:1812 — dbx::commands::mcp_bridge::handle_sql_approval has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 7 (8 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::start (cognitive 36) src-tauri/src/commands/mcp_bridge.rs:341 — dbx::commands::mcp_bridge::start has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28 (30 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx::commands::global_search::search_root (cognitive 35) src-tauri/src/commands/global_search.rs:150 — dbx::commands::global_search::search_root has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::connection::sync_connection_configs (cognitive 34) src-tauri/src/commands/connection.rs:1365 — dbx::commands::connection::sync_connection_configs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_cleanup::sweep (cognitive 25) src-tauri/src/commands/mcp_cleanup.rs:49 — dbx::commands::mcp_cleanup::sweep has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::plugin_file::drop::open_dropped_plugin_files (cognitive 25) src-tauri/src/commands/plugin_file/drop.rs:31 — dbx::commands::plugin_file::drop::open_dropped_plugin_files has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::saved_sql::sync_saved_sql_directory_blocking (cognitive 20) src-tauri/src/commands/saved_sql.rs:143 — dbx::commands::saved_sql::sync_saved_sql_directory_blocking has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::redis_pubsub_server::handle_monitor_socket (cognitive 19) src-tauri/src/commands/redis_pubsub_server.rs:107 — dbx::commands::redis_pubsub_server::handle_monitor_socket has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (8 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx::webview2_preflight::spawn_preflight_child (cognitive 19) src-tauri/src/webview2_preflight.rs:960 — dbx::webview2_preflight::spawn_preflight_child has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 4 (5 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::locale_family (cognitive 18) src-tauri/src/lib.rs:879 — dbx::locale_family has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::background_backup::run_if_requested (cognitive 18) src-tauri/src/background_backup.rs:369 — dbx::background_backup::run_if_requested has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::plugin_download::download_plugin_file (cognitive 18) src-tauri/src/commands/plugin_download.rs:36 — dbx::commands::plugin_download::download_plugin_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::plugin_file::drop::collect_folder_files (cognitive 18) src-tauri/src/commands/plugin_file/drop.rs:167 — dbx::commands::plugin_file::drop::collect_folder_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::plugin_ui_protocol::media_response (cognitive 18) src-tauri/src/plugin_ui_protocol.rs:141 — dbx::plugin_ui_protocol::media_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx::webview2_preflight::runtime_health (cognitive 18) src-tauri/src/webview2_preflight.rs:261 — dbx::webview2_preflight::runtime_health has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::handle_execute_query_data (cognitive 17) src-tauri/src/commands/mcp_bridge.rs:2966 — dbx::commands::mcp_bridge::handle_execute_query_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (6 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::commands::update::download_update_inner (cognitive 17) src-tauri/src/commands/update.rs:761 — dbx::commands::update::download_update_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::fs_open::validate_database_backup_file (cognitive 16) src-tauri/src/commands/fs_open.rs:106 — dbx::commands::fs_open::validate_database_backup_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::read_bridge_request (cognitive 16) src-tauri/src/commands/mcp_bridge.rs:473 — dbx::commands::mcp_bridge::read_bridge_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::plugin_ui_protocol::serve_plugin_media (cognitive 16) src-tauri/src/plugin_ui_protocol.rs:76 — dbx::plugin_ui_protocol::serve_plugin_media has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D29 · Static Analysis (SAST) · REDACTED · ×24
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×22
  • Duplicated block (18 lines × 2) REDACTED:1208 — REDACTED:1208-1225 | REDACTED:1259-1276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1208` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) REDACTED:1404 — REDACTED:1404-1421 | REDACTED:7116-7133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-driver-mongodb/src/mongo_shell.rs:1866 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1866-1883 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1908-1925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_shell.rs:1866` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/dbx-driver-mongodb/src/mongo_shell.rs:1875 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1875-1892 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1958-1975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_shell.rs:1875` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:554 — crates/dbx-drivers/src/db/ssh_tunnel.rs:554-571 | crates/dbx-drivers/src/db/ssh_tunnel.rs:648-665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-mcp/src/server.rs:840 — crates/dbx-mcp/src/server.rs:840-857 | crates/dbx-mcp/src/server.rs:893-910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:840` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-mcp/src/server.rs:839` calls `take` and `crates/dbx-mcp/src/server.rs:892` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:281 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:281-298 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:427-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-web/src/routes/query.rs:497 — crates/dbx-web/src/routes/query.rs:497-514 | crates/dbx-web/src/routes/query.rs:662-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:548 — crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:548-565 | crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:580-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:6218 — crates/dbx-sql-schema/src/schema_diff.rs:6218-6238 | crates/dbx-sql-schema/src/schema_diff.rs:6263-6280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:6218` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) REDACTED:1717 — REDACTED:1717-1734 | agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:157-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (18 lines × 2) agents/drivers/argo-go/connector.go:182 — agents/drivers/argo-go/connector.go:182-199 | agents/drivers/hive-go/connector.go:183-200 — `agents/drivers/argo-go/connector.go` and `agents/drivers/hive-go/connector.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) agents/drivers/argo-go/main.go:296 — agents/drivers/argo-go/main.go:296-313 | agents/drivers/hive-go/main.go:296-313 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) agents/drivers/argo-go/metadata.go:756 — agents/drivers/argo-go/metadata.go:756-773 | agents/drivers/hive-go/metadata.go:767-784 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:756` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) REDACTED:242 — REDACTED:242-259 | REDACTED:242-259 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:262 — REDACTED:262-279 | REDACTED:262-279 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) agents/drivers/cassandra-go/main.go:325 — agents/drivers/cassandra-go/main.go:325-342 | agents/drivers/iotdb/main.go:327-344 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:325` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) agents/drivers/cassandra-go/metadata.go:563 — agents/drivers/cassandra-go/metadata.go:563-580 | agents/drivers/iotdb/metadata.go:517-534 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/metadata.go:563` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) REDACTED:375 — REDACTED:375-392 | agents/drivers/vastbase-go/vastbase_metadata.go:226-243 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:375` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (18 lines × 2) agents/drivers/kingbase-go/main.go:511 — agents/drivers/kingbase-go/main.go:511-528 | agents/drivers/kingbase-go/main.go:716-733 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) REDACTED:859 — REDACTED:859-876 | agents/drivers/vastbase-go/vastbase_metadata.go:684-701 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (18 lines × 2) REDACTED:354 — REDACTED:354-371 | agents/drivers/vastbase-go/vastbase_metadata.go:205-222 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×22
  • Duplicated block (10 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262-271 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:336-345 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:754-763 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) REDACTED:3907 — REDACTED:3907-3916 | src-tauri/src/commands/connection.rs:1997-2006 | src-tauri/src/commands/connection.rs:2578-2587 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3907` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) REDACTED:6589 — REDACTED:6589-6598 | REDACTED:7745-7754 | REDACTED:7778-7787 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6589` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:7755` calls `remove_pool_owners` and `REDACTED:6599` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) REDACTED:1675 — REDACTED:1675-1684 | REDACTED:1871-1880 | REDACTED:2177-2186 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1675` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 3) crates/dbx-core/src/data/transfer.rs:15006 — crates/dbx-core/src/data/transfer.rs:15006-15015 | crates/dbx-core/src/data/transfer.rs:15097-15106 | crates/dbx-core/src/data/transfer.rs:15155-15164 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:15006` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 3) REDACTED:8523 — REDACTED:8523-8532 | REDACTED:8560-8569 | REDACTED:8618-8627 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8523` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) REDACTED:8538 — REDACTED:8538-8547 | REDACTED:8575-8584 | REDACTED:8633-8642 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8538` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:428 — crates/dbx-driver-mongodb/src/mongo_shell.rs:428-437 | crates/dbx-web/src/routes/mcp_policy.rs:110-119 | src-tauri/src/commands/mcp_bridge.rs:1618-1627 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/dbx-driver-redis/src/lib.rs:751 — crates/dbx-driver-redis/src/lib.rs:751-760 | crates/dbx-driver-redis/src/lib.rs:1061-1070 | crates/dbx-driver-redis/src/lib.rs:1097-1106 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-redis/src/lib.rs:751` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/dbx-sql-data/src/query_result_sql.rs:1365 — crates/dbx-sql-data/src/query_result_sql.rs:1365-1374 | crates/dbx-sql-data/src/query_result_sql.rs:1431-1440 | crates/dbx-sql-data/src/query_result_sql.rs:2892-2901 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:4123 — crates/dbx-sql-schema/src/schema_diff.rs:4123-4132 | crates/dbx-sql-schema/src/schema_diff.rs:4265-4274 | crates/dbx-sql-schema/src/schema_diff.rs:4312-4321 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:4123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `source` to `&[TriggerInfo]` in one and `&[SequenceInfo]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 3) crates/dbx-web/src/routes/query.rs:496 — crates/dbx-web/src/routes/query.rs:496-505 | crates/dbx-web/src/routes/query.rs:559-568 | crates/dbx-web/src/routes/query.rs:661-670 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) REDACTED:3644 — REDACTED:3644-3653 | REDACTED:3974-3983 | REDACTED:4373-4382 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:189 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:189-198 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:240-249 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:333-342 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/data_grid_extractors/sql.rs:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23 — agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23-32 | REDACTED:1147-1156 | REDACTED:274-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:22` calls `orNone` and `REDACTED:1146` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) agents/drivers/argo-go/main.go:394 — agents/drivers/argo-go/main.go:394-403 | agents/drivers/hive-go/main.go:394-403 | REDACTED:1142-1151 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:394` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) agents/drivers/argo-go/query.go:494 — agents/drivers/argo-go/query.go:494-503 | agents/drivers/hive-go/query.go:497-506 | REDACTED:6656-6665 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) agents/drivers/etcd-go/main.go:169 — agents/drivers/etcd-go/main.go:169-178 | agents/drivers/etcd2-go/main.go:139-148 | agents/drivers/neo4j-go/main.go:174-183 — `agents/drivers/etcd-go/main.go` and `agents/drivers/etcd2-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 287 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/etcd-go/main.go:169` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) agents/drivers/iotdb/main.go:285 — agents/drivers/iotdb/main.go:285-294 | agents/drivers/kingbase-go/main.go:339-348 | agents/drivers/vastbase-go/main.go:348-357 — `agents/drivers/iotdb/main.go` and `agents/drivers/kingbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 3) agents/drivers/argo-go/kerberos_defaults_windows.go:10 — agents/drivers/argo-go/kerberos_defaults_windows.go:10-19 | agents/drivers/hive-go/kerberos_defaults_windows.go:10-19 | agents/go-common/go-gssapi/krb5/default_paths_windows.go:10-23 — `agents/drivers/argo-go/kerberos_defaults_windows.go` and `agents/drivers/hive-go/kerberos_defaults_windows.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 14 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10 lines × 3) agents/drivers/etcd-go/auth.go:250 — agents/drivers/etcd-go/auth.go:250-259 | agents/drivers/etcd-go/auth.go:363-372 | agents/drivers/etcd-go/auth.go:380-389 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 3) agents/drivers/rabbitmq/operations.go:320 — agents/drivers/rabbitmq/operations.go:320-329 | agents/drivers/rabbitmq/operations.go:915-924 | agents/drivers/rabbitmq/operations.go:1399-1408 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/rabbitmq/operations.go:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R4 · Test Coverage · No test reaches this file · ×22
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/App.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file agents/scripts/build_offline_jdbc_payload.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/debug/plDebugWatch.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/plugin-cli/scripts/stage-sdk.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/viteConnectionTypesPlugin.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/types/pluginAiTools.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/PluginIcon.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/DebugPanel.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/cli/templates/svelte/src/App.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/plugin-cli/scripts/stage-dev.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/diagram/diagramZoom.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/app/pinnedTreeNodeIds.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/build.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/history/historyActions.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/cli/templates/svelte/src/main.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/main.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file deploy/database/mongodb/5.0/init/001-smoke.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file deploy/database/mongodb/8.2/init/001-smoke.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×21
  • Edited copy of a member (27 corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:323 — crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:323-349 | crates/dbx-sql-schema/src/table_structure_sql/columns.rs:687-713 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-web/src/routes/sql_file.rs:500 — crates/dbx-web/src/routes/sql_file.rs:500-533 | src-tauri/src/commands/sql_file.rs:332-358 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:204 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:204-230 | crates/dbx-drivers/src/salesforce_oauth.rs:281-307 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:495 — crates/dbx-core/src/connection/connection_secrets.rs:495-521 | REDACTED:10170-10198 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) src-tauri/src/commands/list_sql_files.rs:629 — src-tauri/src/commands/list_sql_files.rs:629-655 | src-tauri/src/commands/list_sql_files.rs:699-726 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-core/src/schema/mod.rs:10187 — crates/dbx-core/src/schema/mod.rs:10187-10217 | crates/dbx-core/src/schema/normalization.rs:98-124 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-ai-provider/src/ai.rs:2562 — crates/dbx-ai-provider/src/ai.rs:2562-2588 | crates/dbx-ai-provider/src/ai.rs:2590-2625 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:7036 — crates/dbx-driver-mysql/src/mysql.rs:7036-7063 | crates/dbx-driver-mysql/src/mysql.rs:7075-7101 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/drivers/xugu/package_members.go:96 — agents/drivers/xugu/package_members.go:96-122 | agents/drivers/xugu/type_members.go:225-253 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:273 — REDACTED:273-305 | REDACTED:176-202 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:1122 — REDACTED:1122-1148 | REDACTED:1150-1176 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:437 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:437-477 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:688-714 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/drivers/vastbase-go/main.go:922 — agents/drivers/vastbase-go/main.go:922-948 | REDACTED:4166-4195 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:323 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:323-350 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:353-379 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/dbx-sql-data/src/query_result_sql.rs:1470 — crates/dbx-sql-data/src/query_result_sql.rs:1470-1502 | crates/dbx-sql-data/src/query_result_sql.rs:1609-1635 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/drivers/kingbase-go/main.go:1252 — agents/drivers/kingbase-go/main.go:1252-1278 | REDACTED:1545-1573 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:2321 — REDACTED:2321-2347 | REDACTED:3306-3342 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/go-common/go-gssapi/krb5/message_token.go:160 — agents/go-common/go-gssapi/krb5/message_token.go:160-187 | agents/go-common/go-gssapi/krb5/message_token.go:377-403 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:3059 — REDACTED:3059-3085 | REDACTED:4006-4036 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:8685 — REDACTED:8685-8711 | REDACTED:8743-8785 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) agents/drivers/kingbase-go/bench/agent_compare.go:225 — agents/drivers/kingbase-go/bench/agent_compare.go:225-251 | agents/drivers/vastbase-go/bench/agent_compare.go:590-617 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×21
  • Edited copy of a member (19 corresponding lines) crates/dbx-ai-provider/src/ai_cli_agent.rs:449 — crates/dbx-ai-provider/src/ai_cli_agent.rs:449-467 | crates/dbx-ai-provider/src/ai_cli_agent.rs:617-645 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:420 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:420-439 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:710-728 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src-tauri/src/commands/app_settings.rs:531 — src-tauri/src/commands/app_settings.rs:531-560 | src-tauri/src/commands/app_settings.rs:591-609 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1224 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1224-1242 | REDACTED:1846-1869 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:2667 — crates/dbx-core/src/persistence/cloud_sync.rs:2667-2685 | crates/dbx-core/src/persistence/cloud_sync.rs:2704-2723 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:912 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:912-933 | REDACTED:2999-3017 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-core/src/data/sqlite_backup.rs:92 — crates/dbx-core/src/data/sqlite_backup.rs:92-110 | crates/dbx-driver-agent/src/agent_service.rs:2772-2792 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1379 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1379-1401 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1403-1421 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-core/src/schema/agent_pg_sequences.rs:172 — crates/dbx-core/src/schema/agent_pg_sequences.rs:172-190 | crates/dbx-core/src/schema/kingbase.rs:202-220 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src-tauri/src/commands/cloud_sync.rs:198 — src-tauri/src/commands/cloud_sync.rs:198-224 | src-tauri/src/commands/cloud_sync.rs:393-411 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) REDACTED:195 — REDACTED:195-214 | REDACTED:287-305 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:386 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:386-404 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:407-425 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/dbx-web/src/routes/etcd.rs:272 — crates/dbx-web/src/routes/etcd.rs:272-290 | crates/dbx-web/src/routes/etcd.rs:295-313 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) REDACTED:855 — REDACTED:855-876 | REDACTED:878-896 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:733 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:733-751 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:315-339 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) REDACTED:1774 — REDACTED:1774-1792 | agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:111-137 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:906 — agents/go-common/iotdb-client-go/client/session.go:906-924 | agents/go-common/iotdb-client-go/client/session.go:926-944 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/vastbase-go/main.go:491 — agents/drivers/vastbase-go/main.go:491-509 | agents/drivers/vastbase-go/main.go:511-533 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/vastbase-go/spatial.go:105 — agents/drivers/vastbase-go/spatial.go:105-123 | agents/drivers/xugu/spatial.go:174-192 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/cassandra-go/runtime.go:170 — agents/drivers/cassandra-go/runtime.go:170-188 | agents/drivers/neo4j-go/main.go:370-388 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) agents/drivers/kingbase-go/bench/agent_compare.go:162 — agents/drivers/kingbase-go/bench/agent_compare.go:162-181 | REDACTED:420-438 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×21
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-driver-postgres/src/text_encoding.rs:675 — crates/dbx-driver-postgres/src/text_encoding.rs:675-681 | crates/dbx-driver-postgres/src/text_encoding.rs:682-688 | crates/dbx-driver-postgres/src/text_encoding.rs:689-695 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:2221 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2221-2227 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2236-2242 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2962-2973 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) REDACTED:1888 — REDACTED:1888-1894 | REDACTED:9031-9037 | REDACTED:9059-9065 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src-tauri/src/commands/plugins.rs:71 — src-tauri/src/commands/plugins.rs:71-77 | src-tauri/src/commands/plugins.rs:83-91 | src-tauri/src/commands/plugins.rs:97-105 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-core/src/admin/consul/mesh/intentions.rs:121 — crates/dbx-core/src/admin/consul/mesh/intentions.rs:121-127 | crates/dbx-core/src/admin/consul/mesh/intentions.rs:133-141 | crates/dbx-core/src/admin/consul/mesh/peering.rs:102-108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/database_export.rs:157 — crates/dbx-web/src/routes/database_export.rs:157-163 | crates/dbx-web/src/routes/mongodb_import_export.rs:330-336 | crates/dbx-web/src/routes/table_import.rs:381-387 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/mq.rs:591 — crates/dbx-web/src/routes/mq.rs:591-597 | crates/dbx-web/src/routes/mq.rs:696-702 | crates/dbx-web/src/routes/mq.rs:1000-1006 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/mq.rs:882 — crates/dbx-web/src/routes/mq.rs:882-889 | crates/dbx-web/src/routes/mq.rs:975-981 | crates/dbx-web/src/routes/mq.rs:1360-1366 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-core/src/admin/consul/agent.rs:335 — crates/dbx-core/src/admin/consul/agent.rs:335-342 | crates/dbx-core/src/admin/consul/agent.rs:344-350 | crates/dbx-core/src/admin/consul/agent.rs:352-358 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) REDACTED:3179 — REDACTED:3179-3194 | REDACTED:3203-3217 | crates/dbx-core/src/data/transfer.rs:1407-1413 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/document_store.rs:816 — crates/dbx-web/src/routes/document_store.rs:816-822 | crates/dbx-web/src/routes/document_store.rs:827-833 | crates/dbx-web/src/routes/document_store.rs:909-921 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-ai-provider/src/ai.rs:5282 — crates/dbx-ai-provider/src/ai.rs:5282-5288 | crates/dbx-ai-provider/src/ai.rs:5320-5326 | crates/dbx-core/src/persistence/history.rs:118-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-core/src/schema/mod.rs:1550 — crates/dbx-core/src/schema/mod.rs:1550-1556 | crates/dbx-core/src/schema/mod.rs:13002-13009 | crates/dbx-drivers/src/db/questdb.rs:228-235 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/consul.rs:302 — crates/dbx-web/src/routes/consul.rs:302-308 | crates/dbx-web/src/routes/consul.rs:323-329 | crates/dbx-web/src/routes/etcd.rs:186-192 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) agents/common/src/main/java/com/dbx/agent/JdbcAgentProfile.java:231 — agents/common/src/main/java/com/dbx/agent/JdbcAgentProfile.java:231-237 | agents/drivers/access/src/main/java/com/dbx/agent/access/AccessAgent.java:294-300 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:678-684 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/document_store.rs:430 — crates/dbx-web/src/routes/document_store.rs:430-437 | crates/dbx-web/src/routes/document_store.rs:639-645 | crates/dbx-web/src/routes/document_store.rs:650-656 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-web/src/routes/document_store.rs:628 — crates/dbx-web/src/routes/document_store.rs:628-634 | crates/dbx-web/src/routes/document_store.rs:696-702 | crates/dbx-web/src/routes/document_store.rs:707-714 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:12 — agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:12-19 | REDACTED:1138-1144 | REDACTED:265-271 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/dbx-cli/src/agent_skill.rs:309 — crates/dbx-cli/src/agent_skill.rs:309-315 | crates/dbx-formats/src/sql_file_zip_package.rs:127-137 | plugins/sdk/cli/src/lib.rs:1410-1418 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:552 — agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:552-558 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1257-1266 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:1125-1131 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) REDACTED:3966 — REDACTED:3966-3972 | crates/dbx-core/src/query/plugin_data.rs:182-188 | REDACTED:545-551 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×21
  • Duplicated block (8 lines × 3) agents/drivers/duckdb/src/sql.rs:396 — agents/drivers/duckdb/src/sql.rs:396-403 | crates/dbx-driver-mysql/src/mysql.rs:7915-7923 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4618-4626 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:396` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/dbx-core/src/admin/nacos/access_control.rs:161 — crates/dbx-core/src/admin/nacos/access_control.rs:161-168 | crates/dbx-core/src/admin/nacos/access_control.rs:184-192 | crates/dbx-core/src/admin/nacos/access_control.rs:208-216 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/access_control.rs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) REDACTED:7789 — REDACTED:7789-7796 | REDACTED:7819-7826 | REDACTED:7847-7854 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7789` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) REDACTED:481 — REDACTED:481-488 | crates/dbx-drivers/src/db/rqlite_driver.rs:378-385 | crates/dbx-drivers/src/db/turso_driver.rs:623-630 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:481` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/dbx-drivers/src/db/rqlite_driver.rs:321 — crates/dbx-drivers/src/db/rqlite_driver.rs:321-328 | crates/dbx-drivers/src/db/turso_driver.rs:415-422 | crates/dbx-drivers/src/db/turso_driver.rs:438-445 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:321` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/dbx-plugin-runtime/src/plugins/host.rs:193 — crates/dbx-plugin-runtime/src/plugins/host.rs:193-200 | crates/dbx-plugin-runtime/src/plugins/host.rs:236-243 | crates/dbx-plugin-runtime/src/plugins/host.rs:571-578 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) crates/dbx-web/src/routes/cloud_sync.rs:411 — crates/dbx-web/src/routes/cloud_sync.rs:411-418 | crates/dbx-web/src/routes/cloud_sync.rs:465-472 | crates/dbx-web/src/routes/cloud_sync.rs:502-509 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-web/src/routes/cloud_sync.rs:410` calls `ensure_secret_export_allowed` and `crates/dbx-web/src/routes/cloud_sync.rs:464` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) crates/dbx-web/src/routes/database_export.rs:89 — crates/dbx-web/src/routes/database_export.rs:89-96 | crates/dbx-web/src/routes/query_result_export.rs:93-100 | crates/dbx-web/src/routes/table_export.rs:82-89 — before extracting anything, compare `crates/dbx-web/src/routes/database_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/database_export.rs:89` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-web/src/routes/query_result_export.rs:101` calls `drop` and `crates/dbx-web/src/routes/table_export.rs:91` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) REDACTED:291 — REDACTED:291-298 | crates/dbx-drivers/src/db/rqlite_driver.rs:160-167 | crates/dbx-drivers/src/db/turso_driver.rs:221-228 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) REDACTED:567 — REDACTED:567-574 | crates/dbx-drivers/src/db/rqlite_driver.rs:417-424 | crates/dbx-drivers/src/db/turso_driver.rs:662-669 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) crates/dbx-core/src/connection/connection_secrets.rs:949 — crates/dbx-core/src/connection/connection_secrets.rs:949-956 | crates/dbx-core/src/persistence/cloud_sync.rs:2961-2968 | REDACTED:3595-3602 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `crates/dbx-core/src/persistence/cloud_sync.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/dbx-plugin-runtime/src/plugins/assets.rs:114 — crates/dbx-plugin-runtime/src/plugins/assets.rs:114-121 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1280-1287 | plugins/sdk/packager/src/main.rs:637-644 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187-194 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:213-221 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:227-235 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:186` calls `catalogBuiltinFunction`, `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:213` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502-509 | REDACTED:2164-2171 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:422-429 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:854 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:854-861 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:923-930 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1451-1458 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:854` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:862` calls `put`, `partitions`, `size` and `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1459` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1974 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1974-1981 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2065-2072 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2229-2236 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1982` calls `isEmpty` and `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2073` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1987 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1987-1994 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2075-2082 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2240-2247 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1987` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2239` calls `commitLatestPeekRange` and `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1986` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/drivers/argo-go/main.go:441 — agents/drivers/argo-go/main.go:441-448 | agents/drivers/cassandra-go/main.go:370-377 | agents/drivers/hive-go/main.go:441-448 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:441` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) REDACTED:3000 — REDACTED:3000-3007 | agents/drivers/vastbase-go/vastbase_metadata.go:1949-1956 | agents/drivers/vastbase-go/vastbase_metadata.go:1985-1992 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3000` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 3) agents/drivers/kingbase-go/main.go:789 — agents/drivers/kingbase-go/main.go:789-796 | agents/drivers/neo4j-go/main.go:522-529 | agents/drivers/vastbase-go/main.go:667-674 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/neo4j-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 23 separate duplicated blocks between them, totalling at least 248 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (8 lines × 3) agents/drivers/kingbase-go/main.go:1954 — agents/drivers/kingbase-go/main.go:1954-1961 | agents/drivers/vastbase-go/bench/direct/main.go:162-169 | agents/drivers/vastbase-go/main.go:1343-1350 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D1 · Cyclomatic Complexity · dbx_drivers · ×20
  • dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cyclomatic 37) crates/dbx-drivers/src/db/ssh_tunnel.rs:439 — dbx_drivers::db::ssh_tunnel::connect_and_authenticate has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::normalize_sqlite_sql (cyclomatic 27) crates/dbx-drivers/src/db/sqlite.rs:2780 — dbx_drivers::db::sqlite::normalize_sqlite_sql has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql (cyclomatic 26) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:9 — dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns (cyclomatic 26) crates/dbx-drivers/src/db/sqlite.rs:1963 — dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::duckdb_sql::split_sql_statements (cyclomatic 25) crates/dbx-drivers/src/db/duckdb_sql.rs:11 — dbx_drivers::db::duckdb_sql::split_sql_statements has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_drivers::db::solr_driver::translate_field_operator_filter (cyclomatic 25) crates/dbx-drivers/src/db/solr_driver.rs:426 — dbx_drivers::db::solr_driver::translate_field_operator_filter has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_drivers::db::ssh_tunnel::forward_loop (cyclomatic 24) crates/dbx-drivers/src/db/ssh_tunnel.rs:1386 — dbx_drivers::db::ssh_tunnel::forward_loop has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement (cyclomatic 23) crates/dbx-drivers/src/db/dynamodb_driver.rs:473 — dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::tokenize_entry (cyclomatic 23) crates/dbx-drivers/src/db/sqlite.rs:2377 — dbx_drivers::db::sqlite::tokenize_entry has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::strip_sql_comments (cyclomatic 20) crates/dbx-drivers/src/db/sqlite.rs:2119 — dbx_drivers::db::sqlite::strip_sql_comments has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::proxy_tunnel::test_proxy_endpoint (cyclomatic 19) crates/dbx-drivers/src/db/proxy_tunnel.rs:518 — dbx_drivers::db::proxy_tunnel::test_proxy_endpoint has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::couchdb_driver::couchdb_docs_to_table (cyclomatic 17) crates/dbx-drivers/src/db/couchdb_driver.rs:533 — dbx_drivers::db::couchdb_driver::couchdb_docs_to_table has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::validate_number (cyclomatic 17) crates/dbx-drivers/src/db/dynamodb_driver.rs:1549 — dbx_drivers::db::dynamodb_driver::validate_number has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::salesforce_driver::apply_fields_function_limit (cyclomatic 17) REDACTED:896 — dbx_drivers::db::salesforce_driver::apply_fields_function_limit has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::solr_driver::solr_docs_to_table (cyclomatic 17) crates/dbx-drivers/src/db/solr_driver.rs:910 — dbx_drivers::db::solr_driver::solr_docs_to_table has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::extract_create_table_body (cyclomatic 17) crates/dbx-drivers/src/db/sqlite.rs:2050 — dbx_drivers::db::sqlite::extract_create_table_body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::parse_table_level_primary_key (cyclomatic 17) crates/dbx-drivers/src/db/sqlite.rs:2319 — dbx_drivers::db::sqlite::parse_table_level_primary_key has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal (cyclomatic 17) crates/dbx-drivers/src/db/transport_layer_tunnel.rs:263 — dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::json_to_attribute_value (cyclomatic 16) crates/dbx-drivers/src/db/dynamodb_driver.rs:1446 — dbx_drivers::db::dynamodb_driver::json_to_attribute_value has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv (cyclomatic 16) crates/dbx-drivers/src/db/ssh_proxy_command.rs:55 — dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · dbx_ai_provider · ×20
  • dbx_ai_provider::ai::stream_claude_with_tools (cognitive 128) crates/dbx-ai-provider/src/ai.rs:4433 — dbx_ai_provider::ai::stream_claude_with_tools has cognitive complexity 128 (threshold 15). Drivers by points: if/else 25 (105 pts), match/switch 3 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_openai_with_tools (cognitive 110) crates/dbx-ai-provider/src/ai.rs:4658 — dbx_ai_provider::ai::stream_openai_with_tools has cognitive complexity 110 (threshold 15). Drivers by points: if/else 22 (94 pts), loops 3 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_openai (cognitive 68) crates/dbx-ai-provider/src/ai.rs:3978 — dbx_ai_provider::ai::stream_openai has cognitive complexity 68 (threshold 15). Drivers by points: if/else 13 (59 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::build_gemini_contents (cognitive 60) crates/dbx-ai-provider/src/ai.rs:5001 — dbx_ai_provider::ai::build_gemini_contents has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 3 (11 pts), boolean chains 3 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_ai_provider::ai::stream_responses_with_tools (cognitive 57) crates/dbx-ai-provider/src/ai.rs:4842 — dbx_ai_provider::ai::stream_responses_with_tools has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (46 pts), match/switch 2 (7 pts), loops 2 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_gemini_with_tools (cognitive 55) crates/dbx-ai-provider/src/ai.rs:5106 — dbx_ai_provider::ai::stream_gemini_with_tools has cognitive complexity 55 (threshold 15). Drivers by points: if/else 9 (42 pts), loops 3 (11 pts), match/switch 1 (2 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_ai_provider::ai::stream_claude (cognitive 43) crates/dbx-ai-provider/src/ai.rs:3873 — dbx_ai_provider::ai::stream_claude has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent (cognitive 35) crates/dbx-ai-provider/src/ai_cli_agent.rs:1073 — dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 3 (6 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_pi_agent_cli::emit_pi_event (cognitive 35) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:655 — dbx_ai_provider::ai_pi_agent_cli::emit_pi_event has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 1 (4 pts), match/switch 2 (3 pts) (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_ai_provider::ai::stream_responses_api (cognitive 30) crates/dbx-ai-provider/src/ai.rs:4126 — dbx_ai_provider::ai::stream_responses_api has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::measure_first_stream_chunk (cognitive 28) crates/dbx-ai-provider/src/ai.rs:3133 — dbx_ai_provider::ai::measure_first_stream_chunk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_claude_code_cli::parse_claude_code_models (cognitive 25) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:355 — dbx_ai_provider::ai_claude_code_cli::parse_claude_code_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_gemini (cognitive 23) crates/dbx-ai-provider/src/ai.rs:4220 — dbx_ai_provider::ai::stream_gemini has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::resolve_endpoint (cognitive 21) crates/dbx-ai-provider/src/ai.rs:951 — dbx_ai_provider::ai::resolve_endpoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::test_connection_core (cognitive 21) crates/dbx-ai-provider/src/ai.rs:3271 — dbx_ai_provider::ai::test_connection_core has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_opencode_cli::parse_opencode_models (cognitive 21) crates/dbx-ai-provider/src/ai_opencode_cli.rs:444 — dbx_ai_provider::ai_opencode_cli::parse_opencode_models has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::list_claude_models (cognitive 18) crates/dbx-ai-provider/src/ai.rs:2122 — dbx_ai_provider::ai::list_claude_models has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::classify_error (cognitive 18) crates/dbx-ai-provider/src/ai.rs:3441 — dbx_ai_provider::ai::classify_error has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_ai_provider::ai::build_responses_input_with_tools_variant (cognitive 17) crates/dbx-ai-provider/src/ai.rs:1744 — dbx_ai_provider::ai::build_responses_input_with_tools_variant has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::with_stream_retry (cognitive 17) crates/dbx-ai-provider/src/ai.rs:3687 — dbx_ai_provider::ai::with_stream_retry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×20
  • Edited copy of a member (24 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:2697 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2697-2726 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2745-2768 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-plugin-runtime/src/plugins.rs:330 — crates/dbx-plugin-runtime/src/plugins.rs:330-353 | crates/dbx-plugin-runtime/src/plugins.rs:385-418 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:309 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:309-333 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:340-363 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/data/mongodb_dump/archive.rs:31 — crates/dbx-core/src/data/mongodb_dump/archive.rs:31-54 | crates/dbx-core/src/data/mongodb_import_export.rs:1368-1404 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) agents/drivers/xugu/type_members.go:562 — agents/drivers/xugu/type_members.go:562-585 | agents/drivers/xugu/type_members.go:587-624 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/admin/mq/mod.rs:84 — crates/dbx-core/src/admin/mq/mod.rs:84-118 | crates/dbx-core/src/admin/nacos/mod.rs:84-107 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:3658 — crates/dbx-core/src/admin/nacos/http.rs:3658-3681 | crates/dbx-core/src/admin/nacos/http.rs:3683-3711 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/admin/consul/blocking.rs:364 — crates/dbx-core/src/admin/consul/blocking.rs:364-387 | crates/dbx-core/src/admin/consul/txn.rs:357-380 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:146 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:146-173 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:216-239 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src-tauri/src/commands/mongodb_dump.rs:36 — src-tauri/src/commands/mongodb_dump.rs:36-59 | src-tauri/src/commands/mongodb_dump.rs:66-90 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-driver-redis/src/lib.rs:4031 — crates/dbx-driver-redis/src/lib.rs:4031-4054 | crates/dbx-driver-redis/src/lib.rs:5846-5871 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) agents/drivers/oracle-go/pldebug_rows.go:132 — agents/drivers/oracle-go/pldebug_rows.go:132-156 | agents/drivers/oracle-go/pldebug_statement.go:64-87 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:1125 — agents/go-common/iotdb-client-go/client/session.go:1125-1148 | agents/go-common/iotdb-client-go/client/session.go:1150-1173 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) agents/drivers/etcd-go/auth.go:287 — agents/drivers/etcd-go/auth.go:287-311 | agents/drivers/etcd2-go/auth.go:170-193 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:3865 — REDACTED:3865-3888 | REDACTED:3903-3934 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:465 — REDACTED:465-495 | agents/drivers/vastbase-go/vastbase_metadata.go:301-324 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:3802 — REDACTED:3802-3825 | REDACTED:3827-3851 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) REDACTED:2499 — REDACTED:2499-2522 | agents/drivers/vastbase-go/vastbase_metadata.go:1499-1523 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/dbx-driver-mongodb/src/mongo_oidc.rs:179 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:179-202 | crates/dbx-drivers/src/salesforce_oauth.rs:250-273 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src-tauri/src/commands/query.rs:544 — src-tauri/src/commands/query.rs:544-568 | src-tauri/src/commands/query.rs:606-629 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×20
  • Edited copy of a member (17 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:3557 — crates/dbx-driver-sqlserver/src/sqlserver.rs:3557-3573 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3659-3680 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-core/src/admin/mqtt/client.rs:355 — crates/dbx-core/src/admin/mqtt/client.rs:355-374 | crates/dbx-core/src/admin/mqtt/client.rs:376-392 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:629 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:629-645 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:872-888 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:1232 — REDACTED:1232-1254 | REDACTED:1256-1272 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:881 — REDACTED:881-897 | REDACTED:904-925 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:218 — REDACTED:218-234 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:276-299 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:737 — crates/dbx-core/src/connection/connection_secrets.rs:737-753 | REDACTED:10366-10393 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:2570 — REDACTED:2570-2593 | REDACTED:4852-4868 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:10744 — REDACTED:10744-10769 | REDACTED:11195-11211 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:565 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:565-581 | agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:614-634 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-drivers/src/db/sqlite.rs:2758 — crates/dbx-drivers/src/db/sqlite.rs:2758-2776 | crates/dbx-sqlite-worker/src/runtime.rs:98-114 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:1354 — REDACTED:1354-1371 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:570-586 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) agents/drivers/rabbitmq/operations.go:848 — agents/drivers/rabbitmq/operations.go:848-869 | agents/drivers/rabbitmq/operations.go:889-905 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-core/src/admin/nacos/service.rs:33 — crates/dbx-core/src/admin/nacos/service.rs:33-50 | crates/dbx-core/src/admin/nacos/service.rs:567-583 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:213 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:213-231 | agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:234-250 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/dialect_types.rs:29 — crates/dbx-sql-dialect/src/sql_dialect/dialect_types.rs:29-45 | REDACTED:949-966 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:5826 — REDACTED:5826-5842 | REDACTED:5844-5862 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) agents/go-common/go-gssapi/krb5/message_token.go:142 — agents/go-common/go-gssapi/krb5/message_token.go:142-158 | agents/go-common/go-gssapi/krb5/message_token.go:405-421 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/dbx-web/src/routes/table_import.rs:29 — crates/dbx-web/src/routes/table_import.rs:29-45 | crates/dbx-web/src/routes/table_import.rs:47-63 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:1689 — REDACTED:1689-1705 | REDACTED:1714-1739 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×20
  • Duplicated block (20 lines × 2) REDACTED:3960 — REDACTED:3960-3979 | src-tauri/src/commands/connection.rs:2673-2692 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3960` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:3961 — crates/dbx-driver-sqlserver/src/sqlserver.rs:3961-3980 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4085-4104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/dbx-drivers/src/db/dynamodb_driver.rs:666 — crates/dbx-drivers/src/db/dynamodb_driver.rs:666-685 | REDACTED:1216-1235 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) crates/dbx-sql-core/src/sql_analysis.rs:580 — crates/dbx-sql-core/src/sql_analysis.rs:580-599 | crates/dbx-sql-core/src/sql_analysis.rs:788-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/sql_analysis.rs:580` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:257 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:257-276 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:350-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/data_grid_extractors/sql.rs:257` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/dbx-web/src/routes/query_result_export.rs:109 — crates/dbx-web/src/routes/query_result_export.rs:109-128 | crates/dbx-web/src/routes/table_export.rs:97-116 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/query_result_export.rs:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:279 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:279-298 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:598-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) agents/drivers/argo-go/config.go:799 — agents/drivers/argo-go/config.go:799-818 | agents/drivers/hive-go/config.go:839-858 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) REDACTED:277 — REDACTED:277-296 | REDACTED:277-296 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) agents/drivers/argo-go/main.go:369 — agents/drivers/argo-go/main.go:369-388 | agents/drivers/hive-go/main.go:369-388 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) agents/drivers/argo-go/metadata.go:275 — agents/drivers/argo-go/metadata.go:275-294 | agents/drivers/hive-go/metadata.go:281-300 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) REDACTED:506 — REDACTED:506-525 | REDACTED:506-525 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) agents/drivers/etcd-go/watch.go:49 — agents/drivers/etcd-go/watch.go:49-68 | agents/drivers/etcd2-go/watch.go:52-71 — `agents/drivers/etcd-go/watch.go` and `agents/drivers/etcd2-go/watch.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 119 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) REDACTED:671 — REDACTED:671-690 | agents/drivers/vastbase-go/vastbase_metadata.go:496-515 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:671` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) REDACTED:900 — REDACTED:900-919 | agents/drivers/vastbase-go/vastbase_metadata.go:725-744 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) agents/drivers/kingbase-go/main.go:22 — agents/drivers/kingbase-go/main.go:22-41 | agents/drivers/vastbase-go/main.go:19-38 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (20 lines × 2) agents/drivers/kingbase-go/main.go:1139 — agents/drivers/kingbase-go/main.go:1139-1158 | agents/drivers/vastbase-go/main.go:1002-1021 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:1139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) REDACTED:329 — REDACTED:329-348 | agents/drivers/xugu/type_members.go:111-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:329` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) REDACTED:2613 — REDACTED:2613-2632 | agents/drivers/vastbase-go/vastbase_metadata.go:1613-1632 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2613` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) agents/drivers/kingbase-go/bench/agent_compare.go:232 — agents/drivers/kingbase-go/bench/agent_compare.go:232-251 | agents/drivers/vastbase-go/bench/agent_compare.go:598-617 — before extracting anything, compare `agents/drivers/kingbase-go/bench/agent_compare.go` and `agents/drivers/vastbase-go/bench/agent_compare.go` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/bench/agent_compare.go:232` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/vastbase-go/bench/agent_compare.go:597` calls `Delete` and `agents/drivers/kingbase-go/bench/agent_compare.go:231` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×20
  • Duplicated block (19 lines × 2) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:664 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:664-682 | crates/dbx-ai-provider/src/ai_grok_cli.rs:590-608 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:664` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) REDACTED:1655 — REDACTED:1655-1673 | REDACTED:2157-2175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1655` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) REDACTED:1801 — REDACTED:1801-1819 | REDACTED:2514-2532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1801` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:2512` calls `drop` and `REDACTED:1799` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) REDACTED:8735 — REDACTED:8735-8753 | REDACTED:8760-8778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (19 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:3097 — crates/dbx-driver-mysql/src/mysql.rs:3097-3115 | crates/dbx-types/src/models/connection.rs:2085-2103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:3097` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1756 — crates/dbx-sql-data/src/query_result_sql.rs:1756-1774 | crates/dbx-sql-data/src/query_result_sql.rs:1849-1867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:732 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:732-750 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1020-1038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:732` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/dbx-web/src/routes/tunnel_profiles.rs:87 — crates/dbx-web/src/routes/tunnel_profiles.rs:87-105 | src-tauri/src/commands/tunnel_profiles.rs:57-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/tunnel_profiles.rs:87` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) agents/drivers/argo-go/metadata.go:177 — agents/drivers/argo-go/metadata.go:177-195 | agents/drivers/hive-go/metadata.go:177-195 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) agents/drivers/argo-go/protocol_error.go:104 — agents/drivers/argo-go/protocol_error.go:104-122 | agents/drivers/hive-go/protocol_error.go:104-122 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/hive-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 136 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) agents/drivers/argo-go/query.go:425 — agents/drivers/argo-go/query.go:425-443 | agents/drivers/hive-go/query.go:428-446 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) REDACTED:387 — REDACTED:387-405 | REDACTED:387-405 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) agents/drivers/argo-go/zookeeper_tls.go:176 — agents/drivers/argo-go/zookeeper_tls.go:176-194 | agents/drivers/hive-go/zookeeper_tls.go:176-194 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) agents/drivers/etcd-go/kv.go:371 — agents/drivers/etcd-go/kv.go:371-389 | agents/drivers/etcd2-go/kv.go:287-305 — `agents/drivers/etcd-go/kv.go` and `agents/drivers/etcd2-go/kv.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 134 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (19 lines × 2) agents/drivers/etcd-go/protocol_error.go:37 — agents/drivers/etcd-go/protocol_error.go:37-55 | agents/drivers/etcd2-go/protocol_error.go:34-52 — `agents/drivers/etcd-go/protocol_error.go` and `agents/drivers/etcd2-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 81 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/etcd-go/protocol_error.go:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) REDACTED:469 — REDACTED:469-487 | agents/drivers/vastbase-go/vastbase_metadata.go:302-320 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) REDACTED:879 — REDACTED:879-897 | agents/drivers/vastbase-go/vastbase_metadata.go:704-722 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) REDACTED:2395 — REDACTED:2395-2413 | agents/drivers/vastbase-go/vastbase_metadata.go:1470-1488 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (19 lines × 2) REDACTED:2674 — REDACTED:2674-2692 | agents/drivers/vastbase-go/vastbase_metadata.go:1756-1774 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) plugins/sdk/go/dbx-plugin-sdk/sdk.go:225 — plugins/sdk/go/dbx-plugin-sdk/sdk.go:225-243 | plugins/sdk/go/dbx-plugin-sdk/sdk.go:302-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×20
  • Duplicated block (9 lines × 3) crates/dbx-ai-provider/src/ai.rs:4596 — crates/dbx-ai-provider/src/ai.rs:4596-4604 | crates/dbx-ai-provider/src/ai.rs:4927-4935 | crates/dbx-ai-provider/src/ai.rs:5189-5197 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4596` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/dbx-core/src/admin/nacos/http.rs:3614 — crates/dbx-core/src/admin/nacos/http.rs:3614-3622 | crates/dbx-core/src/admin/nacos/http.rs:3664-3672 | crates/dbx-core/src/admin/nacos/http.rs:3689-3697 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/http.rs:3614` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/dbx-core/src/connection/jdbc.rs:1233 — crates/dbx-core/src/connection/jdbc.rs:1233-1241 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1264-1272 | plugins/sdk/packager/src/main.rs:625-633 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) REDACTED:3670 — REDACTED:3670-3678 | src-tauri/src/commands/connection.rs:2043-2053 | src-tauri/src/commands/connection.rs:2621-2629 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3670` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 3) REDACTED:556 — REDACTED:556-564 | REDACTED:2840-2848 | REDACTED:3005-3013 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) REDACTED:1433 — REDACTED:1433-1441 | crates/dbx-sql-core/src/sqlserver_temporal.rs:143-151 | REDACTED:3760-3768 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 3) REDACTED:4742 — REDACTED:4742-4750 | REDACTED:4831-4839 | REDACTED:4939-4947 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4742` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/dbx-core/src/schema/state_calibrator.rs:473 — crates/dbx-core/src/schema/state_calibrator.rs:473-481 | crates/dbx-core/src/schema/state_calibrator.rs:496-504 | crates/dbx-core/src/schema/state_calibrator.rs:507-515 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/state_calibrator.rs:473` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:2438 — crates/dbx-driver-mysql/src/mysql.rs:2438-2446 | crates/dbx-driver-mysql/src/mysql.rs:3068-3076 | REDACTED:3603-3611 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/dbx-drivers/src/salesforce_oauth.rs:463 — crates/dbx-drivers/src/salesforce_oauth.rs:463-473 | crates/dbx-drivers/src/salesforce_oauth.rs:559-567 | crates/dbx-drivers/src/salesforce_oauth.rs:622-632 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:281 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:281-289 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:427-435 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:786-794 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:494 — crates/dbx-driver-mongodb/src/mongo_shell.rs:494-502 | crates/dbx-web/src/routes/mcp_policy.rs:176-184 | src-tauri/src/commands/mcp_bridge.rs:1684-1692 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_shell.rs:494` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:5731 — REDACTED:5731-5739 | REDACTED:5794-5804 | REDACTED:10980-10990 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37-45 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:46-54 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:47-55 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:3391 — REDACTED:3391-3399 | REDACTED:5706-5714 | REDACTED:6115-6123 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:191 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:191-199 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:359-367 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:382-390 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) agents/drivers/argo-go/main.go:146 — agents/drivers/argo-go/main.go:146-154 | agents/drivers/hive-go/main.go:146-154 | agents/drivers/iotdb/main.go:150-158 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) agents/drivers/kingbase-go/main.go:267 — agents/drivers/kingbase-go/main.go:267-275 | agents/drivers/vastbase-go/main.go:268-276 | REDACTED:808-816 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:818` calls `closeAllSessions` and `agents/drivers/kingbase-go/main.go:277` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) agents/drivers/rocketmq/acl.go:32 — agents/drivers/rocketmq/acl.go:32-40 | agents/drivers/rocketmq/acl.go:95-103 | agents/drivers/rocketmq/acl.go:148-156 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 3) REDACTED:652 — REDACTED:652-660 | agents/drivers/cassandra-go/bench/agent_compare.py:325-333 | REDACTED:652-660 — before extracting anything, compare `REDACTED` and `agents/drivers/cassandra-go/bench/agent_compare.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D2 · Cognitive Complexity · dbx_driver_agent · ×19
  • dbx_driver_agent::agent_service::download_with_progress (cognitive 78) crates/dbx-driver-agent/src/agent_service.rs:2177 — dbx_driver_agent::agent_service::download_with_progress has cognitive complexity 78 (threshold 15). Drivers by points: if/else 26 (53 pts), match/switch 5 (15 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::import_offline_zip (cognitive 73) crates/dbx-driver-agent/src/agent_service.rs:3186 — dbx_driver_agent::agent_service::import_offline_zip has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (53 pts), match/switch 6 (12 pts), loops 6, boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits (cognitive 58) crates/dbx-driver-agent/src/agent_offline_export.rs:695 — dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::backend_error::consume_sensitive_value (cognitive 37) crates/dbx-driver-agent/src/backend_error.rs:1098 — dbx_driver_agent::backend_error::consume_sensitive_value has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::open_agent_download_response (cognitive 34) crates/dbx-driver-agent/src/agent_service.rs:2419 — dbx_driver_agent::agent_service::open_agent_download_response has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 4 (13 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::validate_offline_zip_preflight (cognitive 34) crates/dbx-driver-agent/src/agent_service.rs:3554 — dbx_driver_agent::agent_service::validate_offline_zip_preflight has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 2, loops 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_agent::agent_offline_export::validate_managed_jre_tree (cognitive 30) crates/dbx-driver-agent/src/agent_offline_export.rs:926 — dbx_driver_agent::agent_offline_export::validate_managed_jre_tree has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::is_macho_binary_for_cpu (cognitive 26) crates/dbx-driver-agent/src/agent_service.rs:4454 — dbx_driver_agent::agent_service::is_macho_binary_for_cpu has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::collect_offline_entries (cognitive 25) crates/dbx-driver-agent/src/agent_service.rs:3441 — dbx_driver_agent::agent_service::collect_offline_entries has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::backend_error::next_sensitive_assignment (cognitive 25) crates/dbx-driver-agent/src/backend_error.rs:1040 — dbx_driver_agent::backend_error::next_sensitive_assignment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_connection::agent_connect_params_with_role (cognitive 24) crates/dbx-driver-agent/src/agent_connection.rs:95 — dbx_driver_agent::agent_connection::agent_connect_params_with_role has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::agent_service::install_agent_driver_from_registry (cognitive 21) crates/dbx-driver-agent/src/agent_service.rs:1719 — dbx_driver_agent::agent_service::install_agent_driver_from_registry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_agent::agent_connection::zookeeper_connection_endpoints (cognitive 19) crates/dbx-driver-agent/src/agent_connection.rs:729 — dbx_driver_agent::agent_connection::zookeeper_connection_endpoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_offline_export::export_agents_offline_unlocked (cognitive 19) crates/dbx-driver-agent/src/agent_offline_export.rs:313 — dbx_driver_agent::agent_offline_export::export_agents_offline_unlocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::upgrade_all_agent_drivers_with_registry (cognitive 18) crates/dbx-driver-agent/src/agent_service.rs:976 — dbx_driver_agent::agent_service::upgrade_all_agent_drivers_with_registry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_agent::agent_driver::parse_agent_java_opts (cognitive 17) crates/dbx-driver-agent/src/agent_driver.rs:4065 — dbx_driver_agent::agent_driver::parse_agent_java_opts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_offline_export::snapshot_driver_source (cognitive 16) crates/dbx-driver-agent/src/agent_offline_export.rs:578 — dbx_driver_agent::agent_offline_export::snapshot_driver_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_driver_agent::agent_service::open_download_response (cognitive 16) crates/dbx-driver-agent/src/agent_service.rs:728 — dbx_driver_agent::agent_service::open_download_response has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_agent::backend_error::structured_entry (cognitive 16) crates/dbx-driver-agent/src/backend_error.rs:736 — dbx_driver_agent::backend_error::structured_entry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · dbx_driver_postgres · ×19
  • dbx_driver_postgres::postgres::completion_assistant_search_inner (cognitive 56) REDACTED:4145 — dbx_driver_postgres::postgres::completion_assistant_search_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (33 pts), loops 6 (13 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::pg_ndim_array_element_json (cognitive 43) REDACTED:429 — dbx_driver_postgres::postgres::pg_ndim_array_element_json has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28 (42 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::postgres_connection_url (cognitive 35) REDACTED:3504 — dbx_driver_postgres::postgres::postgres_connection_url has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (26 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::classify_pg_type (cognitive 30) REDACTED:1051 — dbx_driver_postgres::postgres::classify_pg_type has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::build_custom_type_ddl (cognitive 27) REDACTED:7984 — dbx_driver_postgres::postgres::build_custom_type_ddl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_sequences (cognitive 26) REDACTED:10904 — dbx_driver_postgres::postgres::list_sequences has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_postgres::postgres::pg_temporal_array_text_to_json (cognitive 24) REDACTED:1300 — dbx_driver_postgres::postgres::pg_temporal_array_text_to_json has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (7 pts), match/switch 3 (5 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (parse_array, parse_quoted, skip_whitespace, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • dbx_driver_postgres::postgres::execute_select_text (cognitive 24) REDACTED:2226 — dbx_driver_postgres::postgres::execute_select_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::cancel_postgres_query (cognitive 24) REDACTED:9991 — dbx_driver_postgres::postgres::cancel_postgres_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (10 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::query_with_column_metadata_fallback (cognitive 21) REDACTED:1693 — dbx_driver_postgres::postgres::query_with_column_metadata_fallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::postgres_quoted_search_path_elements (cognitive 20) REDACTED:8912 — dbx_driver_postgres::postgres::postgres_quoted_search_path_elements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::decode_pg_numeric_bytes (cognitive 18) REDACTED:227 — dbx_driver_postgres::postgres::decode_pg_numeric_bytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::pg_array_to_json_value (cognitive 18) REDACTED:885 — dbx_driver_postgres::postgres::pg_array_to_json_value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::list_indexes_for_relations_with_sql (cognitive 18) REDACTED:5475 — dbx_driver_postgres::postgres::list_indexes_for_relations_with_sql has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::custom_type_domain_attributes (cognitive 18) REDACTED:7815 — dbx_driver_postgres::postgres::custom_type_domain_attributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::decode_tsvector_bytes (cognitive 16) REDACTED:1494 — dbx_driver_postgres::postgres::decode_tsvector_bytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::stream_select_query_text (cognitive 16) REDACTED:2474 — dbx_driver_postgres::postgres::stream_select_query_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_opengauss_constraints (cognitive 16) REDACTED:6007 — dbx_driver_postgres::postgres::list_opengauss_constraints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_opengauss_foreign_keys (cognitive 16) REDACTED:10505 — dbx_driver_postgres::postgres::list_opengauss_foreign_keys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyFields · ×18
  • TooManyFields: KvPrometheusMetrics crates/dbx-core/src/ai/agent_kv.rs:369 — TooManyFields — 89 stored fields. The bar is 30 stored fields; this is 59 over it, 2.97× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: ConnectionConfig crates/dbx-types/src/models/connection.rs:156 — TooManyFields — 72 stored fields beside 38 methods. The bar is 30 stored fields; this is 42 over it, 2.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: ConnectionConfigData crates/dbx-types/src/models/connection.rs:744 — TooManyFields — 72 stored fields. The bar is 30 stored fields; this is 42 over it, 2.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: plDebugNativeEntry agents/drivers/oracle-go/pldebug_manager.go:32 — TooManyFields — 66 stored fields beside 45 methods. The bar is 30 stored fields; this is 36 over it, 2.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DdlDialectProfile crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:100 — TooManyFields — 48 stored fields beside 6 methods. The bar is 30 stored fields; this is 18 over it, 1.60× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: plDebugSession REDACTED:831 — TooManyFields — 47 stored fields beside 63 methods. The bar is 30 stored fields; this is 17 over it, 1.57× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: connectionConfig agents/drivers/hive-go/config.go:102 — TooManyFields — 40 stored fields beside 1 method. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: connectionConfig agents/drivers/argo-go/config.go:99 — TooManyFields — 40 stored fields. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: server REDACTED:647 — TooManyFields — 39 stored fields beside 134 methods. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: QueryResultExportRequest REDACTED:77 — TooManyFields — 38 stored fields. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AppState REDACTED:491 — TooManyFields — 36 stored fields beside 182 methods. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: cassandraConfig agents/drivers/cassandra-go/config.go:15 — TooManyFields — 36 stored fields beside 2 methods. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: SchemaDiffPreparationOptions crates/dbx-sql-schema/src/schema_diff.rs:505 — TooManyFields — 35 stored fields beside 10 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AiConfig crates/dbx-ai-provider/src/ai.rs:410 — TooManyFields — 34 stored fields. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DdlCapabilitiesYaml REDACTED:86 — TooManyFields — 33 stored fields beside 1 method. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: MqCapabilities crates/dbx-core/src/admin/mq/types.rs:37 — TooManyFields — 32 stored fields. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: IoTDBRpcDataSet agents/go-common/iotdb-client-go/client/rpcdataset.go:15 — TooManyFields — 31 stored fields beside 62 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: TableExportRequest REDACTED:50 — TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D35 · Change Coupling · Change-coupling hub · ×18
  • Change-coupling hub: treeNodeIcon.ts → SidebarTreeRuntimeHost.vue, TreeItem.vue, connectionStore.ts apps/desktop/src/lib/sidebar/treeNodeIcon.ts — `apps/desktop/src/lib/sidebar/treeNodeIcon.ts` changes together with 3 other files — `apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue`, `apps/desktop/src/components/sidebar/TreeItem.vue`, `apps/desktop/src/stores/connectionStore.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: http.ts → useSidebarDatabaseSpecificMutationRuntime.ts, redis_ops.rs, ai.rs, document_cmd.rs, mongo_cmd.rs, redis_cmd.rs apps/desktop/src/lib/backend/http.ts — `apps/desktop/src/lib/backend/http.ts` changes together with 6 other files — `apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts`, `crates/dbx-core/src/query/redis_ops.rs`, `crates/dbx-web/src/routes/ai.rs`, `src-tauri/src/commands/document_cmd.rs`, `src-tauri/src/commands/mongo_cmd.rs`, `src-tauri/src/commands/redis_cmd.rs` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: REDACTED → DangerConfirmDialog.vue, SqlFormatterSettingsPanel.vue, SqlParameterDialog.vue, ExportProgressPopover.vue, VisibleDatabasesDialog.vue, sidebarTreeDialogState.ts, useDialogSources.ts, useExportTracker.ts, useSidebarConnectionMutationRuntime.ts, backend-errors.ts, api.ts, tauri.ts, columnFormatter.ts, dataGridContextMenu.ts, gridSelection.ts, keyboardShortcuts.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, sidebarTreeItemLayout.ts, treeNodeIcon.ts, objectSourceEditor.ts, tableImport.ts, ai_cli_agent.rs, connection_secrets.rs, redis.rs, redis_cmd.rs, transfer.rs, update.rs REDACTED — `REDACTED` changes together with 30 other files — `apps/desktop/src/components/editor/DangerConfirmDialog.vue`, `apps/desktop/src/components/editor/SqlFormatterSettingsPanel.vue`, `apps/desktop/src/components/editor/SqlParameterDialog.vue`, `apps/desktop/src/components/export/ExportProgressPopover.vue`, `apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue`, `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/composables/useDialogSources.ts`, `apps/desktop/src/composables/useExportTracker.ts`, `apps/desktop/src/composables/useSidebarConnectionMutationRuntime.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/backend/api.ts`, `apps/desktop/src/lib/backend/tauri.ts`, `apps/desktop/src/lib/dataGrid/columnFormatter.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/dataGrid/gridSelection.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/lib/table/tableImport.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/commands/transfer.rs`, `src-tauri/src/commands/update.rs` — none of which declares a dependency on it: one file is the hub of 30 separate couplings, not 30 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 30.
  • Change-coupling hub: REDACTED → EditorSettingsDialog.vue, sidebarTreeDialogState.ts, useExportTracker.ts, backend-errors.ts, tauri.ts, columnFormatter.ts, dataGridContextMenu.ts, gridSelection.ts, keyboardShortcuts.ts, shortcutRegistry.ts, redisKeyTree.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, sidebarTreeItemLayout.ts, treeNodeIcon.ts, objectSourceEditor.ts, tableImport.ts, settingsStore.ts, ai_cli_agent.rs, connection_secrets.rs, cloud_sync.rs, redis_ops.rs, redis.rs, redis_cmd.rs, transfer.rs, update.rs REDACTED — `REDACTED` changes together with 27 other files — `apps/desktop/src/components/editor/EditorSettingsDialog.vue`, `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/composables/useExportTracker.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/backend/tauri.ts`, `apps/desktop/src/lib/dataGrid/columnFormatter.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/dataGrid/gridSelection.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/redis/redisKeyTree.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/lib/table/tableImport.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-core/src/persistence/cloud_sync.rs`, `crates/dbx-core/src/query/redis_ops.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/commands/transfer.rs`, `src-tauri/src/commands/update.rs` — none of which declares a dependency on it: one file is the hub of 27 separate couplings, not 27 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 27.
  • Change-coupling hub: REDACTED → sidebarTreeDialogState.ts, backend-errors.ts, dataGridContextMenu.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts, settingsStore.ts, ai_cli_agent.rs, redis.rs REDACTED — `REDACTED` changes together with 11 other files — `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-web/src/routes/redis.rs` — none of which declares a dependency on it: one file is the hub of 11 separate couplings, not 11 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 11.
  • Change-coupling hub: REDACTED → EditorSettingsDialog.vue, sidebarTreeDialogState.ts, backend-errors.ts, dataGridContextMenu.ts, keyboardShortcuts.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts, objectSourceEditor.ts, settingsStore.ts, ai_cli_agent.rs, redis.rs, redis_cmd.rs REDACTED — `REDACTED` changes together with 15 other files — `apps/desktop/src/components/editor/EditorSettingsDialog.vue`, `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/redis_cmd.rs` — none of which declares a dependency on it: one file is the hub of 15 separate couplings, not 15 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 15.
  • Change-coupling hub: REDACTED → sidebarTreeDialogState.ts, backend-errors.ts, dataGridContextMenu.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts, settingsStore.ts, ai_cli_agent.rs, redis.rs REDACTED — `REDACTED` changes together with 11 other files — `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-web/src/routes/redis.rs` — none of which declares a dependency on it: one file is the hub of 11 separate couplings, not 11 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 11.
  • Change-coupling hub: REDACTED → sidebarTreeDialogState.ts, backend-errors.ts, dataGridContextMenu.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts, ai_cli_agent.rs REDACTED — `REDACTED` changes together with 9 other files — `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs` — none of which declares a dependency on it: one file is the hub of 9 separate couplings, not 9 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 9.
  • Change-coupling hub: REDACTED → sidebarTreeDialogState.ts, backend-errors.ts, dataGridContextMenu.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts, settingsStore.ts, ai_cli_agent.rs, redis.rs REDACTED — `REDACTED` changes together with 11 other files — `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-web/src/routes/redis.rs` — none of which declares a dependency on it: one file is the hub of 11 separate couplings, not 11 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 11.
  • Change-coupling hub: ko.ts → editorSettingsDraft.ts, settingsSearch.ts, settingsTransfer.ts, treeNodeIcon.ts apps/desktop/src/i18n/locales/ko.ts — `apps/desktop/src/i18n/locales/ko.ts` changes together with 4 other files — `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: api.ts → main.rs, mongo.rs, redis.rs, external_sql.rs, mongo_cmd.rs, redis_cmd.rs, lib.rs apps/desktop/src/lib/backend/api.ts — `apps/desktop/src/lib/backend/api.ts` changes together with 7 other files — `crates/dbx-web/src/main.rs`, `crates/dbx-web/src/routes/mongo.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/external_sql.rs`, `src-tauri/src/commands/mongo_cmd.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/lib.rs` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: AiAssistant.vue → ai_cli_agent.rs, ai_codex_cli.rs, agent_loop.rs, ai.rs, ai.rs apps/desktop/src/components/editor/AiAssistant.vue — `apps/desktop/src/components/editor/AiAssistant.vue` changes together with 5 other files — `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-ai-provider/src/ai_codex_cli.rs`, `crates/dbx-core/src/ai/agent_loop.rs`, `crates/dbx-web/src/routes/ai.rs`, `src-tauri/src/commands/ai.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: App.vue → querySurfaces.ts, openTabsPersistence.ts, external_sql.rs apps/desktop/src/App.vue — `apps/desktop/src/App.vue` changes together with 3 other files — `apps/desktop/src/components/layout/querySurfaces.ts`, `apps/desktop/src/lib/app/openTabsPersistence.ts`, `src-tauri/src/commands/external_sql.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: ConnectionDialog.vue → TunnelProfileManager.vue, DatabaseIcon.vue, DatabaseSearchDialog.vue, VisibleDatabasesDialog.vue, connection_secrets.rs, agent_catalog.rs, database_capabilities.rs apps/desktop/src/components/connection/ConnectionDialog.vue — `apps/desktop/src/components/connection/ConnectionDialog.vue` changes together with 7 other files — `apps/desktop/src/components/connection/TunnelProfileManager.vue`, `apps/desktop/src/components/icons/DatabaseIcon.vue`, `apps/desktop/src/components/search/DatabaseSearchDialog.vue`, `apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-driver-agent/src/agent_catalog.rs`, `crates/dbx-driver-agent/src/database_capabilities.rs` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: tauri.ts → useSidebarDatabaseSpecificMutationRuntime.ts, exportFormats.ts, main.rs apps/desktop/src/lib/backend/tauri.ts — `apps/desktop/src/lib/backend/tauri.ts` changes together with 3 other files — `apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts`, `apps/desktop/src/lib/export/exportFormats.ts`, `crates/dbx-web/src/main.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: settingsSearch.ts → editorSettingsDraft.ts, settingsTransfer.ts, settingsStore.ts apps/desktop/src/lib/settings/settingsSearch.ts — `apps/desktop/src/lib/settings/settingsSearch.ts` changes together with 3 other files — `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsTransfer.ts`, `apps/desktop/src/stores/settingsStore.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: QueryEditor.vue → codemirrorSqlDialect.ts, diagnostics.ts, tokens.ts apps/desktop/src/components/editor/QueryEditor.vue — `apps/desktop/src/components/editor/QueryEditor.vue` changes together with 3 other files — `apps/desktop/src/lib/editor/codemirrorSqlDialect.ts`, `apps/desktop/src/lib/sql/semantic/diagnostics.ts`, `apps/desktop/src/lib/sql/semantic/tokens.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: lib.rs → useSidebarDatabaseSpecificMutationRuntime.ts, useTauriEvents.ts, useWindowControls.ts, localeOptions.ts src-tauri/src/lib.rs — `src-tauri/src/lib.rs` changes together with 4 other files — `apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts`, `apps/desktop/src/composables/useTauriEvents.ts`, `apps/desktop/src/composables/useWindowControls.ts`, `apps/desktop/src/lib/app/localeOptions.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×18
  • Edited copy of a member (23 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:249 — crates/dbx-web/src/routes/mongodb_import_export.rs:249-271 | crates/dbx-web/src/routes/table_import.rs:269-294 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) REDACTED:4701 — REDACTED:4701-4723 | REDACTED:4754-4790 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-plugin-runtime/src/plugins/installer.rs:948 — crates/dbx-plugin-runtime/src/plugins/installer.rs:948-970 | crates/dbx-plugin-runtime/src/plugins/installer.rs:975-997 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:2363 — crates/dbx-driver-sqlserver/src/sqlserver.rs:2363-2385 | crates/dbx-driver-sqlserver/src/sqlserver.rs:2509-2540 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) agents/drivers/etcd-go/main.go:256 — agents/drivers/etcd-go/main.go:256-278 | agents/drivers/etcd2-go/main.go:226-248 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:417 — crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:417-439 | crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:506-535 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) REDACTED:6997 — REDACTED:6997-7019 | REDACTED:9409-9436 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-driver-support/src/ddl_scan.rs:21 — crates/dbx-driver-support/src/ddl_scan.rs:21-43 | crates/dbx-sql-data/src/query_result_sql.rs:3166-3188 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:1665 — crates/dbx-core/src/admin/nacos/http.rs:1665-1687 | crates/dbx-core/src/admin/nacos/http.rs:1692-1714 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-sql-schema/src/schema_diff.rs:915 — crates/dbx-sql-schema/src/schema_diff.rs:915-937 | crates/dbx-sql-schema/src/schema_diff.rs:939-970 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) agents/drivers/kingbase-go/main.go:1058 — agents/drivers/kingbase-go/main.go:1058-1080 | REDACTED:5147-5171 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-plugin-runtime/src/plugins/filesystem.rs:154 — crates/dbx-plugin-runtime/src/plugins/filesystem.rs:154-176 | crates/dbx-plugin-runtime/src/plugins/filesystem.rs:185-208 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) REDACTED:10645 — REDACTED:10645-10676 | REDACTED:10978-11000 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) REDACTED:3183 — REDACTED:3183-3206 | REDACTED:3707-3729 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) agents/drivers/rocketmq/helpers.go:48 — agents/drivers/rocketmq/helpers.go:48-70 | agents/drivers/rocketmq/helpers.go:72-94 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) REDACTED:420 — REDACTED:420-442 | REDACTED:460-482 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) src-tauri/src/commands/document_cmd.rs:65 — src-tauri/src/commands/document_cmd.rs:65-87 | src-tauri/src/commands/mongo_cmd.rs:173-196 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/dbx-core/src/ai/agent_tools.rs:300 — crates/dbx-core/src/ai/agent_tools.rs:300-329 | crates/dbx-core/src/ai/agent_tools.rs:547-569 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×18
  • Edited copy of a member (18 corresponding lines) crates/dbx-mcp/src/backend.rs:1226 — crates/dbx-mcp/src/backend.rs:1226-1250 | crates/dbx-mcp/src/backend.rs:1285-1302 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-plugin-runtime/src/plugins/runtime.rs:1157 — crates/dbx-plugin-runtime/src/plugins/runtime.rs:1157-1177 | plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:655-672 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-core/src/schema/mod.rs:14287 — crates/dbx-core/src/schema/mod.rs:14287-14317 | crates/dbx-core/src/schema/mod.rs:14330-14347 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) REDACTED:2077 — REDACTED:2077-2095 | REDACTED:2190-2207 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-web/src/routes/connection.rs:1091 — crates/dbx-web/src/routes/connection.rs:1091-1108 | crates/dbx-web/src/routes/connection.rs:1114-1135 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) REDACTED:7607 — REDACTED:7607-7624 | REDACTED:7723-7740 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-core/src/admin/mqtt/client.rs:927 — crates/dbx-core/src/admin/mqtt/client.rs:927-951 | crates/dbx-core/src/admin/mqtt/client.rs:957-974 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:548 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:548-565 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:592-613 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) REDACTED:3303 — REDACTED:3303-3320 | REDACTED:3396-3413 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-driver-redis/src/lib.rs:5533 — crates/dbx-driver-redis/src/lib.rs:5533-5550 | crates/dbx-driver-redis/src/lib.rs:5559-5576 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:489 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:489-506 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:643-660 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:508 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:508-525 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:662-679 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:193 — agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:193-215 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:173-190 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-formats/src/csv_export.rs:206 — crates/dbx-formats/src/csv_export.rs:206-237 | crates/dbx-formats/src/csv_export.rs:252-269 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:1080 — agents/go-common/iotdb-client-go/client/session.go:1080-1097 | agents/go-common/iotdb-client-go/client/session.go:1101-1118 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/dbx-sql-core/src/object_source_sql.rs:1953 — crates/dbx-sql-core/src/object_source_sql.rs:1953-1970 | crates/dbx-sql-core/src/object_source_sql.rs:2007-2028 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/drivers/iotdb/metadata.go:593 — agents/drivers/iotdb/metadata.go:593-610 | agents/drivers/neo4j-go/metadata.go:378-395 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) agents/drivers/etcd-go/protocol_error.go:99 — agents/drivers/etcd-go/protocol_error.go:99-116 | agents/drivers/etcd2-go/protocol_error.go:91-108 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×18
  • Edited copy of a member (21 corresponding lines) REDACTED:7746 — REDACTED:7746-7766 | REDACTED:7775-7796 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:193 — agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:193-213 | plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:256-279 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/drivers/duckdb/src/sql.rs:81 — agents/drivers/duckdb/src/sql.rs:81-101 | crates/dbx-drivers/src/db/duckdb_sql.rs:97-117 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src-tauri/src/commands/saved_sql.rs:343 — src-tauri/src/commands/saved_sql.rs:343-367 | src-tauri/src/commands/saved_sql.rs:369-389 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:8927 — REDACTED:8927-8947 | REDACTED:103-127 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:4036 — REDACTED:4036-4061 | REDACTED:4070-4090 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/drivers/oracle-go/pldebug_breakpoint.go:110 — agents/drivers/oracle-go/pldebug_breakpoint.go:110-130 | agents/drivers/oracle-go/pldebug_stack.go:89-109 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:200 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:200-220 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:277-297 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/dbx-ai-provider/src/ai_cursor_cli.rs:103 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:103-125 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:154-174 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:174 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:174-202 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:300-320 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:2341 — REDACTED:2341-2361 | agents/drivers/vastbase-go/vastbase_metadata.go:1682-1702 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/dbx-web/src/routes/connection.rs:844 — crates/dbx-web/src/routes/connection.rs:844-869 | crates/dbx-web/src/routes/connection.rs:889-909 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/drivers/kingbase-go/main.go:1400 — agents/drivers/kingbase-go/main.go:1400-1421 | agents/drivers/vastbase-go/main.go:1139-1159 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:6561 — REDACTED:6561-6581 | REDACTED:6062-6082 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/dbx-core/src/admin/nacos/namespace_access.rs:369 — crates/dbx-core/src/admin/nacos/namespace_access.rs:369-389 | crates/dbx-core/src/admin/nacos/namespace_access.rs:391-411 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:3955 — REDACTED:3955-3975 | REDACTED:3983-4003 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) REDACTED:5083 — REDACTED:5083-5103 | crates/dbx-driver-sqlserver/src/sqlserver.rs:905-932 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) agents/drivers/xugu/package_members.go:265 — agents/drivers/xugu/package_members.go:265-288 | agents/drivers/xugu/package_members.go:290-310 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×18
  • Edited copy of a member (5 corresponding lines) crates/dbx-drivers/src/db/dynamodb_driver.rs:1272 — crates/dbx-drivers/src/db/dynamodb_driver.rs:1272-1278 | crates/dbx-drivers/src/db/dynamodb_driver.rs:1329-1333 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-driver-redis/src/lib.rs:4672 — crates/dbx-driver-redis/src/lib.rs:4672-4676 | crates/dbx-driver-redis/src/lib.rs:4827-4842 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:621 — crates/dbx-core/src/persistence/cloud_sync.rs:621-625 | crates/dbx-core/src/persistence/cloud_sync.rs:711-715 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/scheduled_backup/store.rs:33 — crates/dbx-core/src/scheduled_backup/store.rs:33-37 | crates/dbx-core/src/scheduled_backup/store.rs:39-44 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:3123 — crates/dbx-driver-elasticsearch/src/lib.rs:3123-3127 | REDACTED:3423-3428 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-driver-agent/src/agent_service.rs:1092 — crates/dbx-driver-agent/src/agent_service.rs:1092-1096 | crates/dbx-driver-agent/src/agent_service.rs:1098-1102 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src-tauri/src/commands/mcp.rs:1158 — src-tauri/src/commands/mcp.rs:1158-1162 | src-tauri/src/commands/mcp.rs:1236-1240 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) agents/drivers/argo-go/config.go:897 — agents/drivers/argo-go/config.go:897-901 | agents/drivers/hive-go/config.go:937-941 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/admin/consul/mesh/intentions.rs:78 — crates/dbx-core/src/admin/consul/mesh/intentions.rs:78-82 | crates/dbx-core/src/admin/consul/mesh/peering.rs:73-77 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/connection/session_credentials.rs:180 — crates/dbx-core/src/connection/session_credentials.rs:180-186 | crates/dbx-core/src/connection/session_credentials.rs:213-217 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:4579 — crates/dbx-core/src/admin/nacos/http.rs:4579-4584 | crates/dbx-core/src/admin/nacos/http.rs:4596-4600 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) REDACTED:4661 — REDACTED:4661-4665 | REDACTED:1641-1645 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:938 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:938-944 | crates/dbx-driver-mongodb/src/mongo_shell.rs:321-325 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-plugin-runtime/src/plugins/installer.rs:768 — crates/dbx-plugin-runtime/src/plugins/installer.rs:768-772 | src-tauri/src/commands/mcp_cleanup.rs:21-25 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) agents/drivers/duckdb/src/wire.rs:177 — agents/drivers/duckdb/src/wire.rs:177-181 | crates/dbx-drivers/src/db/duckdb_worker_protocol.rs:22-26 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:7466 — crates/dbx-driver-mysql/src/mysql.rs:7466-7470 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4022-4026 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/dbx-web/src/routes/query.rs:1158 — crates/dbx-web/src/routes/query.rs:1158-1162 | crates/dbx-web/src/routes/schema.rs:597-601 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src-tauri/src/commands/document_cmd.rs:503 — src-tauri/src/commands/document_cmd.rs:503-512 | src-tauri/src/commands/query.rs:683-687 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×18
  • Duplicated block (21 lines × 2) crates/dbx-core/src/data/transfer.rs:12036 — crates/dbx-core/src/data/transfer.rs:12036-12056 | crates/dbx-core/src/data/transfer.rs:13941-13961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:12036` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:604 — crates/dbx-drivers/src/db/couchdb_driver.rs:604-624 | crates/dbx-drivers/src/db/solr_driver.rs:981-1001 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) REDACTED:3348 — REDACTED:3348-3368 | REDACTED:3541-3561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3348` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:3538` calls `is_cancelled`, `Err`, `to_string` and `REDACTED:3347` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 2) crates/dbx-types/src/models/connection.rs:1351 — crates/dbx-types/src/models/connection.rs:1351-1371 | crates/dbx-types/src/models/connection.rs:1534-1554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-types/src/models/connection.rs:1351` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:273 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:273-293 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:442-462 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/config.go:433 — agents/drivers/argo-go/config.go:433-453 | agents/drivers/hive-go/config.go:440-460 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/config.go:433` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/hive-go/config.go:439` calls `TrimLeft`, `TrimSpace` and `agents/drivers/argo-go/config.go:432` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/metadata.go:485 — agents/drivers/argo-go/metadata.go:485-505 | agents/drivers/hive-go/metadata.go:496-516 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/metadata.go:627 — agents/drivers/argo-go/metadata.go:627-647 | agents/drivers/hive-go/metadata.go:638-658 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:627` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/zookeeper_tls.go:207 — agents/drivers/argo-go/zookeeper_tls.go:207-227 | agents/drivers/hive-go/zookeeper_tls.go:207-227 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) REDACTED:710 — REDACTED:710-730 | agents/drivers/vastbase-go/vastbase_metadata.go:535-555 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (21 lines × 2) REDACTED:922 — REDACTED:922-942 | agents/drivers/vastbase-go/vastbase_metadata.go:747-767 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) REDACTED:2996 — REDACTED:2996-3016 | agents/drivers/vastbase-go/vastbase_metadata.go:1945-1965 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2996` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (21 lines × 2) agents/drivers/kingbase-go/main.go:1012 — agents/drivers/kingbase-go/main.go:1012-1032 | REDACTED:4965-4985 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) REDACTED:377 — REDACTED:377-397 | REDACTED:413-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:377` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) agents/go-common/iotdb-client-go/client/session.go:974 — agents/go-common/iotdb-client-go/client/session.go:974-994 | agents/go-common/iotdb-client-go/client/session.go:1020-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/metadata.go:234 — agents/drivers/argo-go/metadata.go:234-254 | agents/drivers/hive-go/metadata.go:240-260 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:12 — agents/drivers/argo-go/bench/functional_probe.py:12-32 | agents/drivers/hive-go/bench/functional_probe.py:12-32 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) REDACTED:26 — REDACTED:26-46 | REDACTED:26-46 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×17
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-driver-mysql/src/manticoresearch.rs:178 — crates/dbx-driver-mysql/src/manticoresearch.rs:178-185 | crates/dbx-driver-mysql/src/ob_oracle.rs:77-94 | crates/dbx-driver-mysql/src/ob_oracle.rs:124-131 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:1039 — crates/dbx-web/src/routes/mq.rs:1039-1046 | crates/dbx-web/src/routes/mq.rs:1052-1059 | crates/dbx-web/src/routes/mq.rs:1065-1072 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-core/src/admin/consul/session.rs:123 — crates/dbx-core/src/admin/consul/session.rs:123-130 | crates/dbx-core/src/admin/consul/session.rs:160-167 | crates/dbx-core/src/admin/consul/session.rs:169-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-web/src/routes/mongo.rs:360 — crates/dbx-web/src/routes/mongo.rs:360-367 | crates/dbx-web/src/routes/mongo.rs:543-560 | crates/dbx-web/src/routes/mongo.rs:668-676 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:514 — crates/dbx-web/src/routes/mq.rs:514-521 | crates/dbx-web/src/routes/mq.rs:527-534 | crates/dbx-web/src/routes/mq.rs:565-572 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:540 — crates/dbx-web/src/routes/mq.rs:540-547 | crates/dbx-web/src/routes/mq.rs:578-585 | crates/dbx-web/src/routes/mq.rs:646-653 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:1335 — crates/dbx-web/src/routes/mq.rs:1335-1342 | crates/dbx-web/src/routes/mq.rs:1538-1548 | crates/dbx-web/src/routes/mq.rs:1563-1570 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-cli/src/main.rs:991 — crates/dbx-cli/src/main.rs:991-1000 | crates/dbx-mcp/src/backend.rs:3088-3101 | crates/dbx-mcp/src/server.rs:7458-7465 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:510 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:510-517 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:581-588 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:647-655 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-core/src/admin/nacos/service.rs:56 — crates/dbx-core/src/admin/nacos/service.rs:56-69 | crates/dbx-core/src/admin/nacos/service.rs:532-539 | crates/dbx-core/src/admin/nacos/service.rs:544-553 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:1033 — crates/dbx-driver-elasticsearch/src/lib.rs:1033-1045 | crates/dbx-driver-elasticsearch/src/lib.rs:1047-1059 | crates/dbx-driver-elasticsearch/src/lib.rs:1061-1068 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) REDACTED:6527 — REDACTED:6527-6534 | REDACTED:6612-6619 | REDACTED:6645-6652 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:788 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:788-795 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:797-805 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1569-1576 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) REDACTED:677 — REDACTED:677-684 | crates/dbx-sql-core/src/object_source_sql.rs:2100-2107 | crates/dbx-sql-core/src/object_source_sql.rs:2117-2124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-core/src/admin/consul/config.rs:192 — crates/dbx-core/src/admin/consul/config.rs:192-199 | crates/dbx-drivers/src/db/influxdb_driver.rs:120-127 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:108-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/dbx-ai-provider/src/ai_cursor_cli.rs:327 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:327-334 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:551-558 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:438-445 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) agents/drivers/kingbase-go/bench/agent_compare.go:331 — agents/drivers/kingbase-go/bench/agent_compare.go:331-338 | REDACTED:475-485 | agents/drivers/vastbase-go/bench/agent_compare.go:726-733 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D1 · Cyclomatic Complexity · dbx_sql_data · ×16
  • dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial (cyclomatic 61) REDACTED:2899 — dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_spatial has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_query_pagination_execution_plan (cyclomatic 42) crates/dbx-sql-data/src/query_result_sql.rs:146 — dbx_sql_data::query_result_sql::build_query_pagination_execution_plan has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_sorted_query_sql (cyclomatic 42) crates/dbx-sql-data/src/query_result_sql.rs:668 — dbx_sql_data::query_result_sql::build_sorted_query_sql has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::data_grid_sql::build_data_grid_save_statements (cyclomatic 41) REDACTED:1846 — dbx_sql_data::data_grid_sql::build_data_grid_save_statements has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::mysql_statement_references_session_variable (cyclomatic 29) crates/dbx-sql-data/src/query_result_sql.rs:548 — dbx_sql_data::query_result_sql::mysql_statement_references_session_variable has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters (cyclomatic 27) REDACTED:640 — dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements (cyclomatic 26) REDACTED:2106 — dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::top_level_sql_tokens (cyclomatic 24) crates/dbx-sql-data/src/query_result_sql.rs:3064 — dbx_sql_data::query_result_sql::top_level_sql_tokens has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements (cyclomatic 23) crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:15 — dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_sql::validate_data_grid_save (cyclomatic 23) REDACTED:1450 — dbx_sql_data::data_grid_sql::validate_data_grid_save has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_sql_data::data_grid_sql::build_data_grid_context_filter_condition (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_sql_data::query_result_sql::sql_server_count_sql (cyclomatic 22) crates/dbx-sql-data/src/query_result_sql.rs:1938 — dbx_sql_data::query_result_sql::sql_server_count_sql has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::query_result_sql::iotdb_tree_count_sql (cyclomatic 21) crates/dbx-sql-data/src/query_result_sql.rs:1726 — dbx_sql_data::query_result_sql::iotdb_tree_count_sql has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_data::data_grid_sql::build_data_grid_column_distinct_values_sql (cyclomatic 18) REDACTED:1218 — dbx_sql_data::data_grid_sql::build_data_grid_column_distinct_values_sql has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_sql_data::data_grid_sql::build_data_grid_context_filter_condition (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_sql_data::query_result_sql::build_paginated_query_sql (cyclomatic 18) crates/dbx-sql-data/src/query_result_sql.rs:363 — dbx_sql_data::query_result_sql::build_paginated_query_sql has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_count_query_sql (cyclomatic 18) crates/dbx-sql-data/src/query_result_sql.rs:433 — dbx_sql_data::query_result_sql::build_count_query_sql has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection (cyclomatic 16) crates/dbx-sql-data/src/query_result_sql.rs:1504 — dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_mysql · ×16
  • dbx_driver_mysql::mysql::mysql_column_type_name (cyclomatic 34) crates/dbx-driver-mysql/src/mysql.rs:928 — dbx_driver_mysql::mysql::mysql_column_type_name has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mysql::mysql::mysql_async_url (cyclomatic 29) crates/dbx-driver-mysql/src/mysql.rs:3262 — dbx_driver_mysql::mysql::mysql_async_url has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::find_if_not_exists_clause (cyclomatic 26) crates/dbx-driver-mysql/src/mysql.rs:7735 — dbx_driver_mysql::mysql::find_if_not_exists_clause has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn (cyclomatic 24) crates/dbx-driver-mysql/src/mysql.rs:6280 — dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::parse_mysql_enum_values (cyclomatic 23) crates/dbx-driver-mysql/src/mysql.rs:5482 — dbx_driver_mysql::mysql::parse_mysql_enum_values has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::mysql_value_to_json_with_data_charset (cyclomatic 19) crates/dbx-driver-mysql/src/mysql.rs:1010 — dbx_driver_mysql::mysql::mysql_value_to_json_with_data_charset has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode (cyclomatic 18) crates/dbx-driver-mysql/src/mysql.rs:2224 — dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::ssl_fallback_url (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:3018 — dbx_driver_mysql::mysql::ssl_fallback_url has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::completion_assistant_search (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:3869 — dbx_driver_mysql::mysql::completion_assistant_search has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::list_objects (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:4897 — dbx_driver_mysql::mysql::list_objects has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::execute_non_result_batch_on_conn (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:7552 — dbx_driver_mysql::mysql::execute_non_result_batch_on_conn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::mysql_bounded_value_preview (cyclomatic 16) crates/dbx-driver-mysql/src/mysql.rs:1260 — dbx_driver_mysql::mysql::mysql_bounded_value_preview has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback (cyclomatic 16) crates/dbx-driver-mysql/src/mysql.rs:1967 — dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments (cyclomatic 16) crates/dbx-driver-mysql/src/mysql.rs:7900 — dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql_data_charset::data_charset_from_params (cyclomatic 16) crates/dbx-driver-mysql/src/mysql_data_charset.rs:37 — dbx_driver_mysql::mysql_data_charset::data_charset_from_params has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mysql::ob_oracle::get_object_source (cyclomatic 16) crates/dbx-driver-mysql/src/ob_oracle.rs:454 — dbx_driver_mysql::ob_oracle::get_object_source has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×15
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:441 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:441-468 | crates/dbx-ai-provider/src/ai_codex_cli.rs:975-999 | crates/dbx-ai-provider/src/ai_grok_cli.rs:650-688 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:533-543 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:574-584 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:6553 — REDACTED:6553-6613 | REDACTED:7736-7765 | REDACTED:7768-7796 | REDACTED:7798-7826 | REDACTED:7828-7854 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:1176 — REDACTED:1176-1641 | REDACTED:1650-1843 | REDACTED:1852-2142 | REDACTED:2151-2351 | REDACTED:2360-2550 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:5674 — REDACTED:5674-5707 | REDACTED:6544-6565 | REDACTED:6567-6588 | REDACTED:6590-6610 | REDACTED:6621-6643 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:5061 — REDACTED:5061-5081 | crates/dbx-driver-elasticsearch/src/lib.rs:2580-2600 | crates/dbx-drivers/src/db/couchdb_driver.rs:626-646 | crates/dbx-drivers/src/db/solr_driver.rs:1003-1023 | crates/dbx-drivers/src/db/vector_driver.rs:943-1000 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:447 — crates/dbx-core/src/schema/mod.rs:447-477 | crates/dbx-core/src/schema/mod.rs:517-530 | crates/dbx-core/src/schema/mod.rs:552-565 | crates/dbx-core/src/schema/mod.rs:587-599 | crates/dbx-core/src/schema/mod.rs:621-633 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:1179 — crates/dbx-core/src/schema/mod.rs:1179-1195 | crates/dbx-core/src/schema/mod.rs:1203-1219 | crates/dbx-core/src/schema/mod.rs:1221-1231 | crates/dbx-core/src/schema/mod.rs:1238-1248 | crates/dbx-core/src/schema/mod.rs:1256-1266 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-driver-sqlserver/src/sqlserver.rs:1887 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1887-1899 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1901-1913 | crates/dbx-sql-data/src/query_result_sql.rs:2284-2299 | crates/dbx-sql-data/src/query_result_sql.rs:2301-2319 | crates/dbx-sql-data/src/query_result_sql.rs:3037-3049 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:707 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:707-741 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:748-804 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:806-853 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:886-918 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:931-976 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:34 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:34-45 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:43-54 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:38-50 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:95-113 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:44-55 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:190 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:190-203 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:148-161 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:273-286 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:292-305 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:158-171 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/argo-go/main.go:19 — agents/drivers/argo-go/main.go:19-104 | agents/drivers/cassandra-go/main.go:15-112 | agents/drivers/hive-go/main.go:19-104 | agents/drivers/iotdb/main.go:18-108 | agents/drivers/neo4j-go/main.go:20-132 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/argo-go/metadata.go:233 — agents/drivers/argo-go/metadata.go:233-257 | agents/drivers/argo-go/metadata.go:259-272 | agents/drivers/hive-go/metadata.go:239-263 | agents/drivers/hive-go/metadata.go:265-278 | agents/drivers/iotdb/metadata.go:165-182 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/iotdb/main.go:298 — agents/drivers/iotdb/main.go:298-312 | agents/drivers/kingbase-go/main.go:352-366 | agents/drivers/neo4j-go/main.go:328-351 | REDACTED:1052-1082 | agents/drivers/vastbase-go/main.go:363-380 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:4556 — REDACTED:4556-4592 | REDACTED:5461-5505 | REDACTED:6006-6042 | REDACTED:6044-6073 | REDACTED:6075-6101 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D2 · Cognitive Complexity · dbx_driver_mongodb · ×14
  • dbx_driver_mongodb::mongo_shell::parse (cognitive 222) crates/dbx-driver-mongodb/src/mongo_shell.rs:549 — dbx_driver_mongodb::mongo_shell::parse has cognitive complexity 222 (threshold 15). Drivers by points: if/else 93 (172 pts), boolean chains 33, loops 10 (12 pts), match/switch 2 (5 pts) (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson (cognitive 54) crates/dbx-driver-mongodb/src/mongo_driver.rs:3397 — dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (45 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments (cognitive 42) crates/dbx-driver-mongodb/src/mongo_shell.rs:1068 — dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 8, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_driver::bulk_write (cognitive 38) crates/dbx-driver-mongodb/src/mongo_driver.rs:2392 — dbx_driver_mongodb::mongo_driver::bulk_write has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::is_shell_regex_value_position (cognitive 28) crates/dbx-driver-mongodb/src/mongo_shell.rs:1419 — dbx_driver_mongodb::mongo_shell::is_shell_regex_value_position has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::read_shell_regex_literal (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1300 — dbx_driver_mongodb::mongo_shell::read_shell_regex_literal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::matching_paren (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1865 — dbx_driver_mongodb::mongo_shell::matching_paren has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::split_top_level (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1943 — dbx_driver_mongodb::mongo_shell::split_top_level has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_oidc::wait_for_callback (cognitive 21) crates/dbx-driver-mongodb/src/mongo_oidc.rs:232 — dbx_driver_mongodb::mongo_oidc::wait_for_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation (cognitive 20) crates/dbx-driver-mongodb/src/mongo_shell.rs:228 — dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 7 (9 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_shell_regex_literals (cognitive 19) crates/dbx-driver-mongodb/src/mongo_shell.rs:1359 — dbx_driver_mongodb::mongo_shell::transform_shell_regex_literals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_ejson_deserialize (cognitive 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1508 — dbx_driver_mongodb::mongo_shell::transform_ejson_deserialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::matching_bracket (cognitive 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1907 — dbx_driver_mongodb::mongo_shell::matching_bracket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_shell_constructors (cognitive 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1561 — dbx_driver_mongodb::mongo_shell::transform_shell_constructors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxMcpServer · ×14
  • DbxMcpServer::execute_query (cognitive 90) crates/dbx-mcp/src/server.rs:2660 — DbxMcpServer::execute_query has cognitive complexity 90 (threshold 15). Drivers by points: if/else 32 (51 pts), match/switch 16 (32 pts), boolean chains 7 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::execute_batch_request (cognitive 70) crates/dbx-mcp/src/server.rs:3059 — DbxMcpServer::execute_batch_request has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (37 pts), match/switch 12 (19 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::run_product_tool (cognitive 65) crates/dbx-mcp/src/server.rs:1062 — DbxMcpServer::run_product_tool has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (48 pts), match/switch 8 (11 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::execute_redis_command (cognitive 37) crates/dbx-mcp/src/server.rs:3705 — DbxMcpServer::execute_redis_command has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (22 pts), match/switch 7 (8 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • DbxMcpServer::ensure_plugin_tool_policy (cognitive 35) crates/dbx-mcp/src/server.rs:4933 — DbxMcpServer::ensure_plugin_tool_policy has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::remove_connection (cognitive 27) crates/dbx-mcp/src/server.rs:4274 — DbxMcpServer::remove_connection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 5 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::execute_and_show (cognitive 24) crates/dbx-mcp/src/server.rs:4422 — DbxMcpServer::execute_and_show has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 5 (7 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • DbxMcpServer::call_plugin_tool_dispatch (cognitive 23) crates/dbx-mcp/src/server.rs:5502 — DbxMcpServer::call_plugin_tool_dispatch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 4, loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • DbxMcpServer::visible_scoped_tools (cognitive 22) crates/dbx-mcp/src/server.rs:5163 — DbxMcpServer::visible_scoped_tools has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (9 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::get_schema_context (cognitive 19) crates/dbx-mcp/src/server.rs:4036 — DbxMcpServer::get_schema_context has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • DbxMcpServer::resolve_connection (cognitive 19) crates/dbx-mcp/src/server.rs:5305 — DbxMcpServer::resolve_connection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::plugin_tools (cognitive 18) crates/dbx-mcp/src/server.rs:2203 — DbxMcpServer::plugin_tools has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 5 (6 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • DbxMcpServer::plugin_tool_catalog (cognitive 17) crates/dbx-mcp/src/server.rs:5593 — DbxMcpServer::plugin_tool_catalog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (4 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::call_plugin_by_id (cognitive 17) crates/dbx-mcp/src/server.rs:5721 — DbxMcpServer::call_plugin_by_id has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3, boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×14
  • Edited copy of a member (22 corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:1876 — crates/dbx-driver-elasticsearch/src/lib.rs:1876-1898 | crates/dbx-drivers/src/db/solr_driver.rs:579-600 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) agents/drivers/etcd-go/watch.go:89 — agents/drivers/etcd-go/watch.go:89-116 | agents/drivers/etcd2-go/watch.go:91-112 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:9050 — REDACTED:9050-9072 | crates/dbx-types/src/models/connection.rs:3164-3185 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/dbx-core/src/schema/oracle_routines.rs:377 — crates/dbx-core/src/schema/oracle_routines.rs:377-398 | crates/dbx-core/src/schema/oracle_routines/readback.rs:57-81 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/dbx-driver-agent/src/agent_service.rs:4357 — crates/dbx-driver-agent/src/agent_service.rs:4357-4378 | crates/dbx-driver-agent/src/agent_service.rs:4380-4406 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:1256 — REDACTED:1256-1277 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:352-375 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) agents/drivers/argo-go/metadata.go:703 — agents/drivers/argo-go/metadata.go:703-724 | agents/drivers/hive-go/metadata.go:714-735 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:128 — REDACTED:128-153 | REDACTED:145-166 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:2730 — REDACTED:2730-2751 | REDACTED:2753-2774 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:1432 — crates/dbx-core/src/admin/nacos/http.rs:1432-1453 | crates/dbx-core/src/admin/nacos/http.rs:1455-1485 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:4506 — REDACTED:4506-4527 | REDACTED:5342-5363 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:189 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:189-215 | REDACTED:404-425 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) REDACTED:1771 — REDACTED:1771-1792 | REDACTED:5063-5084 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/dbx-core/src/ai/agent_tools.rs:416 — crates/dbx-core/src/ai/agent_tools.rs:416-437 | crates/dbx-core/src/ai/agent_tools.rs:692-713 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D1 · Cyclomatic Complexity · dbx · ×13
  • dbx::commands::connection::test_connection_with_info_impl (cyclomatic 82) src-tauri/src/commands/connection.rs:1636 — dbx::commands::connection::test_connection_with_info_impl has cyclomatic complexity 82 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::commands::connection::connect_db_inner (cyclomatic 67) src-tauri/src/commands/connection.rs:2312 — dbx::commands::connection::connect_db_inner has cyclomatic complexity 67 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::run (cyclomatic 61) src-tauri/src/lib.rs:1860 — dbx::run has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::mcp_bridge::start (cyclomatic 32) src-tauri/src/commands/mcp_bridge.rs:341 — dbx::commands::mcp_bridge::start has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::commands::mcp_bridge::handle_sql_approval (cyclomatic 32) src-tauri/src/commands/mcp_bridge.rs:1812 — dbx::commands::mcp_bridge::handle_sql_approval has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::list_sql_files::scan_sql_files_with_diagnostics (cyclomatic 22) src-tauri/src/commands/list_sql_files.rs:254 — dbx::commands::list_sql_files::scan_sql_files_with_diagnostics has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::global_search::search_root (cyclomatic 19) src-tauri/src/commands/global_search.rs:150 — dbx::commands::global_search::search_root has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::mcp_bridge::mongo_pure_field_predicate (cyclomatic 19) src-tauri/src/commands/mcp_bridge.rs:1629 — dbx::commands::mcp_bridge::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::commands::mcp_cleanup::sweep (cyclomatic 17) src-tauri/src/commands/mcp_cleanup.rs:49 — dbx::commands::mcp_cleanup::sweep has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::plugin_file::drop::open_dropped_plugin_files (cyclomatic 17) src-tauri/src/commands/plugin_file/drop.rs:31 — dbx::commands::plugin_file::drop::open_dropped_plugin_files has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::locale_family (cyclomatic 16) src-tauri/src/lib.rs:879 — dbx::locale_family has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::background_backup::run_if_requested (cyclomatic 16) src-tauri/src/background_backup.rs:369 — dbx::background_backup::run_if_requested has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx::commands::connection::sync_connection_configs (cyclomatic 16) src-tauri/src/commands/connection.rs:1365 — dbx::commands::connection::sync_connection_configs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · Fixed-sleep synchronisation · ×13
  • Fixed-sleep synchronisation: compiled UI output waits for a successful build signal plugins/sdk/dev-host/tests/server.test.mjs:138 — This test starts work it did not wait for (`revision`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 650))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: clears sticky subtree loading when health-check reconnect bumps revision apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.ts:3238 — This test starts work it did not wait for (`store`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 2100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: cancels source and target schema compares and drains metadata before disconnecting pools apps/desktop/src/stores/__tests__/connectionStore.oneTimeCleanup.spec.ts:75 — This test starts work it did not wait for (`disconnecting`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: waits for the other namespace when %s fails apps/desktop/src/lib/metadata/__tests__/objectDdlCache.spec.ts:337 — This test starts work it did not wait for (`outcome`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: reports an in-flight DDL outcome as unknown after its generation changes apps/desktop/src/lib/database/__tests__/oracleConstraints.spec.ts:617 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: reports an in-flight DDL outcome as unknown after the generation changes apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:387 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: keeps a resolved DDL committed when only the UI target changes in flight apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:428 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: preflights self-reference before CREATE and executes each statement once apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:631 — This test starts work it did not wait for (`pendingLateCreate`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: stops queued metadata after cancellation and waits for every issued request apps/desktop/src/lib/__tests__/schema/schemaDiffMetadataLoad.spec.ts:48 — This test starts work it did not wait for (`rejection`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: disconnecting either side stops the compare after its issued table-list requests settle apps/desktop/src/composables/__tests__/useSchemaDiffSession.spec.ts:63 — This test starts work it did not wait for (`cancellation`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: detaches a reused tab only after the fresh reload settles, not on its stale errored result apps/desktop/src/composables/__tests__/useSidebarDataOpenRuntime.spec.ts:592 — This test starts work it did not wait for (`opened`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: retains search filter results after editing a cell on a paginated table apps/desktop/src/components/grid/__tests__/DataGridSearchCellEditRetention.spec.ts:71 — This test starts work it did not wait for (`gridRef`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: does not accumulate page styles while repeatedly restoring cached SQL tabs apps/desktop/src/components/editor/__tests__/QueryEditor.componentSplit.integration.spec.ts:432 — This test starts work it did not wait for (`activate`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 150))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D1 · Cyclomatic Complexity · DbxMcpServer · ×12
  • DbxMcpServer::execute_query (cyclomatic 57) crates/dbx-mcp/src/server.rs:2660 — DbxMcpServer::execute_query has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::execute_batch_request (cyclomatic 50) crates/dbx-mcp/src/server.rs:3059 — DbxMcpServer::execute_batch_request has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::run_product_tool (cyclomatic 40) crates/dbx-mcp/src/server.rs:1062 — DbxMcpServer::run_product_tool has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::execute_redis_command (cyclomatic 32) crates/dbx-mcp/src/server.rs:3705 — DbxMcpServer::execute_redis_command has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • DbxMcpServer::remove_connection (cyclomatic 21) crates/dbx-mcp/src/server.rs:4274 — DbxMcpServer::remove_connection has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::ensure_plugin_tool_policy (cyclomatic 21) crates/dbx-mcp/src/server.rs:4933 — DbxMcpServer::ensure_plugin_tool_policy has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::call_plugin_tool_dispatch (cyclomatic 19) crates/dbx-mcp/src/server.rs:5502 — DbxMcpServer::call_plugin_tool_dispatch has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • DbxMcpServer::plugin_tools (cyclomatic 17) crates/dbx-mcp/src/server.rs:2203 — DbxMcpServer::plugin_tools has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • DbxMcpServer::execute_and_show (cyclomatic 17) crates/dbx-mcp/src/server.rs:4422 — DbxMcpServer::execute_and_show has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • DbxMcpServer::get_schema_context (cyclomatic 16) crates/dbx-mcp/src/server.rs:4036 — DbxMcpServer::get_schema_context has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • DbxMcpServer::visible_scoped_tools (cyclomatic 16) crates/dbx-mcp/src/server.rs:5163 — DbxMcpServer::visible_scoped_tools has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • DbxMcpServer::resolve_connection (cyclomatic 16) crates/dbx-mcp/src/server.rs:5305 — DbxMcpServer::resolve_connection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · dbx_driver_redis · ×12
  • dbx_driver_redis::scan_keys_batch_inner (cognitive 65) crates/dbx-driver-redis/src/lib.rs:3267 — dbx_driver_redis::scan_keys_batch_inner has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 5 (20 pts), match/switch 2 (7 pts), boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::parse_command_argv (cognitive 56) crates/dbx-driver-redis/src/lib.rs:2587 — dbx_driver_redis::parse_command_argv has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (47 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_redis::get_slowlog (cognitive 25) crates/dbx-driver-redis/src/lib.rs:2960 — dbx_driver_redis::get_slowlog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::list_keyspace_databases (cognitive 23) crates/dbx-driver-redis/src/lib.rs:1631 — dbx_driver_redis::list_keyspace_databases has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_redis::scan_cluster_values_page_with (cognitive 23) crates/dbx-driver-redis/src/lib.rs:2171 — dbx_driver_redis::scan_cluster_values_page_with has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::hscan_bounded_page (cognitive 21) crates/dbx-driver-redis/src/lib.rs:5310 — dbx_driver_redis::hscan_bounded_page has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (dbx_driver_redis::sscan_bounded_page) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • dbx_driver_redis::sscan_bounded_page (cognitive 21) crates/dbx-driver-redis/src/lib.rs:5382 — dbx_driver_redis::sscan_bounded_page has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (dbx_driver_redis::hscan_bounded_page) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • dbx_driver_redis::scan_values_page_inner (cognitive 20) crates/dbx-driver-redis/src/lib.rs:3431 — dbx_driver_redis::scan_values_page_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::connect_cluster (cognitive 17) crates/dbx-driver-redis/src/lib.rs:981 — dbx_driver_redis::connect_cluster has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::attach_hash_field_ttls (cognitive 17) crates/dbx-driver-redis/src/lib.rs:5641 — dbx_driver_redis::attach_hash_field_ttls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_driver_redis::scan_cluster_keys_batch_on_session (cognitive 16) crates/dbx-driver-redis/src/lib.rs:2063 — dbx_driver_redis::scan_cluster_keys_batch_on_session has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::load_more_collection_scoped (cognitive 16) crates/dbx-driver-redis/src/lib.rs:5050 — dbx_driver_redis::load_more_collection_scoped has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_sqlserver · ×12
  • dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens (cognitive 38) crates/dbx-driver-sqlserver/src/sqlserver.rs:1820 — dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::try_connect (cognitive 31) crates/dbx-driver-sqlserver/src/sqlserver.rs:535 — dbx_driver_sqlserver::sqlserver::try_connect has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::collect_ordered_result_sets_limited (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:2065 — dbx_driver_sqlserver::sqlserver::collect_ordered_result_sets_limited has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::stream_first_result_set (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:2134 — dbx_driver_sqlserver::sqlserver::stream_first_result_set has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::first_sql_tokens (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:4607 — dbx_driver_sqlserver::sqlserver::first_sql_tokens has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 8, if/else 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql (cognitive 25) crates/dbx-driver-sqlserver/src/sqlserver.rs:2755 — dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_sqlserver::sqlserver::build_sqlserver_unsafe_type_query (cognitive 24) crates/dbx-driver-sqlserver/src/sqlserver.rs:1486 — dbx_driver_sqlserver::sqlserver::build_sqlserver_unsafe_type_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json (cognitive 20) crates/dbx-driver-sqlserver/src/sqlserver.rs:2231 — dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::skip_sqlserver_leading_trivia (cognitive 19) crates/dbx-driver-sqlserver/src/sqlserver.rs:4354 — dbx_driver_sqlserver::sqlserver::skip_sqlserver_leading_trivia has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::sqlserver_balanced_transaction_batch_can_use_execute (cognitive 18) crates/dbx-driver-sqlserver/src/sqlserver.rs:4261 — dbx_driver_sqlserver::sqlserver::sqlserver_balanced_transaction_batch_can_use_execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::collect_first_result_limited (cognitive 16) crates/dbx-driver-sqlserver/src/sqlserver.rs:934 — dbx_driver_sqlserver::sqlserver::collect_first_result_limited has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::describe_sqlserver_result_set_with_mode (cognitive 16) crates/dbx-driver-sqlserver/src/sqlserver.rs:1157 — dbx_driver_sqlserver::sqlserver::describe_sqlserver_result_set_with_mode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×12
  • Edited copy of a member (34 corresponding lines) REDACTED:752 — REDACTED:752-785 | REDACTED:1084-1117 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:8441 — REDACTED:8441-8493 | REDACTED:10131-10164 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:6772 — REDACTED:6772-6805 | REDACTED:8554-8588 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/dbx-sql-core/src/sql_analysis.rs:578 — crates/dbx-sql-core/src/sql_analysis.rs:578-611 | crates/dbx-sql-core/src/sql_analysis.rs:787-821 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:442 — agents/go-common/iotdb-client-go/client/session.go:442-478 | agents/go-common/iotdb-client-go/client/session.go:490-523 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:2436 — REDACTED:2436-2474 | REDACTED:2482-2515 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) agents/drivers/argo-go/config.go:420 — agents/drivers/argo-go/config.go:420-453 | agents/drivers/hive-go/config.go:426-460 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:7900 — crates/dbx-driver-mysql/src/mysql.rs:7900-7933 | REDACTED:3591-3630 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:738 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:738-771 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:433-472 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:6728 — REDACTED:6728-6770 | REDACTED:6819-6852 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/dbx-core/src/schema/mod.rs:1138 — crates/dbx-core/src/schema/mod.rs:1138-1171 | crates/dbx-core/src/schema/mod.rs:8272-8311 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) REDACTED:5730 — REDACTED:5730-5765 | REDACTED:5767-5800 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · dbx_web · ×11
  • dbx_web::routes::mongodb_dump::receive_source (cognitive 65) crates/dbx-web/src/routes/mongodb_dump.rs:87 — dbx_web::routes::mongodb_dump::receive_source has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (51 pts), boolean chains 7, loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_web::credentials::restore (cognitive 37) crates/dbx-web/src/credentials.rs:196 — dbx_web::credentials::restore has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_web::routes::mongodb_import_export::preview_import (cognitive 31) crates/dbx-web/src/routes/mongodb_import_export.rs:112 — dbx_web::routes::mongodb_import_export::preview_import has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 5 (10 pts), loops 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::table_import::preview_import (cognitive 31) crates/dbx-web/src/routes/table_import.rs:114 — dbx_web::routes::table_import::preview_import has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 5 (10 pts), loops 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::connection::run_prepared_temporary_connection_test (cognitive 29) crates/dbx-web/src/routes/connection.rs:379 — dbx_web::routes::connection::run_prepared_temporary_connection_test has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 5 (12 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_web::serve (cognitive 28) crates/dbx-web/src/main.rs:520 — dbx_web::serve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 7 (8 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_web::routes::connection::plan_connection_config_sync (cognitive 27) crates/dbx-web/src/routes/connection.rs:1235 — dbx_web::routes::connection::plan_connection_config_sync has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2, match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_web::captcha::draw_glyph (cognitive 20) crates/dbx-web/src/captcha.rs:228 — dbx_web::captcha::draw_glyph has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • dbx_web::routes::redis_pubsub_ws::handle_monitor_socket (cognitive 19) crates/dbx-web/src/routes/redis_pubsub_ws.rs:76 — dbx_web::routes::redis_pubsub_ws::handle_monitor_socket has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (8 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::credentials::restore_value (cognitive 17) crates/dbx-web/src/credentials.rs:71 — dbx_web::credentials::restore_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::transfer::start_transfer (cognitive 16) crates/dbx-web/src/routes/transfer.rs:85 — dbx_web::routes::transfer::start_transfer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Storage · ×11
  • Storage::inspect_data_migration_with_error_cache (cognitive 49) REDACTED:1918 — Storage::inspect_data_migration_with_error_cache has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 16, match/switch 4 (7 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Storage::load_connections (cognitive 35) REDACTED:8131 — Storage::load_connections has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 5 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Storage::cleanup_migration_backups (cognitive 25) REDACTED:2353 — Storage::cleanup_migration_backups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::start_data_migration (cognitive 20) REDACTED:2242 — Storage::start_data_migration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::apply_sync_import_transaction (cognitive 20) REDACTED:7433 — Storage::apply_sync_import_transaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::verify_migration (cognitive 19) REDACTED:2578 — Storage::verify_migration has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (6 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::load_ai_configs (cognitive 19) REDACTED:4884 — Storage::load_ai_configs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::append_mqtt_history_messages (cognitive 19) REDACTED:7864 — Storage::append_mqtt_history_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::finalize_legacy_json_files (cognitive 17) REDACTED:2652 — Storage::finalize_legacy_json_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::load_ai_provider_configs (cognitive 17) REDACTED:4792 — Storage::load_ai_provider_configs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::prune_tab_runtime_cache (cognitive 16) REDACTED:9438 — Storage::prune_tab_runtime_cache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×11
  • Edited copy of a member (25 corresponding lines) crates/dbx-web/src/routes/tunnel_profiles.rs:81 — crates/dbx-web/src/routes/tunnel_profiles.rs:81-105 | src-tauri/src/commands/tunnel_profiles.rs:51-75 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-web/src/routes/query.rs:858 — crates/dbx-web/src/routes/query.rs:858-882 | crates/dbx-web/src/routes/query.rs:907-932 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-driver-agent/src/agent_runtime.rs:434 — crates/dbx-driver-agent/src/agent_runtime.rs:434-458 | crates/dbx-driver-agent/src/agent_runtime.rs:467-491 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) REDACTED:2944 — REDACTED:2944-2968 | agents/drivers/vastbase-go/vastbase_metadata.go:1893-1917 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-core/src/schema/mod.rs:12170 — crates/dbx-core/src/schema/mod.rs:12170-12201 | crates/dbx-core/src/schema/mod.rs:12208-12232 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-core/src/persistence/secret_codec.rs:571 — crates/dbx-core/src/persistence/secret_codec.rs:571-595 | crates/dbx-core/src/persistence/secret_codec.rs:598-622 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:614 — crates/dbx-core/src/admin/nacos/http.rs:614-638 | crates/dbx-core/src/admin/nacos/http.rs:640-664 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:2774 — crates/dbx-core/src/persistence/cloud_sync.rs:2774-2798 | crates/dbx-core/src/persistence/cloud_sync.rs:2823-2847 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) REDACTED:1902 — REDACTED:1902-1926 | REDACTED:1989-2017 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-driver-support/src/ddl_scan.rs:70 — crates/dbx-driver-support/src/ddl_scan.rs:70-104 | crates/dbx-driver-support/src/ddl_scan.rs:108-132 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/dbx-core/src/data/transfer.rs:6425 — crates/dbx-core/src/data/transfer.rs:6425-6449 | crates/dbx-driver-mysql/src/mysql_compatible.rs:462-486 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×11
  • Edited copy of a member (30 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:756 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:756-793 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1350-1379 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751-2782 | REDACTED:6202-6231 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) REDACTED:1380 — REDACTED:1380-1414 | REDACTED:3728-3757 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-sql-core/src/value_literals.rs:85 — crates/dbx-sql-core/src/value_literals.rs:85-114 | crates/dbx-sql-schema/src/db_admin_sql.rs:1399-1432 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-web/src/routes/query.rs:1653 — crates/dbx-web/src/routes/query.rs:1653-1683 | src-tauri/src/commands/query.rs:1274-1303 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) REDACTED:3343 — REDACTED:3343-3372 | agents/drivers/vastbase-go/vastbase_metadata.go:2160-2192 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) agents/drivers/etcd-go/protocol_error.go:36 — agents/drivers/etcd-go/protocol_error.go:36-65 | agents/drivers/etcd2-go/protocol_error.go:33-62 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-drivers/src/db/proxy_tunnel.rs:379 — crates/dbx-drivers/src/db/proxy_tunnel.rs:379-408 | crates/dbx-drivers/src/db/proxy_tunnel.rs:410-443 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-driver-redis/src/lib.rs:4573 — crates/dbx-driver-redis/src/lib.rs:4573-4602 | crates/dbx-driver-redis/src/lib.rs:4718-4768 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-sql-data/src/data_grid_iotdb_sql.rs:11 — crates/dbx-sql-data/src/data_grid_iotdb_sql.rs:11-40 | crates/dbx-sql-data/src/data_grid_tdengine_sql.rs:53-86 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/dbx-core/src/ai/agent_tools.rs:572 — crates/dbx-core/src/ai/agent_tools.rs:572-609 | crates/dbx-core/src/ai/agent_tools.rs:660-689 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×11
  • Edited copies of one member (3 members, 10+ corresponding lines) agents/drivers/oracle-go/pldebug_collection_input.go:28 — agents/drivers/oracle-go/pldebug_collection_input.go:28-37 | agents/drivers/oracle-go/pldebug_object_input.go:26-35 | agents/drivers/oracle-go/pldebug_record_input.go:40-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) src-tauri/src/commands/plugin_storage.rs:163 — src-tauri/src/commands/plugin_storage.rs:163-172 | src-tauri/src/commands/plugin_storage.rs:181-190 | src-tauri/src/commands/plugin_storage.rs:198-207 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:7492 — REDACTED:7492-7503 | REDACTED:7519-7528 | REDACTED:7536-7547 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/dbx-ai-provider/src/ai_cli_agent.rs:656 — crates/dbx-ai-provider/src/ai_cli_agent.rs:656-665 | crates/dbx-ai-provider/src/ai_cli_agent.rs:747-756 | crates/dbx-ai-provider/src/ai_cli_agent.rs:912-921 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:1398 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1398-1407 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1409-1418 | crates/dbx-sql-data/src/query_result_sql.rs:2339-2348 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) agents/drivers/cassandra-go/config.go:501 — agents/drivers/cassandra-go/config.go:501-513 | agents/drivers/iotdb/driver.go:395-404 | agents/drivers/kingbase-go/main.go:606-617 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:1162 — REDACTED:1162-1172 | crates/dbx-core/src/persistence/state_persistence.rs:748-758 | crates/dbx-core/src/query/two_phase_commit.rs:126-135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/dbx-core/src/ai/agent_tools.rs:1731 — crates/dbx-core/src/ai/agent_tools.rs:1731-1741 | crates/dbx-types/src/models/connection.rs:1808-1817 | crates/dbx-types/src/models/connection.rs:1819-1828 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:6565 — REDACTED:6565-6576 | REDACTED:752-761 | REDACTED:5000-5009 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:3193 — REDACTED:3193-3207 | agents/drivers/kingbase-go/main.go:1205-1214 | agents/drivers/kingbase-go/routine_metadata.go:27-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:86 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:86-96 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:67-77 | REDACTED:2959-2968 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×11
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/data/transfer.rs:7963 — crates/dbx-core/src/data/transfer.rs:7963-7983 | crates/dbx-core/src/data/transfer.rs:7985-7990 | crates/dbx-core/src/data/transfer.rs:7992-8016 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/admin/mq/config.rs:202 — crates/dbx-core/src/admin/mq/config.rs:202-207 | crates/dbx-core/src/admin/nacos/config.rs:284-292 | crates/dbx-core/src/admin/nacos/config.rs:294-301 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/persistence/state_persistence.rs:214 — crates/dbx-core/src/persistence/state_persistence.rs:214-219 | crates/dbx-core/src/persistence/state_persistence.rs:221-226 | crates/dbx-core/src/persistence/state_persistence.rs:228-234 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:508 — crates/dbx-driver-mongodb/src/mongo_shell.rs:508-513 | crates/dbx-web/src/routes/mcp_policy.rs:190-195 | src-tauri/src/commands/mcp_bridge.rs:1698-1703 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) REDACTED:1049 — REDACTED:1049-1054 | REDACTED:1056-1066 | crates/dbx-drivers/src/db/meilisearch_driver.rs:1246-1256 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-web/src/routes/plugins.rs:195 — crates/dbx-web/src/routes/plugins.rs:195-200 | crates/dbx-web/src/routes/plugins.rs:205-210 | crates/dbx-web/src/routes/plugins.rs:215-220 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:1666 — crates/dbx-core/src/persistence/cloud_sync.rs:1666-1671 | crates/dbx-core/src/persistence/cloud_sync.rs:1698-1703 | crates/dbx-core/src/persistence/cloud_sync.rs:1721-1728 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-web/src/routes/mq.rs:1154 — crates/dbx-web/src/routes/mq.rs:1154-1159 | crates/dbx-web/src/routes/mq.rs:1312-1318 | crates/dbx-web/src/routes/mq.rs:1324-1329 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/admin/consul/agent.rs:328 — crates/dbx-core/src/admin/consul/agent.rs:328-333 | crates/dbx-core/src/admin/consul/catalog.rs:146-151 | crates/dbx-core/src/admin/consul/status.rs:17-22 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:36 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:36-41 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:42-48 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:34-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/dbx-core/src/admin/consul/client.rs:265 — crates/dbx-core/src/admin/consul/client.rs:265-272 | crates/dbx-core/src/admin/consul/mod.rs:67-74 | crates/dbx-core/src/data/mongodb_dump/stream.rs:159-164 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×11
  • Duplicated block (23 lines × 2) crates/dbx-mcp/src/server.rs:2719 — crates/dbx-mcp/src/server.rs:2719-2741 | crates/dbx-mcp/src/server.rs:3087-3109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) REDACTED:1417 — REDACTED:1417-1439 | REDACTED:1450-1472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1417` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1449` calls `agent_protocol_row_count`, `unwrap_or` and `REDACTED:1416` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (23 lines × 2) REDACTED:328 — REDACTED:328-350 | REDACTED:328-350 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) agents/drivers/argo-go/metadata.go:679 — agents/drivers/argo-go/metadata.go:679-701 | agents/drivers/hive-go/metadata.go:690-712 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) agents/drivers/etcd-go/main.go:143 — agents/drivers/etcd-go/main.go:143-165 | agents/drivers/etcd2-go/main.go:113-135 — `agents/drivers/etcd-go/main.go` and `agents/drivers/etcd2-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 287 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/etcd-go/main.go:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (23 lines × 2) REDACTED:3139 — REDACTED:3139-3161 | agents/drivers/vastbase-go/vastbase_metadata.go:2050-2072 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) REDACTED:1904 — REDACTED:1904-1926 | REDACTED:1995-2017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1904` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (23 lines × 2) agents/drivers/oracle-go/pldebug_rows.go:102 — agents/drivers/oracle-go/pldebug_rows.go:102-124 | agents/drivers/oracle-go/pldebug_statement.go:34-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oracle-go/pldebug_rows.go:102` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (23 lines × 2) REDACTED:45 — REDACTED:45-67 | agents/drivers/zookeeper/main.go:18-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (23 lines × 2) REDACTED:337 — REDACTED:337-359 | REDACTED:404-426 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) REDACTED:49 — REDACTED:49-71 | REDACTED:49-71 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×11
  • Duplicated block (10–11 lines × 2) crates/dbx-core/src/data/transfer.rs:9521 — crates/dbx-core/src/data/transfer.rs:9521-9531 | crates/dbx-core/src/data/transfer.rs:9590-9599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/data/transfer.rs:9534` calls `iter`, `collect` and `crates/dbx-core/src/data/transfer.rs:9602` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2409 — crates/dbx-driver-mysql/src/mysql.rs:2409-2419 | crates/dbx-driver-mysql/src/mysql.rs:3035-3044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:2409` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1689 — crates/dbx-sql-data/src/query_result_sql.rs:1689-1698 | crates/dbx-sql-data/src/query_result_sql.rs:2004-2014 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/query_result_sql.rs:1689` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:920 — crates/dbx-sql-schema/src/schema_diff.rs:920-930 | crates/dbx-sql-schema/src/schema_diff.rs:998-1007 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:1036 — crates/dbx-sql-schema/src/schema_diff.rs:1036-1045 | crates/dbx-sql-schema/src/schema_diff.rs:1048-1058 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-web/src/routes/connection.rs:521 — crates/dbx-web/src/routes/connection.rs:521-530 | crates/dbx-web/src/routes/connection.rs:711-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-web/src/routes/connection.rs:1043 — crates/dbx-web/src/routes/connection.rs:1043-1053 | crates/dbx-web/src/routes/connection.rs:1184-1193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/connection.rs:1043` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) src-tauri/src/commands/connection.rs:2442 — src-tauri/src/commands/connection.rs:2442-2451 | src-tauri/src/commands/connection.rs:2784-2794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/connection.rs:2442` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) REDACTED:740 — REDACTED:740-749 | REDACTED:783-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:750` calls `contains` and `REDACTED:794` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 2) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257-267 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:422-431 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:127 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:127-136 | REDACTED:2654-2664 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:137` calls `logger`, `warn` and `REDACTED:2665` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D5 · Coupling · Off the main sequence · ×11
  • Off the main sequence: dbx-formats — dbx-formats: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-platform — dbx-platform: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: dbx-plugin-packager — dbx-plugin-packager: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sqlite-worker — dbx-sqlite-worker: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-types — dbx-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
  • Off the main sequence: github.com/apache/iotdb-client-go/v2 — github.com/apache/iotdb-client-go/v2: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: github.com/golang-auth/go-gssapi/v2 — github.com/golang-auth/go-gssapi/v2: abstractness 0.09, instability 0.00, distance 0.91 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sql-core — dbx-sql-core: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sql-dialect — dbx-sql-dialect: abstractness 0.02, instability 0.17, distance 0.81 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: dbx-driver-support — dbx-driver-support: abstractness 0.00, instability 0.22, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: dbx-mcp — dbx-mcp: abstractness 0.02, instability 0.25, distance 0.73 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×11
  • Outbound HTTP without resilience REDACTED:158 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:204 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:390 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:211 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:222 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/scripts/build_driver_zips.py:114 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:1890 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:2000 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:2009 — `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-driver-agent/src/agent_manager.rs:1588 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:67 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×10
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-core/src/schema/mod.rs:13108 — crates/dbx-core/src/schema/mod.rs:13108-13121 | crates/dbx-driver-mysql/src/mysql.rs:8082-8092 | crates/dbx-driver-mysql/src/mysql_compatible.rs:240-250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-driver-redis/src/lib.rs:512 — crates/dbx-driver-redis/src/lib.rs:512-525 | crates/dbx-driver-redis/src/lib.rs:601-614 | crates/dbx-driver-redis/src/lib.rs:616-626 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:1677 — crates/dbx-core/src/persistence/cloud_sync.rs:1677-1688 | crates/dbx-core/src/persistence/cloud_sync.rs:1738-1748 | crates/dbx-core/src/persistence/cloud_sync.rs:1835-1846 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-core/src/host/changelog.rs:171 — crates/dbx-core/src/host/changelog.rs:171-181 | crates/dbx-core/src/host/update.rs:195-205 | src-tauri/src/commands/update.rs:958-968 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-core/src/admin/nacos/service.rs:341 — crates/dbx-core/src/admin/nacos/service.rs:341-354 | crates/dbx-core/src/admin/nacos/service.rs:369-379 | crates/dbx-core/src/admin/nacos/service.rs:385-395 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-sql-schema/src/schema_diff.rs:1511 — crates/dbx-sql-schema/src/schema_diff.rs:1511-1521 | crates/dbx-sql-schema/src/schema_diff.rs:1523-1533 | crates/dbx-sql-schema/src/schema_diff.rs:1535-1545 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) agents/drivers/zookeeper/connection.go:585 — agents/drivers/zookeeper/connection.go:585-595 | agents/drivers/zookeeper/connection.go:597-607 | agents/drivers/zookeeper/connection.go:609-619 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) agents/drivers/iotdb/metadata.go:281 — agents/drivers/iotdb/metadata.go:281-296 | agents/drivers/nebula-go/metadata.go:121-131 | agents/drivers/neo4j-go/metadata.go:151-161 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/dbx-core/src/data/transfer.rs:9626 — crates/dbx-core/src/data/transfer.rs:9626-9648 | crates/dbx-core/src/data/transfer.rs:10983-11026 | crates/dbx-core/src/schema/mod.rs:1562-1572 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) REDACTED:241 — REDACTED:241-254 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1397-1407 | REDACTED:112-122 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×10
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/dbx-driver-mysql/src/manticoresearch.rs:76 — crates/dbx-driver-mysql/src/manticoresearch.rs:76-92 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:18-29 | crates/dbx-driver-mysql/src/starrocks.rs:72-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/dbx-types/src/models/connection.rs:2597 — crates/dbx-types/src/models/connection.rs:2597-2608 | crates/dbx-types/src/models/connection.rs:2610-2621 | crates/dbx-types/src/models/connection.rs:2623-2645 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:488 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:488-504 | crates/dbx-ai-provider/src/ai_codex_cli.rs:1021-1032 | crates/dbx-ai-provider/src/ai_grok_cli.rs:710-730 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) REDACTED:1875 — REDACTED:1875-1886 | REDACTED:9018-9029 | REDACTED:9044-9057 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:138 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:138-151 | agents/drivers/gbase8c/src/main/java/com/dbx/agent/gbase8c/Gbase8cAgent.java:102-113 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:166-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) REDACTED:3224 — REDACTED:3224-3235 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:509-520 | REDACTED:6378-6390 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/dbx-sql-core/src/sql_analysis.rs:943 — crates/dbx-sql-core/src/sql_analysis.rs:943-954 | crates/dbx-sql-core/src/sql_analysis.rs:956-967 | crates/dbx-sql-core/src/sql_analysis.rs:1074-1089 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) src-tauri/src/lib.rs:820 — src-tauri/src/lib.rs:820-831 | src-tauri/src/lib.rs:833-844 | src-tauri/src/lib.rs:846-857 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/dbx-web/src/routes/consul.rs:220 — crates/dbx-web/src/routes/consul.rs:220-231 | crates/dbx-web/src/routes/etcd.rs:106-118 | crates/dbx-web/src/routes/zookeeper.rs:53-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) agents/drivers/iotdb/metadata.go:566 — agents/drivers/iotdb/metadata.go:566-577 | REDACTED:2429-2440 | agents/drivers/xugu/package_members.go:124-135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×10
  • Duplicated block (26 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:194 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:194-219 | src-tauri/src/commands/redis_pubsub_server.rs:225-250 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) REDACTED:6733 — REDACTED:6733-6758 | REDACTED:6863-6888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6733` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:50 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:50-75 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:70-95 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) REDACTED:753 — REDACTED:753-778 | REDACTED:1085-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) agents/common/src/main/java/com/dbx/agent/JdbcConnectionParameters.java:19 — agents/common/src/main/java/com/dbx/agent/JdbcConnectionParameters.java:19-44 | plugins/jdbc/src/main/java/app/dbx/jdbc/JdbcConnectionParameters.java:19-44 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/JdbcConnectionParameters.java` and `plugins/jdbc/src/main/java/app/dbx/jdbc/JdbcConnectionParameters.java` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) agents/drivers/argo-go/config.go:862 — agents/drivers/argo-go/config.go:862-887 | agents/drivers/hive-go/config.go:902-927 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) REDACTED:191 — REDACTED:191-216 | REDACTED:191-216 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) REDACTED:219 — REDACTED:219-244 | REDACTED:219-244 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) agents/drivers/argo-go/main.go:508 — agents/drivers/argo-go/main.go:508-533 | agents/drivers/hive-go/main.go:508-533 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) agents/drivers/argo-go/metadata.go:651 — agents/drivers/argo-go/metadata.go:651-676 | agents/drivers/hive-go/metadata.go:662-687 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:651` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×10
  • Duplicated block (24 lines × 2) agents/drivers/duckdb/src/sql.rs:128 — agents/drivers/duckdb/src/sql.rs:128-151 | crates/dbx-drivers/src/db/duckdb_sql.rs:166-189 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) REDACTED:8496 — REDACTED:8496-8519 | REDACTED:8591-8614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8496` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) REDACTED:4053 — REDACTED:4053-4076 | REDACTED:4148-4171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4053` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:155 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:155-178 | src-tauri/src/commands/redis_pubsub_server.rs:186-209 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/redis_pubsub_ws.rs:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:207 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:207-230 | crates/dbx-drivers/src/salesforce_oauth.rs:284-307 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_oidc.rs:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) REDACTED:1055 — REDACTED:1055-1078 | REDACTED:1096-1119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1055` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (24 lines × 2) agents/drivers/argo-go/metadata.go:517 — agents/drivers/argo-go/metadata.go:517-540 | agents/drivers/hive-go/metadata.go:528-551 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:517` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) agents/drivers/argo-go/metadata.go:896 — agents/drivers/argo-go/metadata.go:896-919 | agents/drivers/hive-go/metadata.go:907-930 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) REDACTED:1702 — REDACTED:1702-1725 | agents/drivers/vastbase-go/vastbase_metadata.go:1066-1089 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1702` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) REDACTED:3344 — REDACTED:3344-3367 | agents/drivers/vastbase-go/vastbase_metadata.go:2165-2188 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×10
  • Duplicated block (22 lines × 2) crates/dbx-core/src/data/transfer_runner.rs:369 — crates/dbx-core/src/data/transfer_runner.rs:369-390 | crates/dbx-core/src/data/transfer_runner.rs:435-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer_runner.rs:369` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (22 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6243 — crates/dbx-driver-mysql/src/mysql.rs:6243-6264 | crates/dbx-driver-mysql/src/mysql.rs:6653-6674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6243` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (22 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:588 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:588-609 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:830-851 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/kafka.rs:588` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) plugins/sdk/packager/src/main.rs:183 — plugins/sdk/packager/src/main.rs:183-204 | plugins/sdk/packager/src/main.rs:293-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `plugins/sdk/packager/src/main.rs:183` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) agents/drivers/argo-go/metadata.go:542 — agents/drivers/argo-go/metadata.go:542-563 | agents/drivers/hive-go/metadata.go:553-574 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:542` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) agents/drivers/argo-go/metadata.go:727 — agents/drivers/argo-go/metadata.go:727-748 | agents/drivers/hive-go/metadata.go:738-759 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) agents/drivers/argo-go/metadata.go:775 — agents/drivers/argo-go/metadata.go:775-796 | agents/drivers/hive-go/metadata.go:786-807 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:775` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) REDACTED:274 — REDACTED:274-295 | REDACTED:177-198 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) REDACTED:331 — REDACTED:331-352 | agents/drivers/vastbase-go/vastbase_metadata.go:182-203 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:331` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) agents/drivers/vastbase-go/bench/direct/main.go:139 — agents/drivers/vastbase-go/bench/direct/main.go:139-160 | agents/drivers/vastbase-go/main.go:1320-1341 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×10
  • Duplicated block (14 lines × 3) crates/dbx-core/src/connection/connection_secrets.rs:992 — crates/dbx-core/src/connection/connection_secrets.rs:992-1005 | crates/dbx-core/src/persistence/cloud_sync.rs:2465-2478 | REDACTED:3621-3634 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `crates/dbx-core/src/persistence/cloud_sync.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/persistence/cloud_sync.rs:2480` calls `as_deref` and `crates/dbx-core/src/connection/connection_secrets.rs:1007` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) REDACTED:3891 — REDACTED:3891-3904 | src-tauri/src/commands/connection.rs:1980-1993 | src-tauri/src/commands/connection.rs:2562-2575 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3891` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:1872 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1872-1885 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1914-1927 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1955-1968 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:6166 — crates/dbx-driver-mysql/src/mysql.rs:6166-6179 | crates/dbx-driver-mysql/src/mysql.rs:6352-6365 | crates/dbx-driver-mysql/src/mysql.rs:6576-6589 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) REDACTED:233 — REDACTED:233-246 | crates/dbx-drivers/src/db/rqlite_driver.rs:112-125 | crates/dbx-drivers/src/db/turso_driver.rs:173-186 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:393 — crates/dbx-driver-mongodb/src/mongo_shell.rs:393-406 | crates/dbx-web/src/routes/mcp_policy.rs:75-88 | src-tauri/src/commands/mcp_bridge.rs:1583-1596 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 3) REDACTED:247 — REDACTED:247-260 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:509-522 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:663-676 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) agents/drivers/argo-go/main.go:492 — agents/drivers/argo-go/main.go:492-505 | agents/drivers/hive-go/main.go:492-505 | agents/drivers/iotdb/main.go:413-426 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 3) REDACTED:51 — REDACTED:51-64 | REDACTED:51-64 | agents/drivers/zookeeper/tls.go:32-45 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/zookeeper/tls.go:32` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) agents/go-common/iotdb-client-go/client/session.go:1411 — agents/go-common/iotdb-client-go/client/session.go:1411-1424 | agents/go-common/iotdb-client-go/client/session.go:1437-1450 | agents/go-common/iotdb-client-go/client/session.go:1463-1476 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/go-common/iotdb-client-go/client/session.go:1411` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/go-common/iotdb-client-go/client/session.go:1409` calls `getColumnCategories` and `agents/go-common/iotdb-client-go/client/session.go:1435` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
R11 · Import Boundaries · Boundary violation [package · ×10
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/diagram/elk-layout.ts:1 — apps/desktop/src/lib/diagram/elk-layout.ts:1 imports elkjs/lib/elk.bundled.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:60 — apps/desktop/src/lib/sql/layout/internals.ts:60 imports sql-formatter/dist/esm/parser/createParser.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:61 — apps/desktop/src/lib/sql/layout/internals.ts:61 imports sql-formatter/dist/esm/dialect.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:62 — apps/desktop/src/lib/sql/layout/internals.ts:62 imports sql-formatter/dist/esm/allDialects.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:63 — apps/desktop/src/lib/sql/layout/internals.ts:63 imports sql-formatter/dist/esm/formatter/ExpressionFormatter.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:64 — apps/desktop/src/lib/sql/layout/internals.ts:64 imports sql-formatter/dist/esm/formatter/InlineLayout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:65 — apps/desktop/src/lib/sql/layout/internals.ts:65 imports sql-formatter/dist/esm/formatter/Params.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:66 — apps/desktop/src/lib/sql/layout/internals.ts:66 imports sql-formatter/dist/esm/formatter/Layout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:67 — apps/desktop/src/lib/sql/layout/internals.ts:67 imports sql-formatter/dist/esm/formatter/Indentation.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:test-cross-package-internals] packages/app-tests/mongoShellCommand.test.ts:43 — packages/app-tests/mongoShellCommand.test.ts:43 reaches past another workspace package's public entry into its internals with a relative path (../mongo-shell/src/json.ts) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
D1 · Cyclomatic Complexity · dbx_driver_mongodb · ×9
  • dbx_driver_mongodb::mongo_shell::parse (cyclomatic 144) crates/dbx-driver-mongodb/src/mongo_shell.rs:549 — dbx_driver_mongodb::mongo_shell::parse has cyclomatic complexity 144 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation (cyclomatic 26) crates/dbx-driver-mongodb/src/mongo_shell.rs:228 — dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments (cyclomatic 26) crates/dbx-driver-mongodb/src/mongo_shell.rs:1068 — dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson (cyclomatic 21) crates/dbx-driver-mongodb/src/mongo_driver.rs:3397 — dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::mongo_pure_field_predicate (cyclomatic 19) crates/dbx-driver-mongodb/src/mongo_shell.rs:439 — dbx_driver_mongodb::mongo_shell::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_shell::shell_constructor_to_extended_json (cyclomatic 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1661 — dbx_driver_mongodb::mongo_shell::shell_constructor_to_extended_json has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_driver::bulk_write (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_driver.rs:2392 — dbx_driver_mongodb::mongo_driver::bulk_write has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::read_shell_regex_literal (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1300 — dbx_driver_mongodb::mongo_shell::read_shell_regex_literal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::split_top_level (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1943 — dbx_driver_mongodb::mongo_shell::split_top_level has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · AppState · ×9
  • AppState::get_or_create_pool_for_session_inner_with_receipt (cognitive 166) REDACTED:3526 — AppState::get_or_create_pool_for_session_inner_with_receipt has cognitive complexity 166 (threshold 15). Drivers by points: if/else 54 (113 pts), match/switch 9 (29 pts), loops 5 (18 pts), boolean chains 6 (nesting depth added 92). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • AppState::refresh_connections (cognitive 103) REDACTED:7165 — AppState::refresh_connections has cognitive complexity 103 (threshold 15). Drivers by points: match/switch 24 (72 pts), if/else 12 (23 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 60). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AppState::remove_stale_connection_pool (cognitive 61) REDACTED:5555 — AppState::remove_stale_connection_pool has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 25 (53 pts), if/else 6 (8 pts) (nesting depth added 30). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AppState::start_keepalive_task (cognitive 52) REDACTED:2886 — AppState::start_keepalive_task has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (41 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::insert_connection_pool_inner (cognitive 45) REDACTED:2563 — AppState::insert_connection_pool_inner has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::prepare_connection_transport_with_claimant (cognitive 33) REDACTED:4553 — AppState::prepare_connection_transport_with_claimant has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 7, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • AppState::mq_admin_config_for_connection (cognitive 22) REDACTED:5301 — AppState::mq_admin_config_for_connection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::restore_reclaimed_agent_pool (cognitive 17) REDACTED:6493 — AppState::restore_reclaimed_agent_pool has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::sweep_idle_connections (cognitive 17) REDACTED:7559 — AppState::sweep_idle_connections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_elasticsearch · ×9
  • dbx_driver_elasticsearch::parse_aggregations (cognitive 58) crates/dbx-driver-elasticsearch/src/lib.rs:3200 — dbx_driver_elasticsearch::parse_aggregations has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 5 (15 pts), match/switch 2 (7 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_elasticsearch::adapt_elasticsearch_sql_query (cognitive 27) crates/dbx-driver-elasticsearch/src/lib.rs:2892 — dbx_driver_elasticsearch::adapt_elasticsearch_sql_query has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::normalize_elasticsearch_rest_path (cognitive 25) crates/dbx-driver-elasticsearch/src/lib.rs:2069 — dbx_driver_elasticsearch::normalize_elasticsearch_rest_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::es_send_page (cognitive 23) crates/dbx-driver-elasticsearch/src/lib.rs:1233 — dbx_driver_elasticsearch::es_send_page has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 7 (9 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::execute_sql_query (cognitive 23) crates/dbx-driver-elasticsearch/src/lib.rs:2811 — dbx_driver_elasticsearch::execute_sql_query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::collect_mapping_columns (cognitive 21) crates/dbx-driver-elasticsearch/src/lib.rs:805 — dbx_driver_elasticsearch::collect_mapping_columns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::es_execute_paged_search (cognitive 21) crates/dbx-driver-elasticsearch/src/lib.rs:1357 — dbx_driver_elasticsearch::es_execute_paged_search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::translate_field_operator_filter (cognitive 20) crates/dbx-driver-elasticsearch/src/lib.rs:1762 — dbx_driver_elasticsearch::translate_field_operator_filter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::parse_select_star_search_query (cognitive 20) crates/dbx-driver-elasticsearch/src/lib.rs:2673 — dbx_driver_elasticsearch::parse_select_star_search_query has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×9
  • Edited copy of a member (33 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:587 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:587-619 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:829-862 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:2124 — crates/dbx-driver-elasticsearch/src/lib.rs:2124-2156 | crates/dbx-drivers/src/db/solr_driver.rs:871-908 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) agents/drivers/argo-go/config.go:685 — agents/drivers/argo-go/config.go:685-717 | agents/drivers/hive-go/config.go:692-729 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/dbx-web/src/routes/etcd.rs:399 — crates/dbx-web/src/routes/etcd.rs:399-440 | src-tauri/src/commands/etcd_cmd.rs:264-296 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:181 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:181-213 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:107-143 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) agents/drivers/kingbase-go/main.go:1362 — agents/drivers/kingbase-go/main.go:1362-1398 | agents/drivers/vastbase-go/main.go:1105-1137 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:486 — crates/dbx-core/src/query/mongo_ops.rs:486-526 | crates/dbx-core/src/query/mongo_ops.rs:600-632 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/dbx-plugin-runtime/src/plugins/host.rs:592 — crates/dbx-plugin-runtime/src/plugins/host.rs:592-624 | src-tauri/src/commands/plugins.rs:147-184 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/inference.rs:180 — crates/dbx-sql-dialect/src/sql_dialect/inference.rs:180-217 | crates/dbx-sql-schema/src/schema_diff.rs:3373-3405 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×9
  • Edited copy of a member (42 corresponding lines) REDACTED:1337 — REDACTED:1337-1378 | crates/dbx-core/src/data/transfer.rs:4486-4529 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) agents/drivers/vastbase-go/main.go:875 — agents/drivers/vastbase-go/main.go:875-920 | REDACTED:4089-4130 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:322 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:322-363 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:305-352 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) REDACTED:9546 — REDACTED:9546-9587 | REDACTED:9599-9660 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) REDACTED:1727 — REDACTED:1727-1769 | REDACTED:2734-2775 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) agents/drivers/argo-go/metadata.go:755 — agents/drivers/argo-go/metadata.go:755-796 | agents/drivers/hive-go/metadata.go:766-807 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) REDACTED:818 — REDACTED:818-869 | REDACTED:1087-1128 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) REDACTED:2493 — REDACTED:2493-2553 | REDACTED:2555-2596 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) agents/drivers/etcd-go/main.go:19 — agents/drivers/etcd-go/main.go:19-65 | agents/drivers/etcd2-go/main.go:16-57 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×9
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-core/src/schema/native_jobs/references.rs:121 — crates/dbx-core/src/schema/native_jobs/references.rs:121-138 | crates/dbx-core/src/schema/native_jobs/service.rs:644-660 | crates/dbx-core/src/schema/native_jobs/service.rs:665-687 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-ai-provider/src/ai_codex_cli.rs:401 — crates/dbx-ai-provider/src/ai_codex_cli.rs:401-417 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:383-399 | src-tauri/src/commands/mcp.rs:1601-1618 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-drivers/src/db/questdb.rs:50 — crates/dbx-drivers/src/db/questdb.rs:50-75 | crates/dbx-drivers/src/db/questdb.rs:81-102 | crates/dbx-drivers/src/db/questdb.rs:108-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) REDACTED:4553 — REDACTED:4553-4569 | REDACTED:4609-4625 | REDACTED:5512-5529 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-core/src/schema/mod.rs:1274 — crates/dbx-core/src/schema/mod.rs:1274-1292 | crates/dbx-core/src/schema/mod.rs:10271-10287 | crates/dbx-core/src/schema/mod.rs:10437-10454 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:404 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:404-420 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:423-440 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:455-471 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-mcp/src/server.rs:1903 — crates/dbx-mcp/src/server.rs:1903-1919 | crates/dbx-mcp/src/server.rs:1962-1979 | crates/dbx-mcp/src/server.rs:1989-2006 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-platform/src/ssh_prompt.rs:174 — crates/dbx-platform/src/ssh_prompt.rs:174-190 | crates/dbx-platform/src/ssh_prompt.rs:199-215 | crates/dbx-platform/src/ssh_prompt.rs:218-234 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/dbx-core/src/data/transfer.rs:7270 — crates/dbx-core/src/data/transfer.rs:7270-7286 | crates/dbx-core/src/query/document_ops.rs:457-474 | crates/dbx-sql-schema/src/schema_diff.rs:6386-6403 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×9
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/dbx-web/src/routes/schema.rs:911 — crates/dbx-web/src/routes/schema.rs:911-919 | crates/dbx-web/src/routes/schema.rs:924-932 | crates/dbx-web/src/routes/schema.rs:937-945 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/dbx-core/src/query/document_ops.rs:327 — crates/dbx-core/src/query/document_ops.rs:327-335 | crates/dbx-core/src/query/document_ops.rs:397-405 | crates/dbx-core/src/query/document_ops.rs:433-441 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:555 — crates/dbx-driver-mongodb/src/mongo_driver.rs:555-565 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1025-1033 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1126-1141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:855 — REDACTED:855-863 | REDACTED:865-873 | REDACTED:875-883 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/dbx-plugin-runtime/src/plugins/assets.rs:83 — crates/dbx-plugin-runtime/src/plugins/assets.rs:83-92 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1211-1219 | crates/dbx-plugin-runtime/src/plugins/manifest.rs:1421-1433 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:6145 — REDACTED:6145-6154 | REDACTED:8981-8989 | REDACTED:9002-9014 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) src-tauri/src/commands/text_export.rs:35 — src-tauri/src/commands/text_export.rs:35-43 | src-tauri/src/commands/text_export.rs:46-54 | src-tauri/src/commands/xlsx_export.rs:73-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:34 — agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:34-44 | agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:57-67 | agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:69-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:3621 — REDACTED:3621-3629 | crates/dbx-plugin-runtime/src/plugins/manifest.rs:630-638 | crates/dbx-sql-core/src/value_literals.rs:146-154 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×9
  • Duplicated block (11 lines × 3) REDACTED:5730 — REDACTED:5730-5740 | REDACTED:6323-6333 | REDACTED:6405-6415 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5730` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) REDACTED:3499 — REDACTED:3499-3509 | REDACTED:3526-3536 | REDACTED:3706-3716 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:3497` calls `Err`, `to_string` and `REDACTED:3525` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2590 — crates/dbx-driver-elasticsearch/src/lib.rs:2590-2600 | crates/dbx-drivers/src/db/couchdb_driver.rs:636-646 | crates/dbx-drivers/src/db/solr_driver.rs:1013-1023 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-elasticsearch/src/lib.rs:2590` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `start` to `std::time::Instant` in one and `Instant` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:7902 — crates/dbx-driver-mysql/src/mysql.rs:7902-7912 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4613-4623 | REDACTED:3596-3606 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:678 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:678-688 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:856-866 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:948-958 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:678` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:741 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:741-751 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:901-911 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1029-1039 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:741` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:539 — crates/dbx-driver-elasticsearch/src/lib.rs:539-549 | crates/dbx-drivers/src/db/solr_driver.rs:156-166 | crates/dbx-drivers/src/db/vector_driver.rs:1074-1084 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) agents/drivers/argo-go/zookeeper_tls.go:230 — agents/drivers/argo-go/zookeeper_tls.go:230-240 | REDACTED:171-181 | agents/drivers/hive-go/zookeeper_tls.go:230-240 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) REDACTED:1908 — REDACTED:1908-1918 | REDACTED:1999-2009 | REDACTED:1739-1749 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1908` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×9
  • Duplicated block (8 lines × 4) REDACTED:6206 — REDACTED:6206-6213 | REDACTED:6541-6548 | REDACTED:8098-8105 | REDACTED:8134-8141 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:6216` calls `elapsed`, `as_millis` and `REDACTED:8107` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:7915 — crates/dbx-driver-mysql/src/mysql.rs:7915-7922 | REDACTED:3609-3616 | REDACTED:3708-3715 | REDACTED:3759-3766 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:7915` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) REDACTED:1694 — REDACTED:1694-1701 | REDACTED:1901-1908 | REDACTED:2196-2203 | REDACTED:2386-2393 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1694` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:2385` calls `max` and `REDACTED:1693` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 4) crates/dbx-core/src/admin/consul/agent.rs:604 — crates/dbx-core/src/admin/consul/agent.rs:604-611 | crates/dbx-core/src/admin/consul/health.rs:173-180 | crates/dbx-core/src/admin/consul/kv.rs:448-455 | crates/dbx-core/src/admin/consul/session.rs:213-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (8 lines × 4) crates/dbx-sql-schema/src/native_job_changes/dameng.rs:40 — crates/dbx-sql-schema/src/native_job_changes/dameng.rs:40-47 | crates/dbx-sql-schema/src/native_job_changes/dameng.rs:293-300 | crates/dbx-sql-schema/src/native_job_changes/dameng.rs:302-309 | crates/dbx-sql-schema/src/native_job_changes/dameng.rs:311-318 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/native_job_changes/dameng.rs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 4) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:264 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:264-271 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:348-355 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:374-381 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:396-403 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:264` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) agents/drivers/argo-go/config.go:333 — agents/drivers/argo-go/config.go:333-340 | agents/drivers/argo-go/config.go:462-469 | agents/drivers/hive-go/config.go:339-346 | agents/drivers/hive-go/config.go:469-476 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (8 lines × 4) agents/go-common/iotdb-client-go/client/session.go:778 — agents/go-common/iotdb-client-go/client/session.go:778-785 | agents/go-common/iotdb-client-go/client/session.go:811-818 | agents/go-common/iotdb-client-go/client/session.go:845-852 | agents/go-common/iotdb-client-go/client/session.go:877-884 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/go-common/iotdb-client-go/client/session.go:778` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) agents/drivers/argo-go/main.go:558 — agents/drivers/argo-go/main.go:558-565 | agents/drivers/cassandra-go/main.go:482-489 | agents/drivers/hive-go/main.go:558-565 | agents/drivers/iotdb/main.go:456-463 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×9
  • Duplicated block (5 lines × 4) REDACTED:2869 — REDACTED:2869-2873 | REDACTED:3029-3033 | REDACTED:3044-3048 | REDACTED:3054-3058 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2869` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) crates/dbx-driver-sqlserver/src/sqlserver.rs:3302 — crates/dbx-driver-sqlserver/src/sqlserver.rs:3302-3306 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3308-3312 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3314-3318 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3320-3324 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) crates/dbx-sql-core/src/object_source_sql.rs:226 — crates/dbx-sql-core/src/object_source_sql.rs:226-230 | crates/dbx-sql-core/src/object_source_sql.rs:383-387 | crates/dbx-sql-core/src/object_source_sql.rs:783-787 | crates/dbx-sql-core/src/object_source_sql.rs:2177-2181 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:733 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:733-737 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:782-787 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:907-911 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:954-959 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:913` calls `push`, `to_string` and `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:738` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) REDACTED:56 — REDACTED:56-60 | crates/dbx-drivers/src/db/influxdb3_driver.rs:77-81 | crates/dbx-drivers/src/db/influxdb_driver.rs:102-106 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:141-145 — before extracting anything, compare `crates/dbx-drivers/src/db/influxdb3_driver.rs` and `crates/dbx-drivers/src/db/influxdb_driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108-112 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:111-115 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:115-119 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:119-123 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) REDACTED:2662 — REDACTED:2662-2666 | REDACTED:2691-2695 | REDACTED:2778-2782 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:386-390 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) agents/drivers/argo-go/metadata.go:596 — agents/drivers/argo-go/metadata.go:596-600 | agents/drivers/argo-go/metadata.go:650-654 | agents/drivers/hive-go/metadata.go:607-611 | agents/drivers/hive-go/metadata.go:661-665 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:596` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) agents/drivers/oracle-go/pldebug_breakpoint.go:146 — agents/drivers/oracle-go/pldebug_breakpoint.go:146-150 | REDACTED:217-221 | REDACTED:149-153 | agents/drivers/oracle-go/pldebug_manager.go:798-802 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oracle-go/pldebug_breakpoint.go:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D1 · Cyclomatic Complexity · dbx_ai_provider · ×8
  • dbx_ai_provider::ai::stream_claude_with_tools (cyclomatic 38) crates/dbx-ai-provider/src/ai.rs:4433 — dbx_ai_provider::ai::stream_claude_with_tools has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai::stream_openai_with_tools (cyclomatic 30) crates/dbx-ai-provider/src/ai.rs:4658 — dbx_ai_provider::ai::stream_openai_with_tools has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai_pi_agent_cli::emit_pi_event (cyclomatic 22) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:655 — dbx_ai_provider::ai_pi_agent_cli::emit_pi_event has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent (cyclomatic 20) crates/dbx-ai-provider/src/ai_cli_agent.rs:1073 — dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai::stream_openai (cyclomatic 19) crates/dbx-ai-provider/src/ai.rs:3978 — dbx_ai_provider::ai::stream_openai has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_ai_provider::ai::stream_responses_with_tools (cyclomatic 19) crates/dbx-ai-provider/src/ai.rs:4842 — dbx_ai_provider::ai::stream_responses_with_tools has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_ai_provider::ai::classify_error (cyclomatic 18) crates/dbx-ai-provider/src/ai.rs:3441 — dbx_ai_provider::ai::classify_error has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_ai_provider::ai::build_gemini_contents (cyclomatic 17) crates/dbx-ai-provider/src/ai.rs:5001 — dbx_ai_provider::ai::build_gemini_contents has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dbx_driver_agent · ×8
  • dbx_driver_agent::agent_service::download_with_progress (cyclomatic 37) crates/dbx-driver-agent/src/agent_service.rs:2177 — dbx_driver_agent::agent_service::download_with_progress has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::import_offline_zip (cyclomatic 37) crates/dbx-driver-agent/src/agent_service.rs:3186 — dbx_driver_agent::agent_service::import_offline_zip has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits (cyclomatic 26) crates/dbx-driver-agent/src/agent_offline_export.rs:695 — dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::is_macho_binary_for_cpu (cyclomatic 21) crates/dbx-driver-agent/src/agent_service.rs:4454 — dbx_driver_agent::agent_service::is_macho_binary_for_cpu has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_connection::agent_connect_params_with_role (cyclomatic 20) crates/dbx-driver-agent/src/agent_connection.rs:95 — dbx_driver_agent::agent_connection::agent_connect_params_with_role has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::backend_error::consume_sensitive_value (cyclomatic 19) crates/dbx-driver-agent/src/backend_error.rs:1098 — dbx_driver_agent::backend_error::consume_sensitive_value has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::install_agent_driver_from_registry (cyclomatic 16) crates/dbx-driver-agent/src/agent_service.rs:1719 — dbx_driver_agent::agent_service::install_agent_driver_from_registry has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::agent_service::open_agent_download_response (cyclomatic 16) crates/dbx-driver-agent/src/agent_service.rs:2419 — dbx_driver_agent::agent_service::open_agent_download_response has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_postgres · ×8
  • dbx_driver_postgres::postgres::pg_ndim_array_element_json (cyclomatic 30) REDACTED:429 — dbx_driver_postgres::postgres::pg_ndim_array_element_json has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::completion_assistant_search_inner (cyclomatic 30) REDACTED:4145 — dbx_driver_postgres::postgres::completion_assistant_search_inner has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::classify_pg_type (cyclomatic 29) REDACTED:1051 — dbx_driver_postgres::postgres::classify_pg_type has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::pg_value_to_json_classified (cyclomatic 29) REDACTED:1135 — dbx_driver_postgres::postgres::pg_value_to_json_classified has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_postgres::postgres::postgres_connection_url (cyclomatic 23) REDACTED:3504 — dbx_driver_postgres::postgres::postgres_connection_url has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::build_custom_type_ddl (cyclomatic 22) REDACTED:7984 — dbx_driver_postgres::postgres::build_custom_type_ddl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::pg_temporal_array_text_to_json (cyclomatic 20) REDACTED:1300 — dbx_driver_postgres::postgres::pg_temporal_array_text_to_json has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (parse_array, parse_quoted, normalize_array_value, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • dbx_driver_postgres::postgres::pg_array_to_json_value (cyclomatic 19) REDACTED:885 — dbx_driver_postgres::postgres::pg_array_to_json_value has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D3 · God Classes · TooManyFunctions · ×8
  • TooManyFunctions: dbx_core::admin::nacos::service crates/dbx-core/src/admin/nacos/service.rs:7 — TooManyFunctions — 48 free functions. The bar is 30 free functions; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::nacos_cmd src-tauri/src/commands/nacos_cmd.rs:10 — TooManyFunctions — 45 free functions. The bar is 30 free functions; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_formats::csv_export crates/dbx-formats/src/csv_export.rs:22 — TooManyFunctions — 41 free functions. The bar is 30 free functions; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::document_cmd src-tauri/src/commands/document_cmd.rs:9 — TooManyFunctions — 40 free functions. The bar is 30 free functions; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_ai_provider::ai_opencode_cli crates/dbx-ai-provider/src/ai_opencode_cli.rs:36 — TooManyFunctions — 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_web::routes::app_settings crates/dbx-web/src/routes/app_settings.rs:61 — TooManyFunctions — 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_core::admin::nacos::namespace_access crates/dbx-core/src/admin/nacos/namespace_access.rs:34 — TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::agents src-tauri/src/commands/agents.rs:31 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×8
  • Edited copy of a member (26 corresponding lines) REDACTED:3686 — REDACTED:3686-3732 | REDACTED:3738-3792 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) REDACTED:1414 — REDACTED:1414-1439 | REDACTED:1446-1472 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) REDACTED:9554 — REDACTED:9554-9583 | REDACTED:9699-9724 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) REDACTED:2387 — REDACTED:2387-2418 | agents/drivers/vastbase-go/vastbase_metadata.go:1465-1490 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1482 — agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1482-1511 | agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:2034-2059 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:795 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:795-825 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1061-1086 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) REDACTED:327 — REDACTED:327-352 | agents/drivers/vastbase-go/vastbase_metadata.go:178-203 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/dbx-sql-data/src/data_grid_extractors/sql_identifiers.rs:89 — crates/dbx-sql-data/src/data_grid_extractors/sql_identifiers.rs:89-116 | crates/dbx-sql-data/src/data_grid_extractors/sql_identifiers.rs:118-143 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×8
  • Edited copy of a member (37 corresponding lines) REDACTED:1922 — REDACTED:1922-1960 | REDACTED:1966-2002 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) agents/drivers/kingbase-go/main.go:798 — agents/drivers/kingbase-go/main.go:798-849 | agents/drivers/vastbase-go/main.go:676-712 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) REDACTED:2820 — REDACTED:2820-2876 | REDACTED:2931-2967 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) agents/drivers/duckdb/src/sql.rs:127 — agents/drivers/duckdb/src/sql.rs:127-163 | crates/dbx-drivers/src/db/duckdb_sql.rs:165-201 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) REDACTED:394 — REDACTED:394-432 | agents/drivers/vastbase-go/vastbase_metadata.go:245-281 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) REDACTED:530 — REDACTED:530-569 | REDACTED:271-307 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) agents/drivers/rabbitmq/thrift_binary.go:306 — agents/drivers/rabbitmq/thrift_binary.go:306-342 | agents/drivers/rabbitmq/thrift_binary.go:344-380 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:2168 — crates/dbx-core/src/admin/nacos/http.rs:2168-2207 | crates/dbx-core/src/admin/nacos/http.rs:2245-2281 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×8
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:225 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:225-246 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:305-320 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:197-212 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) REDACTED:328 — REDACTED:328-343 | crates/dbx-drivers/src/db/rqlite_driver.rs:201-216 | crates/dbx-drivers/src/db/turso_driver.rs:262-277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:1006 — crates/dbx-core/src/admin/nacos/http.rs:1006-1021 | crates/dbx-core/src/admin/nacos/http.rs:1074-1096 | crates/dbx-core/src/admin/nacos/http.rs:1103-1125 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:244 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:244-259 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:154-170 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:225-240 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/dbx-sql-core/src/object_source_sql.rs:1518 — crates/dbx-sql-core/src/object_source_sql.rs:1518-1535 | crates/dbx-sql-core/src/object_source_sql.rs:1553-1570 | crates/dbx-sql-core/src/object_source_sql.rs:1679-1694 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) agents/go-common/iotdb-client-go/client/tablesessionpool.go:103 — agents/go-common/iotdb-client-go/client/tablesessionpool.go:103-118 | agents/go-common/iotdb-client-go/client/tablesessionpool.go:127-142 | agents/go-common/iotdb-client-go/client/tablesessionpool.go:153-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/dbx-core/src/data/transfer.rs:6271 — crates/dbx-core/src/data/transfer.rs:6271-6288 | crates/dbx-sql-schema/src/schema_diff.rs:3060-3079 | crates/dbx-sql-schema/src/schema_diff.rs:3235-3250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/dbx-core/src/schema/mod.rs:3408 — crates/dbx-core/src/schema/mod.rs:3408-3424 | crates/dbx-core/src/schema/mod.rs:14483-14498 | crates/dbx-core/src/schema/mod.rs:17612-17627 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×8
  • Duplicated block (25 lines × 2) REDACTED:1227 — REDACTED:1227-1251 | REDACTED:1278-1302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1227` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) REDACTED:8395 — REDACTED:8395-8419 | REDACTED:8932-8956 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:373 — crates/dbx-drivers/src/db/rqlite_driver.rs:373-397 | crates/dbx-drivers/src/db/turso_driver.rs:618-642 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (25 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:129 — crates/dbx-drivers/src/db/rqlite_driver.rs:129-153 | crates/dbx-drivers/src/db/turso_driver.rs:190-214 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) agents/drivers/cassandra-go/main.go:245 — agents/drivers/cassandra-go/main.go:245-269 | agents/drivers/neo4j-go/main.go:273-297 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/neo4j-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 21 separate duplicated blocks between them, totalling at least 280 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:245` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (25 lines × 2) agents/drivers/neo4j-go/internal/neo4jcompat/modern.go:20 — agents/drivers/neo4j-go/internal/neo4jcompat/modern.go:20-44 | agents/drivers/neo4j-go/internal/neo4jcompat/windows_legacy.go:21-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/neo4j-go/internal/neo4jcompat/modern.go:20` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) REDACTED:1215 — REDACTED:1215-1239 | REDACTED:1150-1174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) REDACTED:3214 — REDACTED:3214-3246 | REDACTED:3308-3332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×8
  • Duplicated block (6 lines × 4) crates/dbx-ai-provider/src/ai_codex_cli.rs:989 — crates/dbx-ai-provider/src/ai_codex_cli.rs:989-994 | crates/dbx-ai-provider/src/ai_grok_cli.rs:679-684 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:537-543 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:578-584 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_codex_cli.rs:989` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 4) REDACTED:3716 — REDACTED:3716-3721 | REDACTED:3730-3735 | REDACTED:4463-4468 | REDACTED:4474-4479 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/dbx-drivers/src/db/sqlite.rs:1555 — crates/dbx-drivers/src/db/sqlite.rs:1555-1560 | crates/dbx-drivers/src/db/sqlite.rs:1632-1637 | crates/dbx-drivers/src/db/sqlite.rs:2644-2649 | crates/dbx-drivers/src/db/sqlite.rs:2741-2746 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/sqlite.rs:1555` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) crates/dbx-drivers/src/db/sqlite.rs:1597 — crates/dbx-drivers/src/db/sqlite.rs:1597-1602 | crates/dbx-drivers/src/db/sqlite.rs:2539-2544 | crates/dbx-drivers/src/db/sqlite.rs:2622-2627 | crates/dbx-drivers/src/db/sqlite.rs:2696-2701 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/sqlite.rs:1597` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) crates/dbx-web/src/routes/consul.rs:252 — crates/dbx-web/src/routes/consul.rs:252-257 | crates/dbx-web/src/routes/consul.rs:282-287 | crates/dbx-web/src/routes/consul.rs:292-297 | crates/dbx-web/src/routes/etcd.rs:197-202 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/consul.rs:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:153 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:153-158 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:233-238 | crates/dbx-ai-provider/src/ai_grok_cli.rs:203-208 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:85-90 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 4) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130-135 | REDACTED:3551-3556 | REDACTED:3565-3570 | REDACTED:5622-5627 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:508 — agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:508-513 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:318-323 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:250-255 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:271-276 — before extracting anything, compare `agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:325` calls `buildUrl`, `getHost`, `getPort` and `agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:515` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D1 · Cyclomatic Complexity · dbx_web · ×7
  • dbx_web::routes::mongodb_dump::receive_source (cyclomatic 36) crates/dbx-web/src/routes/mongodb_dump.rs:87 — dbx_web::routes::mongodb_dump::receive_source has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_web::serve (cyclomatic 21) crates/dbx-web/src/main.rs:520 — dbx_web::serve has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_web::routes::mcp_policy::mongo_pure_field_predicate (cyclomatic 19) crates/dbx-web/src/routes/mcp_policy.rs:121 — dbx_web::routes::mcp_policy::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_web::routes::table_import::preview_import (cyclomatic 18) crates/dbx-web/src/routes/table_import.rs:114 — dbx_web::routes::table_import::preview_import has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_web::routes::connection::run_prepared_temporary_connection_test (cyclomatic 16) crates/dbx-web/src/routes/connection.rs:379 — dbx_web::routes::connection::run_prepared_temporary_connection_test has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_web::routes::connection::plan_connection_config_sync (cyclomatic 16) crates/dbx-web/src/routes/connection.rs:1235 — dbx_web::routes::connection::plan_connection_config_sync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_web::routes::mongodb_import_export::preview_import (cyclomatic 16) crates/dbx-web/src/routes/mongodb_import_export.rs:112 — dbx_web::routes::mongodb_import_export::preview_import has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · dbx_plugin_runtime · ×7
  • dbx_plugin_runtime::plugins::manifest::validate_contributions (cognitive 193) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1477 — dbx_plugin_runtime::plugins::manifest::validate_contributions has cognitive complexity 193 (threshold 15). Drivers by points: if/else 52 (154 pts), loops 12 (24 pts), boolean chains 10, match/switch 2 (5 pts) (nesting depth added 117). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::manifest::validate_form_fields (cognitive 48) crates/dbx-plugin-runtime/src/plugins/manifest.rs:2059 — dbx_plugin_runtime::plugins::manifest::validate_form_fields has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog (cognitive 36) crates/dbx-plugin-runtime/src/plugins/marketplace.rs:570 — dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::manifest::validate_localizations (cognitive 27) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1354 — dbx_plugin_runtime::plugins::manifest::validate_localizations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::installer::prune_plugin_history (cognitive 20) crates/dbx-plugin-runtime/src/plugins/installer.rs:999 — dbx_plugin_runtime::plugins::installer::prune_plugin_history has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::installer::extract_package (cognitive 18) crates/dbx-plugin-runtime/src/plugins/installer.rs:802 — dbx_plugin_runtime::plugins::installer::extract_package has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::host::plugin_connection_action_result (cognitive 16) crates/dbx-plugin-runtime/src/plugins/host.rs:787 — dbx_plugin_runtime::plugins::host::plugin_connection_action_result has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 13+ corresponding lines) REDACTED:555 — REDACTED:555-567 | REDACTED:2839-2859 | crates/dbx-core/src/data/transfer.rs:9589-9610 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:358 — crates/dbx-web/src/routes/mongodb_import_export.rs:358-370 | crates/dbx-web/src/routes/sql_file.rs:741-753 | crates/dbx-web/src/routes/table_import.rs:409-422 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:5181 — crates/dbx-driver-mysql/src/mysql.rs:5181-5193 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:90-102 | crates/dbx-driver-mysql/src/starrocks.rs:137-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/dbx-web/src/routes/redis.rs:370 — crates/dbx-web/src/routes/redis.rs:370-382 | crates/dbx-web/src/routes/redis.rs:387-401 | crates/dbx-web/src/routes/redis.rs:406-420 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) REDACTED:9223 — REDACTED:9223-9235 | REDACTED:9239-9255 | REDACTED:9351-9370 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/dbx-web/src/routes/redis.rs:657 — crates/dbx-web/src/routes/redis.rs:657-670 | crates/dbx-web/src/routes/redis.rs:844-856 | crates/dbx-web/src/routes/redis.rs:889-901 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) REDACTED:2695 — REDACTED:2695-2707 | REDACTED:3956-3968 | REDACTED:4702-4714 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×7
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-core/src/data/transfer.rs:9701 — crates/dbx-core/src/data/transfer.rs:9701-9719 | crates/dbx-core/src/data/transfer.rs:10956-10981 | crates/dbx-core/src/data/transfer.rs:11062-11084 | crates/dbx-core/src/data/transfer.rs:11394-11402 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-core/src/schema/mod.rs:286 — crates/dbx-core/src/schema/mod.rs:286-294 | crates/dbx-core/src/schema/mod.rs:350-358 | crates/dbx-core/src/schema/mod.rs:365-373 | crates/dbx-core/src/schema/mod.rs:384-393 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-formats/src/temporal_format.rs:236 — crates/dbx-formats/src/temporal_format.rs:236-255 | crates/dbx-formats/src/temporal_format.rs:265-273 | crates/dbx-formats/src/temporal_format.rs:287-302 | crates/dbx-formats/src/temporal_format.rs:316-326 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:417 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:417-425 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:439-448 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:482-491 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:691-699 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-sql-core/src/sql_risk.rs:328 — crates/dbx-sql-core/src/sql_risk.rs:328-336 | crates/dbx-sql-core/src/sql_risk.rs:418-426 | crates/dbx-sql-core/src/sql_risk.rs:467-475 | crates/dbx-sql-core/src/sql_risk.rs:496-504 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) REDACTED:1585 — REDACTED:1585-1595 | REDACTED:1675-1683 | REDACTED:3477-3490 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1705-1714 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/dbx-drivers/src/db/meilisearch_driver.rs:528 — crates/dbx-drivers/src/db/meilisearch_driver.rs:528-537 | crates/dbx-drivers/src/db/meilisearch_driver.rs:593-606 | crates/dbx-drivers/src/db/meilisearch_driver.rs:1070-1079 | crates/dbx-drivers/src/db/meilisearch_driver.rs:1163-1171 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×7
  • Duplicated block (29 lines × 2) crates/dbx-ai-provider/src/ai.rs:3946 — crates/dbx-ai-provider/src/ai.rs:3946-3974 | crates/dbx-ai-provider/src/ai.rs:4188-4216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3946` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182-210 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:108-136 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) REDACTED:1192 — REDACTED:1192-1220 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:99-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) agents/drivers/argo-go/config.go:386 — agents/drivers/argo-go/config.go:386-414 | agents/drivers/hive-go/config.go:392-420 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) agents/drivers/argo-go/config.go:1168 — agents/drivers/argo-go/config.go:1168-1196 | agents/drivers/hive-go/config.go:1208-1236 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) REDACTED:186 — REDACTED:186-214 | agents/drivers/vastbase-go/vastbase_metadata.go:112-140 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (29 lines × 2) agents/drivers/argo-go/metadata.go:597 — agents/drivers/argo-go/metadata.go:597-625 | agents/drivers/hive-go/metadata.go:608-636 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:597` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×7
  • Duplicated block (27 lines × 2) crates/dbx-ai-provider/src/ai.rs:3918 — crates/dbx-ai-provider/src/ai.rs:3918-3944 | crates/dbx-ai-provider/src/ai.rs:4527-4553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3918` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:490 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:490-516 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:727-753 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) crates/dbx-core/src/data/transfer.rs:13239 — crates/dbx-core/src/data/transfer.rs:13239-13265 | crates/dbx-core/src/data/transfer/structure_plan.rs:571-597 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:13239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (27 lines × 2) agents/drivers/argo-go/config.go:821 — agents/drivers/argo-go/config.go:821-847 | agents/drivers/hive-go/config.go:861-887 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) agents/drivers/argo-go/main.go:332 — agents/drivers/argo-go/main.go:332-358 | agents/drivers/hive-go/main.go:332-358 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) REDACTED:1849 — REDACTED:1849-1875 | agents/drivers/vastbase-go/vastbase_metadata.go:1169-1195 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) REDACTED:282 — REDACTED:282-308 | REDACTED:282-308 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×7
  • Duplicated block (34 lines × 2) crates/dbx-ai-provider/src/ai.rs:4237 — crates/dbx-ai-provider/src/ai.rs:4237-4270 | crates/dbx-ai-provider/src/ai.rs:5124-5157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (34 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:123 — crates/dbx-web/src/routes/mongodb_import_export.rs:123-156 | crates/dbx-web/src/routes/table_import.rs:127-160 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/mongodb_import_export.rs:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-web/src/routes/table_import.rs:161` calls `Some` and `crates/dbx-web/src/routes/mongodb_import_export.rs:157` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (34 lines × 2) agents/drivers/argo-go/metadata.go:297 — agents/drivers/argo-go/metadata.go:297-330 | agents/drivers/hive-go/metadata.go:303-336 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (34 lines × 2) agents/drivers/argo-go/protocol_error.go:37 — agents/drivers/argo-go/protocol_error.go:37-70 | agents/drivers/hive-go/protocol_error.go:37-70 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/hive-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 136 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/protocol_error.go:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (34 lines × 2) agents/drivers/argo-go/query.go:181 — agents/drivers/argo-go/query.go:181-214 | agents/drivers/hive-go/query.go:181-214 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (34 lines × 2) REDACTED:134 — REDACTED:134-167 | agents/drivers/vastbase-go/vastbase_metadata.go:54-87 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:134` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (34 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:92 — agents/drivers/argo-go/bench/functional_probe.py:92-125 | agents/drivers/hive-go/bench/functional_probe.py:92-125 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×7
  • Duplicated block (13 lines × 3) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:262 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:262-274 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:355-367 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:561-573 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) crates/dbx-tauri-schema/src/commands.rs:83 — crates/dbx-tauri-schema/src/commands.rs:83-95 | src-tauri/src/commands/document_cmd.rs:17-29 | src-tauri/src/commands/mongo_cmd.rs:17-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 3) agents/drivers/cassandra-go/metadata.go:658 — agents/drivers/cassandra-go/metadata.go:658-670 | REDACTED:1834-1846 | agents/drivers/vastbase-go/vastbase_metadata.go:1154-1166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 3) agents/drivers/iotdb/protocol_error.go:56 — agents/drivers/iotdb/protocol_error.go:56-68 | agents/drivers/neo4j-go/protocol_error.go:70-82 | agents/drivers/vastbase-go/protocol_error.go:67-79 — `agents/drivers/iotdb/protocol_error.go` and `agents/drivers/neo4j-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 66 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/iotdb/protocol_error.go:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) agents/drivers/argo-go/metadata.go:994 — agents/drivers/argo-go/metadata.go:994-1006 | agents/drivers/hive-go/metadata.go:1005-1017 | agents/drivers/rocketmq/helpers.go:196-208 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 3) REDACTED:372 — REDACTED:372-384 | REDACTED:372-384 | agents/drivers/zookeeper/sasl.go:182-194 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 3) agents/drivers/cassandra-go/metadata.go:626 — agents/drivers/cassandra-go/metadata.go:626-638 | agents/drivers/iotdb/metadata.go:579-591 | agents/drivers/neo4j-go/metadata.go:364-376 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×7
  • Duplicated block (12 lines × 3) agents/drivers/duckdb/src/sql.rs:90 — agents/drivers/duckdb/src/sql.rs:90-101 | crates/dbx-core/src/data/transfer.rs:6314-6325 | crates/dbx-drivers/src/db/duckdb_sql.rs:106-117 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:379 — crates/dbx-driver-mongodb/src/mongo_shell.rs:379-390 | crates/dbx-web/src/routes/mcp_policy.rs:61-72 | src-tauri/src/commands/mcp_bridge.rs:1569-1580 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 3) agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:124 — agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:124-135 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:652-663 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:116-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) REDACTED:3550 — REDACTED:3550-3561 | REDACTED:3564-3575 | REDACTED:5621-5632 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) agents/drivers/argo-go/zookeeper_tls.go:139 — agents/drivers/argo-go/zookeeper_tls.go:139-150 | REDACTED:136-147 | agents/drivers/hive-go/zookeeper_tls.go:139-150 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/zookeeper_tls.go:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (12 lines × 3) agents/drivers/kingbase-go/main.go:769 — agents/drivers/kingbase-go/main.go:769-780 | agents/drivers/neo4j-go/main.go:502-513 | agents/drivers/vastbase-go/main.go:647-658 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/neo4j-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 23 separate duplicated blocks between them, totalling at least 248 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 3) agents/drivers/argo-go/metadata.go:1009 — agents/drivers/argo-go/metadata.go:1009-1020 | agents/drivers/hive-go/metadata.go:1020-1031 | agents/drivers/iotdb/metadata.go:594-605 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:1009` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×7
  • Duplicated block (10 lines × 4) REDACTED:1322 — REDACTED:1322-1331 | REDACTED:1439-1448 | REDACTED:1454-1463 | REDACTED:1586-1595 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 4) crates/dbx-core/src/data/transfer.rs:14717 — crates/dbx-core/src/data/transfer.rs:14717-14726 | crates/dbx-core/src/data/transfer.rs:14741-14750 | crates/dbx-core/src/data/transfer.rs:14765-14774 | crates/dbx-core/src/data/transfer.rs:14794-14803 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:14717` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) crates/dbx-sql-schema/src/schema_diff.rs:3800 — crates/dbx-sql-schema/src/schema_diff.rs:3800-3809 | crates/dbx-sql-schema/src/schema_diff.rs:4105-4114 | crates/dbx-sql-schema/src/schema_diff.rs:4228-4237 | crates/dbx-sql-schema/src/schema_diff.rs:4297-4306 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:3800` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `source` to `&[IndexInfo]` in one and `&[TriggerInfo]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:209 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:209-218 | REDACTED:1040-1049 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:341-350 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:293-302 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 4) REDACTED:5405 — REDACTED:5405-5414 | REDACTED:5428-5437 | REDACTED:5459-5468 | REDACTED:5514-5523 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:5402` calls `oracleListObjects`, `createArrayNode` and `REDACTED:5457` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 4) agents/drivers/iotdb/main.go:301 — agents/drivers/iotdb/main.go:301-310 | agents/drivers/kingbase-go/main.go:355-364 | agents/drivers/neo4j-go/main.go:331-340 | agents/drivers/vastbase-go/main.go:366-375 — `agents/drivers/iotdb/main.go` and `agents/drivers/kingbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/vastbase-go/main.go:376` calls `closeConnectionRuntimes` and `agents/drivers/iotdb/main.go:311` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 4) agents/drivers/etcd-go/main.go:437 — agents/drivers/etcd-go/main.go:437-446 | agents/drivers/etcd2-go/main.go:404-413 | REDACTED:6439-6448 | REDACTED:5965-5974 — `agents/drivers/etcd-go/main.go` and `agents/drivers/etcd2-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 287 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `s *etcdSession) handle(method` in one and `s *etcd2Session) handle(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×7
  • Duplicated block (8–9 lines × 2) agents/drivers/duckdb/src/sql.rs:395 — agents/drivers/duckdb/src/sql.rs:395-402 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4617-4625 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) REDACTED:7432 — REDACTED:7432-7439 | REDACTED:7458-7466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7432` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) crates/dbx-driver-support/src/http_tunnel.rs:58 — crates/dbx-driver-support/src/http_tunnel.rs:58-66 | crates/dbx-driver-support/src/http_tunnel.rs:105-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-support/src/http_tunnel.rs:58` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:12 — crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:12-20 | REDACTED:1895-1902 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:916 — crates/dbx-sql-schema/src/schema_diff.rs:916-923 | crates/dbx-sql-schema/src/schema_diff.rs:940-948 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:916` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) REDACTED:3613 — REDACTED:3613-3620 | REDACTED:2411-2419 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3613` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) REDACTED:3317 — REDACTED:3317-3324 | REDACTED:5446-5454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5446` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: MqAdminConfig (LCOM4 6) crates/dbx-core/src/admin/mq/config.rs:61 — MqAdminConfig's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ConnectionConfig (LCOM4 6) crates/dbx-types/src/models/connection.rs:156 — ConnectionConfig's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MqttOptions (LCOM4 6) vendor/rumqttc/src/v5/mod.rs:64 — MqttOptions's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AgentManager (LCOM4 4) crates/dbx-driver-agent/src/agent_manager.rs:881 — AgentManager's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Connection (LCOM4 4) vendor/tiberius/src/client/connection.rs:52 — Connection's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TlsStream (LCOM4 4) vendor/tiberius/src/client/tls_stream/rustls_tls_stream.rs:34 — TlsStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: QueryStream (LCOM4 4) vendor/tiberius/src/tds/stream/query.rs:91 — QueryStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · AppState · ×6
  • AppState::get_or_create_pool_for_session_inner_with_receipt (cyclomatic 96) REDACTED:3526 — AppState::get_or_create_pool_for_session_inner_with_receipt has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • AppState::refresh_connections (cyclomatic 70) REDACTED:7165 — AppState::refresh_connections has cyclomatic complexity 70 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • AppState::remove_stale_connection_pool (cyclomatic 61) REDACTED:5555 — AppState::remove_stale_connection_pool has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • AppState::prepare_connection_transport_with_claimant (cyclomatic 30) REDACTED:4553 — AppState::prepare_connection_transport_with_claimant has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • AppState::insert_connection_pool_inner (cyclomatic 26) REDACTED:2563 — AppState::insert_connection_pool_inner has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • AppState::start_keepalive_task (cyclomatic 23) REDACTED:2886 — AppState::start_keepalive_task has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · dbx_sql_dialect · ×6
  • dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database (cognitive 54) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:283 — dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38 (46 pts), boolean chains 7, match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind (cognitive 28) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:50 — dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_sql_dialect::sql_dialect::table_select::build_select_columns (cognitive 21) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:933 — dbx_sql_dialect::sql_dialect::table_select::build_select_columns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_column_type (cognitive 20) crates/dbx-sql-dialect/src/sql_dialect/type_rewrite.rs:314 — dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_column_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items (cognitive 19) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:131 — dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::identifiers::qualified_table_name (cognitive 16) crates/dbx-sql-dialect/src/sql_dialect/identifiers.rs:39 — dbx_sql_dialect::sql_dialect::identifiers::qualified_table_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_types · ×6
  • dbx_types::models::connection::normalize_postgres_url_params (cognitive 38) crates/dbx-types/src/models/connection.rs:2470 — dbx_types::models::connection::normalize_postgres_url_params has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::normalize_sqlserver_host_port (cognitive 28) crates/dbx-types/src/models/connection.rs:3187 — dbx_types::models::connection::normalize_sqlserver_host_port has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::parse_as400_jdbc_endpoint (cognitive 21) crates/dbx-types/src/models/connection.rs:2819 — dbx_types::models::connection::parse_as400_jdbc_endpoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_types::models::connection::normalize_mysql_url_params (cognitive 19) crates/dbx-types/src/models/connection.rs:2202 — dbx_types::models::connection::normalize_mysql_url_params has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_types::models::connection::migrate_legacy_transport_layers (cognitive 18) crates/dbx-types/src/models/connection.rs:1006 — dbx_types::models::connection::migrate_legacy_transport_layers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::as400_jdbc_properties (cognitive 16) crates/dbx-types/src/models/connection.rs:2925 — dbx_types::models::connection::as400_jdbc_properties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×6
  • Edited copy of a member (29 corresponding lines) REDACTED:1181 — REDACTED:1181-1231 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:97-130 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/dbx-mcp/src/server.rs:2574 — crates/dbx-mcp/src/server.rs:2574-2602 | crates/dbx-mcp/src/server.rs:2609-2645 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/dbx-driver-redis/src/lib.rs:5460 — crates/dbx-driver-redis/src/lib.rs:5460-5488 | crates/dbx-driver-redis/src/lib.rs:5496-5524 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) REDACTED:2914 — REDACTED:2914-2942 | agents/drivers/vastbase-go/vastbase_metadata.go:1863-1891 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/dbx-core/src/ai/agent_loop.rs:823 — crates/dbx-core/src/ai/agent_loop.rs:823-853 | crates/dbx-core/src/ai/agent_loop.rs:879-907 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) agents/drivers/etcd-go/watch.go:18 — agents/drivers/etcd-go/watch.go:18-46 | agents/drivers/etcd2-go/watch.go:19-49 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×6
  • Edited copy of a member (35 corresponding lines) agents/drivers/argo-go/metadata.go:197 — agents/drivers/argo-go/metadata.go:197-231 | agents/drivers/hive-go/metadata.go:197-237 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/dbx-core/src/schema/mod.rs:10712 — crates/dbx-core/src/schema/mod.rs:10712-10753 | crates/dbx-core/src/schema/mod.rs:10765-10799 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) agents/drivers/kingbase-go/main.go:1117 — agents/drivers/kingbase-go/main.go:1117-1160 | agents/drivers/vastbase-go/main.go:989-1023 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/dbx-web/src/routes/plugins.rs:351 — crates/dbx-web/src/routes/plugins.rs:351-385 | src-tauri/src/commands/plugins.rs:260-296 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:1865 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1865-1904 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1907-1941 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/dbx-sql-data/src/database_structure_search_sql.rs:193 — crates/dbx-sql-data/src/database_structure_search_sql.rs:193-236 | crates/dbx-sql-data/src/database_structure_search_sql.rs:419-453 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×6
  • Edited copy of a member (28 corresponding lines) crates/dbx-web/src/routes/cloud_sync.rs:292 — crates/dbx-web/src/routes/cloud_sync.rs:292-319 | crates/dbx-web/src/routes/cloud_sync.rs:464-496 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/dbx-sql-core/src/value_literals.rs:18 — crates/dbx-sql-core/src/value_literals.rs:18-46 | crates/dbx-sql-core/src/value_literals.rs:56-83 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) REDACTED:3270 — REDACTED:3270-3304 | REDACTED:3445-3472 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) REDACTED:1297 — REDACTED:1297-1327 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:418-445 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) REDACTED:1757 — REDACTED:1757-1789 | REDACTED:1791-1818 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) REDACTED:2623 — REDACTED:2623-2677 | REDACTED:2679-2706 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 5+ corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:449 — crates/dbx-driver-elasticsearch/src/lib.rs:449-456 | crates/dbx-drivers/src/db/couchdb_driver.rs:107-111 | crates/dbx-drivers/src/db/solr_driver.rs:142-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:1002 — agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:1002-1007 | agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:257-262 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1145-1149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) REDACTED:1487 — REDACTED:1487-1491 | REDACTED:3456-3460 | REDACTED:4643-4647 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) crates/dbx-ai-provider/src/ai_cursor_cli.rs:321 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:321-325 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:545-549 | crates/dbx-drivers/src/db/ssh_tunnel.rs:332-338 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) crates/dbx-web/src/routes/consul.rs:334 — crates/dbx-web/src/routes/consul.rs:334-338 | crates/dbx-web/src/routes/nacos.rs:346-351 | crates/dbx-web/src/routes/zookeeper.rs:70-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) crates/dbx-driver-mysql/src/doris.rs:22 — crates/dbx-driver-mysql/src/doris.rs:22-26 | crates/dbx-driver-mysql/src/manticoresearch.rs:13-17 | crates/dbx-driver-mysql/src/starrocks.rs:48-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/dbx-ai-provider/src/ai.rs:5290 — crates/dbx-ai-provider/src/ai.rs:5290-5293 | crates/dbx-core/src/connection/connection_secrets.rs:979-983 | crates/dbx-core/src/persistence/history.rs:126-129 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/dbx-driver-mysql/src/manticoresearch.rs:37 — crates/dbx-driver-mysql/src/manticoresearch.rs:37-40 | crates/dbx-driver-mysql/src/mysql.rs:685-689 | crates/dbx-driver-mysql/src/ob_oracle.rs:39-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/dbx-core/src/query/document_ops.rs:714 — crates/dbx-core/src/query/document_ops.rs:714-717 | crates/dbx-core/src/query/mongo_ops.rs:580-583 | crates/dbx-core/src/schema/mod.rs:8534-8537 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/dbx-web/src/routes/ai.rs:269 — crates/dbx-web/src/routes/ai.rs:269-272 | crates/dbx-web/src/routes/history.rs:76-79 | crates/dbx-web/src/routes/saved_sql.rs:34-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) REDACTED:605 — REDACTED:605-608 | agents/drivers/cassandra-go/bench/agent_compare.py:290-293 | REDACTED:605-608 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) REDACTED:630 — REDACTED:630-633 | agents/drivers/cassandra-go/bench/agent_compare.py:311-314 | REDACTED:630-633 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/dbx-core/src/admin/mq/adapters/kafka.rs:657 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:657-659 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:991-993 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:993-995 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/dbx-core/src/data/docs/export.rs:46 — crates/dbx-core/src/data/docs/export.rs:46-48 | crates/dbx-sql-data/src/data_grid_extractors/document.rs:142-144 | plugins/sdk/cli/src/lib.rs:1515-1517 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) REDACTED:217 — REDACTED:217-219 | crates/dbx-sql-core/src/object_source_sql.rs:1074-1076 | crates/dbx-sql-core/src/sql_analysis.rs:886-888 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/dbx-core/src/data/transfer/xugu_objects.rs:44 — crates/dbx-core/src/data/transfer/xugu_objects.rs:44-46 | crates/dbx-sql-core/src/oracle_view_rename.rs:236-238 | crates/dbx-sql-schema/src/schema_diff/mysql_charset.rs:82-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) REDACTED:170 — REDACTED:170-172 | crates/dbx-drivers/src/db/rqlite_driver.rs:96-98 | crates/dbx-drivers/src/db/turso_driver.rs:157-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) REDACTED:74 — REDACTED:74-76 | agents/drivers/cassandra-go/bench/agent_compare.py:52-54 | REDACTED:74-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×6
  • Duplicated block (31 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:122 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:122-152 | src-tauri/src/commands/redis_pubsub_server.rs:153-183 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/redis_pubsub_ws.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:538 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:538-568 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:775-805 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) crates/dbx-ai-provider/src/ai.rs:4139 — crates/dbx-ai-provider/src/ai.rs:4139-4169 | crates/dbx-ai-provider/src/ai.rs:4863-4893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) agents/drivers/argo-go/metadata.go:436 — agents/drivers/argo-go/metadata.go:436-466 | agents/drivers/hive-go/metadata.go:442-472 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) agents/drivers/argo-go/metadata.go:942 — agents/drivers/argo-go/metadata.go:942-972 | agents/drivers/hive-go/metadata.go:953-983 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) REDACTED:1172 — REDACTED:1172-1202 | agents/drivers/vastbase-go/vastbase_metadata.go:997-1027 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1172` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×6
  • Duplicated block (18–19 lines × 2) REDACTED:1456 — REDACTED:1456-1473 | REDACTED:1509-1527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1509` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18–19 lines × 2) crates/dbx-core/src/data/transfer.rs:6971 — crates/dbx-core/src/data/transfer.rs:6971-6989 | crates/dbx-core/src/data/transfer.rs:7174-7191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:6971` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) crates/dbx-core/src/data/transfer.rs:14341 — crates/dbx-core/src/data/transfer.rs:14341-14358 | crates/dbx-core/src/data/transfer.rs:14379-14397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:14341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:945 — crates/dbx-sql-schema/src/schema_diff.rs:945-963 | crates/dbx-sql-schema/src/schema_diff.rs:1012-1029 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/dbx-web/src/routes/query.rs:1664 — crates/dbx-web/src/routes/query.rs:1664-1681 | src-tauri/src/commands/query.rs:1284-1302 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/query.rs:1664` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (18–19 lines × 2) agents/drivers/oracle-go/pldebug_collection_initialize.go:94 — agents/drivers/oracle-go/pldebug_collection_initialize.go:94-111 | agents/drivers/oracle-go/pldebug_object_initialize.go:31-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oracle-go/pldebug_object_initialize.go:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×6
  • Duplicated block (11–12 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:356 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:356-367 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:453-463 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:356` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) REDACTED:5816 — REDACTED:5816-5827 | REDACTED:5926-5936 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5926` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11–12 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:1255 — crates/dbx-driver-agent/src/agent_service.rs:1255-1266 | crates/dbx-driver-agent/src/agent_service.rs:1291-1301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-agent/src/agent_service.rs:1255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) crates/dbx-plugin-runtime/src/plugins/installer.rs:1133 — crates/dbx-plugin-runtime/src/plugins/installer.rs:1133-1144 | crates/dbx-plugin-runtime/src/plugins/marketplace.rs:798-808 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11–12 lines × 2) REDACTED:177 — REDACTED:177-187 | REDACTED:376-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:177` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) REDACTED:1671 — REDACTED:1671-1682 | agents/drivers/vastbase-go/vastbase_metadata.go:1030-1040 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1671` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×6
  • Duplicated block (11 lines × 4) crates/dbx-ai-provider/src/ai.rs:4023 — crates/dbx-ai-provider/src/ai.rs:4023-4033 | crates/dbx-ai-provider/src/ai.rs:4176-4186 | crates/dbx-ai-provider/src/ai.rs:4722-4732 | crates/dbx-ai-provider/src/ai.rs:4905-4915 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:4023` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 4) crates/dbx-core/src/data/transfer.rs:10200 — crates/dbx-core/src/data/transfer.rs:10200-10210 | crates/dbx-core/src/data/transfer.rs:10448-10458 | crates/dbx-core/src/data/transfer.rs:10597-10607 | crates/dbx-core/src/data/transfer.rs:10694-10704 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:10200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) REDACTED:5508 — REDACTED:5508-5519 | REDACTED:6214-6225 | REDACTED:6549-6560 | REDACTED:10087-10097 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5508` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 4) agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:125 — agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:125-135 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:653-663 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:117-127 | REDACTED:5973-5983 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) agents/drivers/cassandra-go/main.go:222 — agents/drivers/cassandra-go/main.go:222-232 | agents/drivers/etcd-go/main.go:236-246 | agents/drivers/etcd2-go/main.go:206-216 | agents/drivers/vastbase-go/main.go:288-298 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (11 lines × 4) REDACTED:5466 — REDACTED:5466-5476 | REDACTED:6011-6021 | REDACTED:6047-6057 | REDACTED:6078-6088 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5466` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×6
  • Duplicated block (9 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:6951 — crates/dbx-driver-mysql/src/mysql.rs:6951-6959 | crates/dbx-driver-mysql/src/mysql.rs:7005-7013 | REDACTED:2689-2697 | REDACTED:2721-2729 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6951` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) crates/dbx-driver-sqlserver/src/sqlserver.rs:1889 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1889-1897 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1903-1911 | crates/dbx-sql-data/src/query_result_sql.rs:2289-2297 | crates/dbx-sql-data/src/query_result_sql.rs:2309-2317 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234-242 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:137-145 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:262-270 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:147-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224-232 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:179-187 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:308-316 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:188-196 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:178` calls `appendRoutineTypePredicate` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:187` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) agents/drivers/argo-go/main.go:586 — agents/drivers/argo-go/main.go:586-594 | agents/drivers/cassandra-go/main.go:510-518 | agents/drivers/hive-go/main.go:586-594 | agents/drivers/iotdb/main.go:484-492 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (9 lines × 4) agents/drivers/argo-go/main.go:596 — agents/drivers/argo-go/main.go:596-604 | agents/drivers/cassandra-go/main.go:520-528 | agents/drivers/hive-go/main.go:596-604 | agents/drivers/iotdb/main.go:494-502 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×6
  • Duplicated block (7–8 lines × 2) crates/dbx-core/src/ai/agent_kv.rs:1009 — crates/dbx-core/src/ai/agent_kv.rs:1009-1015 | crates/dbx-core/src/ai/agent_kv.rs:1737-1744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) REDACTED:1122 — REDACTED:1122-1128 | REDACTED:1235-1242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) REDACTED:1433 — REDACTED:1433-1440 | REDACTED:2405-2411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) crates/dbx-formats/src/temporal_format.rs:288 — crates/dbx-formats/src/temporal_format.rs:288-295 | crates/dbx-formats/src/temporal_format.rs:317-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-formats/src/temporal_format.rs:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `column_types` to `&[Option<String>]` in one and `&[String]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7–8 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:733 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:733-739 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:954-961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:733` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423-429 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:1089-1096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×6
  • Duplicated block (7 lines × 4) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:807 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:807-813 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:932-938 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1147-1153 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1202-1208 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:807` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122-128 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:199-205 | crates/dbx-ai-provider/src/ai_grok_cli.rs:172-178 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:54-60 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:627 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:627-633 | REDACTED:473-479 | REDACTED:795-803 | REDACTED:810-816 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:808` calls `contains` and `REDACTED:472` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 4) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278 — agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278-284 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:940-946 | REDACTED:3046-3052 | REDACTED:6613-6619 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 4) REDACTED:1382 — REDACTED:1382-1388 | REDACTED:2975-2981 | REDACTED:3362-3368 | REDACTED:4805-4811 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1382` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) REDACTED:3416 — REDACTED:3416-3422 | REDACTED:3438-3444 | REDACTED:5479-5485 | REDACTED:5494-5500 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×6
  • Swallowed exception (caught, then discarded) REDACTED:1499 — `catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:4248 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:4257 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:6525 — `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:6560 — `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:88 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
D1 · Cyclomatic Complexity · dbx_duckdb_driver · ×5
  • dbx_duckdb_driver::query::duckdb_logical_type_to_string (cyclomatic 50) agents/drivers/duckdb/src/query.rs:580 — dbx_duckdb_driver::query::duckdb_logical_type_to_string has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic (cyclomatic 26) agents/drivers/duckdb/src/sql.rs:202 — dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::split_sql_statements (cyclomatic 25) agents/drivers/duckdb/src/sql.rs:1 — dbx_duckdb_driver::sql::split_sql_statements has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::contains_unquoted_sql_keyword (cyclomatic 23) agents/drivers/duckdb/src/sql.rs:330 — dbx_duckdb_driver::sql::contains_unquoted_sql_keyword has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::first_executable_sql_token (cyclomatic 17) agents/drivers/duckdb/src/sql.rs:384 — dbx_duckdb_driver::sql::first_executable_sql_token has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · dbx_driver_elasticsearch · ×5
  • dbx_driver_elasticsearch::es_send_page (cyclomatic 22) crates/dbx-driver-elasticsearch/src/lib.rs:1233 — dbx_driver_elasticsearch::es_send_page has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_elasticsearch::normalize_elasticsearch_rest_path (cyclomatic 20) crates/dbx-driver-elasticsearch/src/lib.rs:2069 — dbx_driver_elasticsearch::normalize_elasticsearch_rest_path has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::adapt_elasticsearch_sql_query (cyclomatic 19) crates/dbx-driver-elasticsearch/src/lib.rs:2892 — dbx_driver_elasticsearch::adapt_elasticsearch_sql_query has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::translate_field_operator_filter (cyclomatic 18) crates/dbx-driver-elasticsearch/src/lib.rs:1762 — dbx_driver_elasticsearch::translate_field_operator_filter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::parse_aggregations (cyclomatic 17) crates/dbx-driver-elasticsearch/src/lib.rs:3200 — dbx_driver_elasticsearch::parse_aggregations has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_sqlserver · ×5
  • dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens (cyclomatic 22) crates/dbx-driver-sqlserver/src/sqlserver.rs:1820 — dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql (cyclomatic 20) crates/dbx-driver-sqlserver/src/sqlserver.rs:2755 — dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json (cyclomatic 19) crates/dbx-driver-sqlserver/src/sqlserver.rs:2231 — dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::sqlserver_column_metadata_from_row (cyclomatic 17) crates/dbx-driver-sqlserver/src/sqlserver.rs:3300 — dbx_driver_sqlserver::sqlserver::sqlserver_column_metadata_from_row has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_sqlserver::sqlserver::first_sql_tokens (cyclomatic 17) crates/dbx-driver-sqlserver/src/sqlserver.rs:4607 — dbx_driver_sqlserver::sqlserver::first_sql_tokens has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · DependencyGraph · ×5
  • DependencyGraph::build_with_functions_and_options (cognitive 121) crates/dbx-sql-schema/src/schema_diff.rs:750 — DependencyGraph::build_with_functions_and_options has cognitive complexity 121 (threshold 15). Drivers by points: if/else 23 (100 pts), loops 9 (21 pts) (nesting depth added 89). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • DependencyGraph::collect_uncovered_edges (cognitive 22) crates/dbx-sql-schema/src/schema_diff.rs:1033 — DependencyGraph::collect_uncovered_edges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::coverage_score_level2 (cognitive 21) crates/dbx-sql-schema/src/schema_diff.rs:939 — DependencyGraph::coverage_score_level2 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::topological_sort (cognitive 19) crates/dbx-sql-schema/src/schema_diff.rs:867 — DependencyGraph::topological_sort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::count_transitive_edges (cognitive 18) crates/dbx-sql-schema/src/schema_diff.rs:1011 — DependencyGraph::count_transitive_edges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupService · ×5
  • BackupService::export_job (cognitive 111) crates/dbx-core/src/scheduled_backup/engine.rs:154 — BackupService::export_job has cognitive complexity 111 (threshold 15). Drivers by points: if/else 37 (90 pts), loops 5 (11 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::tick (cognitive 28) crates/dbx-core/src/scheduled_backup/engine.rs:58 — BackupService::tick has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::serve (cognitive 25) crates/dbx-core/src/scheduled_backup/engine.rs:15 — BackupService::serve has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::cleanup (cognitive 18) crates/dbx-core/src/scheduled_backup/service.rs:230 — BackupService::cleanup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::import_files (cognitive 17) crates/dbx-core/src/scheduled_backup/service.rs:115 — BackupService::import_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_duckdb_driver · ×5
  • dbx_duckdb_driver::sql::split_sql_statements (cognitive 33) agents/drivers/duckdb/src/sql.rs:1 — dbx_duckdb_driver::sql::split_sql_statements has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 9, loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic (cognitive 33) agents/drivers/duckdb/src/sql.rs:202 — dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 11, loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::sql::contains_unquoted_sql_keyword (cognitive 31) agents/drivers/duckdb/src/sql.rs:330 — dbx_duckdb_driver::sql::contains_unquoted_sql_keyword has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 10, loops 4 (10 pts), if/else 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::query::duckdb_logical_type_to_string (cognitive 29) agents/drivers/duckdb/src/query.rs:580 — dbx_duckdb_driver::query::duckdb_logical_type_to_string has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_duckdb_driver::sql::first_executable_sql_token (cognitive 24) agents/drivers/duckdb/src/sql.rs:384 — dbx_duckdb_driver::sql::first_executable_sql_token has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (10 pts), boolean chains 8, if/else 3 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Analyzer · ×5
  • Analyzer::finish_group_by_check (cognitive 32) crates/dbx-sql-core/src/sql_analysis.rs:1679 — Analyzer::finish_group_by_check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analyzer::visit_expr (cognitive 26) crates/dbx-sql-core/src/sql_analysis.rs:1869 — Analyzer::visit_expr has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Analyzer::visit_select (cognitive 23) crates/dbx-sql-core/src/sql_analysis.rs:1592 — Analyzer::visit_select has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 6 (7 pts), match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analyzer::visit_table_factor (cognitive 20) crates/dbx-sql-core/src/sql_analysis.rs:1801 — Analyzer::visit_table_factor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Analyzer::unknown_qualifiers (cognitive 18) crates/dbx-sql-core/src/sql_analysis.rs:2110 — Analyzer::unknown_qualifiers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NacosOpenApiAdmin · ×5
  • NacosOpenApiAdmin::get_config (cognitive 30) crates/dbx-core/src/admin/nacos/http.rs:2651 — NacosOpenApiAdmin::get_config has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::list_instances (cognitive 26) crates/dbx-core/src/admin/nacos/http.rs:3123 — NacosOpenApiAdmin::list_instances has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::list_services (cognitive 20) crates/dbx-core/src/admin/nacos/http.rs:2981 — NacosOpenApiAdmin::list_services has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::test_connection (cognitive 19) crates/dbx-core/src/admin/nacos/http.rs:1844 — NacosOpenApiAdmin::test_connection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • NacosOpenApiAdmin::list_configs_by_client_filters (cognitive 16) crates/dbx-core/src/admin/nacos/http.rs:1189 — NacosOpenApiAdmin::list_configs_by_client_filters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_support · ×5
  • dbx_driver_support::ssh_config::apply_host_entry (cognitive 27) crates/dbx-driver-support/src/ssh_config.rs:198 — dbx_driver_support::ssh_config::apply_host_entry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_support::execution::await_stream_with_progress_timeout (cognitive 19) crates/dbx-driver-support/src/execution.rs:125 — dbx_driver_support::execution::await_stream_with_progress_timeout has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (5 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_support::navicat_mysql_tunnel::serve_client (cognitive 18) crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:195 — dbx_driver_support::navicat_mysql_tunnel::serve_client has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_support::navicat_mysql_tunnel::parse_navicat_response (cognitive 18) crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:383 — dbx_driver_support::navicat_mysql_tunnel::parse_navicat_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_support::db::parse_connect_timeout_with_fallback (cognitive 16) crates/dbx-driver-support/src/db.rs:344 — dbx_driver_support::db::parse_connect_timeout_with_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×5
  • Edited copy of a member (45 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:5633 — crates/dbx-driver-mysql/src/mysql.rs:5633-5677 | crates/dbx-driver-mysql/src/mysql_compatible.rs:177-231 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (45 corresponding lines) REDACTED:1898 — REDACTED:1898-1947 | agents/drivers/vastbase-go/vastbase_metadata.go:1218-1262 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (45 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:973 — agents/go-common/iotdb-client-go/client/session.go:973-1017 | agents/go-common/iotdb-client-go/client/session.go:1019-1064 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (45 corresponding lines) agents/drivers/oracle-go/dbms_output.go:518 — agents/drivers/oracle-go/dbms_output.go:518-562 | agents/drivers/oracle-go/dbms_output.go:575-628 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (45 corresponding lines) crates/dbx-drivers/src/db/ssh_tunnel.rs:1826 — crates/dbx-drivers/src/db/ssh_tunnel.rs:1826-1870 | crates/dbx-drivers/src/db/ssh_tunnel.rs:1891-1935 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×5
  • Edited copy of a member (50 corresponding lines) agents/drivers/kingbase-go/main.go:886 — agents/drivers/kingbase-go/main.go:886-935 | agents/drivers/vastbase-go/main.go:777-829 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) agents/go-common/iotdb-client-go/client/session.go:193 — agents/go-common/iotdb-client-go/client/session.go:193-250 | agents/go-common/iotdb-client-go/client/session.go:264-313 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) crates/dbx-ai-provider/src/ai.rs:3626 — crates/dbx-ai-provider/src/ai.rs:3626-3675 | crates/dbx-ai-provider/src/ai.rs:3696-3753 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) crates/dbx-ai-provider/src/ai.rs:3755 — crates/dbx-ai-provider/src/ai.rs:3755-3811 | crates/dbx-ai-provider/src/ai.rs:3822-3871 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) agents/drivers/argo-go/metadata.go:87 — agents/drivers/argo-go/metadata.go:87-136 | agents/drivers/hive-go/metadata.go:87-136 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×5
  • Edited copy of a member (36 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:363 — crates/dbx-core/src/query/mongo_ops.rs:363-398 | crates/dbx-core/src/query/mongo_ops.rs:540-578 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) agents/drivers/oracle-go/pldebug_rows.go:80 — agents/drivers/oracle-go/pldebug_rows.go:80-124 | agents/drivers/oracle-go/pldebug_statement.go:21-56 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) agents/drivers/rabbitmq/operations.go:731 — agents/drivers/rabbitmq/operations.go:731-766 | agents/drivers/rabbitmq/operations.go:914-956 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) agents/go-common/go-gssapi/krb5/krb5.go:582 — agents/go-common/go-gssapi/krb5/krb5.go:582-622 | agents/go-common/go-gssapi/krb5/krb5.go:660-695 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) crates/dbx-core/src/admin/mq/adapters/pulsar_version.rs:121 — crates/dbx-core/src/admin/mq/adapters/pulsar_version.rs:121-159 | crates/dbx-core/src/admin/mq/types.rs:102-137 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/dbx-mcp/src/server.rs:3548 — crates/dbx-mcp/src/server.rs:3548-3577 | crates/dbx-mcp/src/server.rs:3592-3621 | crates/dbx-mcp/src/server.rs:3636-3656 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) agents/drivers/rabbitmq/operations.go:673 — agents/drivers/rabbitmq/operations.go:673-704 | agents/drivers/rabbitmq/operations.go:809-829 | agents/drivers/rabbitmq/operations.go:1398-1422 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:205 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:205-225 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:337-357 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:289-309 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:1449 — crates/dbx-core/src/query/mongo_ops.rs:1449-1469 | crates/dbx-mcp/src/backend.rs:2991-3011 | crates/dbx-mcp/src/server.rs:6322-6342 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) src-tauri/src/commands/mongo_cmd.rs:387 — src-tauri/src/commands/mongo_cmd.rs:387-408 | src-tauri/src/commands/mongo_cmd.rs:418-438 | src-tauri/src/commands/mongo_cmd.rs:477-497 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/dbx-web/src/routes/mongo.rs:703 — crates/dbx-web/src/routes/mongo.rs:703-717 | crates/dbx-web/src/routes/mongo.rs:780-794 | crates/dbx-web/src/routes/mongo.rs:985-1004 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:1132 — crates/dbx-core/src/query/mongo_ops.rs:1132-1148 | crates/dbx-core/src/query/mongo_ops.rs:1158-1181 | crates/dbx-core/src/query/mongo_ops.rs:1190-1204 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/dbx-mcp/src/server.rs:1698 — crates/dbx-mcp/src/server.rs:1698-1715 | crates/dbx-mcp/src/server.rs:1858-1875 | crates/dbx-mcp/src/server.rs:1882-1896 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/dbx-core/src/data/transfer/oracle_table_contract/length.rs:60 — crates/dbx-core/src/data/transfer/oracle_table_contract/length.rs:60-74 | crates/dbx-sql-core/src/object_source_sql.rs:2294-2309 | crates/dbx-sql-schema/src/schema_diff/mysql_charset.rs:93-108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/dbx-sql-core/src/query_execution_sql.rs:862 — crates/dbx-sql-core/src/query_execution_sql.rs:862-876 | crates/dbx-sql-core/src/sql_risk.rs:826-841 | REDACTED:4930-4946 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×5
  • Duplicated block (14 lines × 4) crates/dbx-core/src/schema/mod.rs:1016 — crates/dbx-core/src/schema/mod.rs:1016-1030 | crates/dbx-core/src/schema/mod.rs:3056-3069 | crates/dbx-core/src/schema/mod.rs:9152-9166 | crates/dbx-core/src/schema/mod.rs:10071-10085 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:1016` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 4) crates/dbx-drivers/src/db/rqlite_driver.rs:232 — crates/dbx-drivers/src/db/rqlite_driver.rs:232-245 | crates/dbx-drivers/src/db/sqlite.rs:2665-2678 | crates/dbx-drivers/src/db/sqlite.rs:2711-2724 | crates/dbx-drivers/src/db/turso_driver.rs:293-306 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/sqlite.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 4) crates/dbx-driver-elasticsearch/src/lib.rs:2018 — crates/dbx-driver-elasticsearch/src/lib.rs:2018-2031 | crates/dbx-drivers/src/db/couchdb_driver.rs:492-505 | crates/dbx-drivers/src/db/solr_driver.rs:856-869 | crates/dbx-sql-core/src/query_execution_sql.rs:802-815 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 4) agents/drivers/cassandra-go/metadata.go:544 — agents/drivers/cassandra-go/metadata.go:544-557 | agents/drivers/iotdb/metadata.go:494-507 | REDACTED:1779-1792 | agents/drivers/vastbase-go/vastbase_metadata.go:1099-1112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/metadata.go:544` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 4) agents/drivers/etcd-go/auth.go:229 — agents/drivers/etcd-go/auth.go:229-242 | agents/drivers/etcd-go/auth.go:267-280 | agents/drivers/etcd2-go/auth.go:104-117 | agents/drivers/etcd2-go/auth.go:149-162 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×5
  • Duplicated block (13 lines × 4) crates/dbx-ai-provider/src/ai.rs:3896 — crates/dbx-ai-provider/src/ai.rs:3896-3908 | crates/dbx-ai-provider/src/ai.rs:4150-4162 | crates/dbx-ai-provider/src/ai.rs:4501-4513 | crates/dbx-ai-provider/src/ai.rs:4874-4886 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3896` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) crates/dbx-core/src/data/transfer.rs:13710 — crates/dbx-core/src/data/transfer.rs:13710-13722 | crates/dbx-core/src/data/transfer.rs:13767-13779 | crates/dbx-core/src/data/transfer.rs:13789-13801 | crates/dbx-core/src/data/transfer.rs:14090-14102 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:13710` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) src-tauri/src/commands/mcp_bridge.rs:2481 — src-tauri/src/commands/mcp_bridge.rs:2481-2493 | src-tauri/src/commands/mcp_bridge.rs:2509-2521 | src-tauri/src/commands/mcp_bridge.rs:2912-2924 | src-tauri/src/commands/mcp_bridge.rs:2968-2980 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/mcp_bridge.rs:2481` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src-tauri/src/commands/mcp_bridge.rs:2495` calls `unwrap_or_default` and `src-tauri/src/commands/mcp_bridge.rs:2982` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 4) agents/drivers/cassandra-go/main.go:349 — agents/drivers/cassandra-go/main.go:349-361 | agents/drivers/iotdb/main.go:352-364 | agents/drivers/kingbase-go/main.go:414-426 | agents/drivers/vastbase-go/main.go:429-441 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:349` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 4) agents/drivers/argo-go/main.go:477 — agents/drivers/argo-go/main.go:477-489 | agents/drivers/cassandra-go/main.go:407-419 | agents/drivers/hive-go/main.go:477-489 | agents/drivers/iotdb/main.go:398-410 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `server *server) dispatch(method` in one and `s *server) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×5
  • Duplicated block (12 lines × 4) REDACTED:1729 — REDACTED:1729-1740 | REDACTED:1994-2005 | REDACTED:2231-2242 | REDACTED:2435-2446 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1729` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) crates/dbx-mcp/src/server.rs:2436 — crates/dbx-mcp/src/server.rs:2436-2447 | crates/dbx-mcp/src/server.rs:2509-2520 | crates/dbx-mcp/src/server.rs:2576-2587 | crates/dbx-mcp/src/server.rs:2611-2622 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:2436` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249-261 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:268-281 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:358-371 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:389-400 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) agents/drivers/argo-go/main.go:176 — agents/drivers/argo-go/main.go:176-187 | agents/drivers/cassandra-go/main.go:174-185 | agents/drivers/hive-go/main.go:176-187 | agents/drivers/iotdb/main.go:180-191 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 4) agents/drivers/kingbase-go/main.go:379 — agents/drivers/kingbase-go/main.go:379-390 | REDACTED:1119-1130 | agents/drivers/vastbase-go/main.go:393-404 | REDACTED:1058-1069 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:379` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×5
  • Duplicated block (8–9 lines × 3) crates/dbx-drivers/src/db/dynamodb_driver.rs:666 — crates/dbx-drivers/src/db/dynamodb_driver.rs:666-674 | REDACTED:1216-1224 | crates/dbx-mcp/src/server.rs:6324-6331 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/dynamodb_driver.rs:666` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-drivers/src/db/dynamodb_driver.rs:676` calls `elapsed`, `as_millis` and `crates/dbx-mcp/src/server.rs:6332` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 3) crates/dbx-drivers/src/db/sqlite.rs:1595 — crates/dbx-drivers/src/db/sqlite.rs:1595-1602 | crates/dbx-drivers/src/db/sqlite.rs:2620-2628 | crates/dbx-drivers/src/db/sqlite.rs:2694-2702 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/sqlite.rs:1595` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-drivers/src/db/sqlite.rs:2691` calls `is_empty`, `Some` and `crates/dbx-drivers/src/db/sqlite.rs:2618` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 3) crates/dbx-web/src/routes/database_export.rs:196 — crates/dbx-web/src/routes/database_export.rs:196-203 | crates/dbx-web/src/routes/query_result_export.rs:173-181 | crates/dbx-web/src/routes/table_export.rs:161-169 — before extracting anything, compare `crates/dbx-web/src/routes/database_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/database_export.rs:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327-334 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:676-683 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1088-1096 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:674` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1088` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457-464 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:277-285 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×5
  • Duplicated block (8 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451-459 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:497-504 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:525-532 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:752-759 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:788-795 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35-42 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:44-51 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:39-46 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:96-103 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:45-52 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:47` calls `sort`, `comparing` and `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:43` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 5) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281-288 | agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:102-109 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:116-123 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:81-88 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:258-265 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) agents/drivers/iotdb/main.go:299 — agents/drivers/iotdb/main.go:299-306 | agents/drivers/kingbase-go/main.go:353-360 | agents/drivers/neo4j-go/main.go:329-336 | REDACTED:1054-1061 | agents/drivers/vastbase-go/main.go:364-371 — `agents/drivers/iotdb/main.go` and `agents/drivers/kingbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/iotdb/main.go:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) agents/drivers/cassandra-go/metadata.go:596 — agents/drivers/cassandra-go/metadata.go:596-603 | agents/drivers/iotdb/metadata.go:553-560 | agents/drivers/kingbase-go/main.go:1999-2006 | agents/drivers/neo4j-go/metadata.go:338-345 | agents/drivers/vastbase-go/main.go:1388-1395 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×5
  • Duplicated block (40 lines × 2) agents/drivers/argo-go/query.go:217 — agents/drivers/argo-go/query.go:217-256 | agents/drivers/hive-go/query.go:217-256 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (40 lines × 2) REDACTED:92 — REDACTED:92-131 | REDACTED:92-131 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (40 lines × 2) agents/drivers/argo-go/zookeeper_tls.go:19 — agents/drivers/argo-go/zookeeper_tls.go:19-58 | agents/drivers/hive-go/zookeeper_tls.go:19-58 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (40 lines × 2) REDACTED:945 — REDACTED:945-984 | agents/drivers/vastbase-go/vastbase_metadata.go:770-809 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (40 lines × 2) agents/drivers/kingbase-go/main.go:1425 — agents/drivers/kingbase-go/main.go:1425-1464 | agents/drivers/vastbase-go/main.go:1163-1202 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:1425` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×5
  • Duplicated block (37 lines × 2) agents/drivers/argo-go/config.go:959 — agents/drivers/argo-go/config.go:959-995 | agents/drivers/hive-go/config.go:999-1035 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (37 lines × 2) agents/drivers/argo-go/connector.go:132 — agents/drivers/argo-go/connector.go:132-168 | agents/drivers/hive-go/connector.go:133-169 — `agents/drivers/argo-go/connector.go` and `agents/drivers/hive-go/connector.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (37 lines × 2) agents/drivers/argo-go/metadata.go:339 — agents/drivers/argo-go/metadata.go:339-375 | agents/drivers/hive-go/metadata.go:345-381 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:339` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (37 lines × 2) REDACTED:194 — REDACTED:194-230 | REDACTED:194-230 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (37 lines × 2) REDACTED:528 — REDACTED:528-564 | REDACTED:528-564 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
AC3 · Page structure · Data table has no header cells · ×4
  • Data table has no header cells apps/desktop/src/components/admin/MySqlDashboard.vue:249 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/debug/DebuggeeSqlPanel.vue:52 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/redis/RedisDashboard.vue:510 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/solr/SolrAdmin.vue:718 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC6 · Visual & motion safety · Focus outline removed inline · ×4
  • Focus outline removed inline apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:303 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:356 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/MySqlDashboard.vue:246 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D1 · Cyclomatic Complexity · dbx_sql_dialect · ×4
  • dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_cross_dialect_to_sqlserver (cyclomatic 68) crates/dbx-sql-dialect/src/sql_dialect/type_rewrite.rs:211 — dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_cross_dialect_to_sqlserver has cyclomatic complexity 68 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database (cyclomatic 45) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:283 — dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind (cyclomatic 24) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:50 — dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items (cyclomatic 23) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:131 — dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Analysis · ×4
  • Analysis::parse (cyclomatic 35) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:421 — Analysis::parse has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::select (cyclomatic 30) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:633 — Analysis::select has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::statement (cyclomatic 23) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:544 — Analysis::statement has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::package_reference (cyclomatic 18) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:579 — Analysis::package_reference has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · runtimeServer.dispatch (cyclomatic 18) · ×4
  • runtimeServer.dispatch (cyclomatic 18) agents/drivers/argo-go/main.go:175 — runtimeServer.dispatch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • runtimeServer.dispatch (cyclomatic 18) agents/drivers/hive-go/main.go:175 — runtimeServer.dispatch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • runtimeServer.dispatch (cyclomatic 18) agents/drivers/iotdb/main.go:179 — runtimeServer.dispatch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • runtimeServer.dispatch (cyclomatic 18) agents/drivers/neo4j-go/main.go:207 — runtimeServer.dispatch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs:1014 — crates/dbx-core/src/query/redis_ops.rs:1014-1032 | crates/dbx-core/src/query/redis_ops.rs:1198-1246 | crates/dbx-core/src/query/redis_ops.rs:1248-1265 | crates/dbx-core/src/query/redis_ops.rs:1273-1295 | crates/dbx-core/src/query/redis_ops.rs:1379-1397 | crates/dbx-core/src/query/redis_ops.rs:1441-1464 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:131 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:131-144 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:88-101 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:210-223 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:238-251 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:92-105 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:96-109 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) agents/drivers/argo-go/protocol_error.go:34 — agents/drivers/argo-go/protocol_error.go:34-70 | agents/drivers/cassandra-go/protocol_error.go:32-84 | agents/drivers/hive-go/protocol_error.go:34-70 | agents/drivers/iotdb/protocol_error.go:33-70 | agents/drivers/neo4j-go/protocol_error.go:37-85 | agents/drivers/vastbase-go/protocol_error.go:33-82 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) agents/go-common/iotdb-client-go/client/column.go:227 — agents/go-common/iotdb-client-go/client/column.go:227-246 | agents/go-common/iotdb-client-go/client/column.go:299-318 | agents/go-common/iotdb-client-go/client/column.go:371-390 | agents/go-common/iotdb-client-go/client/column.go:443-462 | agents/go-common/iotdb-client-go/client/column.go:515-534 | agents/go-common/iotdb-client-go/client/column.go:587-606 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×4
  • Edited copy of a member (39 corresponding lines) crates/dbx-cli/src/main.rs:483 — crates/dbx-cli/src/main.rs:483-521 | crates/dbx-cli/src/main.rs:523-576 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:1508 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1508-1550 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1561-1599 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) src-tauri/src/commands/connection.rs:115 — src-tauri/src/commands/connection.rs:115-163 | src-tauri/src/commands/connection.rs:185-223 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) agents/go-common/go-gssapi/krb5/message_token.go:211 — agents/go-common/go-gssapi/krb5/message_token.go:211-250 | agents/go-common/go-gssapi/krb5/message_token.go:440-478 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×4
  • Edited copy of a member (31 corresponding lines) REDACTED:4549 — REDACTED:4549-4579 | REDACTED:4628-4659 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:1554 — crates/dbx-core/src/query/mongo_ops.rs:1554-1586 | crates/dbx-mcp/src/backend.rs:3043-3073 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/dbx-driver-support/src/http_tunnel.rs:36 — crates/dbx-driver-support/src/http_tunnel.rs:36-66 | crates/dbx-driver-support/src/http_tunnel.rs:78-112 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/dbx-core/src/admin/nacos/http.rs:2283 — crates/dbx-core/src/admin/nacos/http.rs:2283-2313 | crates/dbx-core/src/admin/nacos/http.rs:2315-2345 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 18+ corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:3086 — crates/dbx-core/src/persistence/cloud_sync.rs:3086-3104 | crates/dbx-core/src/persistence/cloud_sync.rs:3110-3130 | crates/dbx-core/src/persistence/state_persistence.rs:477-494 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) crates/dbx-core/src/admin/nacos/access_control.rs:155 — crates/dbx-core/src/admin/nacos/access_control.rs:155-172 | crates/dbx-core/src/admin/nacos/access_control.rs:174-196 | crates/dbx-core/src/admin/nacos/access_control.rs:198-222 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) REDACTED:3134 — REDACTED:3134-3154 | REDACTED:3156-3178 | REDACTED:3209-3226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:365 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:365-382 | agents/drivers/access/src/main/java/com/dbx/agent/access/AccessAgent.java:187-204 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:644-666 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 19+ corresponding lines) REDACTED:5729 — REDACTED:5729-5747 | REDACTED:5754-5772 | REDACTED:5792-5815 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) REDACTED:916 — REDACTED:916-934 | REDACTED:940-962 | REDACTED:1481-1499 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) agents/go-common/iotdb-client-go/client/session.go:727 — agents/go-common/iotdb-client-go/client/session.go:727-750 | agents/go-common/iotdb-client-go/client/session.go:1193-1213 | agents/go-common/iotdb-client-go/client/session.go:1215-1233 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) agents/drivers/oracle-go/pldebug_probe.go:36 — agents/drivers/oracle-go/pldebug_probe.go:36-57 | REDACTED:3537-3555 | REDACTED:3871-3889 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 11+ corresponding lines) crates/dbx-web/src/routes/mongo.rs:566 — crates/dbx-web/src/routes/mongo.rs:566-576 | crates/dbx-web/src/routes/mongo.rs:582-598 | crates/dbx-web/src/routes/mongo.rs:645-662 | crates/dbx-web/src/routes/mongo.rs:723-735 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) agents/common/src/main/java/com/dbx/agent/ForeignKeyInfo.java:72 — agents/common/src/main/java/com/dbx/agent/ForeignKeyInfo.java:72-82 | agents/common/src/main/java/com/dbx/agent/ObjectInfo.java:100-112 | agents/common/src/main/java/com/dbx/agent/TableInfo.java:87-97 | agents/common/src/main/java/com/dbx/agent/TriggerInfo.java:98-110 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) crates/dbx-core/src/query/document_ops.rs:916 — crates/dbx-core/src/query/document_ops.rs:916-926 | crates/dbx-core/src/query/document_ops.rs:978-988 | crates/dbx-core/src/query/document_ops.rs:1011-1021 | crates/dbx-core/src/query/document_ops.rs:1028-1038 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) crates/dbx-plugin-runtime/src/plugins/filesystem.rs:220 — crates/dbx-plugin-runtime/src/plugins/filesystem.rs:220-237 | crates/dbx-plugin-runtime/src/plugins/filesystem.rs:245-255 | crates/dbx-plugin-runtime/src/plugins/filesystem.rs:264-275 | crates/dbx-plugin-runtime/src/plugins/filesystem.rs:285-298 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/dbx-ai-provider/src/ai.rs:1657 — crates/dbx-ai-provider/src/ai.rs:1657-1670 | crates/dbx-ai-provider/src/ai.rs:1672-1685 | crates/dbx-ai-provider/src/ai.rs:1687-1700 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/dbx-formats/src/csv_export.rs:325 — crates/dbx-formats/src/csv_export.rs:325-338 | crates/dbx-formats/src/csv_export.rs:404-417 | crates/dbx-formats/src/csv_export.rs:436-454 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/dbx-web/src/routes/document_store.rs:491 — crates/dbx-web/src/routes/document_store.rs:491-505 | crates/dbx-web/src/routes/mongo.rs:761-774 | crates/dbx-web/src/routes/mongo.rs:966-979 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:2725 — crates/dbx-core/src/persistence/cloud_sync.rs:2725-2740 | crates/dbx-core/src/persistence/cloud_sync.rs:2758-2772 | REDACTED:3658-3671 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/dbx-plugin-runtime/src/plugins/installer.rs:1235 — crates/dbx-plugin-runtime/src/plugins/installer.rs:1235-1248 | crates/dbx-plugin-runtime/src/plugins/manifest.rs:2220-2229 | crates/dbx-plugin-runtime/src/plugins/marketplace.rs:555-568 | crates/dbx-plugin-runtime/src/plugins/marketplace.rs:667-680 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/dbx-core/src/persistence/state_persistence.rs:105 — crates/dbx-core/src/persistence/state_persistence.rs:105-114 | crates/dbx-core/src/persistence/state_persistence.rs:120-130 | crates/dbx-core/src/persistence/state_persistence.rs:132-141 | crates/dbx-core/src/persistence/state_persistence.rs:143-153 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/dbx-web/src/routes/ai.rs:281 — crates/dbx-web/src/routes/ai.rs:281-290 | crates/dbx-web/src/routes/ai.rs:299-308 | crates/dbx-web/src/routes/ai.rs:313-322 | crates/dbx-web/src/routes/ai.rs:327-336 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) REDACTED:716 — REDACTED:716-725 | REDACTED:734-745 | REDACTED:160-169 | REDACTED:178-189 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 12+ corresponding lines) crates/dbx-core/src/admin/nacos/service.rs:237 — crates/dbx-core/src/admin/nacos/service.rs:237-248 | crates/dbx-core/src/admin/nacos/service.rs:250-261 | crates/dbx-core/src/admin/nacos/service.rs:263-279 | crates/dbx-core/src/admin/nacos/service.rs:290-306 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:93 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:93-105 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:178-192 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:53-65 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:58-69 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) agents/go-common/iotdb-client-go/client/session.go:349 — agents/go-common/iotdb-client-go/client/session.go:349-360 | agents/go-common/iotdb-client-go/client/session.go:369-380 | agents/go-common/iotdb-client-go/client/session.go:389-400 | agents/go-common/iotdb-client-go/client/session.go:532-543 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) agents/go-common/iotdb-client-go/client/rpcdataset.go:355 — agents/go-common/iotdb-client-go/client/rpcdataset.go:355-366 | agents/go-common/iotdb-client-go/client/rpcdataset.go:384-395 | agents/go-common/iotdb-client-go/client/rpcdataset.go:413-424 | agents/go-common/iotdb-client-go/client/rpcdataset.go:520-531 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×4
  • Duplicated block (43 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:220 — crates/dbx-drivers/src/db/rqlite_driver.rs:220-262 | crates/dbx-drivers/src/db/turso_driver.rs:281-323 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:220` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `&RqliteClient` in one and `&TursoClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (43 lines × 2) agents/drivers/argo-go/config.go:754 — agents/drivers/argo-go/config.go:754-796 | agents/drivers/hive-go/config.go:794-836 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (43 lines × 2) agents/drivers/argo-go/connector.go:28 — agents/drivers/argo-go/connector.go:28-70 | agents/drivers/hive-go/connector.go:28-70 — `agents/drivers/argo-go/connector.go` and `agents/drivers/hive-go/connector.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/connector.go:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (43 lines × 2) agents/drivers/kingbase-go/main.go:63 — agents/drivers/kingbase-go/main.go:63-105 | agents/drivers/vastbase-go/main.go:56-98 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×4
  • Duplicated block (38 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6943 — crates/dbx-driver-mysql/src/mysql.rs:6943-6980 | crates/dbx-driver-mysql/src/mysql.rs:6997-7034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6943` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-driver-mysql/src/mysql.rs:6942` calls `columns_ref`, `iter`, `name_str` and `crates/dbx-driver-mysql/src/mysql.rs:6996` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (38 lines × 2) agents/drivers/argo-go/config.go:25 — agents/drivers/argo-go/config.go:25-62 | agents/drivers/hive-go/config.go:28-65 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/config.go:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) agents/drivers/argo-go/metadata.go:815 — agents/drivers/argo-go/metadata.go:815-852 | agents/drivers/hive-go/metadata.go:826-863 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (38 lines × 2) agents/drivers/argo-go/query.go:298 — agents/drivers/argo-go/query.go:298-335 | agents/drivers/hive-go/query.go:298-335 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/query.go:298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×4
  • Duplicated block (28 lines × 2) crates/dbx-core/src/admin/nacos/search.rs:250 — crates/dbx-core/src/admin/nacos/search.rs:250-277 | crates/dbx-core/src/admin/nacos/search.rs:331-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/search.rs:250` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) REDACTED:247 — REDACTED:247-274 | REDACTED:247-274 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) agents/drivers/argo-go/main.go:240 — agents/drivers/argo-go/main.go:240-267 | agents/drivers/hive-go/main.go:240-267 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:157 — agents/drivers/argo-go/bench/functional_probe.py:157-184 | agents/drivers/hive-go/bench/functional_probe.py:157-184 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×4
  • Duplicated block (16 lines × 3) crates/dbx-mcp/src/server.rs:4146 — crates/dbx-mcp/src/server.rs:4146-4161 | crates/dbx-mcp/src/server.rs:4210-4225 | crates/dbx-mcp/src/server.rs:4276-4291 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:4146` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207-222 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:339-354 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:291-306 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 3) agents/drivers/cassandra-go/metadata.go:543 — agents/drivers/cassandra-go/metadata.go:543-558 | REDACTED:1778-1793 | agents/drivers/vastbase-go/vastbase_metadata.go:1098-1113 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/metadata.go:543` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) REDACTED:193 — REDACTED:193-208 | agents/drivers/vastbase-go/vastbase_metadata.go:119-134 | REDACTED:533-548 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×4
  • Duplicated block (15 lines × 3) crates/dbx-drivers/src/db/rqlite_driver.rs:232 — crates/dbx-drivers/src/db/rqlite_driver.rs:232-246 | crates/dbx-drivers/src/db/sqlite.rs:2665-2679 | crates/dbx-drivers/src/db/turso_driver.rs:293-307 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/sqlite.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/rqlite_driver.rs:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 3) crates/dbx-mcp/src/server.rs:3552 — crates/dbx-mcp/src/server.rs:3552-3566 | crates/dbx-mcp/src/server.rs:3596-3610 | crates/dbx-mcp/src/server.rs:3637-3651 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) crates/dbx-web/src/routes/document_store.rs:15 — crates/dbx-web/src/routes/document_store.rs:15-29 | crates/dbx-web/src/routes/mongo.rs:28-42 | crates/dbx-web/src/routes/schema.rs:47-61 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 3) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:74 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:74-88 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:88-102 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:53-67 — before extracting anything, compare `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java` and `agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×4
  • Duplicated block (13–14 lines × 2) crates/dbx-core/src/admin/nacos/service.rs:34 — crates/dbx-core/src/admin/nacos/service.rs:34-47 | crates/dbx-core/src/admin/nacos/service.rs:569-581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/service.rs:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `operation` to `NacosAccessControlOperation` in one and `NacosServiceOperation` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/admin/nacos/service.rs:568` calls `service_capabilities` and `crates/dbx-core/src/admin/nacos/service.rs:33` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:3345 — crates/dbx-driver-mysql/src/mysql.rs:3345-3357 | crates/dbx-types/src/models/connection.rs:2228-2241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:3345` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13–14 lines × 2) crates/dbx-driver-support/src/ddl_scan.rs:50 — crates/dbx-driver-support/src/ddl_scan.rs:50-62 | crates/dbx-sql-data/src/query_result_sql.rs:3151-3164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13–14 lines × 2) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:344 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:344-357 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:657-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×4
  • Duplicated block (12–13 lines × 2) agents/drivers/duckdb/src/sql.rs:405 — agents/drivers/duckdb/src/sql.rs:405-416 | REDACTED:3777-3789 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:405` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) crates/dbx-core/src/data/transfer.rs:5710 — crates/dbx-core/src/data/transfer.rs:5710-5722 | crates/dbx-core/src/data/transfer.rs:5863-5874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) crates/dbx-drivers/src/db/sqlite_worker.rs:677 — crates/dbx-drivers/src/db/sqlite_worker.rs:677-688 | crates/dbx-drivers/src/db/sqlite_worker.rs:698-710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/sqlite_worker.rs:677` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) REDACTED:1704 — REDACTED:1704-1715 | REDACTED:1839-1851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1704` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×4
  • Duplicated block (9 lines × 6) crates/dbx-ai-provider/src/ai.rs:3896 — crates/dbx-ai-provider/src/ai.rs:3896-3904 | crates/dbx-ai-provider/src/ai.rs:4150-4158 | crates/dbx-ai-provider/src/ai.rs:4249-4257 | crates/dbx-ai-provider/src/ai.rs:4501-4509 | crates/dbx-ai-provider/src/ai.rs:4874-4882 | crates/dbx-ai-provider/src/ai.rs:5136-5144 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3896` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 6) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:138 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:138-146 | agents/common/src/main/java/com/dbx/agent/BatchExecutor.java:157-165 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:560-568 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1291-1299 | agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:904-912 | agents/common/src/main/java/com/dbx/agent/TransactionExecutor.java:150-158 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/common/src/main/java/com/dbx/agent/TransactionExecutor.java:161` calls `run` and `agents/common/src/main/java/com/dbx/agent/BatchExecutor.java:167` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 6) agents/drivers/argo-go/main.go:467 — agents/drivers/argo-go/main.go:467-475 | agents/drivers/hive-go/main.go:467-475 | agents/drivers/iotdb/main.go:388-396 | agents/drivers/kingbase-go/main.go:491-499 | agents/drivers/neo4j-go/main.go:491-499 | agents/drivers/vastbase-go/main.go:481-489 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:467` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `server *server) dispatch(method` in one and `s *server) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 6) agents/drivers/cassandra-go/main.go:274 — agents/drivers/cassandra-go/main.go:274-282 | agents/drivers/iotdb/main.go:274-282 | agents/drivers/kingbase-go/main.go:328-336 | agents/drivers/nebula-go/main.go:268-276 | agents/drivers/neo4j-go/main.go:302-310 | agents/drivers/vastbase-go/main.go:337-345 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×4
  • Duplicated block (8 lines × 6) crates/dbx-ai-provider/src/ai.rs:3895 — crates/dbx-ai-provider/src/ai.rs:3895-3902 | crates/dbx-ai-provider/src/ai.rs:4003-4010 | crates/dbx-ai-provider/src/ai.rs:4149-4156 | crates/dbx-ai-provider/src/ai.rs:4500-4507 | crates/dbx-ai-provider/src/ai.rs:4700-4707 | crates/dbx-ai-provider/src/ai.rs:4873-4880 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3895` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-ai-provider/src/ai.rs:4000` calls `minimax_stream_semantics` and `crates/dbx-ai-provider/src/ai.rs:3892` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 6) crates/dbx-core/src/query/redis_ops.rs:222 — crates/dbx-core/src/query/redis_ops.rs:222-229 | crates/dbx-core/src/query/redis_ops.rs:252-259 | crates/dbx-core/src/query/redis_ops.rs:281-288 | crates/dbx-core/src/query/redis_ops.rs:309-316 | crates/dbx-core/src/query/redis_ops.rs:412-419 | crates/dbx-core/src/query/redis_ops.rs:444-451 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:222` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 6) crates/dbx-mcp/src/server.rs:2442 — crates/dbx-mcp/src/server.rs:2442-2449 | crates/dbx-mcp/src/server.rs:2515-2522 | crates/dbx-mcp/src/server.rs:2582-2589 | crates/dbx-mcp/src/server.rs:2617-2624 | crates/dbx-mcp/src/server.rs:4045-4052 | crates/dbx-mcp/src/server.rs:4390-4397 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 6) agents/drivers/cassandra-go/main.go:244 — agents/drivers/cassandra-go/main.go:244-251 | agents/drivers/iotdb/main.go:245-252 | agents/drivers/kingbase-go/main.go:304-311 | agents/drivers/neo4j-go/main.go:272-279 | REDACTED:927-934 | agents/drivers/vastbase-go/main.go:310-317 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×4
  • Duplicated block (7 lines × 5) REDACTED:6599 — REDACTED:6599-6605 | REDACTED:7756-7762 | REDACTED:7788-7794 | REDACTED:7818-7824 | REDACTED:7846-7852 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:7755` calls `remove_pool_owners` and `REDACTED:6598` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 5) crates/dbx-core/src/schema/mod.rs:1185 — crates/dbx-core/src/schema/mod.rs:1185-1193 | crates/dbx-core/src/schema/mod.rs:1209-1217 | crates/dbx-core/src/schema/mod.rs:1223-1229 | crates/dbx-core/src/schema/mod.rs:1240-1246 | crates/dbx-core/src/schema/mod.rs:1258-1264 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:1185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 5) crates/dbx-driver-sqlserver/src/sqlserver.rs:1891 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1891-1897 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1905-1911 | crates/dbx-sql-data/src/query_result_sql.rs:2291-2297 | crates/dbx-sql-data/src/query_result_sql.rs:2311-2317 | crates/dbx-sql-data/src/query_result_sql.rs:3041-3047 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-sqlserver/src/sqlserver.rs:1891` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-sql-data/src/query_result_sql.rs:2288` calls `top_level_sql_tokens` and `crates/dbx-sql-data/src/query_result_sql.rs:2308` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:219 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:219-225 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:233-239 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:136-142 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:261-267 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:146-152 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×4
  • Duplicated block (9 lines × 7) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:177 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:177-185 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:257-265 | crates/dbx-ai-provider/src/ai_codex_cli.rs:478-486 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:148-156 | crates/dbx-ai-provider/src/ai_grok_cli.rs:227-235 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:219-227 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:109-117 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 7) crates/dbx-web/src/routes/consul.rs:14 — crates/dbx-web/src/routes/consul.rs:14-22 | crates/dbx-web/src/routes/document_store.rs:35-43 | crates/dbx-web/src/routes/etcd.rs:16-24 | crates/dbx-web/src/routes/hbase.rs:15-23 | crates/dbx-web/src/routes/mongo.rs:49-57 | crates/dbx-web/src/routes/redis.rs:17-25 | crates/dbx-web/src/routes/zookeeper.rs:14-22 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/consul.rs:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 7) agents/drivers/argo-go/main.go:198 — agents/drivers/argo-go/main.go:198-206 | agents/drivers/cassandra-go/main.go:196-204 | agents/drivers/hive-go/main.go:198-206 | agents/drivers/iotdb/main.go:202-210 | agents/drivers/kingbase-go/main.go:266-274 | agents/drivers/neo4j-go/main.go:230-238 | agents/drivers/vastbase-go/main.go:267-275 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kingbase-go/main.go:275` calls `newServer`, `dispatch` and `agents/drivers/argo-go/main.go:207` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 7) agents/drivers/argo-go/main.go:392 — agents/drivers/argo-go/main.go:392-400 | agents/drivers/cassandra-go/main.go:328-336 | agents/drivers/hive-go/main.go:392-400 | agents/drivers/iotdb/main.go:330-338 | agents/drivers/kingbase-go/main.go:392-400 | agents/drivers/neo4j-go/main.go:432-440 | agents/drivers/vastbase-go/main.go:407-415 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `server *server) dispatch(method` in one and `s *server) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/cassandra-go/main.go:327` calls `handshakeResult` and `agents/drivers/argo-go/main.go:391` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×4
  • Duplicated block (9 lines × 5) crates/dbx-core/src/data/transfer.rs:14718 — crates/dbx-core/src/data/transfer.rs:14718-14726 | crates/dbx-core/src/data/transfer.rs:14742-14750 | crates/dbx-core/src/data/transfer.rs:14766-14774 | crates/dbx-core/src/data/transfer.rs:14795-14803 | crates/dbx-core/src/data/transfer.rs:14996-15004 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:14718` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 5) agents/drivers/cassandra-go/main.go:244 — agents/drivers/cassandra-go/main.go:244-252 | agents/drivers/iotdb/main.go:245-253 | agents/drivers/kingbase-go/main.go:304-312 | agents/drivers/neo4j-go/main.go:272-280 | agents/drivers/vastbase-go/main.go:310-318 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (9 lines × 5) agents/drivers/cassandra-go/protocol_error.go:121 — agents/drivers/cassandra-go/protocol_error.go:121-133 | agents/drivers/etcd-go/protocol_error.go:74-82 | agents/drivers/etcd2-go/protocol_error.go:66-74 | agents/drivers/neo4j-go/protocol_error.go:122-130 | agents/drivers/vastbase-go/protocol_error.go:119-131 — `agents/drivers/cassandra-go/protocol_error.go` and `agents/drivers/etcd-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/protocol_error.go:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 5) REDACTED:4569 — REDACTED:4569-4577 | REDACTED:5471-5479 | REDACTED:6016-6024 | REDACTED:6052-6060 | REDACTED:6083-6091 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4569` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×4
  • Duplicated block (5 lines × 6) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457-461 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-598 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1847-1851 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1902-1906 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2089 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-535 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 6) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-598 | REDACTED:3347-3351 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:440-444 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503-507 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2089 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-535 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 6) agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255 — agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255-259 | REDACTED:4640-4644 | REDACTED:4724-4728 | REDACTED:5570-5575 | REDACTED:5973-5977 | REDACTED:6169-6174 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:5576` calls `getString`, `createArrayNode`, `add` and `REDACTED:4729` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 6) REDACTED:4611 — REDACTED:4611-4615 | REDACTED:5380-5384 | REDACTED:5408-5412 | REDACTED:5431-5435 | REDACTED:5462-5466 | REDACTED:5517-5521 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:5379` calls `setString` and `REDACTED:5430` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
AC1 · Text alternatives · <canvas> without a text alternative · ×3
  • <canvas> without a text alternative apps/desktop/src/components/grid/DataGridCellDetailDialog.vue:226 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:199 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative docs/components/landing/Starfield.tsx:212 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark apps/desktop/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark dbx-er-diagram-architecture.html:3 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark docs/app/(root)/layout.tsx:34 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · dbx_plugin_runtime · ×3
  • dbx_plugin_runtime::plugins::manifest::validate_contributions (cyclomatic 82) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1477 — dbx_plugin_runtime::plugins::manifest::validate_contributions has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_plugin_runtime::plugins::manifest::validate_form_fields (cyclomatic 24) crates/dbx-plugin-runtime/src/plugins/manifest.rs:2059 — dbx_plugin_runtime::plugins::manifest::validate_form_fields has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog (cyclomatic 19) crates/dbx-plugin-runtime/src/plugins/marketplace.rs:570 — dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Storage · ×3
  • Storage::inspect_data_migration_with_error_cache (cyclomatic 51) REDACTED:1918 — Storage::inspect_data_migration_with_error_cache has cyclomatic complexity 51 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Storage::load_connections (cyclomatic 17) REDACTED:8131 — Storage::load_connections has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Storage::cleanup_migration_backups (cyclomatic 16) REDACTED:2353 — Storage::cleanup_migration_backups has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupService · ×3
  • BackupService::export_job (cyclomatic 46) crates/dbx-core/src/scheduled_backup/engine.rs:154 — BackupService::export_job has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • BackupService::command (cyclomatic 17) crates/dbx-core/src/scheduled_backup/service.rs:54 — BackupService::command has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • BackupService::tick (cyclomatic 16) crates/dbx-core/src/scheduled_backup/engine.rs:58 — BackupService::tick has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_redis · ×3
  • dbx_driver_redis::parse_command_argv (cyclomatic 30) crates/dbx-driver-redis/src/lib.rs:2587 — dbx_driver_redis::parse_command_argv has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_redis::scan_keys_batch_inner (cyclomatic 23) crates/dbx-driver-redis/src/lib.rs:3267 — dbx_driver_redis::scan_keys_batch_inner has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_redis::attach_hash_field_ttls (cyclomatic 17) crates/dbx-driver-redis/src/lib.rs:5641 — dbx_driver_redis::attach_hash_field_ttls has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_driver_redis::redis_command_raw_to_json (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Analyzer · ×3
  • Analyzer::visit_expr (cyclomatic 29) crates/dbx-sql-core/src/sql_analysis.rs:1869 — Analyzer::visit_expr has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analyzer::visit_select (cyclomatic 18) crates/dbx-sql-core/src/sql_analysis.rs:1592 — Analyzer::visit_select has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analyzer::finish_group_by_check (cyclomatic 18) crates/dbx-sql-core/src/sql_analysis.rs:1679 — Analyzer::finish_group_by_check has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_types · ×3
  • dbx_types::models::connection::normalize_postgres_url_params (cyclomatic 27) crates/dbx-types/src/models/connection.rs:2470 — dbx_types::models::connection::normalize_postgres_url_params has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_types::models::connection::parse_as400_jdbc_endpoint (cyclomatic 21) crates/dbx-types/src/models/connection.rs:2819 — dbx_types::models::connection::parse_as400_jdbc_endpoint has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_types::models::connection::normalize_mysql_url_params (cyclomatic 20) crates/dbx-types/src/models/connection.rs:2202 — dbx_types::models::connection::normalize_mysql_url_params has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.completionAssistantSearch (cyclomatic 18) · ×3
  • server.completionAssistantSearch (cyclomatic 18) agents/drivers/cassandra-go/metadata.go:536 — server.completionAssistantSearch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • server.completionAssistantSearch (cyclomatic 18) REDACTED:1771 — server.completionAssistantSearch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • server.completionAssistantSearch (cyclomatic 18) agents/drivers/vastbase-go/vastbase_metadata.go:1091 — server.completionAssistantSearch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D12 · Dependency Hygiene · Dependency pinned to a stale untagged commit · ×3
  • Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test — Direct dependency `github.com/jcmturner/krb5test` is required at `v0.0.0-20201230140143-102e4b78cdb8` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-12-30, 5.9 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/jcmturner/krb5test` and has not moved this requirement in 5.9 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/jcmturner/krb5test` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test — Direct dependency `github.com/jcmturner/krb5test` is required at `v0.0.0-20201230140143-102e4b78cdb8` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-12-30, 5.9 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/jcmturner/krb5test` and has not moved this requirement in 5.9 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/jcmturner/krb5test` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: gitea.com/kingbase/gokb — Direct dependency `gitea.com/kingbase/gokb` is required at `v0.0.0-20201021123113-29bd62a876c3` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-10-21, 6.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `gitea.com/kingbase/gokb` and has not moved this requirement in 6.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `gitea.com/kingbase/gokb` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
D17 · Explicit Debt · TodoComment · ×3
  • TodoComment crates/dbx-ai-provider/src/ai.rs:926 — /// TODO(Agens, tracked by #8144 and #8658): Remove `is_agens_endpoint` and all
  • TodoComment agents/go-common/go-gssapi/krb5/krb5.go:1102 — // TODO: fix GenerateEncryptionKey at some point to cope with different — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment agents/go-common/go-gssapi/krb5/krb5_test.go:7 — // TODO: testing this stuff really needs a KDC or a mock — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · McpAccessPolicy · ×3
  • McpAccessPolicy::to_v1 (cognitive 67) crates/dbx-core/src/ai/mcp_access.rs:639 — McpAccessPolicy::to_v1 has cognitive complexity 67 (threshold 15). Drivers by points: if/else 14 (38 pts), boolean chains 15, match/switch 5 (11 pts), loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • McpAccessPolicy::from_v1 (cognitive 26) crates/dbx-core/src/ai/mcp_access.rs:508 — McpAccessPolicy::from_v1 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • McpAccessPolicy::with_v2_only_rules_from (cognitive 24) crates/dbx-core/src/ai/mcp_access.rs:893 — McpAccessPolicy::with_v2_only_rules_from has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Analysis · ×3
  • Analysis::parse (cognitive 57) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:421 — Analysis::parse has cognitive complexity 57 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 7, loops 4 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analysis::select (cognitive 37) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:633 — Analysis::select has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6, match/switch 2 (4 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analysis::statement (cognitive 31) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:544 — Analysis::statement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 4, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_plugin_cli · ×3
  • dbx_plugin_cli::dev::build_config (cognitive 37) plugins/sdk/cli/src/dev.rs:52 — dbx_plugin_cli::dev::build_config has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_cli::create_project (cognitive 17) plugins/sdk/cli/src/lib.rs:797 — dbx_plugin_cli::create_project has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_cli::package_project (cognitive 17) plugins/sdk/cli/src/lib.rs:866 — dbx_plugin_cli::package_project has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantSearch (cognitive 37) · ×3
  • server.completionAssistantSearch (cognitive 37) agents/drivers/cassandra-go/metadata.go:536 — server.completionAssistantSearch has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.completionAssistantSearch (cognitive 37) REDACTED:1771 — server.completionAssistantSearch has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.completionAssistantSearch (cognitive 37) agents/drivers/vastbase-go/vastbase_metadata.go:1091 — server.completionAssistantSearch has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_mcp · ×3
  • dbx_mcp::transaction::handle_command (cognitive 27) crates/dbx-mcp/src/transaction.rs:532 — dbx_mcp::transaction::handle_command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 7 (10 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_mcp::server::ensure_plugin_scope (cognitive 19) crates/dbx-mcp/src/server.rs:6478 — dbx_mcp::server::ensure_plugin_scope has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_mcp::server::validate_transaction_sql_shape (cognitive 18) crates/dbx-mcp/src/server.rs:6777 — dbx_mcp::server::validate_transaction_sql_shape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:524 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:524-540 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:542-560 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:575-600 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:602-621 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:669-687 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:689-706 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:708-734 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) agents/drivers/argo-go/protocol_error.go:103 — agents/drivers/argo-go/protocol_error.go:103-122 | agents/drivers/cassandra-go/protocol_error.go:119-143 | agents/drivers/etcd-go/protocol_error.go:69-90 | agents/drivers/etcd2-go/protocol_error.go:64-82 | agents/drivers/hive-go/protocol_error.go:103-122 | agents/drivers/neo4j-go/protocol_error.go:120-138 | agents/drivers/vastbase-go/protocol_error.go:117-141 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) agents/drivers/cassandra-go/main.go:242 — agents/drivers/cassandra-go/main.go:242-272 | agents/drivers/iotdb/main.go:243-272 | agents/drivers/kingbase-go/main.go:302-326 | agents/drivers/neo4j-go/main.go:270-300 | REDACTED:925-970 | agents/drivers/vastbase-go/main.go:308-335 | REDACTED:847-905 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (67 corresponding lines) · ×3
  • Edited copy of a member (67 corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:1402 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1402-1469 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1640-1706 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (67 corresponding lines) crates/dbx-mcp/src/server.rs:5506 — crates/dbx-mcp/src/server.rs:5506-5587 | crates/dbx-mcp/src/server.rs:5726-5792 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (67 corresponding lines) REDACTED:3559 — REDACTED:3559-3625 | REDACTED:2341-2429 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×3
  • Edited copy of a member (47 corresponding lines) crates/dbx-core/src/admin/consul/blocking.rs:119 — crates/dbx-core/src/admin/consul/blocking.rs:119-167 | crates/dbx-core/src/admin/consul/blocking.rs:174-220 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) REDACTED:2237 — REDACTED:2237-2283 | REDACTED:2655-2701 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/dbx-core/src/ai/agent_tools.rs:441 — crates/dbx-core/src/ai/agent_tools.rs:441-489 | crates/dbx-core/src/ai/agent_tools.rs:611-657 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×3
  • Edited copy of a member (49 corresponding lines) REDACTED:4975 — REDACTED:4975-5023 | REDACTED:5245-5298 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) agents/go-common/iotdb-client-go/client/column_decoder.go:91 — agents/go-common/iotdb-client-go/client/column_decoder.go:91-141 | agents/go-common/iotdb-client-go/client/column_decoder.go:147-195 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) src-tauri/src/commands/mcp.rs:192 — src-tauri/src/commands/mcp.rs:192-242 | src-tauri/src/commands/mcp.rs:244-292 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×3
  • Edited copy of a member (40 corresponding lines) REDACTED:2157 — REDACTED:2157-2208 | REDACTED:2385-2424 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) agents/drivers/kingbase-go/main.go:1003 — agents/drivers/kingbase-go/main.go:1003-1042 | REDACTED:4950-5003 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) crates/dbx-web/src/routes/schema_diff.rs:32 — crates/dbx-web/src/routes/schema_diff.rs:32-71 | src-tauri/src/commands/schema_diff.rs:66-105 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×3
  • Edited copy of a member (32 corresponding lines) agents/drivers/duckdb/src/schema.rs:421 — agents/drivers/duckdb/src/schema.rs:421-452 | crates/dbx-drivers/src/db/sqlite.rs:1653-1686 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) REDACTED:95 — REDACTED:95-126 | REDACTED:196-232 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1969 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1969-2000 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2223-2258 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 26+ corresponding lines) crates/dbx-driver-mongodb/src/mongo_driver.rs:2338 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2338-2367 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2807-2834 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2843-2868 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 26+ corresponding lines) REDACTED:3478 — REDACTED:3478-3504 | REDACTED:3660-3685 | REDACTED:3818-3847 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 26+ corresponding lines) REDACTED:396 — REDACTED:396-421 | crates/dbx-drivers/src/db/rqlite_driver.rs:278-303 | crates/dbx-drivers/src/db/turso_driver.rs:339-364 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×3
  • Edited copy of a member (38 corresponding lines) src-tauri/src/commands/database_export.rs:74 — src-tauri/src/commands/database_export.rs:74-124 | src-tauri/src/commands/table_export.rs:70-107 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) REDACTED:4052 — REDACTED:4052-4093 | REDACTED:4147-4184 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) agents/drivers/neo4j-go/internal/neo4jcompat/modern.go:13 — agents/drivers/neo4j-go/internal/neo4jcompat/modern.go:13-50 | agents/drivers/neo4j-go/internal/neo4jcompat/windows_legacy.go:14-51 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 23+ corresponding lines) crates/dbx-core/src/persistence/state_persistence.rs:360 — crates/dbx-core/src/persistence/state_persistence.rs:360-385 | crates/dbx-core/src/persistence/state_persistence.rs:387-413 | crates/dbx-core/src/persistence/state_persistence.rs:415-437 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) agents/drivers/etcd2-go/auth.go:51 — agents/drivers/etcd2-go/auth.go:51-73 | agents/drivers/etcd2-go/auth.go:75-99 | agents/drivers/etcd2-go/auth.go:195-217 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:516 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:516-540 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:867-890 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:486-508 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/dbx-ai-provider/src/ai_cli_agent.rs:372 — crates/dbx-ai-provider/src/ai_cli_agent.rs:372-392 | crates/dbx-ai-provider/src/ai_cli_agent.rs:530-549 | crates/dbx-ai-provider/src/ai_cli_agent.rs:758-778 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/dbx-core/src/query/redis_ops.rs:17 — crates/dbx-core/src/query/redis_ops.rs:17-36 | crates/dbx-core/src/query/redis_ops.rs:63-89 | crates/dbx-core/src/query/redis_ops.rs:142-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) REDACTED:1066 — REDACTED:1066-1085 | REDACTED:1130-1159 | REDACTED:1262-1286 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 10+ corresponding lines) crates/dbx-tauri-schema/src/commands.rs:330 — crates/dbx-tauri-schema/src/commands.rs:330-345 | crates/dbx-tauri-schema/src/commands.rs:574-600 | crates/dbx-tauri-schema/src/commands.rs:642-651 | crates/dbx-tauri-schema/src/commands.rs:698-714 | crates/dbx-tauri-schema/src/commands.rs:746-763 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 10+ corresponding lines) crates/dbx-core/src/schema/mod.rs:8748 — crates/dbx-core/src/schema/mod.rs:8748-8757 | crates/dbx-core/src/schema/mod.rs:8759-8772 | crates/dbx-driver-mysql/src/mysql.rs:4142-4156 | crates/dbx-driver-mysql/src/mysql.rs:4158-4177 | REDACTED:4481-4496 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 10+ corresponding lines) agents/drivers/argo-go/main.go:567 — agents/drivers/argo-go/main.go:567-576 | agents/drivers/cassandra-go/main.go:491-500 | agents/drivers/hive-go/main.go:567-576 | agents/drivers/iotdb/main.go:465-474 | agents/drivers/vastbase-go/main.go:1397-1406 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/dbx-web/src/routes/schema.rs:201 — crates/dbx-web/src/routes/schema.rs:201-210 | crates/dbx-web/src/routes/schema.rs:476-484 | crates/dbx-web/src/routes/schema.rs:898-906 | crates/dbx-web/src/routes/schema.rs:950-958 | crates/dbx-web/src/routes/schema.rs:1254-1262 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/dbx-core/src/admin/mq/token.rs:113 — crates/dbx-core/src/admin/mq/token.rs:113-121 | crates/dbx-core/src/admin/nacos/archive.rs:251-259 | crates/dbx-driver-mysql/src/mysql.rs:1156-1164 | crates/dbx-driver-support/src/db.rs:322-330 | crates/dbx-sqlite-worker/src/runtime.rs:251-259 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/dbx-driver-agent/src/agent_offline_export.rs:1108 — crates/dbx-driver-agent/src/agent_offline_export.rs:1108-1116 | crates/dbx-driver-agent/src/agent_service.rs:3661-3669 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1250-1260 | crates/dbx-plugin-runtime/src/plugins/runtime.rs:1221-1231 | plugins/sdk/packager/src/main.rs:587-597 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 14+ corresponding lines) agents/go-common/iotdb-client-go/client/session.go:412 — agents/go-common/iotdb-client-go/client/session.go:412-428 | agents/go-common/iotdb-client-go/client/session.go:554-567 | agents/go-common/iotdb-client-go/client/session.go:579-595 | agents/go-common/iotdb-client-go/client/session.go:1175-1191 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) agents/drivers/cassandra-go/main.go:284 — agents/drivers/cassandra-go/main.go:284-298 | agents/drivers/neo4j-go/main.go:312-326 | agents/drivers/vastbase-go/main.go:347-361 | REDACTED:958-971 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) agents/drivers/kingbase-go/main.go:697 — agents/drivers/kingbase-go/main.go:697-710 | agents/drivers/oracle-go/oci.go:116-129 | agents/drivers/vastbase-go/main.go:583-596 | REDACTED:1384-1399 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:742 — crates/dbx-web/src/routes/mq.rs:742-749 | crates/dbx-web/src/routes/mq.rs:1025-1033 | crates/dbx-web/src/routes/mq.rs:1184-1191 | crates/dbx-web/src/routes/mq.rs:1298-1306 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) crates/dbx-core/src/data/transfer.rs:1292 — crates/dbx-core/src/data/transfer.rs:1292-1299 | REDACTED:566-574 | crates/dbx-drivers/src/db/rqlite_driver.rs:416-424 | crates/dbx-drivers/src/db/turso_driver.rs:661-669 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) REDACTED:1099 — REDACTED:1099-1106 | REDACTED:1759-1769 | REDACTED:3531-3539 | REDACTED:3555-3563 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 7+ corresponding lines) crates/dbx-driver-elasticsearch/src/lib.rs:1698 — crates/dbx-driver-elasticsearch/src/lib.rs:1698-1705 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1503-1509 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1518-1524 | crates/dbx-drivers/src/db/dynamodb_driver.rs:957-967 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 7+ corresponding lines) crates/dbx-sql-core/src/sql_risk.rs:292 — crates/dbx-sql-core/src/sql_risk.rs:292-298 | crates/dbx-sql-core/src/sql_risk.rs:316-326 | crates/dbx-sql-core/src/sql_risk.rs:408-416 | crates/dbx-sql-core/src/sql_risk.rs:454-465 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 7+ corresponding lines) crates/dbx-web/src/routes/hbase.rs:123 — crates/dbx-web/src/routes/hbase.rs:123-135 | crates/dbx-web/src/routes/hbase.rs:140-153 | crates/dbx-web/src/routes/hbase.rs:158-170 | crates/dbx-web/src/routes/hbase.rs:175-181 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (6 members, 8+ corresponding lines) src-tauri/src/commands/mongo_cmd.rs:210 — src-tauri/src/commands/mongo_cmd.rs:210-229 | src-tauri/src/commands/mongo_cmd.rs:241-259 | src-tauri/src/commands/mongo_cmd.rs:268-275 | src-tauri/src/commands/mongo_cmd.rs:286-297 | src-tauri/src/commands/mongo_cmd.rs:310-335 | src-tauri/src/commands/mongo_cmd.rs:347-365 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 8+ corresponding lines) crates/dbx-web/src/routes/mq.rs:830 — crates/dbx-web/src/routes/mq.rs:830-837 | crates/dbx-web/src/routes/mq.rs:843-850 | crates/dbx-web/src/routes/mq.rs:856-863 | crates/dbx-web/src/routes/mq.rs:869-876 | crates/dbx-web/src/routes/mq.rs:925-938 | crates/dbx-web/src/routes/mq.rs:944-957 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 8+ corresponding lines) crates/dbx-web/src/routes/consul.rs:1285 — crates/dbx-web/src/routes/consul.rs:1285-1292 | crates/dbx-web/src/routes/consul.rs:1360-1367 | crates/dbx-web/src/routes/consul.rs:1394-1402 | crates/dbx-web/src/routes/consul.rs:1440-1447 | crates/dbx-web/src/routes/consul.rs:1461-1468 | crates/dbx-web/src/routes/consul.rs:1498-1506 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×3
  • Duplicated block (52 lines × 2) REDACTED:3867 — REDACTED:3867-3918 | src-tauri/src/commands/connection.rs:2538-2589 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3867` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (52 lines × 2) agents/drivers/argo-go/metadata.go:16 — agents/drivers/argo-go/metadata.go:16-67 | agents/drivers/hive-go/metadata.go:16-67 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (52 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:37 — agents/drivers/argo-go/bench/functional_probe.py:37-88 | agents/drivers/hive-go/bench/functional_probe.py:37-88 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×3
  • Duplicated block (32 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:104 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:104-135 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:394-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-data/src/data_grid_extractors/sql.rs:104` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (32 lines × 2) crates/dbx-ai-provider/src/ai.rs:3885 — crates/dbx-ai-provider/src/ai.rs:3885-3916 | crates/dbx-ai-provider/src/ai.rs:4490-4521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3885` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (32 lines × 2) REDACTED:79 — REDACTED:79-110 | REDACTED:79-110 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×3
  • Duplicated block (39 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:79 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:79-117 | src-tauri/src/commands/redis_pubsub_server.rs:110-148 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/redis_pubsub_ws.rs:79` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (39 lines × 2) REDACTED:142 — REDACTED:142-180 | REDACTED:142-180 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (39 lines × 2) REDACTED:298 — REDACTED:298-336 | REDACTED:298-336 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×3
  • Duplicated block (17 lines × 3) crates/dbx-ai-provider/src/ai.rs:3960 — crates/dbx-ai-provider/src/ai.rs:3960-3976 | crates/dbx-ai-provider/src/ai.rs:4202-4218 | crates/dbx-ai-provider/src/ai.rs:4296-4312 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3960` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) agents/drivers/cassandra-go/protocol_error.go:14 — agents/drivers/cassandra-go/protocol_error.go:14-30 | agents/drivers/neo4j-go/protocol_error.go:15-31 | agents/drivers/vastbase-go/protocol_error.go:15-31 — `agents/drivers/cassandra-go/protocol_error.go` and `agents/drivers/neo4j-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 98 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/neo4j-go/protocol_error.go:33` calls `errorResponse`, `classifyRPCError` and `agents/drivers/cassandra-go/protocol_error.go:32` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 3) REDACTED:132 — REDACTED:132-148 | agents/drivers/cassandra-go/bench/agent_compare.py:104-120 | REDACTED:132-148 — before extracting anything, compare `REDACTED` and `agents/drivers/cassandra-go/bench/agent_compare.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–15 lines × 3) · ×3
  • Duplicated block (13–15 lines × 3) REDACTED:3843 — REDACTED:3843-3855 | src-tauri/src/commands/connection.rs:1918-1932 | src-tauri/src/commands/connection.rs:2504-2516 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3843` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–15 lines × 3) REDACTED:3859 — REDACTED:3859-3871 | src-tauri/src/commands/connection.rs:1946-1960 | src-tauri/src/commands/connection.rs:2530-2542 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3859` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–15 lines × 3) REDACTED:3875 — REDACTED:3875-3887 | src-tauri/src/commands/connection.rs:1963-1977 | src-tauri/src/commands/connection.rs:2546-2558 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3875` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×3
  • Duplicated block (11–13 lines × 2) crates/dbx-mcp/src/server.rs:2443 — crates/dbx-mcp/src/server.rs:2443-2455 | crates/dbx-mcp/src/server.rs:2516-2526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:2443` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11–13 lines × 2) crates/dbx-web/src/routes/sql_file.rs:521 — crates/dbx-web/src/routes/sql_file.rs:521-533 | src-tauri/src/commands/sql_file.rs:348-358 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/sql_file.rs:521` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–13 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:3142 — crates/dbx-core/src/persistence/cloud_sync.rs:3142-3154 | crates/dbx-core/src/persistence/cloud_sync.rs:3162-3172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/persistence/cloud_sync.rs:3142` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×3
  • Duplicated block (7–8 lines × 3) REDACTED:2583 — REDACTED:2583-2589 | REDACTED:2931-2938 | REDACTED:4889-4895 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2583` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 3) REDACTED:7747 — REDACTED:7747-7754 | REDACTED:7777-7783 | REDACTED:7807-7814 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7747` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:427 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:427-434 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:581-588 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:672-678 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:590` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:680` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×3
  • Duplicated block (7 lines × 6) agents/drivers/duckdb/src/sql.rs:239 — agents/drivers/duckdb/src/sql.rs:239-245 | agents/drivers/duckdb/src/sql.rs:403-409 | REDACTED:2271-2277 | crates/dbx-driver-mysql/src/mysql.rs:7747-7753 | crates/dbx-driver-mysql/src/mysql.rs:7923-7929 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4626-4632 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:403` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/duckdb/src/sql.rs:247` calls `Some`, `dollar_quote_end` and `agents/drivers/duckdb/src/sql.rs:410` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 6) crates/dbx-mcp/src/server.rs:3466 — crates/dbx-mcp/src/server.rs:3466-3472 | crates/dbx-mcp/src/server.rs:4038-4044 | crates/dbx-mcp/src/server.rs:4383-4389 | crates/dbx-mcp/src/server.rs:4424-4430 | crates/dbx-mcp/src/server.rs:4515-4521 | crates/dbx-mcp/src/server.rs:4545-4551 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:3466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-mcp/src/server.rs:4432` calls `tool_error` and `crates/dbx-mcp/src/server.rs:4045` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 6) agents/drivers/argo-go/main.go:456 — agents/drivers/argo-go/main.go:456-462 | agents/drivers/cassandra-go/main.go:384-390 | agents/drivers/hive-go/main.go:456-462 | agents/drivers/iotdb/main.go:377-383 | agents/drivers/neo4j-go/main.go:480-486 | agents/drivers/vastbase-go/main.go:470-476 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×3
  • Duplicated block (6–7 lines × 2) crates/dbx-core/src/safety/production_safety.rs:255 — crates/dbx-core/src/safety/production_safety.rs:255-261 | crates/dbx-core/src/safety/production_safety.rs:274-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/safety/production_safety.rs:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6–7 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:292 — crates/dbx-web/src/routes/mongodb_import_export.rs:292-297 | crates/dbx-web/src/routes/table_import.rs:322-328 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/mongodb_import_export.rs:292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–7 lines × 2) REDACTED:128 — REDACTED:128-134 | REDACTED:150-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–7 lines × 3) · ×3
  • Duplicated block (4–7 lines × 3) REDACTED:2006 — REDACTED:2006-2012 | REDACTED:2168-2174 | crates/dbx-sql-data/src/data_grid_tdengine_sql.rs:245-248 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (4–7 lines × 3) crates/dbx-web/src/routes/mcp_policy.rs:388 — crates/dbx-web/src/routes/mcp_policy.rs:388-394 | crates/dbx-web/src/routes/mcp_policy.rs:420-423 | crates/dbx-web/src/routes/mcp_policy.rs:461-467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (4–7 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:685 — crates/dbx-ai-provider/src/ai_cli_agent.rs:685-691 | crates/dbx-ai-provider/src/ai_cli_agent.rs:813-816 | crates/dbx-ai-provider/src/ai_cli_agent.rs:945-951 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_cli_agent.rs:685` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–6 lines × 3) · ×3
  • Duplicated block (3–6 lines × 3) crates/dbx-web/src/routes/plugins.rs:240 — crates/dbx-web/src/routes/plugins.rs:240-242 | crates/dbx-web/src/routes/plugins.rs:319-324 | crates/dbx-web/src/routes/plugins.rs:338-343 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/plugins.rs:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-web/src/routes/plugins.rs:324` calls `stop_external_driver_pools` and `crates/dbx-web/src/routes/plugins.rs:242` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (3–6 lines × 3) crates/dbx-web/src/routes/database_export.rs:184 — crates/dbx-web/src/routes/database_export.rs:184-186 | crates/dbx-web/src/routes/query_result_export.rs:165-170 | crates/dbx-web/src/routes/table_export.rs:151-156 — before extracting anything, compare `crates/dbx-web/src/routes/database_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/query_result_export.rs:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-web/src/routes/query_result_export.rs:165` calls `remove_file` and `crates/dbx-web/src/routes/database_export.rs:184` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (3–6 lines × 3) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:835 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:835-840 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:857-862 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:874-876 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/oracle_ddl_indexes.rs:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:720 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:720-724 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:773-777 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:818-823 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:899-903 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:943-947 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:720` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 5) crates/dbx-drivers/src/db/couchdb_driver.rs:274 — crates/dbx-drivers/src/db/couchdb_driver.rs:274-278 | crates/dbx-drivers/src/db/couchdb_driver.rs:326-330 | crates/dbx-drivers/src/db/couchdb_driver.rs:387-391 | crates/dbx-drivers/src/db/couchdb_driver.rs:410-414 | crates/dbx-drivers/src/db/vector_driver.rs:664-668 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 5) REDACTED:2277 — REDACTED:2277-2281 | REDACTED:3185-3189 | REDACTED:3347-3351 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:440-444 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503-507 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×3
  • Duplicated block (9–10 lines × 2) REDACTED:438 — REDACTED:438-447 | REDACTED:1050-1058 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) REDACTED:836 — REDACTED:836-844 | REDACTED:1811-1820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:836` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) REDACTED:4001 — REDACTED:4001-4010 | REDACTED:5410-5418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4001` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×3
  • Duplicated block (33 lines × 2) agents/drivers/argo-go/metadata.go:87 — agents/drivers/argo-go/metadata.go:87-119 | agents/drivers/hive-go/metadata.go:87-119 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (33 lines × 2) agents/drivers/etcd-go/main.go:400 — agents/drivers/etcd-go/main.go:400-432 | agents/drivers/etcd2-go/main.go:354-386 — `agents/drivers/etcd-go/main.go` and `agents/drivers/etcd2-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 287 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/etcd-go/main.go:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `s *etcdSession) handle(method` in one and `s *etcd2Session) handle(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/etcd2-go/main.go:387` calls `isEtcd3OnlyMethod` and `agents/drivers/etcd-go/main.go:433` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (33 lines × 2) REDACTED:3214 — REDACTED:3214-3246 | REDACTED:3387-3422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×3
  • Duplicated block (30 lines × 2) agents/drivers/argo-go/config.go:143 — agents/drivers/argo-go/config.go:143-172 | agents/drivers/hive-go/config.go:146-175 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (30 lines × 2) REDACTED:64 — REDACTED:64-93 | REDACTED:64-93 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) agents/drivers/iotdb/metadata.go:23 — agents/drivers/iotdb/metadata.go:23-52 | agents/drivers/neo4j-go/metadata.go:18-47 — `agents/drivers/iotdb/metadata.go` and `agents/drivers/neo4j-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/iotdb/metadata.go:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/iotdb/metadata.go:20` calls `MustCompile` and `agents/drivers/neo4j-go/metadata.go:16` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/components/plugins/PluginFileManager.vue:190 — apps/desktop/src/components/plugins/PluginFileManager.vue:190 · apps/desktop/src/composables/usePluginShortcutHeight.ts:64 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 — apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 · apps/desktop/src/lib/table/oracleRoutineRename.ts:53 — the two spans are one implementation copied and then locally edited — 541 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/stores/savedSqlStore.ts:1061 — apps/desktop/src/stores/savedSqlStore.ts:1061 · apps/desktop/src/stores/transferTaskStore.ts:397 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×3
  • Duplicated block (45 lines × 2 locations) apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:879 — apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:879 · apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (45 lines × 2 locations) apps/desktop/src/lib/backend/http.ts:3847 — apps/desktop/src/lib/backend/http.ts:3847 · apps/desktop/src/lib/backend/http.ts:3920 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (45 lines × 2 locations) apps/desktop/src/stores/queryStore.ts:2515 — apps/desktop/src/stores/queryStore.ts:2515 · apps/desktop/src/stores/queryStore.ts:2641 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
D1 · Cyclomatic Complexity · ConnectionConfig · ×2
  • ConnectionConfig::connection_url_with_host (cyclomatic 98) crates/dbx-types/src/models/connection.rs:1483 — ConnectionConfig::connection_url_with_host has cyclomatic complexity 98 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ConnectionConfig::redacted_connection_url_with_host (cyclomatic 87) crates/dbx-types/src/models/connection.rs:1312 — ConnectionConfig::redacted_connection_url_with_host has cyclomatic complexity 87 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · main.applyHiveParameters (cyclomatic 48) · ×2
  • main.applyHiveParameters (cyclomatic 48) agents/drivers/argo-go/config.go:527 — main.applyHiveParameters has cyclomatic complexity 48 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • main.applyHiveParameters (cyclomatic 48) agents/drivers/hive-go/config.go:534 — main.applyHiveParameters has cyclomatic complexity 48 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MqttClient · ×2
  • MqttClient::spawn_v4_event_loop (cyclomatic 33) crates/dbx-core/src/admin/mqtt/client.rs:432 — MqttClient::spawn_v4_event_loop has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MqttClient::spawn_v5_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • MqttClient::spawn_v5_event_loop (cyclomatic 33) crates/dbx-core/src/admin/mqtt/client.rs:550 — MqttClient::spawn_v5_event_loop has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MqttClient::spawn_v4_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · main.buildTLSConfig (cyclomatic 29) · ×2
  • main.buildTLSConfig (cyclomatic 29) agents/drivers/argo-go/config.go:1041 — main.buildTLSConfig has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • main.buildTLSConfig (cyclomatic 29) agents/drivers/hive-go/config.go:1081 — main.buildTLSConfig has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getTypeDetails (cyclomatic 25) · ×2
  • server.getTypeDetails (cyclomatic 25) REDACTED:768 — server.getTypeDetails has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • server.getTypeDetails (cyclomatic 25) agents/drivers/vastbase-go/vastbase_metadata.go:593 — server.getTypeDetails has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dbx_mcp · ×2
  • dbx_mcp::transaction::handle_command (cyclomatic 24) crates/dbx-mcp/src/transaction.rs:532 — dbx_mcp::transaction::handle_command has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_mcp::server::validate_transaction_sql_shape (cyclomatic 18) crates/dbx-mcp/src/server.rs:6777 — dbx_mcp::server::validate_transaction_sql_shape has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.finalizeKerberosConfig (cyclomatic 24) · ×2
  • main.finalizeKerberosConfig (cyclomatic 24) agents/drivers/argo-go/config.go:903 — main.finalizeKerberosConfig has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • main.finalizeKerberosConfig (cyclomatic 24) agents/drivers/hive-go/config.go:943 — main.finalizeKerberosConfig has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.listTables (cyclomatic 23) · ×2
  • server.listTables (cyclomatic 23) agents/drivers/argo-go/metadata.go:296 — server.listTables has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • server.listTables (cyclomatic 23) agents/drivers/hive-go/metadata.go:302 — server.listTables has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.executeTabSql · ×2
  • queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:9615 — queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::bindLargeValueContext) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • queryStore.useQueryStore.executeTabSql::bindLargeValueContext (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:9562 — queryStore.useQueryStore.executeTabSql::bindLargeValueContext has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · zooKeeperDiscovery.Endpoints (cyclomatic 21) · ×2
  • zooKeeperDiscovery.Endpoints (cyclomatic 21) REDACTED:95 — zooKeeperDiscovery.Endpoints has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • zooKeeperDiscovery.Endpoints (cyclomatic 21) REDACTED:95 — zooKeeperDiscovery.Endpoints has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.splitNativeDSNFields (cyclomatic 20) · ×2
  • main.splitNativeDSNFields (cyclomatic 20) agents/drivers/kingbase-go/main.go:1542 — main.splitNativeDSNFields has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • main.splitNativeDSNFields (cyclomatic 20) agents/drivers/vastbase-go/main.go:1242 — main.splitNativeDSNFields has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · runtimeServer.dispatch (cyclomatic 19) · ×2
  • runtimeServer.dispatch (cyclomatic 19) agents/drivers/cassandra-go/main.go:173 — runtimeServer.dispatch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • runtimeServer.dispatch (cyclomatic 19) agents/drivers/vastbase-go/main.go:233 — runtimeServer.dispatch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · main.parseHiveConnectionString (cyclomatic 18) · ×2
  • main.parseHiveConnectionString (cyclomatic 18) agents/drivers/argo-go/config.go:295 — main.parseHiveConnectionString has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • main.parseHiveConnectionString (cyclomatic 18) agents/drivers/hive-go/config.go:301 — main.parseHiveConnectionString has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JdbcConnectionParameters.describe (cyclomatic 17) · ×2
  • JdbcConnectionParameters.describe (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/JdbcConnectionParameters.java:18 — JdbcConnectionParameters.describe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • JdbcConnectionParameters.describe (cyclomatic 17) plugins/jdbc/src/main/java/app/dbx/jdbc/JdbcConnectionParameters.java:18 — JdbcConnectionParameters.describe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.loadTrustStore (cyclomatic 17) · ×2
  • main.loadTrustStore (cyclomatic 17) agents/drivers/argo-go/zookeeper_tls.go:60 — main.loadTrustStore has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • main.loadTrustStore (cyclomatic 17) agents/drivers/hive-go/zookeeper_tls.go:60 — main.loadTrustStore has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.dispatch (cyclomatic 17) · ×2
  • runtimeServer.dispatch (cyclomatic 17) agents/drivers/kingbase-go/main.go:237 — runtimeServer.dispatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • runtimeServer.dispatch (cyclomatic 17) REDACTED:775 — runtimeServer.dispatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: main.normalizeValueWithType (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D10 · Test Quality · No assertions · ×2
  • No assertions: preserves all original parameter bytes for every exported connection apps/desktop/src/lib/connection/__tests__/connectionParameterExport.live.spec.ts:11 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: removes a previous mode's function signature when the mode changes apps/desktop/src/components/editor/__tests__/QueryEditor.kingbase.integration.spec.ts:98 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · MqttClient · ×2
  • MqttClient::spawn_v4_event_loop (cognitive 74) crates/dbx-core/src/admin/mqtt/client.rs:432 — MqttClient::spawn_v4_event_loop has cognitive complexity 74 (threshold 15). Drivers by points: if/else 16 (64 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MqttClient::spawn_v5_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • MqttClient::spawn_v5_event_loop (cognitive 74) crates/dbx-core/src/admin/mqtt/client.rs:550 — MqttClient::spawn_v5_event_loop has cognitive complexity 74 (threshold 15). Drivers by points: if/else 16 (64 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MqttClient::spawn_v4_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ConnectionConfig · ×2
  • ConnectionConfig::connection_url_with_host (cognitive 71) crates/dbx-types/src/models/connection.rs:1483 — ConnectionConfig::connection_url_with_host has cognitive complexity 71 (threshold 15). Drivers by points: if/else 42 (65 pts), boolean chains 5, match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ConnectionConfig::redacted_connection_url_with_host (cognitive 47) crates/dbx-types/src/models/connection.rs:1312 — ConnectionConfig::redacted_connection_url_with_host has cognitive complexity 47 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 2, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.applyHiveParameters (cognitive 55) · ×2
  • main.applyHiveParameters (cognitive 55) agents/drivers/argo-go/config.go:527 — main.applyHiveParameters has cognitive complexity 55 (threshold 15). Drivers by points: if/else 33 (43 pts), boolean chains 12 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • main.applyHiveParameters (cognitive 55) agents/drivers/hive-go/config.go:534 — main.applyHiveParameters has cognitive complexity 55 (threshold 15). Drivers by points: if/else 33 (43 pts), boolean chains 12 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeTabSql · ×2
  • queryStore.useQueryStore.executeTabSql::bindLargeValueContext (cognitive 42) apps/desktop/src/stores/queryStore.ts:9562 — queryStore.useQueryStore.executeTabSql::bindLargeValueContext has cognitive complexity 42 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 6 (16 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction (cognitive 22) apps/desktop/src/stores/queryStore.ts:9615 — queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 6, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::bindLargeValueContext) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · main.buildTLSConfig (cognitive 39) · ×2
  • main.buildTLSConfig (cognitive 39) agents/drivers/argo-go/config.go:1041 — main.buildTLSConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.buildTLSConfig (cognitive 39) agents/drivers/hive-go/config.go:1081 — main.buildTLSConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.loadTrustStore (cognitive 36) · ×2
  • main.loadTrustStore (cognitive 36) agents/drivers/argo-go/zookeeper_tls.go:60 — main.loadTrustStore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 2 (6 pts), match/switch 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.loadTrustStore (cognitive 36) agents/drivers/hive-go/zookeeper_tls.go:60 — main.loadTrustStore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 2 (6 pts), match/switch 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zooKeeperDiscovery.Endpoints (cognitive 36) · ×2
  • zooKeeperDiscovery.Endpoints (cognitive 36) REDACTED:95 — zooKeeperDiscovery.Endpoints has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • zooKeeperDiscovery.Endpoints (cognitive 36) REDACTED:95 — zooKeeperDiscovery.Endpoints has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_cli · ×2
  • dbx_cli::run_query (cognitive 35) crates/dbx-cli/src/main.rs:303 — dbx_cli::run_query has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 9, match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_cli::run_context (cognitive 18) crates/dbx-cli/src/main.rs:407 — dbx_cli::run_context has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 3 (4 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · main.splitNativeDSNFields (cognitive 34) · ×2
  • main.splitNativeDSNFields (cognitive 34) agents/drivers/kingbase-go/main.go:1542 — main.splitNativeDSNFields has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (11 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.splitNativeDSNFields (cognitive 34) agents/drivers/vastbase-go/main.go:1242 — main.splitNativeDSNFields has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (11 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_tdengine_driver · ×2
  • dbx_tdengine_driver::runtime::run (cognitive 32) agents/drivers/tdengine/src/runtime.rs:67 — dbx_tdengine_driver::runtime::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (11 pts), loops 5 (8 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_tdengine_driver::runtime::error_response (cognitive 17) agents/drivers/tdengine/src/runtime.rs:456 — dbx_tdengine_driver::runtime::error_response has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · server.listTables (cognitive 32) · ×2
  • server.listTables (cognitive 32) agents/drivers/argo-go/metadata.go:296 — server.listTables has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.listTables (cognitive 32) agents/drivers/hive-go/metadata.go:302 — server.listTables has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseHiveConnectionString (cognitive 30) · ×2
  • main.parseHiveConnectionString (cognitive 30) agents/drivers/argo-go/config.go:295 — main.parseHiveConnectionString has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.parseHiveConnectionString (cognitive 30) agents/drivers/hive-go/config.go:301 — main.parseHiveConnectionString has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextEncoding · ×2
  • TextEncoding::encode_copy_text (cognitive 29) crates/dbx-driver-postgres/src/text_encoding.rs:149 — TextEncoding::encode_copy_text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 pts), match/switch 2 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TextEncoding::encode_sql (cognitive 19) crates/dbx-driver-postgres/src/text_encoding.rs:75 — TextEncoding::encode_sql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.loadClientKeyStore (cognitive 29) · ×2
  • main.loadClientKeyStore (cognitive 29) agents/drivers/argo-go/zookeeper_tls.go:119 — main.loadClientKeyStore has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.loadClientKeyStore (cognitive 29) agents/drivers/hive-go/zookeeper_tls.go:119 — main.loadClientKeyStore has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.executeStatements (cognitive 27) · ×2
  • server.executeStatements (cognitive 27) agents/drivers/argo-go/query.go:297 — server.executeStatements has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.executeStatements (cognitive 27) agents/drivers/hive-go/query.go:297 — server.executeStatements has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.validateDefaultExpression · ×2
  • tableColumnDefinitionPaste.validateDefaultExpression::operand (cognitive 27) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:99 — tableColumnDefinitionPaste.validateDefaultExpression::operand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (tableColumnDefinitionPaste.validateDefaultExpression::expression) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • tableColumnDefinitionPaste.validateDefaultExpression::expression (cognitive 18) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:131 — tableColumnDefinitionPaste.validateDefaultExpression::expression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (tableColumnDefinitionPaste.validateDefaultExpression::operand) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · JdbcConnectionParameters.describe (cognitive 25) · ×2
  • JdbcConnectionParameters.describe (cognitive 25) agents/common/src/main/java/com/dbx/agent/JdbcConnectionParameters.java:18 — JdbcConnectionParameters.describe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (9 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JdbcConnectionParameters.describe (cognitive 25) plugins/jdbc/src/main/java/app/dbx/jdbc/JdbcConnectionParameters.java:18 — JdbcConnectionParameters.describe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (9 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · discoveryConnector.Connect (cognitive 23) · ×2
  • discoveryConnector.Connect (cognitive 23) agents/drivers/argo-go/connector.go:131 — discoveryConnector.Connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • discoveryConnector.Connect (cognitive 23) agents/drivers/hive-go/connector.go:132 — discoveryConnector.Connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_plugin_packager · ×2
  • dbx_plugin_packager::run_package_cli (cognitive 22) plugins/sdk/packager/src/main.rs:80 — dbx_plugin_packager::run_package_cli has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_plugin_packager::validate_unsigned_candidate (cognitive 21) plugins/sdk/packager/src/main.rs:316 — dbx_plugin_packager::validate_unsigned_candidate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.finalizeKerberosConfig (cognitive 22) · ×2
  • main.finalizeKerberosConfig (cognitive 22) agents/drivers/argo-go/config.go:903 — main.finalizeKerberosConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • main.finalizeKerberosConfig (cognitive 22) agents/drivers/hive-go/config.go:943 — main.finalizeKerberosConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LegacyReader · ×2
  • LegacyReader::list_objects (cognitive 21) crates/dbx-core/src/schema/oracle_triggers.rs:276 — LegacyReader::list_objects has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (6 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LegacyReader::source (cognitive 20) crates/dbx-core/src/schema/oracle_triggers.rs:494 — LegacyReader::source has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getTypeDetails (cognitive 21) · ×2
  • server.getTypeDetails (cognitive 21) REDACTED:768 — server.getTypeDetails has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • server.getTypeDetails (cognitive 21) agents/drivers/vastbase-go/vastbase_metadata.go:593 — server.getTypeDetails has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.nativeConnectionStringSSLMode (cognitive 20) · ×2
  • main.nativeConnectionStringSSLMode (cognitive 20) agents/drivers/kingbase-go/main.go:1423 — main.nativeConnectionStringSSLMode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.nativeConnectionStringSSLMode (cognitive 20) agents/drivers/vastbase-go/main.go:1161 — main.nativeConnectionStringSSLMode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.customTypeRangeAttributes (cognitive 20) · ×2
  • server.customTypeRangeAttributes (cognitive 20) REDACTED:986 — server.customTypeRangeAttributes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.customTypeRangeAttributes (cognitive 20) agents/drivers/vastbase-go/vastbase_metadata.go:811 — server.customTypeRangeAttributes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseHiveAssignments (cognitive 19) · ×2
  • main.parseHiveAssignments (cognitive 19) agents/drivers/argo-go/config.go:420 — main.parseHiveAssignments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.parseHiveAssignments (cognitive 19) agents/drivers/hive-go/config.go:426 — main.parseHiveAssignments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.dispatch (cognitive 19) · ×2
  • runtimeServer.dispatch (cognitive 19) agents/drivers/cassandra-go/main.go:173 — runtimeServer.dispatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • runtimeServer.dispatch (cognitive 19) agents/drivers/vastbase-go/main.go:233 — runtimeServer.dispatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GitDiffScanner · ×2
  • GitDiffScanner::parse_diff_output (cognitive 18) crates/dbx-sql-schema/src/sql_parser/git.rs:117 — GitDiffScanner::parse_diff_output has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • GitDiffScanner::build_sql_filter (cognitive 17) crates/dbx-sql-schema/src/sql_parser/git.rs:89 — GitDiffScanner::build_sql_filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuckDbWorkerClient · ×2
  • DuckDbWorkerClient::execute_query_page (cognitive 17) crates/dbx-drivers/src/db/duckdb_query_sessions.rs:32 — DuckDbWorkerClient::execute_query_page has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DuckDbWorkerClient::execute_typed_with_options (cognitive 17) crates/dbx-drivers/src/db/duckdb_worker_process.rs:287 — DuckDbWorkerClient::execute_typed_with_options has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (15 pts), if/else 1 (2 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.applyKerberosJAASFile (cognitive 17) · ×2
  • main.applyKerberosJAASFile (cognitive 17) agents/drivers/argo-go/config.go:958 — main.applyKerberosJAASFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.applyKerberosJAASFile (cognitive 17) agents/drivers/hive-go/config.go:998 — main.applyKerberosJAASFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantSearch (cognitive 17) · ×2
  • server.completionAssistantSearch (cognitive 17) agents/drivers/argo-go/metadata.go:814 — server.completionAssistantSearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.completionAssistantSearch (cognitive 17) agents/drivers/hive-go/metadata.go:825 — server.completionAssistantSearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.dispatch (cognitive 17) · ×2
  • runtimeServer.dispatch (cognitive 17) agents/drivers/iotdb/main.go:179 — runtimeServer.dispatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • runtimeServer.dispatch (cognitive 17) agents/drivers/neo4j-go/main.go:207 — runtimeServer.dispatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.parseHiveServerRegistration (cognitive 16) · ×2
  • main.parseHiveServerRegistration (cognitive 16) REDACTED:218 — main.parseHiveServerRegistration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.parseHiveServerRegistration (cognitive 16) REDACTED:218 — main.parseHiveServerRegistration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listObjects (cognitive 16) · ×2
  • server.listObjects (cognitive 16) agents/drivers/argo-go/metadata.go:435 — server.listObjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • server.listObjects (cognitive 16) agents/drivers/hive-go/metadata.go:441 — server.listObjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · protocolZooKeeperClient.authenticateSASL (cognitive 16) · ×2
  • protocolZooKeeperClient.authenticateSASL (cognitive 16) REDACTED:193 — protocolZooKeeperClient.authenticateSASL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • protocolZooKeeperClient.authenticateSASL (cognitive 16) REDACTED:193 — protocolZooKeeperClient.authenticateSASL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (46 shared lines) · ×2
  • Near-duplicate member pair (46 shared lines) crates/dbx-web/src/routes/query_result_export.rs:40 — crates/dbx-web/src/routes/query_result_export.rs:40-128 | crates/dbx-web/src/routes/table_export.rs:37-116 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (46 shared lines) REDACTED:1107 — REDACTED:1107-1311 | REDACTED:1051-1239 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (23 shared lines) · ×2
  • Near-duplicate member pair (23 shared lines) REDACTED:1340 — REDACTED:1340-1369 | REDACTED:1444-1473 — These two members are variants of one another: 23 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (23 shared lines) REDACTED:140 — REDACTED:140-216 | agents/drivers/vastbase-go/bench/agent_compare.go:216-272 — These two members are variants of one another: 23 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (12 members, 50+ identical tokens) REDACTED:2863 — REDACTED:2863-2917 | REDACTED:3023-3110 | REDACTED:3484-3536 | REDACTED:4792-4842 | REDACTED:5058-5082 | REDACTED:5342-5359 | REDACTED:7374-7402 | REDACTED:8086-8129 | REDACTED:8131-8261 | REDACTED:9016-9036 | REDACTED:9836-9910 | REDACTED:9928-9988 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) agents/drivers/argo-go/main.go:106 — agents/drivers/argo-go/main.go:106-142 | agents/drivers/cassandra-go/main.go:114-149 | agents/drivers/etcd-go/main.go:127-165 | agents/drivers/etcd2-go/main.go:97-135 | agents/drivers/hive-go/main.go:106-142 | agents/drivers/iotdb/main.go:110-146 | agents/drivers/kingbase-go/main.go:185-220 | agents/drivers/nebula-go/main.go:66-104 | agents/drivers/neo4j-go/main.go:134-170 | REDACTED:710-784 | agents/drivers/vastbase-go/main.go:181-216 | REDACTED:708-750 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (10 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:95 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:95-124 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:205-244 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:103-123 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:163-199 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:225-246 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:288-328 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:307-349 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:107-131 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:173-213 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:111-135 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
  • Members sharing a duplicated core (10 members, 50+ identical tokens) agents/drivers/argo-go/main.go:160 — agents/drivers/argo-go/main.go:160-173 | agents/drivers/cassandra-go/main.go:158-171 | agents/drivers/etcd-go/main.go:184-197 | agents/drivers/etcd2-go/main.go:154-167 | agents/drivers/hive-go/main.go:160-173 | agents/drivers/iotdb/main.go:164-177 | agents/drivers/neo4j-go/main.go:192-205 | agents/drivers/vastbase-go/main.go:218-231 | REDACTED:760-773 | REDACTED:1036-1049 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (8 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:10 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:10-16 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:87-93 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:205-242 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:169-187 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:126-145 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:249-270 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:278-289 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:134-155 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) agents/drivers/argo-go/metadata.go:16 — agents/drivers/argo-go/metadata.go:16-73 | agents/drivers/cassandra-go/metadata.go:12-58 | agents/drivers/hive-go/metadata.go:16-73 | agents/drivers/iotdb/metadata.go:14-65 | REDACTED:67-172 | agents/drivers/neo4j-go/metadata.go:13-98 | agents/drivers/vastbase-go/vastbase_metadata.go:17-98 | REDACTED:405-507 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×2
  • Edited copy of a member (61 corresponding lines) crates/dbx-driver-redis/src/lib.rs:5320 — crates/dbx-driver-redis/src/lib.rs:5320-5380 | crates/dbx-driver-redis/src/lib.rs:5392-5452 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (61 corresponding lines) crates/dbx-mcp/src/server.rs:2434 — crates/dbx-mcp/src/server.rs:2434-2500 | crates/dbx-mcp/src/server.rs:2507-2567 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×2
  • Edited copy of a member (60 corresponding lines) REDACTED:824 — REDACTED:824-908 | REDACTED:775-834 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (60 corresponding lines) crates/dbx-web/src/routes/redis_pubsub_ws.rs:119 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:119-178 | src-tauri/src/commands/redis_pubsub_server.rs:150-209 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (53 corresponding lines) · ×2
  • Edited copy of a member (53 corresponding lines) crates/dbx-drivers/src/db/dynamodb_driver.rs:844 — crates/dbx-drivers/src/db/dynamodb_driver.rs:844-896 | crates/dbx-drivers/src/db/dynamodb_driver.rs:898-955 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (53 corresponding lines) REDACTED:7014 — REDACTED:7014-7074 | REDACTED:7085-7137 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) crates/dbx-web/src/routes/query.rs:492 — crates/dbx-web/src/routes/query.rs:492-549 | crates/dbx-web/src/routes/query.rs:660-720 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) crates/dbx-core/src/data/transfer.rs:6955 — crates/dbx-core/src/data/transfer.rs:6955-7067 | crates/dbx-core/src/data/transfer.rs:7173-7230 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×2
  • Edited copy of a member (41 corresponding lines) crates/dbx-core/src/connection/jdbc.rs:634 — crates/dbx-core/src/connection/jdbc.rs:634-680 | crates/dbx-driver-agent/src/agent_service.rs:102-142 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) agents/drivers/argo-go/config.go:22 — agents/drivers/argo-go/config.go:22-62 | agents/drivers/hive-go/config.go:22-65 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×2
  • Edited copy of a member (44 corresponding lines) crates/dbx-core/src/data/transfer.rs:7436 — crates/dbx-core/src/data/transfer.rs:7436-7479 | crates/dbx-core/src/data/transfer.rs:7519-7572 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) agents/drivers/rabbitmq/operations.go:27 — agents/drivers/rabbitmq/operations.go:27-70 | agents/drivers/rabbitmq/operations.go:399-449 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×2
  • Edited copy of a member (46 corresponding lines) REDACTED:1702 — REDACTED:1702-1747 | agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:144-189 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) crates/dbx-formats/src/temporal_format.rs:46 — crates/dbx-formats/src/temporal_format.rs:46-91 | crates/dbx-formats/src/xlsx_export.rs:1137-1195 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 30+ corresponding lines) REDACTED:2986 — REDACTED:2986-3021 | agents/drivers/vastbase-go/vastbase_metadata.go:1935-1970 | agents/drivers/vastbase-go/vastbase_metadata.go:1972-2001 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 30+ corresponding lines) crates/dbx-sql-schema/src/table_structure_sql/comments.rs:102 — crates/dbx-sql-schema/src/table_structure_sql/comments.rs:102-131 | crates/dbx-sql-schema/src/table_structure_sql/comments.rs:140-170 | crates/dbx-sql-schema/src/table_structure_sql/comments.rs:189-219 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 22+ corresponding lines) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:826 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:826-847 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:336-357 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:560-581 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 22+ corresponding lines) REDACTED:225 — REDACTED:225-246 | crates/dbx-drivers/src/db/rqlite_driver.rs:104-125 | crates/dbx-drivers/src/db/turso_driver.rs:165-186 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 16+ corresponding lines) crates/dbx-web/src/routes/mongo.rs:682 — crates/dbx-web/src/routes/mongo.rs:682-697 | crates/dbx-web/src/routes/mongo.rs:819-840 | crates/dbx-web/src/routes/mongo.rs:846-866 | crates/dbx-web/src/routes/mongo.rs:902-918 | crates/dbx-web/src/routes/mongo.rs:924-940 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 16+ corresponding lines) agents/drivers/etcd-go/auth.go:249 — agents/drivers/etcd-go/auth.go:249-264 | agents/drivers/etcd-go/auth.go:362-377 | agents/drivers/etcd-go/auth.go:379-394 | agents/drivers/etcd2-go/auth.go:129-144 | agents/drivers/etcd2-go/auth.go:290-305 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:408 — crates/dbx-core/src/query/mongo_ops.rs:408-434 | crates/dbx-core/src/query/mongo_ops.rs:449-477 | crates/dbx-core/src/query/mongo_ops.rs:818-841 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) agents/go-common/iotdb-client-go/client/session.go:1401 — agents/go-common/iotdb-client-go/client/session.go:1401-1424 | agents/go-common/iotdb-client-go/client/session.go:1426-1450 | agents/go-common/iotdb-client-go/client/session.go:1452-1476 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 18+ corresponding lines) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:57 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:57-74 | agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:127-156 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:68-89 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:72-93 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 18+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:120 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:120-137 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:197-217 | crates/dbx-ai-provider/src/ai_grok_cli.rs:170-187 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:52-69 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 6+ corresponding lines) crates/dbx-web/src/routes/schema.rs:134 — crates/dbx-web/src/routes/schema.rs:134-140 | crates/dbx-web/src/routes/schema.rs:155-161 | crates/dbx-web/src/routes/schema.rs:678-683 | crates/dbx-web/src/routes/schema.rs:1278-1284 | crates/dbx-web/src/routes/schema.rs:1289-1295 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 6+ corresponding lines) crates/dbx-web/src/routes/mongo.rs:349 — crates/dbx-web/src/routes/mongo.rs:349-354 | crates/dbx-web/src/routes/mq.rs:480-485 | crates/dbx-web/src/routes/mq.rs:491-496 | crates/dbx-web/src/routes/mq.rs:818-824 | crates/dbx-web/src/routes/mq.rs:1378-1384 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 6+ corresponding lines) crates/dbx-driver-postgres/src/text_encoding.rs:639 — crates/dbx-driver-postgres/src/text_encoding.rs:639-644 | crates/dbx-driver-postgres/src/text_encoding.rs:649-654 | crates/dbx-driver-postgres/src/text_encoding.rs:659-664 | crates/dbx-driver-postgres/src/text_encoding.rs:669-674 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 6+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:28 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:28-34 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:34-40 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:130-135 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:27-32 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 7+ corresponding lines) REDACTED:1994 — REDACTED:1994-2000 | REDACTED:2002-2008 | REDACTED:2217-2225 | agents/drivers/vastbase-go/vastbase_metadata.go:1264-1270 | agents/drivers/vastbase-go/vastbase_metadata.go:1272-1278 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 7+ corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/capabilities.rs:173 — crates/dbx-sql-dialect/src/sql_dialect/capabilities.rs:173-180 | crates/dbx-sql-dialect/src/sql_dialect/identifiers.rs:251-258 | crates/dbx-sql-dialect/src/sql_dialect/identifiers.rs:486-493 | crates/dbx-sql-schema/src/table_structure_sql/util.rs:65-72 | crates/dbx-sql-schema/src/table_structure_sql/util.rs:118-124 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×2
  • Duplicated block (24–25 lines × 2) agents/drivers/duckdb/src/sql.rs:170 — agents/drivers/duckdb/src/sql.rs:170-194 | crates/dbx-drivers/src/db/duckdb_sql.rs:208-231 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24–25 lines × 2) REDACTED:8448 — REDACTED:8448-8472 | REDACTED:8981-9004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8448` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:144 — crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:144-165 | crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:232-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22–23 lines × 2) agents/go-common/iotdb-client-go/client/session.go:220 — agents/go-common/iotdb-client-go/client/session.go:220-241 | agents/go-common/iotdb-client-go/client/session.go:282-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/go-common/iotdb-client-go/client/session.go:242` calls `GetSessionId`, `RequestStatementId`, `Background` and `agents/go-common/iotdb-client-go/client/session.go:305` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×2
  • Duplicated block (23 lines × 4) REDACTED:97 — REDACTED:97-119 | crates/dbx-drivers/src/db/influxdb3_driver.rs:89-111 | crates/dbx-drivers/src/db/influxdb_driver.rs:130-152 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:153-175 — before extracting anything, compare `crates/dbx-drivers/src/db/influxdb3_driver.rs` and `crates/dbx-drivers/src/db/influxdb_driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 4) agents/drivers/cassandra-go/main.go:22 — agents/drivers/cassandra-go/main.go:22-44 | agents/drivers/iotdb/main.go:27-49 | agents/drivers/neo4j-go/main.go:26-48 | agents/drivers/vastbase-go/main.go:25-47 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:356 — crates/dbx-driver-mongodb/src/mongo_shell.rs:356-376 | crates/dbx-web/src/routes/mcp_policy.rs:38-58 | src-tauri/src/commands/mcp_bridge.rs:1546-1566 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:6193 — crates/dbx-driver-mysql/src/mysql.rs:6193-6213 | crates/dbx-driver-mysql/src/mysql.rs:6379-6399 | crates/dbx-driver-mysql/src/mysql.rs:6603-6623 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6193` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×2
  • Duplicated block (18–21 lines × 2) crates/dbx-mcp/src/server.rs:2896 — crates/dbx-mcp/src/server.rs:2896-2916 | crates/dbx-mcp/src/server.rs:3238-3255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:2896` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (18–21 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1475 — crates/dbx-sql-data/src/query_result_sql.rs:1475-1492 | crates/dbx-sql-data/src/query_result_sql.rs:3112-3132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 5) · ×2
  • Duplicated block (19 lines × 5) REDACTED:302 — REDACTED:302-320 | crates/dbx-drivers/src/db/rqlite_driver.rs:174-192 | crates/dbx-drivers/src/db/sqlite.rs:2518-2536 | crates/dbx-drivers/src/db/sqlite.rs:2578-2596 | crates/dbx-drivers/src/db/turso_driver.rs:235-253 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:302` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 5) agents/drivers/cassandra-go/main.go:24 — agents/drivers/cassandra-go/main.go:24-42 | agents/drivers/iotdb/main.go:29-47 | agents/drivers/neo4j-go/main.go:28-46 | agents/drivers/vastbase-go/main.go:27-45 | REDACTED:318-336 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) crates/dbx-core/src/data/transfer.rs:10454 — crates/dbx-core/src/data/transfer.rs:10454-10472 | crates/dbx-core/src/data/transfer.rs:10603-10621 | crates/dbx-core/src/data/transfer.rs:10700-10718 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:10454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 3) REDACTED:403 — REDACTED:403-421 | crates/dbx-drivers/src/db/rqlite_driver.rs:285-303 | crates/dbx-drivers/src/db/turso_driver.rs:346-364 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:403` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `&CloudflareD1Client` in one and `&RqliteClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-drivers/src/db/rqlite_driver.rs:305` calls `execute_query`, `execute_query_with_max_rows` and `REDACTED:423` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×2
  • Duplicated block (16–19 lines × 2) REDACTED:3670 — REDACTED:3670-3685 | src-tauri/src/commands/connection.rs:2621-2639 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3670` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–19 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:184 — crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:184-199 | crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:264-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×2
  • Duplicated block (18 lines × 3) crates/dbx-core/src/query/mongo_ops.rs:1561 — crates/dbx-core/src/query/mongo_ops.rs:1561-1578 | crates/dbx-drivers/src/db/dynamodb_driver.rs:620-637 | crates/dbx-mcp/src/backend.rs:3048-3065 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/mongo_ops.rs:1561` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `documents` to `Vec<serde_json::Value>` in one and `Vec<Value>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 3) agents/drivers/argo-go/protocol_error.go:15 — agents/drivers/argo-go/protocol_error.go:15-32 | agents/drivers/hive-go/protocol_error.go:15-32 | agents/drivers/iotdb/protocol_error.go:14-31 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/hive-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 136 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) REDACTED:5353 — REDACTED:5353-5369 | REDACTED:5467-5484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5353` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17–18 lines × 2) REDACTED:5655 — REDACTED:5655-5671 | REDACTED:5693-5710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5655` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) REDACTED:5954 — REDACTED:5954-5970 | REDACTED:10074-10089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5954` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:421 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:421-437 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:711-726 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) crates/dbx-driver-elasticsearch/src/lib.rs:2382 — crates/dbx-driver-elasticsearch/src/lib.rs:2382-2396 | crates/dbx-driver-elasticsearch/src/lib.rs:2412-2427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-elasticsearch/src/lib.rs:2382` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15–16 lines × 2) REDACTED:1964 — REDACTED:1964-1978 | REDACTED:2012-2027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1964` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×2
  • Duplicated block (14–15 lines × 4) REDACTED:5763 — REDACTED:5763-5777 | REDACTED:6169-6182 | REDACTED:6271-6284 | REDACTED:6370-6383 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5763` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757-770 | REDACTED:2663-2677 | REDACTED:2692-2706 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:367-381 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×2
  • Duplicated block (13 lines × 5) REDACTED:5766 — REDACTED:5766-5778 | REDACTED:5977-5989 | REDACTED:6171-6183 | REDACTED:6273-6285 | REDACTED:6372-6384 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 5) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:191 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:191-203 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:149-161 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:274-286 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:293-305 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:159-171 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×2
  • Duplicated block (11–12 lines × 4) REDACTED:1823 — REDACTED:1823-1833 | REDACTED:2122-2132 | REDACTED:2331-2341 | REDACTED:2536-2547 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1823` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 4) agents/drivers/cassandra-go/protocol_error.go:73 — agents/drivers/cassandra-go/protocol_error.go:73-84 | agents/drivers/iotdb/protocol_error.go:60-70 | agents/drivers/neo4j-go/protocol_error.go:74-85 | agents/drivers/vastbase-go/protocol_error.go:71-82 — `agents/drivers/cassandra-go/protocol_error.go` and `agents/drivers/iotdb/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/protocol_error.go:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×2
  • Duplicated block (10–12 lines × 2) crates/dbx-core/src/admin/nacos/batch.rs:297 — crates/dbx-core/src/admin/nacos/batch.rs:297-308 | crates/dbx-core/src/admin/nacos/http.rs:1226-1235 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/nacos/batch.rs:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 2) agents/go-common/iotdb-client-go/client/session.go:619 — agents/go-common/iotdb-client-go/client/session.go:619-630 | agents/go-common/iotdb-client-go/client/session.go:666-675 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/go-common/iotdb-client-go/client/session.go:619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×2
  • Duplicated block (9–11 lines × 3) REDACTED:3830 — REDACTED:3830-3838 | src-tauri/src/commands/connection.rs:1896-1906 | src-tauri/src/commands/connection.rs:2491-2499 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src-tauri/src/commands/connection.rs:2490` calls `is_some` and `REDACTED:3829` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9–11 lines × 3) REDACTED:8785 — REDACTED:8785-8795 | src-tauri/src/commands/connection.rs:2064-2072 | src-tauri/src/commands/connection.rs:2641-2649 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×2
  • Duplicated block (9–11 lines × 2) crates/dbx-core/src/connection/jdbc.rs:662 — crates/dbx-core/src/connection/jdbc.rs:662-672 | crates/dbx-driver-agent/src/agent_service.rs:132-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/connection/jdbc.rs:662` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–11 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:1480 — crates/dbx-driver-mysql/src/mysql.rs:1480-1490 | crates/dbx-driver-mysql/src/mysql.rs:1519-1527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) crates/dbx-core/src/data/transfer.rs:14741 — crates/dbx-core/src/data/transfer.rs:14741-14750 | crates/dbx-core/src/data/transfer.rs:14765-14774 | crates/dbx-core/src/data/transfer.rs:15086-15095 | crates/dbx-core/src/data/transfer.rs:15110-15119 | crates/dbx-core/src/data/transfer.rs:15144-15153 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:14741` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/data/transfer.rs:15083` calls `push` and `crates/dbx-core/src/data/transfer.rs:14738` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 5) REDACTED:5677 — REDACTED:5677-5686 | REDACTED:6546-6555 | REDACTED:6569-6578 | REDACTED:6592-6601 | REDACTED:6623-6632 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5677` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×2
  • Duplicated block (7–10 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:227 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:227-236 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:898-904 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/kafka.rs:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:905` calls `get`, `and_then`, `as_str` and `crates/dbx-core/src/admin/mq/adapters/kafka.rs:237` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7–10 lines × 2) crates/dbx-core/src/schema/native_jobs/operations.rs:494 — crates/dbx-core/src/schema/native_jobs/operations.rs:494-500 | crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:319-328 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/native_jobs/operations.rs:494` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:167 — crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:167-176 | crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:211-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–10 lines × 2) crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1206 — crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1206-1213 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1284-1293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×2
  • Duplicated block (7–9 lines × 2) crates/dbx-sql-core/src/object_source_sql.rs:223 — crates/dbx-sql-core/src/object_source_sql.rs:223-229 | crates/dbx-sql-core/src/object_source_sql.rs:378-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-core/src/object_source_sql.rs:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `input` to `OracleRoutineReferenceRewriteInput` in one and `OracleTableReferenceRewriteInput` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7–9 lines × 2) crates/dbx-types/src/models/connection.rs:2612 — crates/dbx-types/src/models/connection.rs:2612-2618 | crates/dbx-types/src/models/connection.rs:2632-2640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 12) · ×2
  • Duplicated block (8 lines × 12) REDACTED:3848 — REDACTED:3848-3855 | REDACTED:3864-3871 | REDACTED:3880-3887 | REDACTED:3896-3903 | src-tauri/src/commands/connection.rs:1923-1930 | src-tauri/src/commands/connection.rs:1951-1958 | src-tauri/src/commands/connection.rs:1968-1975 | src-tauri/src/commands/connection.rs:1985-1992 | src-tauri/src/commands/connection.rs:2509-2516 | src-tauri/src/commands/connection.rs:2535-2542 | src-tauri/src/commands/connection.rs:2551-2558 | src-tauri/src/commands/connection.rs:2567-2574 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3848` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 12) agents/drivers/argo-go/main.go:115 — agents/drivers/argo-go/main.go:115-122 | agents/drivers/cassandra-go/main.go:122-129 | agents/drivers/etcd-go/main.go:136-143 | agents/drivers/etcd2-go/main.go:106-113 | agents/drivers/hive-go/main.go:115-122 | agents/drivers/iotdb/main.go:119-126 | agents/drivers/kingbase-go/main.go:193-200 | agents/drivers/nebula-go/main.go:73-80 | agents/drivers/neo4j-go/main.go:143-150 | REDACTED:719-726 | agents/drivers/vastbase-go/main.go:189-196 | REDACTED:716-723 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:728` calls `closeAllSessions` and `agents/drivers/argo-go/main.go:123` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×2
  • Duplicated block (7–8 lines × 4) crates/dbx-driver-elasticsearch/src/lib.rs:2582 — crates/dbx-driver-elasticsearch/src/lib.rs:2582-2588 | crates/dbx-drivers/src/db/couchdb_driver.rs:627-634 | crates/dbx-drivers/src/db/solr_driver.rs:1004-1011 | crates/dbx-drivers/src/db/vector_driver.rs:978-985 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/couchdb_driver.rs:627` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 4) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503-509 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1764-1771 | REDACTED:4640-4646 | REDACTED:5570-5577 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×2
  • Duplicated block (6–8 lines × 2) REDACTED:2571 — REDACTED:2571-2578 | REDACTED:4853-4858 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2571` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `DuckDbImportContext` in one and `&DuckDbImportContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6–8 lines × 2) crates/dbx-formats/src/temporal_format.rs:237 — crates/dbx-formats/src/temporal_format.rs:237-244 | crates/dbx-formats/src/temporal_format.rs:266-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-formats/src/temporal_format.rs:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×2
  • Duplicated block (6–7 lines × 4) crates/dbx-core/src/connection/jdbc.rs:917 — crates/dbx-core/src/connection/jdbc.rs:917-923 | crates/dbx-core/src/connection/jdbc.rs:989-994 | crates/dbx-core/src/connection/jdbc.rs:1069-1074 | crates/dbx-plugin-runtime/src/plugins.rs:200-206 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/connection/jdbc.rs:917` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6–7 lines × 4) REDACTED:8538 — REDACTED:8538-8544 | REDACTED:8575-8581 | REDACTED:8633-8639 | REDACTED:8670-8675 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8538` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×2
  • Duplicated block (6 lines × 6) crates/dbx-core/src/query/redis_ops.rs:1015 — crates/dbx-core/src/query/redis_ops.rs:1015-1020 | crates/dbx-core/src/query/redis_ops.rs:1199-1204 | crates/dbx-core/src/query/redis_ops.rs:1249-1254 | crates/dbx-core/src/query/redis_ops.rs:1274-1279 | crates/dbx-core/src/query/redis_ops.rs:1380-1385 | crates/dbx-core/src/query/redis_ops.rs:1442-1447 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:1015` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 6) REDACTED:3414 — REDACTED:3414-3419 | REDACTED:3436-3441 | REDACTED:3481-3486 | REDACTED:5477-5482 | REDACTED:5492-5497 | REDACTED:5538-5543 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3414` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×2
  • Duplicated block (5–6 lines × 2) crates/dbx-core/src/schema/native_jobs/operations.rs:1020 — crates/dbx-core/src/schema/native_jobs/operations.rs:1020-1024 | crates/dbx-core/src/schema/native_jobs/operations.rs:1029-1034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/native_jobs/operations.rs:1029` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5–6 lines × 2) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858-863 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:916-920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×2
  • Duplicated block (6 lines × 8) crates/dbx-ai-provider/src/ai.rs:3893 — crates/dbx-ai-provider/src/ai.rs:3893-3898 | crates/dbx-ai-provider/src/ai.rs:4001-4006 | crates/dbx-ai-provider/src/ai.rs:4147-4152 | crates/dbx-ai-provider/src/ai.rs:4245-4250 | crates/dbx-ai-provider/src/ai.rs:4498-4503 | crates/dbx-ai-provider/src/ai.rs:4698-4703 | crates/dbx-ai-provider/src/ai.rs:4871-4876 | crates/dbx-ai-provider/src/ai.rs:5132-5137 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3893` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-ai-provider/src/ai.rs:4000` calls `minimax_stream_semantics` and `crates/dbx-ai-provider/src/ai.rs:3892` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 8) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-599 | REDACTED:3347-3352 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:503-508 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2090 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-536 | REDACTED:4640-4645 | REDACTED:5570-5576 | REDACTED:6169-6175 — there are 8 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×2
  • Duplicated block (4–5 lines × 4) crates/dbx-core/src/schema/mod.rs:10850 — crates/dbx-core/src/schema/mod.rs:10850-10853 | crates/dbx-core/src/schema/mod.rs:11080-11084 | crates/dbx-core/src/schema/mod.rs:11205-11209 | crates/dbx-core/src/schema/mod.rs:11224-11228 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/mod.rs:10850` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (4–5 lines × 4) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828-1831 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1901-1905 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2012-2016 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2398-2402 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×2
  • Duplicated block (4–5 lines × 3) crates/dbx-drivers/src/db/questdb.rs:54 — crates/dbx-drivers/src/db/questdb.rs:54-58 | crates/dbx-drivers/src/db/questdb.rs:85-89 | crates/dbx-drivers/src/db/questdb.rs:111-114 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/questdb.rs:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (4–5 lines × 3) REDACTED:2253 — REDACTED:2253-2256 | REDACTED:3869-3874 | REDACTED:3945-3949 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×2
  • Duplicated block (6 lines × 5) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:139 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:139-144 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:219-224 | crates/dbx-ai-provider/src/ai_codex_cli.rs:226-231 | crates/dbx-ai-provider/src/ai_grok_cli.rs:189-194 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:71-76 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:166 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:166-171 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:246-251 | crates/dbx-ai-provider/src/ai_codex_cli.rs:247-252 | crates/dbx-ai-provider/src/ai_grok_cli.rs:216-221 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:98-103 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–10 lines × 3) · ×2
  • Duplicated block (3–10 lines × 3) crates/dbx-web/src/routes/schema.rs:623 — crates/dbx-web/src/routes/schema.rs:623-625 | crates/dbx-web/src/routes/schema.rs:698-707 | crates/dbx-web/src/routes/schema.rs:783-792 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/schema.rs:623` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-web/src/routes/schema.rs:698` calls `external_doris_catalog`, `as_deref` and `crates/dbx-web/src/routes/schema.rs:623` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (3–10 lines × 3) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182-191 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:340-342 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:191-200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×2
  • Duplicated block (25 lines × 3) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:740 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:740-764 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:805-829 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:435-459 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:740` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 3) agents/drivers/cassandra-go/metadata.go:28 — agents/drivers/cassandra-go/metadata.go:28-52 | agents/drivers/iotdb/metadata.go:35-59 | agents/drivers/neo4j-go/metadata.go:30-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/metadata.go:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×2
  • Duplicated block (20–22 lines × 2) REDACTED:264 — REDACTED:264-285 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:385-404 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20–22 lines × 2) agents/drivers/etcd-go/watch.go:218 — agents/drivers/etcd-go/watch.go:218-237 | agents/drivers/etcd2-go/watch.go:213-234 — `agents/drivers/etcd-go/watch.go` and `agents/drivers/etcd2-go/watch.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 119 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/etcd-go/watch.go:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×2
  • Duplicated block (13 lines × 6) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:132 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:132-144 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:89-101 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:211-223 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:239-251 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:93-105 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:97-109 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:227` calls `resolveSchema` and `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:148` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 6) agents/drivers/argo-go/main.go:191 — agents/drivers/argo-go/main.go:191-203 | agents/drivers/cassandra-go/main.go:189-201 | agents/drivers/hive-go/main.go:191-203 | agents/drivers/iotdb/main.go:195-207 | agents/drivers/kingbase-go/main.go:259-271 | agents/drivers/neo4j-go/main.go:223-235 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6–8 lines × 4) · ×2
  • Duplicated block (6–8 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207-214 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:165-170 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:294-299 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:175-180 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–8 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206-213 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:164-169 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:308-313 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:174-179 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:261 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:261-272 | agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:300-311 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:172-183 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:242-253 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:281-292 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 5) agents/drivers/argo-go/main.go:226 — agents/drivers/argo-go/main.go:226-237 | agents/drivers/hive-go/main.go:226-237 | agents/drivers/iotdb/main.go:229-240 | agents/drivers/kingbase-go/main.go:288-299 | agents/drivers/neo4j-go/main.go:256-267 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:226` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (86 lines × 2) · ×2
  • Duplicated block (86 lines × 2) agents/drivers/argo-go/main.go:19 — agents/drivers/argo-go/main.go:19-104 | agents/drivers/hive-go/main.go:19-104 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (86 lines × 2) REDACTED:769 — REDACTED:769-854 | agents/drivers/vastbase-go/vastbase_metadata.go:594-679 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (73 lines × 2) · ×2
  • Duplicated block (73 lines × 2) agents/drivers/argo-go/config.go:68 — agents/drivers/argo-go/config.go:68-140 | agents/drivers/hive-go/config.go:71-143 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (73 lines × 2) agents/drivers/argo-go/bench/kdc_fixture/main.go:27 — agents/drivers/argo-go/bench/kdc_fixture/main.go:27-99 | agents/drivers/hive-go/bench/kdc_fixture/main.go:27-99 — before extracting anything, compare `agents/drivers/argo-go/bench/kdc_fixture/main.go` and `agents/drivers/hive-go/bench/kdc_fixture/main.go` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×2
  • Duplicated block (55 lines × 2) agents/drivers/argo-go/query.go:27 — agents/drivers/argo-go/query.go:27-81 | agents/drivers/hive-go/query.go:27-81 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (55 lines × 2) REDACTED:513 — REDACTED:513-567 | agents/drivers/vastbase-go/vastbase_metadata.go:342-396 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×2
  • Duplicated block (51 lines × 2) agents/drivers/argo-go/config.go:904 — agents/drivers/argo-go/config.go:904-954 | agents/drivers/hive-go/config.go:944-994 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (51 lines × 2) agents/drivers/etcd-go/main.go:200 — agents/drivers/etcd-go/main.go:200-250 | agents/drivers/etcd2-go/main.go:170-220 — `agents/drivers/etcd-go/main.go` and `agents/drivers/etcd2-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 287 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×2
  • Duplicated block (50 lines × 2) REDACTED:21 — REDACTED:21-70 | REDACTED:21-70 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 474 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (50 lines × 2) REDACTED:414 — REDACTED:414-463 | REDACTED:414-463 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×2
  • Duplicated block (18 lines × 4) agents/drivers/argo-go/main.go:202 — agents/drivers/argo-go/main.go:202-219 | agents/drivers/cassandra-go/main.go:200-217 | agents/drivers/hive-go/main.go:202-219 | agents/drivers/iotdb/main.go:206-223 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 4) agents/drivers/argo-go/main.go:451 — agents/drivers/argo-go/main.go:451-468 | agents/drivers/cassandra-go/main.go:379-396 | agents/drivers/hive-go/main.go:451-468 | agents/drivers/iotdb/main.go:372-389 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:451` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) agents/drivers/argo-go/main.go:419 — agents/drivers/argo-go/main.go:419-429 | agents/drivers/cassandra-go/main.go:349-359 | agents/drivers/hive-go/main.go:419-429 | agents/drivers/iotdb/main.go:352-362 | agents/drivers/kingbase-go/main.go:414-424 | agents/drivers/vastbase-go/main.go:429-439 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/cassandra-go/main.go:360` calls `listIndexes`, `stringParam` and `agents/drivers/argo-go/main.go:430` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 6) agents/drivers/argo-go/protocol_error.go:35 — agents/drivers/argo-go/protocol_error.go:35-45 | agents/drivers/cassandra-go/protocol_error.go:33-43 | agents/drivers/hive-go/protocol_error.go:35-45 | agents/drivers/iotdb/protocol_error.go:34-44 | agents/drivers/neo4j-go/protocol_error.go:38-48 | agents/drivers/vastbase-go/protocol_error.go:34-44 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/cassandra-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (11 lines × 7) · ×2
  • Duplicated block (11 lines × 7) agents/drivers/argo-go/main.go:213 — agents/drivers/argo-go/main.go:213-223 | agents/drivers/cassandra-go/main.go:211-221 | agents/drivers/hive-go/main.go:213-223 | agents/drivers/iotdb/main.go:217-227 | agents/drivers/kingbase-go/main.go:276-286 | agents/drivers/neo4j-go/main.go:244-254 | agents/drivers/vastbase-go/main.go:277-287 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 7) agents/drivers/argo-go/metadata.go:75 — agents/drivers/argo-go/metadata.go:75-85 | agents/drivers/cassandra-go/metadata.go:60-70 | agents/drivers/hive-go/metadata.go:75-85 | agents/drivers/iotdb/metadata.go:67-77 | REDACTED:174-184 | agents/drivers/vastbase-go/vastbase_metadata.go:100-110 | REDACTED:509-519 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking REDACTED:1829 — `enable_wal_mode` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking REDACTED:43 — `rmSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (73 matched lines × 2 locations) apps/desktop/src/lib/app/documentJsonValues.ts:306 — apps/desktop/src/lib/app/documentJsonValues.ts:306 · REDACTED:466 — the two spans are one implementation copied and then locally edited — 596 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (73 matched lines × 2 locations) apps/desktop/src/lib/metadata/objectDdlCache.ts:193 — apps/desktop/src/lib/metadata/objectDdlCache.ts:193 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:131 — the two spans are one implementation copied and then locally edited — 569 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (48 matched lines × 2 locations) apps/desktop/src/components/objects/ObjectBrowser.vue:5254 — apps/desktop/src/components/objects/ObjectBrowser.vue:5254 · apps/desktop/src/components/objects/ObjectSourceDialog.vue:277 — the two spans are one implementation copied and then locally edited — 282 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (48 matched lines × 2 locations) apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 — apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 · apps/desktop/src/components/sidebar/VisibleSchemasDialog.vue:33 — the two spans are one implementation copied and then locally edited — 334 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R7 · Dead Code · Dead file (~3 LoC) · ×2
  • Dead file (~3 LoC) deploy/database/mongodb/5.0/init/001-smoke.js — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~3 LoC) deploy/database/mongodb/8.2/init/001-smoke.js — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×2
  • JavaScript dependencies are not locked plugins/sdk/cli/templates/svelte/package.json:9 — plugins/sdk/cli/templates/svelte/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked vendor/tauri-plugin-updater/package.json:26 — vendor/tauri-plugin-updater/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×2
  • Length read from the parsed input is spent without ever being bounded crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:433 — `column_count` is read from the bytes being parsed at line 417 (`u32::from_be_bytes`), then used to size a `Vec::with_capacity` at line 433 — and nowhere in its scope is `column_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `column_count` against the bytes actually remaining and a maximum the format allows before allocating.
  • Length read from the parsed input is spent without ever being bounded REDACTED:3436 — `len` is read from the bytes being parsed at line 3434 (`u32::from_le_bytes`), then used to size a `vec![…; n]` at line 3436 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
AC3 · Page structure · Empty <h3> heading · ×1
  • Empty <h3> heading apps/desktop/src/components/diagram/DiagramInspector.vue:420 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 dbx-er-diagram-architecture.html:699 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus apps/desktop/src/components/ai/rich/AiHtmlPreview.vue:104 — This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.executeTabSql (cyclomatic 601) · ×1
  • queryStore.useQueryStore.executeTabSql (cyclomatic 601) apps/desktop/src/stores/queryStore.ts:8415 — queryStore.useQueryStore.executeTabSql has cyclomatic complexity 601 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql::bindLargeValueContext, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 310) · ×1
  • settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 310) apps/desktop/src/stores/settingsStore.ts:3117 — settingsStore.useSettingsStore.applyEditorSettingsPatch has cyclomatic complexity 310 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.fetchCapturedTabResultForExport (cyclomatic 186) · ×1
  • queryStore.useQueryStore.fetchCapturedTabResultForExport (cyclomatic 186) apps/desktop/src/stores/queryStore.ts:11358 — queryStore.useQueryStore.fetchCapturedTabResultForExport has cyclomatic complexity 186 (threshold 15). Of this number, 155 points are the body's own statements and 31 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugSelectNativeTarget (cyclomatic 178) · ×1
  • main.plDebugSelectNativeTarget (cyclomatic 178) agents/drivers/oracle-go/pldebug_target.go:492 — main.plDebugSelectNativeTarget has cyclomatic complexity 178 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginHostBridge.dispatch (cyclomatic 178) · ×1
  • PluginHostBridge.dispatch (cyclomatic 178) REDACTED:664 — PluginHostBridge.dispatch has cyclomatic complexity 178 (threshold 15). Of this number, 177 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.normalizeEditorSettings (cyclomatic 164) · ×1
  • settingsStore.normalizeEditorSettings (cyclomatic 164) apps/desktop/src/stores/settingsStore.ts:2081 — settingsStore.normalizeEditorSettings has cyclomatic complexity 164 (threshold 15). Of this number, 154 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cyclomatic 147) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cyclomatic 147) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1700 — useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult has cyclomatic complexity 147 (threshold 15). Of this number, 119 points are the body's own statements and 28 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.prepareOracleTypeManagement (cyclomatic 141) · ×1
  • oracleTypeManagement.prepareOracleTypeManagement (cyclomatic 141) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — oracleTypeManagement.prepareOracleTypeManagement has cyclomatic complexity 141 (threshold 15). Of this number, 118 points are the body's own statements and 23 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cyclomatic 134) · ×1
  • useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cyclomatic 134) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData has cyclomatic complexity 134 (threshold 15). Of this number, 106 points are the body's own statements and 28 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonRpcServer.dispatch (cyclomatic 133) · ×1
  • JsonRpcServer.dispatch (cyclomatic 133) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — JsonRpcServer.dispatch has cyclomatic complexity 133 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativePlan.render (cyclomatic 132) · ×1
  • plDebugNativePlan.render (cyclomatic 132) agents/drivers/oracle-go/pldebug_target_invoke.go:138 — plDebugNativePlan.render has cyclomatic complexity 132 (threshold 15). Of this number, 106 points are the body's own statements and 26 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.mutateNativeBreakpoint (cyclomatic 127) · ×1
  • plDebugNativeEntry.mutateNativeBreakpoint (cyclomatic 127) agents/drivers/oracle-go/pldebug_breakpoint_write.go:46 — plDebugNativeEntry.mutateNativeBreakpoint has cyclomatic complexity 127 (threshold 15). Of this number, 116 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cyclomatic 118) · ×1
  • useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cyclomatic 118) apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:93 — useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown has cyclomatic complexity 118 (threshold 15). Of this number, 17 points are the body's own statements and 101 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportLocalSnapshot (cyclomatic 118) · ×1
  • useDataGridExport.useDataGridExport.exportLocalSnapshot (cyclomatic 118) apps/desktop/src/composables/useDataGridExport.ts:1215 — useDataGridExport.useDataGridExport.exportLocalSnapshot has cyclomatic complexity 118 (threshold 15). Of this number, 48 points are the body's own statements and 70 belong to 13 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createMockHost (cyclomatic 117) · ×1
  • createMockHost (cyclomatic 117) plugins/sdk/dev-host/server.mjs:77 — createMockHost has cyclomatic complexity 117 (threshold 15). Of this number, 25 points are the body's own statements and 92 belong to 28 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.saveChanges (cyclomatic 114) · ×1
  • useDataGridEditor.useDataGridEditor.saveChanges (cyclomatic 114) apps/desktop/src/composables/useDataGridEditor.ts:2464 — useDataGridEditor.useDataGridEditor.saveChanges has cyclomatic complexity 114 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.splitSqlStatementRanges (cyclomatic 112) · ×1
  • sqlStatementRanges.splitSqlStatementRanges (cyclomatic 112) apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — sqlStatementRanges.splitSqlStatementRanges has cyclomatic complexity 112 (threshold 15). Of this number, 95 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineBlockLayout.indentRoutineBlocks (cyclomatic 108) · ×1
  • routineBlockLayout.indentRoutineBlocks (cyclomatic 108) apps/desktop/src/lib/sql/routineBlockLayout.ts:90 — routineBlockLayout.indentRoutineBlocks has cyclomatic complexity 108 (threshold 15). Of this number, 105 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTreeNodeChildren (cyclomatic 107) · ×1
  • connectionStore.useConnectionStore.loadTreeNodeChildren (cyclomatic 107) apps/desktop/src/stores/connectionStore.ts:8971 — connectionStore.useConnectionStore.loadTreeNodeChildren has cyclomatic complexity 107 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGenerate.buildDefaultGeneratorParams (cyclomatic 101) · ×1
  • dataGenerate.buildDefaultGeneratorParams (cyclomatic 101) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1343 — dataGenerate.buildDefaultGeneratorParams has cyclomatic complexity 101 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cyclomatic 99) · ×1
  • oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cyclomatic 99) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111 — oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot has cyclomatic complexity 99 (threshold 15). Of this number, 98 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.getSqlCompletionContext (cyclomatic 99) · ×1
  • sqlCompletion.getSqlCompletionContext (cyclomatic 99) apps/desktop/src/lib/sql/sqlCompletion.ts:3053 — sqlCompletion.getSqlCompletionContext has cyclomatic complexity 99 (threshold 15). Of this number, 98 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.parseColumn (cyclomatic 99) · ×1
  • tableColumnDefinitionPaste.parseColumn (cyclomatic 99) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156 — tableColumnDefinitionPaste.parseColumn has cyclomatic complexity 99 (threshold 15). Of this number, 86 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlCompletionProvider.build (cyclomatic 98) · ×1
  • SqlCompletionProvider.build (cyclomatic 98) apps/desktop/src/lib/sql/sqlCompletion.ts:2097 — SqlCompletionProvider.build has cyclomatic complexity 98 (threshold 15). Of this number, 92 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryResultTransferDdl.rewriteCreateTableName (cyclomatic 97) · ×1
  • queryResultTransferDdl.rewriteCreateTableName (cyclomatic 97) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:231 — queryResultTransferDdl.rewriteCreateTableName has cyclomatic complexity 97 (threshold 15). Of this number, 84 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugParseNativeConstructors (cyclomatic 95) · ×1
  • main.plDebugParseNativeConstructors (cyclomatic 95) agents/drivers/oracle-go/pldebug_object_constructors.go:270 — main.plDebugParseNativeConstructors has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.queryResultTransferTargetType (cyclomatic 95) · ×1
  • queryResultTransferValues.queryResultTransferTargetType (cyclomatic 95) apps/desktop/src/components/transfer/queryResultTransferValues.ts:158 — queryResultTransferValues.queryResultTransferTargetType has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.buildNativeJobDefinitionEdit (cyclomatic 95) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionEdit (cyclomatic 95) apps/desktop/src/lib/database/nativeJobAdmin.ts:147 — nativeJobAdmin.buildNativeJobDefinitionEdit has cyclomatic complexity 95 (threshold 15). Of this number, 78 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · treeNodeIcon.getTreeNodeIconInfo (cyclomatic 95) · ×1
  • treeNodeIcon.getTreeNodeIconInfo (cyclomatic 95) apps/desktop/src/lib/sidebar/treeNodeIcon.ts:10 — treeNodeIcon.getTreeNodeIconInfo has cyclomatic complexity 95 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.explainTabSql (cyclomatic 94) · ×1
  • queryStore.useQueryStore.explainTabSql (cyclomatic 94) apps/desktop/src/stores/queryStore.ts:10386 — queryStore.useQueryStore.explainTabSql has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cyclomatic 93) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cyclomatic 93) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:871 — useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions has cyclomatic complexity 93 (threshold 15). Of this number, 88 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.compressSqlText (cyclomatic 93) · ×1
  • sqlFormatter.compressSqlText (cyclomatic 93) apps/desktop/src/lib/sql/sqlFormatter.ts:982 — sqlFormatter.compressSqlText has cyclomatic complexity 93 (threshold 15). Of this number, 66 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.executeTargetSql (cyclomatic 92) · ×1
  • useSqlExecution.useSqlExecution.executeTargetSql (cyclomatic 92) apps/desktop/src/composables/useSqlExecution.ts:678 — useSqlExecution.useSqlExecution.executeTargetSql has cyclomatic complexity 92 (threshold 15). Of this number, 79 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlStatementSplitter · ×1
  • SqlStatementSplitter::push_chunk_with_control (cyclomatic 91) REDACTED:753 — SqlStatementSplitter::push_chunk_with_control has cyclomatic complexity 91 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cyclomatic 91) · ×1
  • connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cyclomatic 91) apps/desktop/src/stores/connectionStore.ts:7988 — connectionStore.useConnectionStore.loadMoreObjectGroupChildren has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 13 of the 91 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 8031, searchIsCurrent, a function literal at line 8053, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · oracleConstraints.executeOracleConstraintPlan (cyclomatic 90) · ×1
  • oracleConstraints.executeOracleConstraintPlan (cyclomatic 90) apps/desktop/src/lib/database/oracleConstraints.ts:720 — oracleConstraints.executeOracleConstraintPlan has cyclomatic complexity 90 (threshold 15). Of this number, 88 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksAlterOptions.starRocksAlterOptionsFromDdl (cyclomatic 90) · ×1
  • starrocksAlterOptions.starRocksAlterOptionsFromDdl (cyclomatic 90) apps/desktop/src/lib/table/starrocksAlterOptions.ts:45 — starrocksAlterOptions.starRocksAlterOptionsFromDdl has cyclomatic complexity 90 (threshold 15). Of this number, 62 points are the body's own statements and 28 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cyclomatic 87) · ×1
  • useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cyclomatic 87) apps/desktop/src/components/editor/useQueryEditorHover.ts:85 — useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip has cyclomatic complexity 87 (threshold 15). Of this number, 74 points are the body's own statements and 13 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLoadNativeTypeGraphOnLoader (cyclomatic 86) · ×1
  • main.plDebugLoadNativeTypeGraphOnLoader (cyclomatic 86) agents/drivers/oracle-go/pldebug_type_graph.go:323 — main.plDebugLoadNativeTypeGraphOnLoader has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.findSqlParameterOccurrences (cyclomatic 86) · ×1
  • sqlParameters.findSqlParameterOccurrences (cyclomatic 86) apps/desktop/src/lib/sql/sqlParameters.ts:429 — sqlParameters.findSqlParameterOccurrences has cyclomatic complexity 86 (threshold 15). Of this number, 84 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DriversClient.DriversClient (cyclomatic 86) · ×1
  • DriversClient.DriversClient (cyclomatic 86) docs/app/[lang]/drivers/DriversClient.tsx:216 — DriversClient.DriversClient has cyclomatic complexity 86 (threshold 15). Of this number, 49 points are the body's own statements and 37 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onReloadData (cyclomatic 85) · ×1
  • useDataGridActions.useDataGridActions.onReloadData (cyclomatic 85) apps/desktop/src/composables/useDataGridActions.ts:319 — useDataGridActions.useDataGridActions.onReloadData has cyclomatic complexity 85 (threshold 15). Of this number, 73 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.getFunctionDescriptions (cyclomatic 84) · ×1
  • sqlCompletion.getFunctionDescriptions (cyclomatic 84) apps/desktop/src/lib/sql/sqlCompletion.ts:1137 — sqlCompletion.getFunctionDescriptions has cyclomatic complexity 84 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTables (cyclomatic 83) · ×1
  • connectionStore.useConnectionStore.loadTables (cyclomatic 83) apps/desktop/src/stores/connectionStore.ts:7588 — connectionStore.useConnectionStore.loadTables has cyclomatic complexity 83 (threshold 15). Of this number, 19 points are the body's own statements and 64 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cyclomatic 82) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cyclomatic 82) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:67 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions has cyclomatic complexity 82 (threshold 15). Of this number, 26 points are the body's own statements and 56 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleForeignKeys.executeOracleForeignKeyPlan (cyclomatic 81) · ×1
  • oracleForeignKeys.executeOracleForeignKeyPlan (cyclomatic 81) apps/desktop/src/lib/database/oracleForeignKeys.ts:699 — oracleForeignKeys.executeOracleForeignKeyPlan has cyclomatic complexity 81 (threshold 15). Of this number, 73 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeDeclarations (cyclomatic 80) · ×1
  • main.plDebugNativeDeclarations (cyclomatic 80) agents/drivers/oracle-go/pldebug_variables.go:264 — main.plDebugNativeDeclarations has cyclomatic complexity 80 (threshold 15). Of this number, 76 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.applyCassandraURLParams (cyclomatic 79) · ×1
  • main.applyCassandraURLParams (cyclomatic 79) agents/drivers/cassandra-go/config.go:167 — main.applyCassandraURLParams has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugScanNativeRoutinesMode (cyclomatic 79) · ×1
  • main.plDebugScanNativeRoutinesMode (cyclomatic 79) agents/drivers/oracle-go/pldebug_routine.go:369 — main.plDebugScanNativeRoutinesMode has cyclomatic complexity 79 (threshold 15). Of this number, 19 points are the body's own statements and 60 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cyclomatic 78) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cyclomatic 78) apps/desktop/src/composables/useDataGridExport.ts:2013 — useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx has cyclomatic complexity 78 (threshold 15). Of this number, 17 points are the body's own statements and 61 belong to 16 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cyclomatic 78) · ×1
  • oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cyclomatic 78) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:260 — oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoWriteCommand (cyclomatic 78) · ×1
  • mongoShellCommand.parseMongoWriteCommand (cyclomatic 78) REDACTED:912 — mongoShellCommand.parseMongoWriteCommand has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.doExecute (cyclomatic 77) · ×1
  • useSqlExecution.useSqlExecution.doExecute (cyclomatic 77) apps/desktop/src/composables/useSqlExecution.ts:510 — useSqlExecution.useSqlExecution.doExecute has cyclomatic complexity 77 (threshold 15). Of this number, 74 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarActiveTabTarget.matchesTarget (cyclomatic 75) · ×1
  • sidebarActiveTabTarget.matchesTarget (cyclomatic 75) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:312 — sidebarActiveTabTarget.matchesTarget has cyclomatic complexity 75 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadObjectGroupFirstPage (cyclomatic 75) · ×1
  • connectionStore.useConnectionStore.loadObjectGroupFirstPage (cyclomatic 75) apps/desktop/src/stores/connectionStore.ts:7768 — connectionStore.useConnectionStore.loadObjectGroupFirstPage has cyclomatic complexity 75 (threshold 15). Of this number, 22 points are the body's own statements and 53 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Plan.read (cyclomatic 74) · ×1
  • Plan.read (cyclomatic 74) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:510 — Plan.read has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · openTabsPersistence.serializeOpenTabs (cyclomatic 74) · ×1
  • openTabsPersistence.serializeOpenTabs (cyclomatic 74) apps/desktop/src/lib/app/openTabsPersistence.ts:217 — openTabsPersistence.serializeOpenTabs has cyclomatic complexity 74 (threshold 15). Most of this is not in the body itself: 1 of the 74 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 218, 284). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · canvasDataGridRenderer.drawCanvasDataGrid (cyclomatic 73) · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid (cyclomatic 73) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:442 — canvasDataGridRenderer.drawCanvasDataGrid has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid::drawCell) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlFormatter.maskStringAndCommentSpans (cyclomatic 73) · ×1
  • sqlFormatter.maskStringAndCommentSpans (cyclomatic 73) apps/desktop/src/lib/sql/sqlFormatter.ts:613 — sqlFormatter.maskStringAndCommentSpans has cyclomatic complexity 73 (threshold 15). Of this number, 62 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.buildRequest (cyclomatic 72) · ×1
  • useDataGridExtractor.useDataGridExtractor.buildRequest (cyclomatic 72) apps/desktop/src/composables/useDataGridExtractor.ts:186 — useDataGridExtractor.useDataGridExtractor.buildRequest has cyclomatic complexity 72 (threshold 15). Of this number, 64 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryResultTransferValues.queryResultTransferSqlLiteral (cyclomatic 71) · ×1
  • queryResultTransferValues.queryResultTransferSqlLiteral (cyclomatic 71) apps/desktop/src/components/transfer/queryResultTransferValues.ts:412 — queryResultTransferValues.queryResultTransferSqlLiteral has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · canvasDataGridRenderer.drawCanvasDataGrid · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid::drawCell (cyclomatic 71) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:649 — canvasDataGridRenderer.drawCanvasDataGrid::drawCell has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · tabPresentation.tabDisplayTitle (cyclomatic 71) · ×1
  • tabPresentation.tabDisplayTitle (cyclomatic 71) apps/desktop/src/lib/tabs/tabPresentation.ts:311 — tabPresentation.tabDisplayTitle has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createMockHost.bridge (cyclomatic 71) · ×1
  • createMockHost.bridge (cyclomatic 71) plugins/sdk/dev-host/server.mjs:267 — createMockHost.bridge has cyclomatic complexity 71 (threshold 15). Of this number, 65 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryDataFile (cyclomatic 70) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryDataFile (cyclomatic 70) apps/desktop/src/composables/useDataGridExport.ts:1452 — useDataGridExport.useDataGridExport.exportMemoryDataFile has cyclomatic complexity 70 (threshold 15). Of this number, 35 points are the body's own statements and 35 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tokens.tokenizeSqlSemantic (cyclomatic 70) · ×1
  • tokens.tokenizeSqlSemantic (cyclomatic 70) apps/desktop/src/lib/sql/semantic/tokens.ts:104 — tokens.tokenizeSqlSemantic has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeNamedCall.result (cyclomatic 69) · ×1
  • plDebugNativeNamedCall.result (cyclomatic 69) agents/drivers/oracle-go/pldebug_target_invoke.go:734 — plDebugNativeNamedCall.result has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLoadNativeTargets (cyclomatic 68) · ×1
  • main.plDebugLoadNativeTargets (cyclomatic 68) agents/drivers/oracle-go/pldebug_target.go:304 — main.plDebugLoadNativeTargets has cyclomatic complexity 68 (threshold 15). Of this number, 20 points are the body's own statements and 48 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferSource.loadQueryResultTransferSourceDdl (cyclomatic 68) · ×1
  • queryResultTransferSource.loadQueryResultTransferSourceDdl (cyclomatic 68) apps/desktop/src/components/transfer/queryResultTransferSource.ts:23 — queryResultTransferSource.loadQueryResultTransferSourceDdl has cyclomatic complexity 68 (threshold 15). Of this number, 55 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useNavigationTargets.openTableTarget (cyclomatic 68) · ×1
  • useNavigationTargets.openTableTarget (cyclomatic 68) apps/desktop/src/composables/useNavigationTargets.ts:66 — useNavigationTargets.openTableTarget has cyclomatic complexity 68 (threshold 15). Of this number, 65 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSchemaDiffSession.runSchemaDiffSession (cyclomatic 68) · ×1
  • useSchemaDiffSession.runSchemaDiffSession (cyclomatic 68) apps/desktop/src/composables/useSchemaDiffSession.ts:164 — useSchemaDiffSession.runSchemaDiffSession has cyclomatic complexity 68 (threshold 15). Of this number, 64 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineRename.executeOracleRoutineRename (cyclomatic 68) · ×1
  • oracleRoutineRename.executeOracleRoutineRename (cyclomatic 68) apps/desktop/src/lib/table/oracleRoutineRename.ts:470 — oracleRoutineRename.executeOracleRoutineRename has cyclomatic complexity 68 (threshold 15). Of this number, 66 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createMockHost.bridge (cyclomatic 68) · ×1
  • server.createMockHost.bridge (cyclomatic 68) plugins/sdk/dev-host/server.mjs:267 — server.createMockHost.bridge has cyclomatic complexity 68 (threshold 15). Of this number, 62 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MysqlDumpBinaryLiteralNormalizer · ×1
  • MysqlDumpBinaryLiteralNormalizer::normalize (cyclomatic 67) REDACTED:1734 — MysqlDumpBinaryLiteralNormalizer::normalize has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.parse (cyclomatic 67) · ×1
  • PlDebugObjectConstructors.parse (cyclomatic 67) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:175 — PlDebugObjectConstructors.parse has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.prepareOracleTableRename (cyclomatic 66) · ×1
  • oracleTableRename.prepareOracleTableRename (cyclomatic 66) REDACTED:542 — oracleTableRename.prepareOracleTableRename has cyclomatic complexity 66 (threshold 15). Of this number, 55 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseTableClone.buildOceanbaseTableClone (cyclomatic 65) · ×1
  • oceanbaseTableClone.buildOceanbaseTableClone (cyclomatic 65) apps/desktop/src/lib/database/oceanbaseTableClone.ts:41 — oceanbaseTableClone.buildOceanbaseTableClone has cyclomatic complexity 65 (threshold 15). Of this number, 46 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.render (cyclomatic 64) · ×1
  • Plan.render (cyclomatic 64) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:262 — Plan.render has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cyclomatic 64) · ×1
  • useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cyclomatic 64) apps/desktop/src/composables/useDatabaseTableEmpty.ts:40 — useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables has cyclomatic complexity 64 (threshold 15). Of this number, 57 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleConstraints.readOracleConstraintSnapshot (cyclomatic 64) · ×1
  • oracleConstraints.readOracleConstraintSnapshot (cyclomatic 64) apps/desktop/src/lib/database/oracleConstraints.ts:274 — oracleConstraints.readOracleConstraintSnapshot has cyclomatic complexity 64 (threshold 15). Of this number, 53 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugComposite.compositeInputComplete (cyclomatic 64) · ×1
  • plDebugComposite.compositeInputComplete (cyclomatic 64) apps/desktop/src/lib/debug/plDebugComposite.ts:91 — plDebugComposite.compositeInputComplete has cyclomatic complexity 64 (threshold 15). Of this number, 43 points are the body's own statements and 21 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.validateOracleRoutineDeployment (cyclomatic 63) · ×1
  • oracleRoutineDeploy.validateOracleRoutineDeployment (cyclomatic 63) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:468 — oracleRoutineDeploy.validateOracleRoutineDeployment has cyclomatic complexity 63 (threshold 15). Of this number, 54 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsTransfer.parseSettingsTransferFile (cyclomatic 63) · ×1
  • settingsTransfer.parseSettingsTransferFile (cyclomatic 63) apps/desktop/src/lib/settings/settingsTransfer.ts:661 — settingsTransfer.parseSettingsTransferFile has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSource.rewriteOraclePackageSource (cyclomatic 63) · ×1
  • oraclePackageSource.rewriteOraclePackageSource (cyclomatic 63) apps/desktop/src/lib/table/oraclePackageSource.ts:103 — oraclePackageSource.rewriteOraclePackageSource has cyclomatic complexity 63 (threshold 15). Of this number, 57 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeRoutineHeaderMode (cyclomatic 62) · ×1
  • main.plDebugNativeRoutineHeaderMode (cyclomatic 62) agents/drivers/oracle-go/pldebug_routine.go:164 — main.plDebugNativeRoutineHeaderMode has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cyclomatic 62) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cyclomatic 62) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:357 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cyclomatic 62) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cyclomatic 62) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1282 — useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cyclomatic 62) · ×1
  • useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cyclomatic 62) apps/desktop/src/composables/useQuickOpen.ts:615 — useQuickOpen.useQuickOpen.processDatabaseTreeNodes has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrlBuilder.buildSpecialJdbcUrl (cyclomatic 62) · ×1
  • connectionUrlBuilder.buildSpecialJdbcUrl (cyclomatic 62) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:372 — connectionUrlBuilder.buildSpecialJdbcUrl has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphCompletion.getGraphCompletionContext (cyclomatic 62) · ×1
  • graphCompletion.getGraphCompletionContext (cyclomatic 62) apps/desktop/src/lib/graph/graphCompletion.ts:23 — graphCompletion.getGraphCompletionContext has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableImport.importDataTypeForDatabase (cyclomatic 62) · ×1
  • tableImport.importDataTypeForDatabase (cyclomatic 62) apps/desktop/src/lib/table/tableImport.ts:338 — tableImport.importDataTypeForDatabase has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCopyExtractor.normalizeDataGridExtractorOptions (cyclomatic 61) · ×1
  • dataGridCopyExtractor.normalizeDataGridExtractorOptions (cyclomatic 61) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:239 — dataGridCopyExtractor.normalizeDataGridExtractorOptions has cyclomatic complexity 61 (threshold 15). Of this number, 58 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableTree.buildGroupedObjectTreeNodes (cyclomatic 61) · ×1
  • tableTree.buildGroupedObjectTreeNodes (cyclomatic 61) apps/desktop/src/lib/table/tableTree.ts:1055 — tableTree.buildGroupedObjectTreeNodes has cyclomatic complexity 61 (threshold 15). Of this number, 23 points are the body's own statements and 38 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.resolve (cyclomatic 60) · ×1
  • PlDebugTarget.resolve (cyclomatic 60) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:803 — PlDebugTarget.resolve has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doltVersionControl.layoutDoltCommitGraph (cyclomatic 60) · ×1
  • doltVersionControl.layoutDoltCommitGraph (cyclomatic 60) apps/desktop/src/lib/dolt/doltVersionControl.ts:467 — doltVersionControl.layoutDoltCommitGraph has cyclomatic complexity 60 (threshold 15). Of this number, 39 points are the body's own statements and 21 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiff.convertToSchemaDiffObjects (cyclomatic 60) · ×1
  • schemaDiff.convertToSchemaDiffObjects (cyclomatic 60) apps/desktop/src/lib/schema/schemaDiff.ts:708 — schemaDiff.convertToSchemaDiffObjects has cyclomatic complexity 60 (threshold 15). Of this number, 49 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysqlRoutineVariables.collectMysqlRoutineVariables (cyclomatic 60) · ×1
  • mysqlRoutineVariables.collectMysqlRoutineVariables (cyclomatic 60) apps/desktop/src/lib/sql/mysqlRoutineVariables.ts:34 — mysqlRoutineVariables.collectMysqlRoutineVariables has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.executeOracleTableRename (cyclomatic 60) · ×1
  • oracleTableRename.executeOracleTableRename (cyclomatic 60) REDACTED:825 — oracleTableRename.executeOracleTableRename has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createMockHost.server (cyclomatic 60) · ×1
  • server.createMockHost.server (cyclomatic 60) plugins/sdk/dev-host/server.mjs:474 — server.createMockHost.server has cyclomatic complexity 60 (threshold 15). Of this number, 40 points are the body's own statements and 20 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handle (cyclomatic 59) · ×1
  • DbxJdbcPlugin.handle (cyclomatic 59) REDACTED:844 — DbxJdbcPlugin.handle has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · server.dispatch (cyclomatic 59) · ×1
  • server.dispatch (cyclomatic 59) REDACTED:1107 — server.dispatch has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.invalidateCompletionCache (cyclomatic 59) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionCache (cyclomatic 59) apps/desktop/src/stores/connectionStore.ts:4817 — connectionStore.useConnectionStore.invalidateCompletionCache has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.inspectNativeCurrentProgram (cyclomatic 58) · ×1
  • plDebugNativeEntry.inspectNativeCurrentProgram (cyclomatic 58) agents/drivers/oracle-go/pldebug_entry.go:85 — plDebugNativeEntry.inspectNativeCurrentProgram has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cyclomatic 58) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cyclomatic 58) apps/desktop/src/composables/useDataGridLargeValues.ts:292 — useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews has cyclomatic complexity 58 (threshold 15). Of this number, 57 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrl.parseConnectionUrl (cyclomatic 58) · ×1
  • connectionUrl.parseConnectionUrl (cyclomatic 58) REDACTED:776 — connectionUrl.parseConnectionUrl has cyclomatic complexity 58 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.start (cyclomatic 57) · ×1
  • plDebugNativeEntry.start (cyclomatic 57) agents/drivers/oracle-go/pldebug_manager.go:377 — plDebugNativeEntry.start has cyclomatic complexity 57 (threshold 15). Of this number, 53 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGenerate.generateValue (cyclomatic 57) · ×1
  • dataGenerate.generateValue (cyclomatic 57) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1701 — dataGenerate.generateValue has cyclomatic complexity 57 (threshold 15). Of this number, 56 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cyclomatic 57) · ×1
  • oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cyclomatic 57) apps/desktop/src/lib/database/oracleForeignKeys.ts:312 — oracleForeignKeys.readOracleForeignKeyReferenceSnapshot has cyclomatic complexity 57 (threshold 15). Of this number, 52 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeManagement.executeOracleTypeManagement (cyclomatic 57) · ×1
  • oracleTypeManagement.executeOracleTypeManagement (cyclomatic 57) apps/desktop/src/lib/table/oracleTypeManagement.ts:572 — oracleTypeManagement.executeOracleTypeManagement has cyclomatic complexity 57 (threshold 15). Of this number, 52 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cyclomatic 56) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cyclomatic 56) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:553 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData has cyclomatic complexity 56 (threshold 15). Of this number, 35 points are the body's own statements and 21 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadDatabases (cyclomatic 56) · ×1
  • connectionStore.useConnectionStore.loadDatabases (cyclomatic 56) apps/desktop/src/stores/connectionStore.ts:6373 — connectionStore.useConnectionStore.loadDatabases has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 6 of the 56 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6399, 6541). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadAllObjectGroupChildren (cyclomatic 56) · ×1
  • connectionStore.useConnectionStore.loadAllObjectGroupChildren (cyclomatic 56) apps/desktop/src/stores/connectionStore.ts:8362 — connectionStore.useConnectionStore.loadAllObjectGroupChildren has cyclomatic complexity 56 (threshold 15). Of this number, 43 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.publishSnapshot (cyclomatic 56) · ×1
  • plDebugStore.usePlDebugStore.publishSnapshot (cyclomatic 56) apps/desktop/src/stores/plDebugStore.ts:308 — plDebugStore.usePlDebugStore.publishSnapshot has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.dispatch (cyclomatic 55) · ×1
  • server.dispatch (cyclomatic 55) REDACTED:1051 — server.dispatch has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.diagnoseMongoCommand (cyclomatic 55) · ×1
  • mongoShellCommand.diagnoseMongoCommand (cyclomatic 55) REDACTED:132 — mongoShellCommand.diagnoseMongoCommand has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractSelectList (cyclomatic 55) · ×1
  • sqlCompletion.extractSelectList (cyclomatic 55) apps/desktop/src/lib/sql/sqlCompletion.ts:4438 — sqlCompletion.extractSelectList has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cyclomatic 54) · ×1
  • oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cyclomatic 54) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:33 — oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · installBridge (cyclomatic 54) · ×1
  • installBridge (cyclomatic 54) REDACTED:2 — installBridge has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 53 function items inside it that branch (a function literal at line 171, stream::start::onEvent, applyTheme, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · plDebugRecordDecoder.object (cyclomatic 53) · ×1
  • plDebugRecordDecoder.object (cyclomatic 53) agents/drivers/oracle-go/pldebug_object_input.go:37 — plDebugRecordDecoder.object has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.topLevelSoftStatementLineStarts (cyclomatic 53) · ×1
  • sqlStatementRanges.topLevelSoftStatementLineStarts (cyclomatic 53) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1212 — sqlStatementRanges.topLevelSoftStatementLineStarts has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.preparePastedRows (cyclomatic 53) · ×1
  • useDataGridEditor.useDataGridEditor.preparePastedRows (cyclomatic 53) apps/desktop/src/composables/useDataGridEditor.ts:1559 — useDataGridEditor.useDataGridEditor.preparePastedRows has cyclomatic complexity 53 (threshold 15). Of this number, 50 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aliasHighlights.sqlAliasHighlightGroups (cyclomatic 53) · ×1
  • aliasHighlights.sqlAliasHighlightGroups (cyclomatic 53) apps/desktop/src/lib/sql/semantic/aliasHighlights.ts:34 — aliasHighlights.sqlAliasHighlightGroups has cyclomatic complexity 53 (threshold 15). Of this number, 49 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cyclomatic 53) · ×1
  • sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cyclomatic 53) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:46 — sqlDatabaseLinks.collectSqlDatabaseLinkStarts has cyclomatic complexity 53 (threshold 15). Of this number, 46 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.scalarInput (cyclomatic 52) · ×1
  • PlDebugTarget.scalarInput (cyclomatic 52) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:986 — PlDebugTarget.scalarInput has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cyclomatic 52) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cyclomatic 52) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:694 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 6 of the 52 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 720, 744, 738, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tableSelectSql.qualifiedTableName (cyclomatic 52) · ×1
  • tableSelectSql.qualifiedTableName (cyclomatic 52) apps/desktop/src/lib/table/tableSelectSql.ts:209 — tableSelectSql.qualifiedTableName has cyclomatic complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Loader.load (cyclomatic 51) · ×1
  • Loader.load (cyclomatic 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:66 — Loader.load has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.resolveNativeNamedSources (cyclomatic 51) · ×1
  • plDebugNativeEntry.resolveNativeNamedSources (cyclomatic 51) agents/drivers/oracle-go/pldebug_source.go:126 — plDebugNativeEntry.resolveNativeNamedSources has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cyclomatic 51) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cyclomatic 51) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1448 — useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh has cyclomatic complexity 51 (threshold 15). Of this number, 40 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onPaginate (cyclomatic 51) · ×1
  • useDataGridActions.useDataGridActions.onPaginate (cyclomatic 51) apps/desktop/src/composables/useDataGridActions.ts:606 — useDataGridActions.useDataGridActions.onPaginate has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.ensureConnected (cyclomatic 51) · ×1
  • connectionStore.useConnectionStore.ensureConnected (cyclomatic 51) apps/desktop/src/stores/connectionStore.ts:5992 — connectionStore.useConnectionStore.ensureConnected has cyclomatic complexity 51 (threshold 15). Of this number, 33 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.prepareEditableQueryExecution (cyclomatic 51) · ×1
  • queryStore.useQueryStore.prepareEditableQueryExecution (cyclomatic 51) apps/desktop/src/stores/queryStore.ts:7739 — queryStore.useQueryStore.prepareEditableQueryExecution has cyclomatic complexity 51 (threshold 15). Of this number, 49 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StarRocksAlter · ×1
  • StarRocksAlter::build (cyclomatic 50) crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs:63 — StarRocksAlter::build has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeCallMatches (cyclomatic 50) · ×1
  • main.plDebugNativeCallMatches (cyclomatic 50) agents/drivers/oracle-go/pldebug_target.go:903 — main.plDebugNativeCallMatches has cyclomatic complexity 50 (threshold 15). Of this number, 44 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.prepareOracleTriggerPlan (cyclomatic 50) · ×1
  • oracleTriggerPlan.prepareOracleTriggerPlan (cyclomatic 50) apps/desktop/src/lib/database/oracleTriggerPlan.ts:166 — oracleTriggerPlan.prepareOracleTriggerPlan has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarActiveTabTarget.activeTabSidebarTarget (cyclomatic 50) · ×1
  • sidebarActiveTabTarget.activeTabSidebarTarget (cyclomatic 50) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:125 — sidebarActiveTabTarget.activeTabSidebarTarget has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.executeStatement (cyclomatic 49) · ×1
  • plDebugNativeEntry.executeStatement (cyclomatic 49) REDACTED:149 — plDebugNativeEntry.executeStatement has cyclomatic complexity 49 (threshold 15). Of this number, 28 points are the body's own statements and 21 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.readNativeValues (cyclomatic 49) · ×1
  • plDebugNativeEntry.readNativeValues (cyclomatic 49) agents/drivers/oracle-go/pldebug_frame_value.go:63 — plDebugNativeEntry.readNativeValues has cyclomatic complexity 49 (threshold 15). Of this number, 38 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.ordinaryProxyMessage (cyclomatic 49) · ×1
  • main.ordinaryProxyMessage (cyclomatic 49) agents/drivers/rocketmq/proxy.go:306 — main.ordinaryProxyMessage has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cellValueTransform.transformCellValue (cyclomatic 49) · ×1
  • cellValueTransform.transformCellValue (cyclomatic 49) apps/desktop/src/lib/dataGrid/cellValueTransform.ts:111 — cellValueTransform.transformCellValue has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysqlGeneratePartitions.constrainMysqlGenerateColumns (cyclomatic 49) · ×1
  • mysqlGeneratePartitions.constrainMysqlGenerateColumns (cyclomatic 49) apps/desktop/src/lib/dataGrid/mysqlGeneratePartitions.ts:28 — mysqlGeneratePartitions.constrainMysqlGenerateColumns has cyclomatic complexity 49 (threshold 15). Of this number, 40 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.scanMongoCallArguments (cyclomatic 49) · ×1
  • mongoCompletion.scanMongoCallArguments (cyclomatic 49) REDACTED:871 — mongoCompletion.scanMongoCallArguments has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiff.injectColumnRenameSql (cyclomatic 49) · ×1
  • schemaDiff.injectColumnRenameSql (cyclomatic 49) apps/desktop/src/lib/schema/schemaDiff.ts:1056 — schemaDiff.injectColumnRenameSql has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarTableNameCopy.qualifiedNameForSidebarNode (cyclomatic 49) · ×1
  • sidebarTableNameCopy.qualifiedNameForSidebarNode (cyclomatic 49) apps/desktop/src/lib/sidebar/sidebarTableNameCopy.ts:96 — sidebarTableNameCopy.qualifiedNameForSidebarNode has cyclomatic complexity 49 (threshold 15). Of this number, 46 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.parseTableColumnDefinitions (cyclomatic 49) · ×1
  • tableColumnDefinitionPaste.parseTableColumnDefinitions (cyclomatic 49) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:321 — tableColumnDefinitionPaste.parseTableColumnDefinitions has cyclomatic complexity 49 (threshold 15). Of this number, 38 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main (cyclomatic 49) · ×1
  • main (cyclomatic 49) REDACTED:593 — main has cyclomatic complexity 49 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · plDebugNativeEntry.nativeVariableNames (cyclomatic 48) · ×1
  • plDebugNativeEntry.nativeVariableNames (cyclomatic 48) agents/drivers/oracle-go/pldebug_variables.go:11 — plDebugNativeEntry.nativeVariableNames has cyclomatic complexity 48 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sqlStatementRanges.splitStatementRangeAtSoftStarts (cyclomatic 48) · ×1
  • sqlStatementRanges.splitStatementRangeAtSoftStarts (cyclomatic 48) apps/desktop/src/lib/sql/sqlStatementRanges.ts:868 — sqlStatementRanges.splitStatementRangeAtSoftStarts has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.oraclePlSqlBlockEnd (cyclomatic 48) · ×1
  • sqlStatementRanges.oraclePlSqlBlockEnd (cyclomatic 48) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2632 — sqlStatementRanges.oraclePlSqlBlockEnd has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisKeyTree.buildRedisKeySnapshotCooperatively (cyclomatic 48) · ×1
  • redisKeyTree.buildRedisKeySnapshotCooperatively (cyclomatic 48) apps/desktop/src/lib/redis/redisKeyTree.ts:333 — redisKeyTree.buildRedisKeySnapshotCooperatively has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.plDebugProbeOnConnection (cyclomatic 47) · ×1
  • server.plDebugProbeOnConnection (cyclomatic 47) agents/drivers/oracle-go/pldebug_probe.go:113 — server.plDebugProbeOnConnection has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.writeValue (cyclomatic 47) · ×1
  • plDebugNativeEntry.writeValue (cyclomatic 47) REDACTED:75 — plDebugNativeEntry.writeValue has cyclomatic complexity 47 (threshold 15). Of this number, 35 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · triggerToggleSql.buildTriggerToggleSql (cyclomatic 47) · ×1
  • triggerToggleSql.buildTriggerToggleSql (cyclomatic 47) apps/desktop/src/lib/database/triggerToggleSql.ts:29 — triggerToggleSql.buildTriggerToggleSql has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildObjectItems (cyclomatic 47) · ×1
  • sqlCompletion.buildObjectItems (cyclomatic 47) apps/desktop/src/lib/sql/sqlCompletion.ts:5319 — sqlCompletion.buildObjectItems has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5341, 5335). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settingsStore.normalizeMcpGlobalPolicy (cyclomatic 47) · ×1
  • settingsStore.normalizeMcpGlobalPolicy (cyclomatic 47) apps/desktop/src/stores/settingsStore.ts:212 — settingsStore.normalizeMcpGlobalPolicy has cyclomatic complexity 47 (threshold 15). Of this number, 18 points are the body's own statements and 29 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PlDebugSession.mutateBreakpoint (cyclomatic 46) · ×1
  • PlDebugSession.mutateBreakpoint (cyclomatic 46) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:788 — PlDebugSession.mutateBreakpoint has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cyclomatic 46) · ×1
  • useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cyclomatic 46) apps/desktop/src/composables/useDataGridExport.ts:2453 — useDataGridExport.useDataGridExport.exportFullTableDataViaBackend has cyclomatic complexity 46 (threshold 15). Of this number, 43 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · schemaDiff.setSchemaDiffObjectSelectedWithDependencies · ×1
  • schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply (cyclomatic 46) apps/desktop/src/lib/schema/schemaDiff.ts:1234 — schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.exportQuerySqlDirect (cyclomatic 46) · ×1
  • queryStore.useQueryStore.exportQuerySqlDirect (cyclomatic 46) apps/desktop/src/stores/queryStore.ts:11920 — queryStore.useQueryStore.exportQuerySqlDirect has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 11 of the 46 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 11998, assertQueuedSourceAvailable, startExport, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.child (cyclomatic 45) · ×1
  • PlDebugCompositeInput.child (cyclomatic 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:217 — PlDebugCompositeInput.child has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · main.applyJavaDriverHOCON (cyclomatic 45) · ×1
  • main.applyJavaDriverHOCON (cyclomatic 45) agents/drivers/cassandra-go/config_file.go:49 — main.applyJavaDriverHOCON has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.cleanup (cyclomatic 45) · ×1
  • plDebugNativeEntry.cleanup (cyclomatic 45) agents/drivers/oracle-go/pldebug_manager.go:930 — plDebugNativeEntry.cleanup has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cyclomatic 45) · ×1
  • useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cyclomatic 45) apps/desktop/src/composables/useDataGridExtractor.ts:452 — useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor has cyclomatic complexity 45 (threshold 15). Of this number, 41 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphCompletionScope.graphCompletionScope (cyclomatic 45) · ×1
  • graphCompletionScope.graphCompletionScope (cyclomatic 45) apps/desktop/src/lib/graph/graphCompletionScope.ts:41 — graphCompletionScope.graphCompletionScope has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandPreview.quoteRedisBytes (cyclomatic 45) · ×1
  • redisCommandPreview.quoteRedisBytes (cyclomatic 45) apps/desktop/src/lib/redis/redisCommandPreview.ts:67 — redisCommandPreview.quoteRedisBytes has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RedisKeyGroupIndex.project (cyclomatic 45) · ×1
  • RedisKeyGroupIndex.project (cyclomatic 45) apps/desktop/src/lib/redis/redisKeyGroupIndex.ts:124 — RedisKeyGroupIndex.project has cyclomatic complexity 45 (threshold 15). Of this number, 27 points are the body's own statements and 18 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlVariables.readValueEnd (cyclomatic 45) · ×1
  • sqlVariables.readValueEnd (cyclomatic 45) apps/desktop/src/lib/sql/sqlVariables.ts:175 — sqlVariables.readValueEnd has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionObjects (cyclomatic 45) · ×1
  • connectionStore.useConnectionStore.listCompletionObjects (cyclomatic 45) apps/desktop/src/stores/connectionStore.ts:10515 — connectionStore.useConnectionStore.listCompletionObjects has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 14 of the 45 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 10582, 10541). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · McpAccessPolicy · ×1
  • McpAccessPolicy::to_v1 (cyclomatic 44) crates/dbx-core/src/ai/mcp_access.rs:639 — McpAccessPolicy::to_v1 has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.tokens (cyclomatic 44) · ×1
  • PlDebugObjectConstructors.tokens (cyclomatic 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:298 — PlDebugObjectConstructors.tokens has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugCompositeOutputTypes (cyclomatic 44) · ×1
  • main.plDebugCompositeOutputTypes (cyclomatic 44) agents/drivers/oracle-go/pldebug_record_output.go:13 — main.plDebugCompositeOutputTypes has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.topLevelWordsInRange (cyclomatic 44) · ×1
  • sqlStatementRanges.topLevelWordsInRange (cyclomatic 44) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1469 — sqlStatementRanges.topLevelWordsInRange has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoFormatter.formatMongoShellText (cyclomatic 44) · ×1
  • mongoFormatter.formatMongoShellText (cyclomatic 44) apps/desktop/src/lib/mongo/mongoFormatter.ts:20 — mongoFormatter.formatMongoShellText has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoTopLevelCommandLineStarts (cyclomatic 44) · ×1
  • mongoShellCommand.mongoTopLevelCommandLineStarts (cyclomatic 44) REDACTED:1562 — mongoShellCommand.mongoTopLevelCommandLineStarts has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frontendPlugin.buildPluginConnectionConfig (cyclomatic 44) · ×1
  • frontendPlugin.buildPluginConnectionConfig (cyclomatic 44) apps/desktop/src/lib/plugins/frontendPlugin.ts:270 — frontendPlugin.buildPluginConnectionConfig has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · model.buildCursorIntent (cyclomatic 44) · ×1
  • model.buildCursorIntent (cyclomatic 44) apps/desktop/src/lib/sql/semantic/model.ts:988 — model.buildCursorIntent has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.getSqlLexicalContext (cyclomatic 44) · ×1
  • sqlCompletion.getSqlLexicalContext (cyclomatic 44) apps/desktop/src/lib/sql/sqlCompletion.ts:2562 — sqlCompletion.getSqlLexicalContext has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.restoreOracleTypeManagementDraft (cyclomatic 44) · ×1
  • oracleTypeManagement.restoreOracleTypeManagementDraft (cyclomatic 44) apps/desktop/src/lib/table/oracleTypeManagement.ts:706 — oracleTypeManagement.restoreOracleTypeManagementDraft has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cyclomatic 44) · ×1
  • queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cyclomatic 44) apps/desktop/src/stores/queryStore.ts:7435 — queryStore.useQueryStore.resolveEditableSourceMetadataTarget has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IssueSubmissionClient.IssueSubmissionClient (cyclomatic 44) · ×1
  • IssueSubmissionClient.IssueSubmissionClient (cyclomatic 44) docs/components/issues/IssueSubmissionClient.tsx:168 — IssueSubmissionClient.IssueSubmissionClient has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 11 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.createMockHost.api (cyclomatic 44) · ×1
  • server.createMockHost.api (cyclomatic 44) plugins/sdk/dev-host/server.mjs:374 — server.createMockHost.api has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createMockHost.api (cyclomatic 44) · ×1
  • createMockHost.api (cyclomatic 44) plugins/sdk/dev-host/server.mjs:374 — createMockHost.api has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 15 of the 44 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 392, 381, 446, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · main.readThriftValue (cyclomatic 43) · ×1
  • main.readThriftValue (cyclomatic 43) agents/drivers/rabbitmq/thrift_binary.go:171 — main.readThriftValue has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoSql.tokenize (cyclomatic 43) · ×1
  • mongoSql.tokenize (cyclomatic 43) apps/desktop/src/lib/mongo/mongoSql.ts:577 — mongoSql.tokenize has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarSearchTree.filterSidebarTreeWithMatcher (cyclomatic 43) · ×1
  • sidebarSearchTree.filterSidebarTreeWithMatcher (cyclomatic 43) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:486 — sidebarSearchTree.filterSidebarTreeWithMatcher has cyclomatic complexity 43 (threshold 15). Of this number, 37 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildColumnItems (cyclomatic 43) · ×1
  • sqlCompletion.buildColumnItems (cyclomatic 43) apps/desktop/src/lib/sql/sqlCompletion.ts:6141 — sqlCompletion.buildColumnItems has cyclomatic complexity 43 (threshold 15). Of this number, 29 points are the body's own statements and 14 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineRename.verifyBeforeDrop (cyclomatic 43) · ×1
  • oracleRoutineRename.verifyBeforeDrop (cyclomatic 43) apps/desktop/src/lib/table/oracleRoutineRename.ts:614 — oracleRoutineRename.verifyBeforeDrop has cyclomatic complexity 43 (threshold 15). Of this number, 34 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.refreshDataTabInternal (cyclomatic 43) · ×1
  • queryStore.useQueryStore.refreshDataTabInternal (cyclomatic 43) apps/desktop/src/stores/queryStore.ts:5930 — queryStore.useQueryStore.refreshDataTabInternal has cyclomatic complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TableRestoreFilter · ×1
  • TableRestoreFilter::classify (cyclomatic 42) REDACTED:67 — TableRestoreFilter::classify has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DdlBuilder.buildTableDdl (cyclomatic 42) · ×1
  • DdlBuilder.buildTableDdl (cyclomatic 42) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:94 — DdlBuilder.buildTableDdl has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.runDebuggeeTarget (cyclomatic 42) · ×1
  • PlDebugSession.runDebuggeeTarget (cyclomatic 42) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2284 — PlDebugSession.runDebuggeeTarget has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.dispatch (cyclomatic 42) · ×1
  • server.dispatch (cyclomatic 42) agents/drivers/kingbase-go/main.go:372 — server.dispatch has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · documentStoreProvider.buildDocumentFilterCondition (cyclomatic 42) · ×1
  • documentStoreProvider.buildDocumentFilterCondition (cyclomatic 42) apps/desktop/src/lib/app/documentStoreProvider.ts:560 — documentStoreProvider.buildDocumentFilterCondition has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarMenuLayout.buildSidebarMenuLayout (cyclomatic 42) · ×1
  • sidebarMenuLayout.buildSidebarMenuLayout (cyclomatic 42) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:177 — sidebarMenuLayout.buildSidebarMenuLayout has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.currentLineBlockEnd (cyclomatic 42) · ×1
  • sqlCompletion.currentLineBlockEnd (cyclomatic 42) apps/desktop/src/lib/sql/sqlCompletion.ts:2816 — sqlCompletion.currentLineBlockEnd has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksDdlDisplay.formatStarRocksDdlForDisplay (cyclomatic 42) · ×1
  • starrocksDdlDisplay.formatStarRocksDdlForDisplay (cyclomatic 42) apps/desktop/src/lib/sql/starrocksDdlDisplay.ts:75 — starrocksDdlDisplay.formatStarRocksDdlForDisplay has cyclomatic complexity 42 (threshold 15). Of this number, 27 points are the body's own statements and 15 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.buildQueryMetadataPatch (cyclomatic 42) · ×1
  • queryStore.useQueryStore.buildQueryMetadataPatch (cyclomatic 42) apps/desktop/src/stores/queryStore.ts:7971 — queryStore.useQueryStore.buildQueryMetadataPatch has cyclomatic complexity 42 (threshold 15). Of this number, 35 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginDetailClient.PluginDetailClient (cyclomatic 42) · ×1
  • PluginDetailClient.PluginDetailClient (cyclomatic 42) docs/app/[lang]/plugins/[id]/PluginDetailClient.tsx:107 — PluginDetailClient.PluginDetailClient has cyclomatic complexity 42 (threshold 15). Of this number, 22 points are the body's own statements and 20 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.temporal (cyclomatic 41) · ×1
  • PlDebugTemporalJson.temporal (cyclomatic 41) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:145 — PlDebugTemporalJson.temporal has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugCollectionInitializer.collection (cyclomatic 41) · ×1
  • plDebugCollectionInitializer.collection (cyclomatic 41) agents/drivers/oracle-go/pldebug_collection_initialize.go:60 — plDebugCollectionInitializer.collection has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativePlan.bind (cyclomatic 41) · ×1
  • plDebugNativePlan.bind (cyclomatic 41) agents/drivers/oracle-go/pldebug_target_invoke.go:521 — plDebugNativePlan.bind has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseWKBGeometry (cyclomatic 41) · ×1
  • main.parseWKBGeometry (cyclomatic 41) agents/drivers/vastbase-go/spatial.go:413 — main.parseWKBGeometry has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cyclomatic 41) · ×1
  • useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cyclomatic 41) apps/desktop/src/composables/useDataGridActions.ts:176 — useDataGridActions.useDataGridActions.refreshDataTabTableMeta has cyclomatic complexity 41 (threshold 15). Of this number, 23 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai.buildAiContext (cyclomatic 41) · ×1
  • ai.buildAiContext (cyclomatic 41) apps/desktop/src/lib/ai/ai.ts:906 — ai.buildAiContext has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columnFormatter.normalizeColumnFormatter (cyclomatic 41) · ×1
  • columnFormatter.normalizeColumnFormatter (cyclomatic 41) apps/desktop/src/lib/dataGrid/columnFormatter.ts:235 — columnFormatter.normalizeColumnFormatter has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridContextMenu.createDataGridColumnContextMenuItems (cyclomatic 41) · ×1
  • dataGridContextMenu.createDataGridColumnContextMenuItems (cyclomatic 41) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:116 — dataGridContextMenu.createDataGridColumnContextMenuItems has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridPaintTheme.resolveDataGridPaintTheme (cyclomatic 41) · ×1
  • dataGridPaintTheme.resolveDataGridPaintTheme (cyclomatic 41) apps/desktop/src/lib/dataGrid/dataGridPaintTheme.ts:270 — dataGridPaintTheme.resolveDataGridPaintTheme has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleForeignKeys.parseOracleForeignKeyDdl (cyclomatic 41) · ×1
  • oracleForeignKeys.parseOracleForeignKeyDdl (cyclomatic 41) apps/desktop/src/lib/database/oracleForeignKeys.ts:26 — oracleForeignKeys.parseOracleForeignKeyDdl has cyclomatic complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoSql.compileSelect (cyclomatic 41) · ×1
  • mongoSql.compileSelect (cyclomatic 41) apps/desktop/src/lib/mongo/mongoSql.ts:671 — mongoSql.compileSelect has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.acceptOraclePackageTransferApproval (cyclomatic 41) · ×1
  • oracleRoutineDeploy.acceptOraclePackageTransferApproval (cyclomatic 41) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:373 — oracleRoutineDeploy.acceptOraclePackageTransferApproval has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · printer.printRuleElement (cyclomatic 41) · ×1
  • printer.printRuleElement (cyclomatic 41) apps/desktop/src/lib/sql/layout/printer.ts:254 — printer.printRuleElement has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · completion.sqlCompletionContextFromSemantic (cyclomatic 41) · ×1
  • completion.sqlCompletionContextFromSemantic (cyclomatic 41) apps/desktop/src/lib/sql/semantic/completion.ts:338 — completion.sqlCompletionContextFromSemantic has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · objectSourceTabSave.saveObjectSourceTab (cyclomatic 41) · ×1
  • objectSourceTabSave.saveObjectSourceTab (cyclomatic 41) apps/desktop/src/lib/table/objectSourceTabSave.ts:18 — objectSourceTabSave.saveObjectSourceTab has cyclomatic complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableTree.buildSimpleObjectTreeNodes (cyclomatic 41) · ×1
  • tableTree.buildSimpleObjectTreeNodes (cyclomatic 41) apps/desktop/src/lib/table/tableTree.ts:741 — tableTree.buildSimpleObjectTreeNodes has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.recover (cyclomatic 41) · ×1
  • plDebugStore.usePlDebugStore.recover (cyclomatic 41) apps/desktop/src/stores/plDebugStore.ts:642 — plDebugStore.usePlDebugStore.recover has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 10 of the 41 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 650, isCurrent, a function literal at line 660, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · EwkbWktDecoder.parseGeometry (cyclomatic 40) · ×1
  • EwkbWktDecoder.parseGeometry (cyclomatic 40) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:300 — EwkbWktDecoder.parseGeometry has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeMapStack (cyclomatic 40) · ×1
  • main.plDebugNativeMapStack (cyclomatic 40) agents/drivers/oracle-go/pldebug_stack.go:111 — main.plDebugNativeMapStack has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.readExactTriggerRows (cyclomatic 40) · ×1
  • server.readExactTriggerRows (cyclomatic 40) agents/drivers/oracle-go/trigger_metadata.go:133 — server.readExactTriggerRows has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.applyNativeBreakpointRules (cyclomatic 40) · ×1
  • plDebugNativeEntry.applyNativeBreakpointRules (cyclomatic 40) agents/drivers/oracle-go/pldebug_breakpoint_rules.go:37 — plDebugNativeEntry.applyNativeBreakpointRules has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cyclomatic 40) · ×1
  • useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cyclomatic 40) apps/desktop/src/composables/useDataGridExport.ts:2708 — useDataGridExport.useDataGridExport.exportQueryResultViaBackend has cyclomatic complexity 40 (threshold 15). Of this number, 35 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · datagripImport.parseJdbcUrl (cyclomatic 40) · ×1
  • datagripImport.parseJdbcUrl (cyclomatic 40) REDACTED:135 — datagripImport.parseJdbcUrl has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listObjects (cyclomatic 39) · ×1
  • DbxJdbcPlugin.listObjects (cyclomatic 39) REDACTED:3229 — DbxJdbcPlugin.listObjects has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeRoutineParamMode (cyclomatic 39) · ×1
  • main.plDebugNativeRoutineParamMode (cyclomatic 39) agents/drivers/oracle-go/pldebug_routine.go:283 — main.plDebugNativeRoutineParamMode has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugBuildNativeTypedSignaturePrepared (cyclomatic 39) · ×1
  • main.plDebugBuildNativeTypedSignaturePrepared (cyclomatic 39) agents/drivers/oracle-go/pldebug_typed_signature.go:144 — main.plDebugBuildNativeTypedSignaturePrepared has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.nativeExternalPackageVariableNames (cyclomatic 39) · ×1
  • plDebugNativeEntry.nativeExternalPackageVariableNames (cyclomatic 39) agents/drivers/oracle-go/pldebug_variables.go:132 — plDebugNativeEntry.nativeExternalPackageVariableNames has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.commitEdit (cyclomatic 39) · ×1
  • useDataGridEditor.useDataGridEditor.commitEdit (cyclomatic 39) apps/desktop/src/composables/useDataGridEditor.ts:1122 — useDataGridEditor.useDataGridEditor.commitEdit has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionDeepLink.kafkaConnectionDraft (cyclomatic 39) · ×1
  • connectionDeepLink.kafkaConnectionDraft (cyclomatic 39) REDACTED:306 — connectionDeepLink.kafkaConnectionDraft has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoCompletion.classifyStageOptions (cyclomatic 39) · ×1
  • mongoCompletion.classifyStageOptions (cyclomatic 39) REDACTED:1644 — mongoCompletion.classifyStageOptions has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ddlDisplay.collectDdlStatementNameTargets (cyclomatic 39) · ×1
  • ddlDisplay.collectDdlStatementNameTargets (cyclomatic 39) apps/desktop/src/lib/sql/ddlDisplay.ts:208 — ddlDisplay.collectDdlStatementNameTargets has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · insertValueHints.selectProjectionStarts (cyclomatic 39) · ×1
  • insertValueHints.selectProjectionStarts (cyclomatic 39) apps/desktop/src/lib/sql/insertValueHints.ts:222 — insertValueHints.selectProjectionStarts has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runStep (cyclomatic 39) · ×1
  • runStep (cyclomatic 39) REDACTED:482 — runStep has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.setBreakpoints (cyclomatic 38) · ×1
  • PlDebugSession.setBreakpoints (cyclomatic 38) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:893 — PlDebugSession.setBreakpoints has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.buildCustomTypeDDL (cyclomatic 38) · ×1
  • server.buildCustomTypeDDL (cyclomatic 38) REDACTED:1093 — server.buildCustomTypeDDL has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeSourceTokens (cyclomatic 38) · ×1
  • main.plDebugNativeSourceTokens (cyclomatic 38) agents/drivers/oracle-go/pldebug_routine.go:21 — main.plDebugNativeSourceTokens has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.buildCustomTypeDDL (cyclomatic 38) · ×1
  • main.buildCustomTypeDDL (cyclomatic 38) agents/drivers/vastbase-go/vastbase_metadata.go:918 — main.buildCustomTypeDDL has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.trimRangeEndBeforeNextBoundary (cyclomatic 38) · ×1
  • sqlStatementRanges.trimRangeEndBeforeNextBoundary (cyclomatic 38) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1923 — sqlStatementRanges.trimRangeEndBeforeNextBoundary has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGenerate.findGeneratorKey (cyclomatic 38) · ×1
  • dataGenerate.findGeneratorKey (cyclomatic 38) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1273 — dataGenerate.findGeneratorKey has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleViewRename.prepareOracleViewRename (cyclomatic 38) · ×1
  • oracleViewRename.prepareOracleViewRename (cyclomatic 38) apps/desktop/src/lib/table/oracleViewRename.ts:128 — oracleViewRename.prepareOracleViewRename has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.refreshTreeNode (cyclomatic 38) · ×1
  • connectionStore.useConnectionStore.refreshTreeNode (cyclomatic 38) apps/desktop/src/stores/connectionStore.ts:9091 — connectionStore.useConnectionStore.refreshTreeNode has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.persistTypeManagementDraft (cyclomatic 38) · ×1
  • queryStore.useQueryStore.persistTypeManagementDraft (cyclomatic 38) apps/desktop/src/stores/queryStore.ts:3068 — queryStore.useQueryStore.persistTypeManagementDraft has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.countQueryTotalRowsInBackground (cyclomatic 38) · ×1
  • queryStore.useQueryStore.countQueryTotalRowsInBackground (cyclomatic 38) apps/desktop/src/stores/queryStore.ts:8243 — queryStore.useQueryStore.countQueryTotalRowsInBackground has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 8290, clearPendingCount). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · startDevelopment (cyclomatic 38) · ×1
  • startDevelopment (cyclomatic 38) plugins/sdk/dev-host/runtime.mjs:39 — startDevelopment has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 13 of the 38 points are its own statements and the rest belongs to 20 function items inside it that branch (spawnCommand, a function literal at line 131, run, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · etcdSession.history (cyclomatic 37) · ×1
  • etcdSession.history (cyclomatic 37) agents/drivers/etcd-go/history.go:39 — etcdSession.history has cyclomatic complexity 37 (threshold 15). Of this number, 22 points are the body's own statements and 15 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyArgumentTree (cyclomatic 37) · ×1
  • main.plDebugLegacyArgumentTree (cyclomatic 37) agents/drivers/oracle-go/pldebug_legacy_arguments.go:30 — main.plDebugLegacyArgumentTree has cyclomatic complexity 37 (threshold 15). Of this number, 26 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listConstraintsWithIdentity (cyclomatic 37) · ×1
  • server.listConstraintsWithIdentity (cyclomatic 37) REDACTED:3380 — server.listConstraintsWithIdentity has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.checkUpdates (cyclomatic 37) · ×1
  • useAppUpdater.useAppUpdater.checkUpdates (cyclomatic 37) apps/desktop/src/composables/useAppUpdater.ts:305 — useAppUpdater.useAppUpdater.checkUpdates has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor (cyclomatic 37) · ×1
  • useDataGridEditor.useDataGridEditor (cyclomatic 37) apps/desktop/src/composables/useDataGridEditor.ts:394 — useDataGridEditor.useDataGridEditor has cyclomatic complexity 37 (threshold 15). Of this number, 22 points are the body's own statements and 15 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.applyCellValueToItem (cyclomatic 37) · ×1
  • useDataGridEditor.useDataGridEditor.applyCellValueToItem (cyclomatic 37) apps/desktop/src/composables/useDataGridEditor.ts:1247 — useDataGridEditor.useDataGridEditor.applyCellValueToItem has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useExportTracker.useExportTracker.updateDataTransferTask (cyclomatic 37) · ×1
  • useExportTracker.useExportTracker.updateDataTransferTask (cyclomatic 37) apps/desktop/src/composables/useExportTracker.ts:931 — useExportTracker.useExportTracker.updateDataTransferTask has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridExecutedQuery.dataGridExecutedQueryConditions (cyclomatic 37) · ×1
  • dataGridExecutedQuery.dataGridExecutedQueryConditions (cyclomatic 37) apps/desktop/src/lib/dataGrid/dataGridExecutedQuery.ts:7 — dataGridExecutedQuery.dataGridExecutedQueryConditions has cyclomatic complexity 37 (threshold 15). Of this number, 32 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.parseEscape (cyclomatic 37) · ×1
  • regexGenerate.parseEscape (cyclomatic 37) REDACTED:123 — regexGenerate.parseEscape has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobs.rebaseNativeJobDamengDraft (cyclomatic 37) · ×1
  • nativeJobs.rebaseNativeJobDamengDraft (cyclomatic 37) apps/desktop/src/lib/database/nativeJobs.ts:458 — nativeJobs.rebaseNativeJobDamengDraft has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.parseOracleCachedPlan (cyclomatic 37) · ×1
  • oracleSessionDiagnostics.parseOracleCachedPlan (cyclomatic 37) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:163 — oracleSessionDiagnostics.parseOracleCachedPlan has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.verifyStep (cyclomatic 37) · ×1
  • oracleTriggerPlan.verifyStep (cyclomatic 37) apps/desktop/src/lib/database/oracleTriggerPlan.ts:669 — oracleTriggerPlan.verifyStep has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.buildQualifierActions (cyclomatic 37) · ×1
  • sqlIntentionActions.buildQualifierActions (cyclomatic 37) apps/desktop/src/lib/editor/sqlIntentionActions.ts:562 — sqlIntentionActions.buildQualifierActions has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · kvValueFormat.validateKvValue (cyclomatic 37) · ×1
  • kvValueFormat.validateKvValue (cyclomatic 37) apps/desktop/src/lib/kv/kvValueFormat.ts:33 — kvValueFormat.validateKvValue has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.formatSqlText (cyclomatic 37) · ×1
  • sqlFormatter.formatSqlText (cyclomatic 37) apps/desktop/src/lib/sql/sqlFormatter.ts:457 — sqlFormatter.formatSqlText has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.normalizeConnection (cyclomatic 37) · ×1
  • connectionStore.useConnectionStore.normalizeConnection (cyclomatic 37) apps/desktop/src/stores/connectionStore.ts:1827 — connectionStore.useConnectionStore.normalizeConnection has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionColumns (cyclomatic 37) · ×1
  • connectionStore.useConnectionStore.listCompletionColumns (cyclomatic 37) apps/desktop/src/stores/connectionStore.ts:10676 — connectionStore.useConnectionStore.listCompletionColumns has cyclomatic complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.runOracleTriggerSourceAction (cyclomatic 37) · ×1
  • queryStore.useQueryStore.runOracleTriggerSourceAction (cyclomatic 37) apps/desktop/src/stores/queryStore.ts:3547 — queryStore.useQueryStore.runOracleTriggerSourceAction has cyclomatic complexity 37 (threshold 15). Of this number, 24 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · codeContext (cyclomatic 37) · ×1
  • codeContext (cyclomatic 37) REDACTED:164 — codeContext has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body's own statements and 8 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.sqlRequiresSessionAffinity (cyclomatic 36) · ×1
  • main.sqlRequiresSessionAffinity (cyclomatic 36) agents/drivers/vastbase-go/connection_state.go:47 — main.sqlRequiresSessionAffinity has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.parseExplainLikePrefixAt (cyclomatic 36) · ×1
  • sqlStatementRanges.parseExplainLikePrefixAt (cyclomatic 36) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1699 — sqlStatementRanges.parseExplainLikePrefixAt has cyclomatic complexity 36 (threshold 15). Of this number, 31 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridInsertPaste.splitTopLevelStatements (cyclomatic 36) · ×1
  • dataGridInsertPaste.splitTopLevelStatements (cyclomatic 36) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:26 — dataGridInsertPaste.splitTopLevelStatements has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · db2ExplainPlan.parseDb2ExplainText (cyclomatic 36) · ×1
  • db2ExplainPlan.parseDb2ExplainText (cyclomatic 36) apps/desktop/src/lib/diagram/db2ExplainPlan.ts:50 — db2ExplainPlan.parseDb2ExplainText has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cyclomatic 36) · ×1
  • queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cyclomatic 36) apps/desktop/src/lib/editor/queryEditorNativeSelection.ts:536 — queryEditorNativeSelection.createQueryEditorNativeSelectionGuard has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 627, 645, 582, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · cypherReadOnly.isProvenReadOnlyCypher (cyclomatic 36) · ×1
  • cypherReadOnly.isProvenReadOnlyCypher (cyclomatic 36) apps/desktop/src/lib/sql/cypherReadOnly.ts:4 — cypherReadOnly.isProvenReadOnlyCypher has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.protectDuckDbPrefixAliasSeparators (cyclomatic 36) · ×1
  • sqlFormatter.protectDuckDbPrefixAliasSeparators (cyclomatic 36) apps/desktop/src/lib/sql/sqlFormatter.ts:336 — sqlFormatter.protectDuckDbPrefixAliasSeparators has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.readValue (cyclomatic 35) · ×1
  • DbxJdbcPlugin.readValue (cyclomatic 35) REDACTED:6283 — DbxJdbcPlugin.readValue has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.oracleUniqueIndexMetadata (cyclomatic 35) · ×1
  • server.oracleUniqueIndexMetadata (cyclomatic 35) REDACTED:3515 — server.oracleUniqueIndexMetadata has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugNativeEntry.snapshotLocked (cyclomatic 35) · ×1
  • plDebugNativeEntry.snapshotLocked (cyclomatic 35) agents/drivers/oracle-go/pldebug_manager.go:274 — plDebugNativeEntry.snapshotLocked has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cyclomatic 35) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cyclomatic 35) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:578 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferDdl.temporalColumnTypesFromDdl (cyclomatic 35) · ×1
  • queryResultTransferDdl.temporalColumnTypesFromDdl (cyclomatic 35) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:90 — queryResultTransferDdl.temporalColumnTypesFromDdl has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · openTabsPersistence.restoreOpenTabsArray (cyclomatic 35) · ×1
  • openTabsPersistence.restoreOpenTabsArray (cyclomatic 35) apps/desktop/src/lib/app/openTabsPersistence.ts:318 — openTabsPersistence.restoreOpenTabsArray has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 7 of the 35 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 325, 341, 345). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · errorUtils.isBackendError (cyclomatic 35) · ×1
  • errorUtils.isBackendError (cyclomatic 35) apps/desktop/src/lib/backend/errorUtils.ts:129 — errorUtils.isBackendError has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dbAdminSql.buildDuplicateTableStructurePlan (cyclomatic 35) · ×1
  • dbAdminSql.buildDuplicateTableStructurePlan (cyclomatic 35) apps/desktop/src/lib/database/dbAdminSql.ts:263 — dbAdminSql.buildDuplicateTableStructurePlan has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleConstraints.constraintRecoveryCandidate (cyclomatic 35) · ×1
  • oracleConstraints.constraintRecoveryCandidate (cyclomatic 35) apps/desktop/src/lib/database/oracleConstraints.ts:427 — oracleConstraints.constraintRecoveryCandidate has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cyclomatic 35) · ×1
  • codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cyclomatic 35) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:381 — codemirrorSqlDialect.createDbxCodeMirrorSqlDialect has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · navicatImport.parseConnection (cyclomatic 35) · ×1
  • navicatImport.parseConnection (cyclomatic 35) REDACTED:283 — navicatImport.parseConnection has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cypherFormatter.needsSpace (cyclomatic 35) · ×1
  • cypherFormatter.needsSpace (cyclomatic 35) apps/desktop/src/lib/sql/cypherFormatter.ts:318 — cypherFormatter.needsSpace has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · insertValueHints.stepLexState (cyclomatic 35) · ×1
  • insertValueHints.stepLexState (cyclomatic 35) apps/desktop/src/lib/sql/insertValueHints.ts:452 — insertValueHints.stepLexState has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.parseExtraToColumnExtra (cyclomatic 35) · ×1
  • tableStructureEditorState.parseExtraToColumnExtra (cyclomatic 35) apps/desktop/src/lib/table/tableStructureEditorState.ts:884 — tableStructureEditorState.parseExtraToColumnExtra has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.runPublicOperation · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation::dispatch (cyclomatic 35) apps/desktop/src/stores/plDebugStore.ts:453 — plDebugStore.usePlDebugStore.runPublicOperation::dispatch has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.setValue (cyclomatic 35) · ×1
  • plDebugStore.usePlDebugStore.setValue (cyclomatic 35) apps/desktop/src/stores/plDebugStore.ts:1702 — plDebugStore.usePlDebugStore.setValue has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · json.shellConstructorToExtendedJson (cyclomatic 35) · ×1
  • json.shellConstructorToExtendedJson (cyclomatic 35) packages/mongo-shell/src/json.ts:638 — json.shellConstructorToExtendedJson has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlScanner · ×1
  • SqlScanner::step (cyclomatic 34) REDACTED:3326 — SqlScanner::step has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 34) · ×1
  • main.parseConnectionConfig (cyclomatic 34) agents/drivers/iotdb/driver.go:104 — main.parseConnectionConfig has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeCapture.finishReferences (cyclomatic 34) · ×1
  • plDebugNativeCapture.finishReferences (cyclomatic 34) agents/drivers/oracle-go/pldebug_output.go:271 — plDebugNativeCapture.finishReferences has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codeSnapshot.snapshotElementToPng (cyclomatic 34) · ×1
  • codeSnapshot.snapshotElementToPng (cyclomatic 34) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:343 — codeSnapshot.snapshotElementToPng has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.readAudit (cyclomatic 34) · ×1
  • oceanbaseSessionDiagnostics.readAudit (cyclomatic 34) REDACTED:181 — oceanbaseSessionDiagnostics.readAudit has cyclomatic complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.readbackMatches (cyclomatic 34) · ×1
  • oracleConstraints.readbackMatches (cyclomatic 34) apps/desktop/src/lib/database/oracleConstraints.ts:629 — oracleConstraints.readbackMatches has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeySourceSnapshot (cyclomatic 34) · ×1
  • oracleForeignKeys.readOracleForeignKeySourceSnapshot (cyclomatic 34) apps/desktop/src/lib/database/oracleForeignKeys.ts:231 — oracleForeignKeys.readOracleForeignKeySourceSnapshot has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · hoverTableSql.normalizeAlignedSqlWhitespace (cyclomatic 34) · ×1
  • hoverTableSql.normalizeAlignedSqlWhitespace (cyclomatic 34) apps/desktop/src/lib/editor/hoverTableSql.ts:163 — hoverTableSql.normalizeAlignedSqlWhitespace has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.getMongoCompletionContext (cyclomatic 34) · ×1
  • mongoCompletion.getMongoCompletionContext (cyclomatic 34) REDACTED:368 — mongoCompletion.getMongoCompletionContext has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sqlCompletion.buildComparisonValueItems (cyclomatic 34) · ×1
  • sqlCompletion.buildComparisonValueItems (cyclomatic 34) apps/desktop/src/lib/sql/sqlCompletion.ts:5780 — sqlCompletion.buildComparisonValueItems has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.singularTableName (cyclomatic 34) · ×1
  • sqlCompletion.singularTableName (cyclomatic 34) apps/desktop/src/lib/sql/sqlCompletion.ts:6709 — sqlCompletion.singularTableName has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.buildKeywordItems (cyclomatic 34) · ×1
  • sqlCompletion.buildKeywordItems (cyclomatic 34) apps/desktop/src/lib/sql/sqlCompletion.ts:7018 — sqlCompletion.buildKeywordItems has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7033, 7042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlParameters.isMysqlRoutineHeader (cyclomatic 34) · ×1
  • sqlParameters.isMysqlRoutineHeader (cyclomatic 34) apps/desktop/src/lib/sql/sqlParameters.ts:713 — sqlParameters.isMysqlRoutineHeader has cyclomatic complexity 34 (threshold 15). Of this number, 24 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cyclomatic 34) · ×1
  • sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cyclomatic 34) apps/desktop/src/lib/sql/sqlParameters.ts:1244 — sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cyclomatic 34) · ×1
  • oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cyclomatic 34) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:275 — oraclePackageSaveAs.executePreparedOraclePackageSaveAs has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableStructureEditorState.columnDataTypeForEditor (cyclomatic 34) · ×1
  • tableStructureEditorState.columnDataTypeForEditor (cyclomatic 34) apps/desktop/src/lib/table/tableStructureEditorState.ts:1082 — tableStructureEditorState.columnDataTypeForEditor has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.tabTooltipLines (cyclomatic 34) · ×1
  • tabPresentation.tabTooltipLines (cyclomatic 34) apps/desktop/src/lib/tabs/tabPresentation.ts:431 — tabPresentation.tabTooltipLines has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.connect (cyclomatic 34) · ×1
  • connectionStore.useConnectionStore.connect (cyclomatic 34) apps/desktop/src/stores/connectionStore.ts:5556 — connectionStore.useConnectionStore.connect has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTableForLocate (cyclomatic 34) · ×1
  • connectionStore.useConnectionStore.loadTableForLocate (cyclomatic 34) apps/desktop/src/stores/connectionStore.ts:8217 — connectionStore.useConnectionStore.loadTableForLocate has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 8234, 8312, 8269). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.start (cyclomatic 34) · ×1
  • plDebugStore.usePlDebugStore.start (cyclomatic 34) apps/desktop/src/stores/plDebugStore.ts:920 — plDebugStore.usePlDebugStore.start has cyclomatic complexity 34 (threshold 15). Of this number, 18 points are the body's own statements and 16 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.createTab (cyclomatic 34) · ×1
  • queryStore.useQueryStore.createTab (cyclomatic 34) apps/desktop/src/stores/queryStore.ts:3241 — queryStore.useQueryStore.createTab has cyclomatic complexity 34 (threshold 15). Of this number, 23 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginManifest · ×1
  • PluginManifest::compatibility (cyclomatic 33) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1180 — PluginManifest::compatibility has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DialectYaml · ×1
  • DialectYaml::build_capability_flags (cyclomatic 33) REDACTED:539 — DialectYaml::build_capability_flags has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DeferredLobValues.read (cyclomatic 33) · ×1
  • DeferredLobValues.read (cyclomatic 33) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:222 — DeferredLobValues.read has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DeferredLobValues.readAhead (cyclomatic 33) · ×1
  • DeferredLobValues.readAhead (cyclomatic 33) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152 — DeferredLobValues.readAhead has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.composite (cyclomatic 33) · ×1
  • PlDebugCompositeInput.composite (cyclomatic 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:113 — PlDebugCompositeInput.composite has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.debugBefore (cyclomatic 33) · ×1
  • PlDebugSession.debugBefore (cyclomatic 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:525 — PlDebugSession.debugBefore has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyCollectionFromSource (cyclomatic 33) · ×1
  • main.plDebugLegacyCollectionFromSource (cyclomatic 33) agents/drivers/oracle-go/pldebug_legacy_declarations.go:126 — main.plDebugLegacyCollectionFromSource has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.prepareLegacyJob (cyclomatic 33) · ×1
  • server.prepareLegacyJob (cyclomatic 33) agents/drivers/oracle-go/native_jobs.go:85 — server.prepareLegacyJob has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugRecordDecoder.record (cyclomatic 33) · ×1
  • plDebugRecordDecoder.record (cyclomatic 33) agents/drivers/oracle-go/pldebug_record_input.go:77 — plDebugRecordDecoder.record has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.mysqlRoutineTokens (cyclomatic 33) · ×1
  • sqlStatementRanges.mysqlRoutineTokens (cyclomatic 33) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2293 — sqlStatementRanges.mysqlRoutineTokens has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportXlsxResult (cyclomatic 33) · ×1
  • useDataGridExport.useDataGridExport.exportXlsxResult (cyclomatic 33) apps/desktop/src/composables/useDataGridExport.ts:1866 — useDataGridExport.useDataGridExport.exportXlsxResult has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1872, 1911). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · connectionDeepLink.parseConnectionDeepLinkUpdate (cyclomatic 33) · ×1
  • connectionDeepLink.parseConnectionDeepLinkUpdate (cyclomatic 33) REDACTED:113 — connectionDeepLink.parseConnectionDeepLinkUpdate has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.readPlan (cyclomatic 33) · ×1
  • oceanbaseSessionDiagnostics.readPlan (cyclomatic 33) REDACTED:320 — oceanbaseSessionDiagnostics.readPlan has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cyclomatic 33) · ×1
  • oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cyclomatic 33) REDACTED:376 — oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeyMetadata (cyclomatic 33) · ×1
  • oracleForeignKeys.readOracleForeignKeyMetadata (cyclomatic 33) apps/desktop/src/lib/database/oracleForeignKeys.ts:172 — oracleForeignKeys.readOracleForeignKeyMetadata has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executePreparedTriggerPlan · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan::run (cyclomatic 33) apps/desktop/src/lib/database/oracleTriggerPlan.ts:268 — oracleTriggerPlan.executePreparedTriggerPlan::run has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · anotherRedisImport.connection (cyclomatic 33) · ×1
  • anotherRedisImport.connection (cyclomatic 33) apps/desktop/src/lib/imports/anotherRedisImport.ts:32 — anotherRedisImport.connection has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.refreshOracleRoutineDeployment (cyclomatic 33) · ×1
  • oracleRoutineDeploy.refreshOracleRoutineDeployment (cyclomatic 33) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:569 — oracleRoutineDeploy.refreshOracleRoutineDeployment has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarSearchTree.mergeSidebarRegexIndexScopes (cyclomatic 33) · ×1
  • sidebarSearchTree.mergeSidebarRegexIndexScopes (cyclomatic 33) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:289 — sidebarSearchTree.mergeSidebarRegexIndexScopes has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.tokenizeCypher (cyclomatic 33) · ×1
  • cypherFormatter.tokenizeCypher (cyclomatic 33) apps/desktop/src/lib/sql/cypherFormatter.ts:176 — cypherFormatter.tokenizeCypher has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleViewRename.executeOracleViewRename (cyclomatic 33) · ×1
  • oracleViewRename.executeOracleViewRename (cyclomatic 33) apps/desktop/src/lib/table/oracleViewRename.ts:268 — oracleViewRename.executeOracleViewRename has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.tabIconClass (cyclomatic 33) · ×1
  • tabPresentation.tabIconClass (cyclomatic 33) apps/desktop/src/lib/tabs/tabPresentation.ts:860 — tabPresentation.tabIconClass has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.runPublicOperation (cyclomatic 33) · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation (cyclomatic 33) apps/desktop/src/stores/plDebugStore.ts:433 — plDebugStore.usePlDebugStore.runPublicOperation has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation::dispatch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · plDebugStore.evaluateCondition (cyclomatic 33) · ×1
  • plDebugStore.evaluateCondition (cyclomatic 33) apps/desktop/src/stores/plDebugStore.ts:2104 — plDebugStore.evaluateCondition has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.duplicateTab (cyclomatic 33) · ×1
  • queryStore.useQueryStore.duplicateTab (cyclomatic 33) apps/desktop/src/stores/queryStore.ts:5613 — queryStore.useQueryStore.duplicateTab has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · registerDbxMcpBridge (cyclomatic 33) · ×1
  • registerDbxMcpBridge (cyclomatic 33) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:43 — registerDbxMcpBridge has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 84, execute, a function literal at line 77, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DependencyGraph · ×1
  • DependencyGraph::build_with_functions_and_options (cyclomatic 32) crates/dbx-sql-schema/src/schema_diff.rs:750 — DependencyGraph::build_with_functions_and_options has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listIndexes (cyclomatic 32) · ×1
  • DbxJdbcPlugin.listIndexes (cyclomatic 32) REDACTED:3530 — DbxJdbcPlugin.listIndexes has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.isSelectWithClause (cyclomatic 32) · ×1
  • OceanBaseOracleAgent.isSelectWithClause (cyclomatic 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:277 — OceanBaseOracleAgent.isSelectWithClause has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.node (cyclomatic 32) · ×1
  • PlDebugTemporalJson.node (cyclomatic 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:58 — PlDebugTemporalJson.node has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listConstraints (cyclomatic 32) · ×1
  • server.listConstraints (cyclomatic 32) REDACTED:2524 — server.listConstraints has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeObjectCallables (cyclomatic 32) · ×1
  • main.plDebugNativeObjectCallables (cyclomatic 32) agents/drivers/oracle-go/pldebug_object_constructors.go:90 — main.plDebugNativeObjectCallables has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeTypeLoader.compiledSource (cyclomatic 32) · ×1
  • plDebugNativeTypeLoader.compiledSource (cyclomatic 32) agents/drivers/oracle-go/pldebug_legacy_source.go:39 — plDebugNativeTypeLoader.compiledSource has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.openClient (cyclomatic 32) · ×1
  • main.openClient (cyclomatic 32) agents/drivers/zookeeper/connection.go:151 — main.openClient has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-schema-objects.main (cyclomatic 32) · ×1
  • verify-schema-objects.main (cyclomatic 32) REDACTED:10 — verify-schema-objects.main has cyclomatic complexity 32 (threshold 15). Of this number, 20 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cyclomatic 32) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cyclomatic 32) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:399 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget has cyclomatic complexity 32 (threshold 15). Of this number, 23 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useTauriEvents.useTauriEvents.setupTauriListeners (cyclomatic 32) · ×1
  • useTauriEvents.useTauriEvents.setupTauriListeners (cyclomatic 32) apps/desktop/src/composables/useTauriEvents.ts:28 — useTauriEvents.useTauriEvents.setupTauriListeners has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 41, 87, 64, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.localeFromLanguageTag (cyclomatic 32) · ×1
  • index.localeFromLanguageTag (cyclomatic 32) apps/desktop/src/i18n/index.ts:39 — index.localeFromLanguageTag has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · jdbcProperties.parseJdbcProperties (cyclomatic 32) · ×1
  • jdbcProperties.parseJdbcProperties (cyclomatic 32) apps/desktop/src/lib/connection/jdbcProperties.ts:39 — jdbcProperties.parseJdbcProperties has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridConditionHighlight.tokenizeDataGridCondition (cyclomatic 32) · ×1
  • dataGridConditionHighlight.tokenizeDataGridCondition (cyclomatic 32) apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts:51 — dataGridConditionHighlight.tokenizeDataGridCondition has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · xuguUserPermissions.xuguGrantSql (cyclomatic 32) · ×1
  • xuguUserPermissions.xuguGrantSql (cyclomatic 32) apps/desktop/src/lib/database/xuguUserPermissions.ts:580 — xuguUserPermissions.xuguGrantSql has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mcpAccessTree.buildMcpAccessTreeRows (cyclomatic 32) · ×1
  • mcpAccessTree.buildMcpAccessTreeRows (cyclomatic 32) apps/desktop/src/lib/mcp/mcpAccessTree.ts:152 — mcpAccessTree.buildMcpAccessTreeRows has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (connectionRows, a function literal at line 252, a function literal at line 232, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.includeOraclePackageCompanion (cyclomatic 32) · ×1
  • oracleRoutineDeploy.includeOraclePackageCompanion (cyclomatic 32) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:130 — oracleRoutineDeploy.includeOraclePackageCompanion has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · databaseTableEmpty.buildLayers (cyclomatic 32) · ×1
  • databaseTableEmpty.buildLayers (cyclomatic 32) apps/desktop/src/lib/sidebar/databaseTableEmpty.ts:46 — databaseTableEmpty.buildLayers has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.collectSqlServerLocalVariables (cyclomatic 32) · ×1
  • sqlCompletion.collectSqlServerLocalVariables (cyclomatic 32) apps/desktop/src/lib/sql/sqlCompletion.ts:3220 — sqlCompletion.collectSqlServerLocalVariables has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectDuckDbStructFieldSeparators (cyclomatic 32) · ×1
  • sqlParameters.collectDuckDbStructFieldSeparators (cyclomatic 32) apps/desktop/src/lib/sql/sqlParameters.ts:931 — sqlParameters.collectDuckDbStructFieldSeparators has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.validateDependentDeclaration (cyclomatic 32) · ×1
  • oracleTableRename.validateDependentDeclaration (cyclomatic 32) REDACTED:282 — oracleTableRename.validateDependentDeclaration has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cyclomatic 32) · ×1
  • connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cyclomatic 32) apps/desktop/src/stores/connectionStore.ts:3476 — connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionTables (cyclomatic 32) · ×1
  • connectionStore.useConnectionStore.listCompletionTables (cyclomatic 32) apps/desktop/src/stores/connectionStore.ts:10359 — connectionStore.useConnectionStore.listCompletionTables has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 10381). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · seo.auditPages (cyclomatic 32) · ×1
  • seo.auditPages (cyclomatic 32) docs/scripts/seo.mjs:84 — seo.auditPages has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateRecord (cyclomatic 32) · ×1
  • validateRecord (cyclomatic 32) plugins/sdk/dev-host/connections.mjs:13 — validateRecord has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.applyHOCONAuthentication (cyclomatic 31) · ×1
  • main.applyHOCONAuthentication (cyclomatic 31) agents/drivers/cassandra-go/config_file.go:169 — main.applyHOCONAuthentication has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.pendingCleanupContinuation (cyclomatic 31) · ×1
  • plDebugNativeEntry.pendingCleanupContinuation (cyclomatic 31) agents/drivers/oracle-go/pldebug_drain.go:129 — plDebugNativeEntry.pendingCleanupContinuation has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.listConstraints (cyclomatic 31) · ×1
  • server.listConstraints (cyclomatic 31) agents/drivers/vastbase-go/vastbase_metadata.go:1525 — server.listConstraints has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.renderXuguTableDDL (cyclomatic 31) · ×1
  • main.renderXuguTableDDL (cyclomatic 31) REDACTED:4742 — main.renderXuguTableDDL has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguWKBReader.geometry (cyclomatic 31) · ×1
  • xuguWKBReader.geometry (cyclomatic 31) agents/drivers/xugu/spatial.go:322 — xuguWKBReader.geometry has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tablet.SetValueAt (cyclomatic 31) · ×1
  • Tablet.SetValueAt (cyclomatic 31) agents/go-common/iotdb-client-go/client/tablet.go:124 — Tablet.SetValueAt has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.resultToExport (cyclomatic 31) · ×1
  • useDataGridExport.useDataGridExport.resultToExport (cyclomatic 31) apps/desktop/src/composables/useDataGridExport.ts:613 — useDataGridExport.useDataGridExport.resultToExport has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.submitBackendExport · ×1
  • useDataGridExport.useDataGridExport.submitBackendExport::execute (cyclomatic 31) apps/desktop/src/composables/useDataGridExport.ts:2629 — useDataGridExport.useDataGridExport.submitBackendExport::execute has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cyclomatic 31) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cyclomatic 31) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:814 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 10 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 837, 886, 845, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · oracleIndexes.executeOracleIndexPlan (cyclomatic 31) · ×1
  • oracleIndexes.executeOracleIndexPlan (cyclomatic 31) apps/desktop/src/lib/database/oracleIndexes.ts:379 — oracleIndexes.executeOracleIndexPlan has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · productionSafety.sqlTargetSafetyText (cyclomatic 31) · ×1
  • productionSafety.sqlTargetSafetyText (cyclomatic 31) apps/desktop/src/lib/database/productionSafety.ts:276 — productionSafety.sqlTargetSafetyText has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.tokenizeSelectionIdentifiers (cyclomatic 31) · ×1
  • sqlIntentionActions.tokenizeSelectionIdentifiers (cyclomatic 31) apps/desktop/src/lib/editor/sqlIntentionActions.ts:292 — sqlIntentionActions.tokenizeSelectionIdentifiers has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · thriftBinary.readValue (cyclomatic 31) · ×1
  • thriftBinary.readValue (cyclomatic 31) apps/desktop/src/lib/mq/thriftBinary.ts:163 — thriftBinary.readValue has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · schemaDiff.stripSqlCommentsAndStringLiterals (cyclomatic 31) · ×1
  • schemaDiff.stripSqlCommentsAndStringLiterals (cyclomatic 31) apps/desktop/src/lib/schema/schemaDiff.ts:501 — schemaDiff.stripSqlCommentsAndStringLiterals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · insertValueHints.parseInsertClause (cyclomatic 31) · ×1
  • insertValueHints.parseInsertClause (cyclomatic 31) apps/desktop/src/lib/sql/insertValueHints.ts:312 — insertValueHints.parseInsertClause has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · printer.printRuleList (cyclomatic 31) · ×1
  • printer.printRuleList (cyclomatic 31) apps/desktop/src/lib/sql/layout/printer.ts:172 — printer.printRuleList has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 189, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlCompletion.collectSqlServerRoutineParameters (cyclomatic 31) · ×1
  • sqlCompletion.collectSqlServerRoutineParameters (cyclomatic 31) apps/desktop/src/lib/sql/sqlCompletion.ts:3278 — sqlCompletion.collectSqlServerRoutineParameters has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.parseTrailingIdentifierContext (cyclomatic 31) · ×1
  • sqlCompletion.parseTrailingIdentifierContext (cyclomatic 31) apps/desktop/src/lib/sql/sqlCompletion.ts:3457 — sqlCompletion.parseTrailingIdentifierContext has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectSelectAssignmentVariables (cyclomatic 31) · ×1
  • sqlParameters.collectSelectAssignmentVariables (cyclomatic 31) apps/desktop/src/lib/sql/sqlParameters.ts:1538 — sqlParameters.collectSelectAssignmentVariables has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlRisk.sqlSafetyText (cyclomatic 31) · ×1
  • sqlRisk.sqlSafetyText (cyclomatic 31) apps/desktop/src/lib/sql/sqlRisk.ts:252 — sqlRisk.sqlSafetyText has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.assertNoUnapprovedChange (cyclomatic 31) · ×1
  • oracleTypeManagement.assertNoUnapprovedChange (cyclomatic 31) apps/desktop/src/lib/table/oracleTypeManagement.ts:491 — oracleTypeManagement.assertNoUnapprovedChange has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableCopyTaskStore.useTableCopyTaskStore.run (cyclomatic 31) · ×1
  • tableCopyTaskStore.useTableCopyTaskStore.run (cyclomatic 31) apps/desktop/src/stores/tableCopyTaskStore.ts:155 — tableCopyTaskStore.useTableCopyTaskStore.run has cyclomatic complexity 31 (threshold 15). Of this number, 20 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Projection · ×1
  • Projection::read (cyclomatic 30) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:673 — Projection::read has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleTriggerMetadataReader.summaries (cyclomatic 30) · ×1
  • OracleTriggerMetadataReader.summaries (cyclomatic 30) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:146 — OracleTriggerMetadataReader.summaries has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.dispatchNativeDebug (cyclomatic 30) · ×1
  • runtimeServer.dispatchNativeDebug (cyclomatic 30) agents/drivers/oracle-go/pldebug_manager.go:126 — runtimeServer.dispatchNativeDebug has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · useDataGridScrollbars.useDataGridScrollbars (cyclomatic 30) · ×1
  • useDataGridScrollbars.useDataGridScrollbars (cyclomatic 30) apps/desktop/src/composables/useDataGridScrollbars.ts:32 — useDataGridScrollbars.useDataGridScrollbars has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ai.buildModePromptLines (cyclomatic 30) · ×1
  • ai.buildModePromptLines (cyclomatic 30) apps/desktop/src/lib/ai/ai.ts:682 — ai.buildModePromptLines has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cyclomatic 30) · ×1
  • legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cyclomatic 30) apps/desktop/src/lib/dataGrid/legacyLargeValueExport.ts:98 — legacyLargeValueExport.fetchLegacyLargeValueRequestChunk has cyclomatic complexity 30 (threshold 15). Of this number, 21 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.validateOracleForeignKeySourceChanges (cyclomatic 30) · ×1
  • oracleForeignKeys.validateOracleForeignKeySourceChanges (cyclomatic 30) apps/desktop/src/lib/database/oracleForeignKeys.ts:263 — oracleForeignKeys.validateOracleForeignKeySourceChanges has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.prepareOracleForeignKeyPlan (cyclomatic 30) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyPlan (cyclomatic 30) apps/desktop/src/lib/database/oracleForeignKeys.ts:647 — oracleForeignKeys.prepareOracleForeignKeyPlan has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · xuguUserPermissions.xuguRevokeSql (cyclomatic 30) · ×1
  • xuguUserPermissions.xuguRevokeSql (cyclomatic 30) apps/desktop/src/lib/database/xuguUserPermissions.ts:627 — xuguUserPermissions.xuguRevokeSql has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · graphCompletion.buildGraphCompletionItems (cyclomatic 30) · ×1
  • graphCompletion.buildGraphCompletionItems (cyclomatic 30) apps/desktop/src/lib/graph/graphCompletion.ts:142 — graphCompletion.buildGraphCompletionItems has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbeaverImport.buildConnection (cyclomatic 30) · ×1
  • dbeaverImport.buildConnection (cyclomatic 30) REDACTED:242 — dbeaverImport.buildConnection has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.collectInnermostObjectKeys (cyclomatic 30) · ×1
  • mongoCompletion.collectInnermostObjectKeys (cyclomatic 30) REDACTED:972 — mongoCompletion.collectInnermostObjectKeys has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · primitives.renderInline (cyclomatic 30) · ×1
  • primitives.renderInline (cyclomatic 30) apps/desktop/src/lib/sql/layout/primitives.ts:464 — primitives.renderInline has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractReferencedTables (cyclomatic 30) · ×1
  • sqlCompletion.extractReferencedTables (cyclomatic 30) apps/desktop/src/lib/sql/sqlCompletion.ts:4199 — sqlCompletion.extractReferencedTables has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildTableItems (cyclomatic 30) · ×1
  • sqlCompletion.buildTableItems (cyclomatic 30) apps/desktop/src/lib/sql/sqlCompletion.ts:5153 — sqlCompletion.buildTableItems has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to one function literal inside it that branches (line 5173). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.prepareOraclePackageSaveAs (cyclomatic 30) · ×1
  • oraclePackageSaveAs.prepareOraclePackageSaveAs (cyclomatic 30) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:164 — oraclePackageSaveAs.prepareOraclePackageSaveAs has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableSelectSql.quoteTableIdentifier (cyclomatic 30) · ×1
  • tableSelectSql.quoteTableIdentifier (cyclomatic 30) apps/desktop/src/lib/table/tableSelectSql.ts:95 — tableSelectSql.quoteTableIdentifier has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.setChildren (cyclomatic 30) · ×1
  • connectionStore.useConnectionStore.setChildren (cyclomatic 30) apps/desktop/src/stores/connectionStore.ts:2186 — connectionStore.useConnectionStore.setChildren has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.closeOriginal (cyclomatic 30) · ×1
  • plDebugStore.usePlDebugStore.closeOriginal (cyclomatic 30) apps/desktop/src/stores/plDebugStore.ts:1810 — plDebugStore.usePlDebugStore.closeOriginal has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openObjectBrowser (cyclomatic 30) · ×1
  • queryStore.useQueryStore.openObjectBrowser (cyclomatic 30) apps/desktop/src/stores/queryStore.ts:3913 — queryStore.useQueryStore.openObjectBrowser has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cyclomatic 30) · ×1
  • queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cyclomatic 30) apps/desktop/src/stores/queryStore.ts:7695 — queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation has cyclomatic complexity 30 (threshold 15). Of this number, 23 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IssueSubmissionLimiter.fetch (cyclomatic 30) · ×1
  • IssueSubmissionLimiter.fetch (cyclomatic 30) docs/worker.ts:565 — IssueSubmissionLimiter.fetch has cyclomatic complexity 30 (threshold 15). Of this number, 20 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · locate (cyclomatic 30) · ×1
  • locate (cyclomatic 30) REDACTED:316 — locate has cyclomatic complexity 30 (threshold 15). Of this number, 18 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StarRocksCreateTable · ×1
  • StarRocksCreateTable::validate (cyclomatic 29) crates/dbx-sql-schema/src/table_structure_sql/create_dialect.rs:107 — StarRocksCreateTable::validate has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlobBoundExecutor.execute (cyclomatic 29) · ×1
  • BlobBoundExecutor.execute (cyclomatic 29) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:35 — BlobBoundExecutor.execute has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.getObjectSource (cyclomatic 29) · ×1
  • DbxJdbcPlugin.getObjectSource (cyclomatic 29) REDACTED:5664 — DbxJdbcPlugin.getObjectSource has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Db2ExplainPlan.singleQuery (cyclomatic 29) · ×1
  • Db2ExplainPlan.singleQuery (cyclomatic 29) REDACTED:277 — Db2ExplainPlan.singleQuery has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.requiresTypedLobConnection (cyclomatic 29) · ×1
  • PlDebugTarget.requiresTypedLobConnection (cyclomatic 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:113 — PlDebugTarget.requiresTypedLobConnection has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · kerberosConfig.finalize (cyclomatic 29) · ×1
  • kerberosConfig.finalize (cyclomatic 29) agents/drivers/cassandra-go/kerberos.go:89 — kerberosConfig.finalize has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugDecodeCollectionEnvelope (cyclomatic 29) · ×1
  • main.plDebugDecodeCollectionEnvelope (cyclomatic 29) agents/drivers/oracle-go/pldebug_collection_input.go:130 — main.plDebugDecodeCollectionEnvelope has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.errorResponse (cyclomatic 29) · ×1
  • main.errorResponse (cyclomatic 29) agents/drivers/oracle-go/rpc_errors.go:71 — main.errorResponse has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.getExactTriggerSource (cyclomatic 29) · ×1
  • server.getExactTriggerSource (cyclomatic 29) agents/drivers/oracle-go/trigger_metadata.go:322 — server.getExactTriggerSource has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugSession.setBreakpoints (cyclomatic 29) · ×1
  • plDebugSession.setBreakpoints (cyclomatic 29) REDACTED:2066 — plDebugSession.setBreakpoints has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridCanvasRuntime.useDataGridCanvasRuntime (cyclomatic 29) · ×1
  • useDataGridCanvasRuntime.useDataGridCanvasRuntime (cyclomatic 29) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:55 — useDataGridCanvasRuntime.useDataGridCanvasRuntime has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cyclomatic 29) · ×1
  • useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cyclomatic 29) apps/desktop/src/composables/useMultiDbTargetSelection.ts:241 — useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCellCoercion.parsePostgresArrayText (cyclomatic 29) · ×1
  • dataGridCellCoercion.parsePostgresArrayText (cyclomatic 29) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:384 — dataGridCellCoercion.parsePostgresArrayText has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.oracleConstraintDefinitionFromInfo (cyclomatic 29) · ×1
  • oracleConstraints.oracleConstraintDefinitionFromInfo (cyclomatic 29) apps/desktop/src/lib/database/oracleConstraints.ts:116 — oracleConstraints.oracleConstraintDefinitionFromInfo has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executePreparedTriggerPlan (cyclomatic 29) · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan (cyclomatic 29) apps/desktop/src/lib/database/oracleTriggerPlan.ts:257 — oracleTriggerPlan.executePreparedTriggerPlan has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.collectSqlRanges (cyclomatic 29) · ×1
  • sqlSemanticSelectionRanges.collectSqlRanges (cyclomatic 29) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:331 — sqlSemanticSelectionRanges.collectSqlRanges has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphSignatureHelp.getGraphFunctionSignatureHelp (cyclomatic 29) · ×1
  • graphSignatureHelp.getGraphFunctionSignatureHelp (cyclomatic 29) apps/desktop/src/lib/graph/graphSignatureHelp.ts:6 — graphSignatureHelp.getGraphFunctionSignatureHelp has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.splitMongoSemicolonSeparatedSegments (cyclomatic 29) · ×1
  • mongoShellCommand.splitMongoSemicolonSeparatedSegments (cyclomatic 29) REDACTED:1465 — mongoShellCommand.splitMongoSemicolonSeparatedSegments has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editableQueryHiddenKeys.appendSelectProjections (cyclomatic 29) · ×1
  • editableQueryHiddenKeys.appendSelectProjections (cyclomatic 29) apps/desktop/src/lib/sql/editableQueryHiddenKeys.ts:47 — editableQueryHiddenKeys.appendSelectProjections has cyclomatic complexity 29 (threshold 15). Of this number, 17 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · rules.hasRuleLineBreak (cyclomatic 29) · ×1
  • rules.hasRuleLineBreak (cyclomatic 29) apps/desktop/src/lib/sql/layout/rules.ts:37 — rules.hasRuleLineBreak has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlCompletion.parsePostgresRegclassPrefix (cyclomatic 29) · ×1
  • sqlCompletion.parsePostgresRegclassPrefix (cyclomatic 29) apps/desktop/src/lib/sql/sqlCompletion.ts:2489 — sqlCompletion.parsePostgresRegclassPrefix has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectTriggerPseudoRecordFieldStarts (cyclomatic 29) · ×1
  • sqlParameters.collectTriggerPseudoRecordFieldStarts (cyclomatic 29) apps/desktop/src/lib/sql/sqlParameters.ts:1031 — sqlParameters.collectTriggerPseudoRecordFieldStarts has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableVGroup.findTableVGroupContainerNode (cyclomatic 29) · ×1
  • tableVGroup.findTableVGroupContainerNode (cyclomatic 29) apps/desktop/src/lib/table/tableVGroup.ts:629 — tableVGroup.findTableVGroupContainerNode has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (walk, a function literal at line 663, matchesOptional, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.searchSidebarObjects (cyclomatic 29) · ×1
  • connectionStore.useConnectionStore.searchSidebarObjects (cyclomatic 29) apps/desktop/src/stores/connectionStore.ts:3273 — connectionStore.useConnectionStore.searchSidebarObjects has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadDorisCatalogTables (cyclomatic 29) · ×1
  • connectionStore.useConnectionStore.loadDorisCatalogTables (cyclomatic 29) apps/desktop/src/stores/connectionStore.ts:7502 — connectionStore.useConnectionStore.loadDorisCatalogTables has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 7526). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.readPublic (cyclomatic 29) · ×1
  • plDebugStore.usePlDebugStore.readPublic (cyclomatic 29) apps/desktop/src/stores/plDebugStore.ts:555 — plDebugStore.usePlDebugStore.readPublic has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport (cyclomatic 29) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport (cyclomatic 29) apps/desktop/src/stores/queryStore.ts:10858 — queryStore.useQueryStore.captureResultLegacyValuesForExport has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveResultMetadataForBatch (cyclomatic 29) · ×1
  • queryStore.useQueryStore.resolveResultMetadataForBatch (cyclomatic 29) apps/desktop/src/stores/queryStore.ts:10954 — queryStore.useQueryStore.resolveResultMetadataForBatch has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.useSettingsStore.initEditorSettings (cyclomatic 29) · ×1
  • settingsStore.useSettingsStore.initEditorSettings (cyclomatic 29) apps/desktop/src/stores/settingsStore.ts:2679 — settingsStore.useSettingsStore.initEditorSettings has cyclomatic complexity 29 (threshold 15). Of this number, 15 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KafkaAgent.peekMessages (cyclomatic 28) · ×1
  • KafkaAgent.peekMessages (cyclomatic 28) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1699 — KafkaAgent.peekMessages has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlDebugTarget.lobInput (cyclomatic 28) · ×1
  • PlDebugTarget.lobInput (cyclomatic 28) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:935 — PlDebugTarget.lobInput has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 28) · ×1
  • main.parseConnectionConfig (cyclomatic 28) agents/drivers/hive-go/config.go:145 — main.parseConnectionConfig has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getObjectSource (cyclomatic 28) · ×1
  • server.getObjectSource (cyclomatic 28) REDACTED:3702 — server.getObjectSource has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.executeTarget (cyclomatic 28) · ×1
  • plDebugNativeEntry.executeTarget (cyclomatic 28) agents/drivers/oracle-go/pldebug_manager.go:618 — plDebugNativeEntry.executeTarget has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 621, 682, 672). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SPNEGORoundTripper.RoundTrip (cyclomatic 28) · ×1
  • SPNEGORoundTripper.RoundTrip (cyclomatic 28) agents/go-common/gosasl/http_spnego.go:73 — SPNEGORoundTripper.RoundTrip has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlStorage.stripOracleStorageAttributes (cyclomatic 28) · ×1
  • ddlStorage.stripOracleStorageAttributes (cyclomatic 28) apps/desktop/src/lib/sql/ddlStorage.ts:216 — ddlStorage.stripOracleStorageAttributes has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.skipBalancedParens (cyclomatic 28) · ×1
  • sqlStatementRanges.skipBalancedParens (cyclomatic 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1798 — sqlStatementRanges.skipBalancedParens has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cyclomatic 28) · ×1
  • useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cyclomatic 28) apps/desktop/src/composables/useDataGridColumnFormatter.ts:288 — useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cyclomatic 28) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cyclomatic 28) apps/desktop/src/composables/useDataGridLargeValues.ts:549 — useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cyclomatic 28) · ×1
  • useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cyclomatic 28) apps/desktop/src/composables/useNavigationTargets.ts:432 — useNavigationTargets.useNavigationTargets.onStructureEditorSaved has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · documentStoreProvider.parseMongoFilterValueAs (cyclomatic 28) · ×1
  • documentStoreProvider.parseMongoFilterValueAs (cyclomatic 28) apps/desktop/src/lib/app/documentStoreProvider.ts:919 — documentStoreProvider.parseMongoFilterValueAs has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionParameterDocument.parseConnectionParameters (cyclomatic 28) · ×1
  • connectionParameterDocument.parseConnectionParameters (cyclomatic 28) apps/desktop/src/lib/connection/connectionParameterDocument.ts:61 — connectionParameterDocument.parseConnectionParameters has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionPickerTree.buildConnectionPickerRows (cyclomatic 28) · ×1
  • connectionPickerTree.buildConnectionPickerRows (cyclomatic 28) apps/desktop/src/lib/connection/connectionPickerTree.ts:47 — connectionPickerTree.buildConnectionPickerRows has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (visitSearch, visitTree, subtreeHasConnection). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionUrl.urlParamsRequireTls (cyclomatic 28) · ×1
  • connectionUrl.urlParamsRequireTls (cyclomatic 28) REDACTED:387 — connectionUrl.urlParamsRequireTls has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridInsertPaste.readTableReferenceToken (cyclomatic 28) · ×1
  • dataGridInsertPaste.readTableReferenceToken (cyclomatic 28) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:174 — dataGridInsertPaste.readTableReferenceToken has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.prepareOracleIndexPlan (cyclomatic 28) · ×1
  • oracleIndexes.prepareOracleIndexPlan (cyclomatic 28) apps/desktop/src/lib/database/oracleIndexes.ts:333 — oracleIndexes.prepareOracleIndexPlan has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cyclomatic 28) · ×1
  • codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cyclomatic 28) apps/desktop/src/lib/editor/codemirrorCurrentStatementFrameLayer.ts:70 — codemirrorCurrentStatementFrameLayer.currentStatementFrameRect has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.validateBulkWriteOperations (cyclomatic 28) · ×1
  • mongoShellCommand.validateBulkWriteOperations (cyclomatic 28) REDACTED:1919 — mongoShellCommand.validateBulkWriteOperations has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nacosAdmin.normalizeNacosEndpoint (cyclomatic 28) · ×1
  • nacosAdmin.normalizeNacosEndpoint (cyclomatic 28) apps/desktop/src/lib/nacos/nacosAdmin.ts:129 — nacosAdmin.normalizeNacosEndpoint has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginAiCompletion.createPluginAiCompletion.runGeneration (cyclomatic 28) · ×1
  • pluginAiCompletion.createPluginAiCompletion.runGeneration (cyclomatic 28) apps/desktop/src/lib/plugins/pluginAiCompletion.ts:131 — pluginAiCompletion.createPluginAiCompletion.runGeneration has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.findMatchingParen (cyclomatic 28) · ×1
  • sqlCompletion.findMatchingParen (cyclomatic 28) apps/desktop/src/lib/sql/sqlCompletion.ts:4527 — sqlCompletion.findMatchingParen has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.splitTopLevel (cyclomatic 28) · ×1
  • sqlCompletion.splitTopLevel (cyclomatic 28) apps/desktop/src/lib/sql/sqlCompletion.ts:4802 — sqlCompletion.splitTopLevel has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oraclePackageSource.tokens (cyclomatic 28) · ×1
  • oraclePackageSource.tokens (cyclomatic 28) apps/desktop/src/lib/table/oraclePackageSource.ts:10 — oraclePackageSource.tokens has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cyclomatic 28) · ×1
  • starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cyclomatic 28) apps/desktop/src/lib/table/starrocksLayoutCopy.ts:43 — starrocksLayoutCopy.buildStarRocksLayoutCopyDdl has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.appendQueryResultSegment (cyclomatic 28) · ×1
  • queryStore.appendQueryResultSegment (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:434 — queryStore.appendQueryResultSegment has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.applyLoadedObjectSource (cyclomatic 28) · ×1
  • queryStore.useQueryStore.applyLoadedObjectSource (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:3648 — queryStore.useQueryStore.applyLoadedObjectSource has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveQueryDisplayMetadata (cyclomatic 28) · ×1
  • queryStore.useQueryStore.resolveQueryDisplayMetadata (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:7867 — queryStore.useQueryStore.resolveQueryDisplayMetadata has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dbx_cli · ×1
  • dbx_cli::run_query (cyclomatic 27) crates/dbx-cli/src/main.rs:303 — dbx_cli::run_query has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleColumnDataType (cyclomatic 27) · ×1
  • DbxJdbcPlugin.oracleColumnDataType (cyclomatic 27) REDACTED:6202 — DbxJdbcPlugin.oracleColumnDataType has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.formatDataType (cyclomatic 27) · ×1
  • OceanBaseOracleAgent.formatDataType (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751 — OceanBaseOracleAgent.formatDataType has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.child (cyclomatic 27) · ×1
  • PlDebugCompositeOutput.child (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:141 — PlDebugCompositeOutput.child has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PlDebugTarget.load (cyclomatic 27) · ×1
  • PlDebugTarget.load (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1321 — PlDebugTarget.load has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseConnectionConfig (cyclomatic 27) · ×1
  • main.parseConnectionConfig (cyclomatic 27) agents/drivers/argo-go/config.go:142 — main.parseConnectionConfig has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcdSession.leaseList (cyclomatic 27) · ×1
  • etcdSession.leaseList (cyclomatic 27) agents/drivers/etcd-go/lease.go:38 — etcdSession.leaseList has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugEvaluateCondition (cyclomatic 27) · ×1
  • main.plDebugEvaluateCondition (cyclomatic 27) agents/drivers/oracle-go/pldebug_condition.go:35 — main.plDebugEvaluateCondition has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyCollectionElementMatches (cyclomatic 27) · ×1
  • main.plDebugLegacyCollectionElementMatches (cyclomatic 27) agents/drivers/oracle-go/pldebug_legacy_type_graph.go:72 — main.plDebugLegacyCollectionElementMatches has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeSelectConstructor (cyclomatic 27) · ×1
  • main.plDebugNativeSelectConstructor (cyclomatic 27) agents/drivers/oracle-go/pldebug_object_select.go:51 — main.plDebugNativeSelectConstructor has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugDecodeTimezoneInput (cyclomatic 27) · ×1
  • main.plDebugDecodeTimezoneInput (cyclomatic 27) agents/drivers/oracle-go/pldebug_timezone.go:57 — main.plDebugDecodeTimezoneInput has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugLobOutput.collect (cyclomatic 27) · ×1
  • plDebugLobOutput.collect (cyclomatic 27) agents/drivers/oracle-go/pldebug_lob_output.go:121 — plDebugLobOutput.collect has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 125). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugNativeEntry.driveNativeEntry (cyclomatic 27) · ×1
  • plDebugNativeEntry.driveNativeEntry (cyclomatic 27) agents/drivers/oracle-go/pldebug_entry.go:235 — plDebugNativeEntry.driveNativeEntry has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.convertObjectKeyedInt64Map (cyclomatic 27) · ×1
  • main.convertObjectKeyedInt64Map (cyclomatic 27) REDACTED:403 — main.convertObjectKeyedInt64Map has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cyclomatic 27) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cyclomatic 27) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:522 — useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useCellDetailEditor.useCellDetailEditor.create (cyclomatic 27) · ×1
  • useCellDetailEditor.useCellDetailEditor.create (cyclomatic 27) apps/desktop/src/composables/useCellDetailEditor.ts:239 — useCellDetailEditor.useCellDetailEditor.create has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGenerateSession.streamInsertTable (cyclomatic 27) · ×1
  • useDataGenerateSession.streamInsertTable (cyclomatic 27) apps/desktop/src/composables/useDataGenerateSession.ts:161 — useDataGenerateSession.streamInsertTable has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onSort (cyclomatic 27) · ×1
  • useDataGridActions.useDataGridActions.onSort (cyclomatic 27) apps/desktop/src/composables/useDataGridActions.ts:771 — useDataGridActions.useDataGridActions.onSort has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportCsv (cyclomatic 27) · ×1
  • useDataGridExport.useDataGridExport.exportCsv (cyclomatic 27) apps/desktop/src/composables/useDataGridExport.ts:1560 — useDataGridExport.useDataGridExport.exportCsv has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1562, 1585). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useExportTracker.useExportTracker.cancelTask (cyclomatic 27) · ×1
  • useExportTracker.useExportTracker.cancelTask (cyclomatic 27) apps/desktop/src/composables/useExportTracker.ts:1063 — useExportTracker.useExportTracker.cancelTask has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionParameterDocument.writeConnectionParameters (cyclomatic 27) · ×1
  • connectionParameterDocument.writeConnectionParameters (cyclomatic 27) apps/desktop/src/lib/connection/connectionParameterDocument.ts:139 — connectionParameterDocument.writeConnectionParameters has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnType.resolveDataGridTypeVisualKind (cyclomatic 27) · ×1
  • dataGridColumnType.resolveDataGridTypeVisualKind (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridColumnType.ts:356 — dataGridColumnType.resolveDataGridTypeVisualKind has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridInsertPaste.readBracketedGroup (cyclomatic 27) · ×1
  • dataGridInsertPaste.readBracketedGroup (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:128 — dataGridInsertPaste.readBracketedGroup has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridSelectionPersistence.captureDataGridSelection (cyclomatic 27) · ×1
  • dataGridSelectionPersistence.captureDataGridSelection (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:134 — dataGridSelectionPersistence.captureDataGridSelection has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.buildGrantAuthorizationPlan (cyclomatic 27) · ×1
  • databaseAuthorizationPlan.buildGrantAuthorizationPlan (cyclomatic 27) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:299 — databaseAuthorizationPlan.buildGrantAuthorizationPlan has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.nativeJobProgramArgumentLayout (cyclomatic 27) · ×1
  • nativeJobAdmin.nativeJobProgramArgumentLayout (cyclomatic 27) apps/desktop/src/lib/database/nativeJobAdmin.ts:269 — nativeJobAdmin.nativeJobProgramArgumentLayout has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns (cyclomatic 27) · ×1
  • oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns (cyclomatic 27) apps/desktop/src/lib/database/oracleIndexes.ts:126 — oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 131, 137). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · dataDictionaryExportTask.startDataDictionaryExport (cyclomatic 27) · ×1
  • dataDictionaryExportTask.startDataDictionaryExport (cyclomatic 27) apps/desktop/src/lib/docs/dataDictionaryExportTask.ts:36 — dataDictionaryExportTask.startDataDictionaryExport has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 43, 91, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · codemirrorSqlAliasHighlights.createSqlAliasHighlights (cyclomatic 27) · ×1
  • codemirrorSqlAliasHighlights.createSqlAliasHighlights (cyclomatic 27) apps/desktop/src/lib/editor/codemirrorSqlAliasHighlights.ts:22 — codemirrorSqlAliasHighlights.createSqlAliasHighlights has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · shortcutDisplay.shortcutKeyLabel (cyclomatic 27) · ×1
  • shortcutDisplay.shortcutKeyLabel (cyclomatic 27) apps/desktop/src/lib/editor/shortcutDisplay.ts:84 — shortcutDisplay.shortcutKeyLabel has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gridSnapshot.renderGridSnapshotHtml (cyclomatic 27) · ×1
  • gridSnapshot.renderGridSnapshotHtml (cyclomatic 27) apps/desktop/src/lib/gridSnapshot/gridSnapshot.ts:130 — gridSnapshot.renderGridSnapshotHtml has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · nacosConfigValidation.validateHtml (cyclomatic 27) · ×1
  • nacosConfigValidation.validateHtml (cyclomatic 27) REDACTED:108 — nacosConfigValidation.validateHtml has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editorSettingsDraft.normalizedDraftValue (cyclomatic 27) · ×1
  • editorSettingsDraft.normalizedDraftValue (cyclomatic 27) apps/desktop/src/lib/settings/editorSettingsDraft.ts:224 — editorSettingsDraft.normalizedDraftValue has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · treeNodeClick.treeNodeRowDoubleClickAction (cyclomatic 27) · ×1
  • treeNodeClick.treeNodeRowDoubleClickAction (cyclomatic 27) apps/desktop/src/lib/sidebar/treeNodeClick.ts:196 — treeNodeClick.treeNodeRowDoubleClickAction has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · solrAdmin.buildSolrQuery (cyclomatic 27) · ×1
  • solrAdmin.buildSolrQuery (cyclomatic 27) apps/desktop/src/lib/solr/solrAdmin.ts:302 — solrAdmin.buildSolrQuery has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · printer.printClause (cyclomatic 27) · ×1
  • printer.printClause (cyclomatic 27) apps/desktop/src/lib/sql/layout/printer.ts:57 — printer.printClause has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 85, 99). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlAnalysis.analyzeEditableQueryEditability (cyclomatic 27) · ×1
  • sqlAnalysis.analyzeEditableQueryEditability (cyclomatic 27) apps/desktop/src/lib/sql/sqlAnalysis.ts:249 — sqlAnalysis.analyzeEditableQueryEditability has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.parseTrailingIdentifierPart (cyclomatic 27) · ×1
  • sqlCompletion.parseTrailingIdentifierPart (cyclomatic 27) apps/desktop/src/lib/sql/sqlCompletion.ts:3518 — sqlCompletion.parseTrailingIdentifierPart has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.scanCteDefinitions (cyclomatic 27) · ×1
  • sqlCompletion.scanCteDefinitions (cyclomatic 27) apps/desktop/src/lib/sql/sqlCompletion.ts:4667 — sqlCompletion.scanCteDefinitions has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.objectMatchesCompletionContext (cyclomatic 27) · ×1
  • sqlCompletion.objectMatchesCompletionContext (cyclomatic 27) apps/desktop/src/lib/sql/sqlCompletion.ts:5506 — sqlCompletion.objectMatchesCompletionContext has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave (cyclomatic 27) · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave (cyclomatic 27) apps/desktop/src/lib/table/oracleRoutineWrite.ts:49 — oracleRoutineWrite.prepareOracleRoutineSourceSave has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (execute, a function literal at line 75, a function literal at line 138). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · routineDefinitionSave.routineDefinitionKind (cyclomatic 27) · ×1
  • routineDefinitionSave.routineDefinitionKind (cyclomatic 27) apps/desktop/src/lib/table/routineDefinitionSave.ts:13 — routineDefinitionSave.routineDefinitionKind has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.isReusableTreeSnapshot (cyclomatic 27) · ×1
  • connectionStore.useConnectionStore.isReusableTreeSnapshot (cyclomatic 27) apps/desktop/src/stores/connectionStore.ts:3757 — connectionStore.useConnectionStore.isReusableTreeSnapshot has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.loadDdlViewerTab (cyclomatic 27) · ×1
  • queryStore.useQueryStore.loadDdlViewerTab (cyclomatic 27) apps/desktop/src/stores/queryStore.ts:3730 — queryStore.useQueryStore.loadDdlViewerTab has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeTab (cyclomatic 27) · ×1
  • queryStore.useQueryStore.closeTab (cyclomatic 27) apps/desktop/src/stores/queryStore.ts:5317 — queryStore.useQueryStore.closeTab has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeJobRegistry · ×1
  • NativeJobRegistry::remember (cyclomatic 26) crates/dbx-core/src/schema/native_jobs/service.rs:102 — NativeJobRegistry::remember has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SshConfigLoader · ×1
  • SshConfigLoader::parse_lines (cyclomatic 26) crates/dbx-driver-support/src/ssh_config.rs:343 — SshConfigLoader::parse_lines has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleTriggerReader.summary (cyclomatic 26) · ×1
  • OracleTriggerReader.summary (cyclomatic 26) REDACTED:167 — OracleTriggerReader.summary has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.prepare (cyclomatic 26) · ×1
  • NativeLegacyJobSession.prepare (cyclomatic 26) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:139 — NativeLegacyJobSession.prepare has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MongoAgent.configureBuilder (cyclomatic 26) · ×1
  • MongoAgent.configureBuilder (cyclomatic 26) REDACTED:159 — MongoAgent.configureBuilder has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.completionAssistantPackageMembers (cyclomatic 26) · ×1
  • OceanBaseOracleAgent.completionAssistantPackageMembers (cyclomatic 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:878 — OceanBaseOracleAgent.completionAssistantPackageMembers has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyPackageDeclarations (cyclomatic 26) · ×1
  • main.plDebugLegacyPackageDeclarations (cyclomatic 26) agents/drivers/oracle-go/pldebug_legacy_declarations.go:19 — main.plDebugLegacyPackageDeclarations has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeTimezoneResult (cyclomatic 26) · ×1
  • main.plDebugNativeTimezoneResult (cyclomatic 26) agents/drivers/oracle-go/pldebug_timezone.go:291 — main.plDebugNativeTimezoneResult has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeEntry.recoverOutput (cyclomatic 26) · ×1
  • plDebugNativeEntry.recoverOutput (cyclomatic 26) agents/drivers/oracle-go/pldebug_manager.go:1134 — plDebugNativeEntry.recoverOutput has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeRoutineScan.identify (cyclomatic 26) · ×1
  • plDebugNativeRoutineScan.identify (cyclomatic 26) agents/drivers/oracle-go/pldebug_routine.go:609 — plDebugNativeRoutineScan.identify has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.renderXuguPartitionDDL (cyclomatic 26) · ×1
  • main.renderXuguPartitionDDL (cyclomatic 26) REDACTED:4984 — main.renderXuguPartitionDDL has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.classifyRPCError (cyclomatic 26) · ×1
  • main.classifyRPCError (cyclomatic 26) agents/drivers/xugu/protocol_error.go:48 — main.classifyRPCError has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter (cyclomatic 26) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter (cyclomatic 26) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:449 — useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 452, 464). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cyclomatic 26) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cyclomatic 26) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:821 — useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · transferStrategy.createTransferSubmission.start (cyclomatic 26) · ×1
  • transferStrategy.createTransferSubmission.start (cyclomatic 26) apps/desktop/src/components/transfer/transferStrategy.ts:101 — transferStrategy.createTransferSubmission.start has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cyclomatic 26) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cyclomatic 26) REDACTED:558 — useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · errorUtils.normalizeBackendErrorAtDepth (cyclomatic 26) · ×1
  • errorUtils.normalizeBackendErrorAtDepth (cyclomatic 26) apps/desktop/src/lib/backend/errorUtils.ts:212 — errorUtils.normalizeBackendErrorAtDepth has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.buildNativeJobDefinitionCreate (cyclomatic 26) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionCreate (cyclomatic 26) apps/desktop/src/lib/database/nativeJobAdmin.ts:378 — nativeJobAdmin.buildNativeJobDefinitionCreate has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · historyRestoreTarget.resolveHistorySqlRestoreTarget (cyclomatic 26) · ×1
  • historyRestoreTarget.resolveHistorySqlRestoreTarget (cyclomatic 26) apps/desktop/src/lib/history/historyRestoreTarget.ts:12 — historyRestoreTarget.resolveHistorySqlRestoreTarget has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cyclomatic 26) · ×1
  • influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cyclomatic 26) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:84 — influxDbV1Delete.resolveInfluxDbV1DeleteTarget has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.classifyCursorInCall (cyclomatic 26) · ×1
  • mongoCompletion.classifyCursorInCall (cyclomatic 26) REDACTED:1145 — mongoCompletion.classifyCursorInCall has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoDocumentValues.renderMongoShellLiteral (cyclomatic 26) · ×1
  • mongoDocumentValues.renderMongoShellLiteral (cyclomatic 26) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:688 — mongoDocumentValues.renderMongoShellLiteral has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginFloatingWindow.parseFloatingWindowRequest (cyclomatic 26) · ×1
  • pluginFloatingWindow.parseFloatingWindowRequest (cyclomatic 26) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:267 — pluginFloatingWindow.parseFloatingWindowRequest has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryResultBatchInsert.batchResultInsertRequest (cyclomatic 26) · ×1
  • queryResultBatchInsert.batchResultInsertRequest (cyclomatic 26) apps/desktop/src/lib/query/queryResultBatchInsert.ts:8 — queryResultBatchInsert.batchResultInsertRequest has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.matchesPendingTransferInput (cyclomatic 26) · ×1
  • oracleRoutineDeploy.matchesPendingTransferInput (cyclomatic 26) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:295 — oracleRoutineDeploy.matchesPendingTransferInput has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · schemaDiffDdlNormalize.stripSchemaFromSql (cyclomatic 26) · ×1
  • schemaDiffDdlNormalize.stripSchemaFromSql (cyclomatic 26) REDACTED:50 — schemaDiffDdlNormalize.stripSchemaFromSql has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.activeSingleQuotedLiteralStart (cyclomatic 26) · ×1
  • sqlCompletion.activeSingleQuotedLiteralStart (cyclomatic 26) apps/desktop/src/lib/sql/sqlCompletion.ts:2428 — sqlCompletion.activeSingleQuotedLiteralStart has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectNativeSqlServerParameters (cyclomatic 26) · ×1
  • sqlParameters.collectNativeSqlServerParameters (cyclomatic 26) apps/desktop/src/lib/sql/sqlParameters.ts:1380 — sqlParameters.collectNativeSqlServerParameters has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.jdbcRoutineParameterType (cyclomatic 26) · ×1
  • routineParameters.jdbcRoutineParameterType (cyclomatic 26) apps/desktop/src/lib/table/routineParameters.ts:185 — routineParameters.jdbcRoutineParameterType has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableStructureEditorState.isDataTypeLengthDisabled (cyclomatic 26) · ×1
  • tableStructureEditorState.isDataTypeLengthDisabled (cyclomatic 26) apps/desktop/src/lib/table/tableStructureEditorState.ts:1896 — tableStructureEditorState.isDataTypeLengthDisabled has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tabPresentation.statementExecutionMarkers (cyclomatic 26) · ×1
  • tabPresentation.statementExecutionMarkers (cyclomatic 26) apps/desktop/src/lib/tabs/tabPresentation.ts:589 — tabPresentation.statementExecutionMarkers has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.requireAiRecommendationUpdate (cyclomatic 26) · ×1
  • server.requireAiRecommendationUpdate (cyclomatic 26) plugins/sdk/dev-host/server.mjs:47 — server.requireAiRecommendationUpdate has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · publish (cyclomatic 26) · ×1
  • publish (cyclomatic 26) .github/ui-preview/publish.mjs:167 — publish has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginPackageInstaller · ×1
  • PluginPackageInstaller::install_bytes_locked (cyclomatic 25) crates/dbx-plugin-runtime/src/plugins/installer.rs:529 — PluginPackageInstaller::install_bytes_locked has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlobBoundStatement.scanSql (cyclomatic 25) · ×1
  • BlobBoundStatement.scanSql (cyclomatic 25) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:58 — BlobBoundStatement.scanSql has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleListIndexes (cyclomatic 25) · ×1
  • DbxJdbcPlugin.oracleListIndexes (cyclomatic 25) REDACTED:5554 — DbxJdbcPlugin.oracleListIndexes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.continueWith (cyclomatic 25) · ×1
  • PlDebugSession.continueWith (cyclomatic 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2179 — PlDebugSession.continueWith has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.bind (cyclomatic 25) · ×1
  • Plan.bind (cyclomatic 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:432 — Plan.bind has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcdSession.put (cyclomatic 25) · ×1
  • etcdSession.put (cyclomatic 25) agents/drivers/etcd-go/kv.go:229 — etcdSession.put has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseSingleOracleTableRef (cyclomatic 25) · ×1
  • main.parseSingleOracleTableRef (cyclomatic 25) REDACTED:5565 — main.parseSingleOracleTableRef has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.dispatch (cyclomatic 25) · ×1
  • runtimeServer.dispatch (cyclomatic 25) REDACTED:824 — runtimeServer.dispatch has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlStorage.stripOceanBaseOracleStorageOptions (cyclomatic 25) · ×1
  • ddlStorage.stripOceanBaseOracleStorageOptions (cyclomatic 25) apps/desktop/src/lib/sql/ddlStorage.ts:91 — ddlStorage.stripOceanBaseOracleStorageOptions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.oraclePlSqlTokens (cyclomatic 25) · ×1
  • sqlStatementRanges.oraclePlSqlTokens (cyclomatic 25) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2755 — sqlStatementRanges.oraclePlSqlTokens has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cyclomatic 25) · ×1
  • useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cyclomatic 25) apps/desktop/src/components/editor/useQueryEditorCompletionMetadata.ts:430 — useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSessionDiagnostics.useSessionDiagnostics.refresh (cyclomatic 25) · ×1
  • useSessionDiagnostics.useSessionDiagnostics.refresh (cyclomatic 25) apps/desktop/src/composables/useSessionDiagnostics.ts:40 — useSessionDiagnostics.useSessionDiagnostics.refresh has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cyclomatic 25) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cyclomatic 25) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:205 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrlBuilder.connectionUrlCopyFormats (cyclomatic 25) · ×1
  • connectionUrlBuilder.connectionUrlCopyFormats (cyclomatic 25) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:564 — connectionUrlBuilder.connectionUrlCopyFormats has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridClipboard.prepareDataGridClipboard (cyclomatic 25) · ×1
  • dataGridClipboard.prepareDataGridClipboard (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridClipboard.ts:65 — dataGridClipboard.prepareDataGridClipboard has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCopyExtractor.validateDataGridExtractorOptions (cyclomatic 25) · ×1
  • dataGridCopyExtractor.validateDataGridExtractorOptions (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:316 — dataGridCopyExtractor.validateDataGridExtractorOptions has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridSelectionPersistence.restoreDataGridSelection (cyclomatic 25) · ×1
  • dataGridSelectionPersistence.restoreDataGridSelection (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:200 — dataGridSelectionPersistence.restoreDataGridSelection has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cyclomatic 25) · ×1
  • databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cyclomatic 25) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:191 — databaseAuthorizationPlan.buildCreateUserAuthorizationPlan has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.prepareOracleConstraintPlan (cyclomatic 25) · ×1
  • oracleConstraints.prepareOracleConstraintPlan (cyclomatic 25) apps/desktop/src/lib/database/oracleConstraints.ts:692 — oracleConstraints.prepareOracleConstraintPlan has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · explainPlan.parseDamengExplainText (cyclomatic 25) · ×1
  • explainPlan.parseDamengExplainText (cyclomatic 25) apps/desktop/src/lib/diagram/explainPlan.ts:89 — explainPlan.parseDamengExplainText has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorTableDrop.parseTableReferencePayload (cyclomatic 25) · ×1
  • queryEditorTableDrop.parseTableReferencePayload (cyclomatic 25) apps/desktop/src/lib/editor/queryEditorTableDrop.ts:196 — queryEditorTableDrop.parseTableReferencePayload has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.collectExpressionSection (cyclomatic 25) · ×1
  • sqlSemanticSelectionRanges.collectExpressionSection (cyclomatic 25) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:247 — sqlSemanticSelectionRanges.collectExpressionSection has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · vimImeGuard.createVimImeGuard (cyclomatic 25) · ×1
  • vimImeGuard.createVimImeGuard (cyclomatic 25) apps/desktop/src/lib/editor/vimImeGuard.ts:37 — vimImeGuard.createVimImeGuard has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 48, 74). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoCompletion.extractActiveDatabase (cyclomatic 25) · ×1
  • mongoCompletion.extractActiveDatabase (cyclomatic 25) REDACTED:2526 — mongoCompletion.extractActiveDatabase has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · diagnostics.isSqlServerGoSeparatorLine (cyclomatic 25) · ×1
  • diagnostics.isSqlServerGoSeparatorLine (cyclomatic 25) apps/desktop/src/lib/sql/semantic/diagnostics.ts:167 — diagnostics.isSqlServerGoSeparatorLine has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · model.sqlSemanticTableNameSpans (cyclomatic 25) · ×1
  • model.sqlSemanticTableNameSpans (cyclomatic 25) apps/desktop/src/lib/sql/semantic/model.ts:155 — model.sqlSemanticTableNameSpans has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.cteBodyProjectionShape (cyclomatic 25) · ×1
  • model.cteBodyProjectionShape (cyclomatic 25) apps/desktop/src/lib/sql/semantic/model.ts:274 — model.cteBodyProjectionShape has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.scanSelectListContext (cyclomatic 25) · ×1
  • sqlCompletion.scanSelectListContext (cyclomatic 25) apps/desktop/src/lib/sql/sqlCompletion.ts:3621 — sqlCompletion.scanSelectListContext has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlDatabaseLinks.collectSqlXmlKeywordPositions (cyclomatic 25) · ×1
  • sqlDatabaseLinks.collectSqlXmlKeywordPositions (cyclomatic 25) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:10 — sqlDatabaseLinks.collectSqlXmlKeywordPositions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlRisk.classifySetTokens (cyclomatic 25) · ×1
  • sqlRisk.classifySetTokens (cyclomatic 25) apps/desktop/src/lib/sql/sqlRisk.ts:397 — sqlRisk.classifySetTokens has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectSourceLoad.oracleTriggerErrorEditorOffset (cyclomatic 25) · ×1
  • objectSourceLoad.oracleTriggerErrorEditorOffset (cyclomatic 25) apps/desktop/src/lib/table/objectSourceLoad.ts:34 — objectSourceLoad.oracleTriggerErrorEditorOffset has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleRoutineRename.prepareOracleRoutineRename (cyclomatic 25) · ×1
  • oracleRoutineRename.prepareOracleRoutineRename (cyclomatic 25) apps/desktop/src/lib/table/oracleRoutineRename.ts:253 — oracleRoutineRename.prepareOracleRoutineRename has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · tableSqlTemplates.columnPlaceholderValue (cyclomatic 25) · ×1
  • tableSqlTemplates.columnPlaceholderValue (cyclomatic 25) apps/desktop/src/lib/table/tableSqlTemplates.ts:202 — tableSqlTemplates.columnPlaceholderValue has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableTree.mergeTableTreePageChildren (cyclomatic 25) · ×1
  • tableTree.mergeTableTreePageChildren (cyclomatic 25) apps/desktop/src/lib/table/tableTree.ts:503 — tableTree.mergeTableTreePageChildren has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (addNode, collect, addToParent, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cyclomatic 25) · ×1
  • connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cyclomatic 25) apps/desktop/src/stores/connectionStore.ts:3193 — connectionStore.useConnectionStore.loadPagedObjectGroupChildren has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cyclomatic 25) · ×1
  • connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cyclomatic 25) apps/desktop/src/stores/connectionStore.ts:3376 — connectionStore.useConnectionStore.loadPagedSimpleTableChildren has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.revalidateObjectSourceTab (cyclomatic 25) · ×1
  • queryStore.useQueryStore.revalidateObjectSourceTab (cyclomatic 25) apps/desktop/src/stores/queryStore.ts:3464 — queryStore.useQueryStore.revalidateObjectSourceTab has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · transferTaskStore.normalizeTask (cyclomatic 25) · ×1
  • transferTaskStore.normalizeTask (cyclomatic 25) apps/desktop/src/stores/transferTaskStore.ts:98 — transferTaskStore.normalizeTask has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RoutineOperationRegistry · ×1
  • RoutineOperationRegistry::prepare_batch (cyclomatic 24) crates/dbx-core/src/schema/oracle_routines/operations/retention.rs:186 — RoutineOperationRegistry::prepare_batch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentDriverClient · ×1
  • AgentDriverClient::call_typed_with_timeout_and_cancel (cyclomatic 24) crates/dbx-driver-agent/src/agent_driver.rs:2259 — AgentDriverClient::call_typed_with_timeout_and_cancel has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AgentMethod::as_str (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.validatePeekRequest (cyclomatic 24) · ×1
  • KafkaAgent.validatePeekRequest (cyclomatic 24) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2482 — KafkaAgent.validatePeekRequest has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · cassandraConfig.finalize (cyclomatic 24) · ×1
  • cassandraConfig.finalize (cyclomatic 24) agents/drivers/cassandra-go/config.go:452 — cassandraConfig.finalize has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listIndexesWithoutOrdinality (cyclomatic 24) · ×1
  • server.listIndexesWithoutOrdinality (cyclomatic 24) REDACTED:2227 — server.listIndexesWithoutOrdinality has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.rewriteOracleSelectItems (cyclomatic 24) · ×1
  • main.rewriteOracleSelectItems (cyclomatic 24) REDACTED:5681 — main.rewriteOracleSelectItems has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleLegacyCharset.validateValue (cyclomatic 24) · ×1
  • oracleLegacyCharset.validateValue (cyclomatic 24) agents/drivers/oracle-go/legacy_charset.go:132 — oracleLegacyCharset.validateValue has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugLobOutput.freezeNationalSource (cyclomatic 24) · ×1
  • plDebugLobOutput.freezeNationalSource (cyclomatic 24) agents/drivers/oracle-go/pldebug_lob_output.go:49 — plDebugLobOutput.freezeNationalSource has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.applyMessageProperties (cyclomatic 24) · ×1
  • main.applyMessageProperties (cyclomatic 24) agents/drivers/rabbitmq/message_properties.go:12 — main.applyMessageProperties has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.renderNotice (cyclomatic 24) · ×1
  • index.html.renderNotice (cyclomatic 24) apps/desktop/index.html:409 — index.html.renderNotice has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cyclomatic 24) · ×1
  • useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cyclomatic 24) apps/desktop/src/components/editor/useQueryEditorCompletionKeys.ts:177 — useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cyclomatic 24) · ×1
  • useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cyclomatic 24) apps/desktop/src/composables/useDataGridExport.ts:2231 — useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2235, 2257, 2275, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cyclomatic 24) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cyclomatic 24) apps/desktop/src/composables/useDataGridLargeValues.ts:768 — useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useFileDrop.useFileDrop.setupFileDrop (cyclomatic 24) · ×1
  • useFileDrop.useFileDrop.setupFileDrop (cyclomatic 24) apps/desktop/src/composables/useFileDrop.ts:44 — useFileDrop.useFileDrop.setupFileDrop has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 48, 125, 139). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · safeJsonFormat.myersDiff (cyclomatic 24) · ×1
  • safeJsonFormat.myersDiff (cyclomatic 24) REDACTED:303 — safeJsonFormat.myersDiff has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · xmlFormat.parseXmlDocument (cyclomatic 24) · ×1
  • xmlFormat.parseXmlDocument (cyclomatic 24) apps/desktop/src/lib/common/xmlFormat.ts:37 — xmlFormat.parseXmlDocument has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentTarget.consulAgentWriteBlockedReason (cyclomatic 24) · ×1
  • agentTarget.consulAgentWriteBlockedReason (cyclomatic 24) apps/desktop/src/lib/consul/agentTarget.ts:39 — agentTarget.consulAgentWriteBlockedReason has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridCellCoercion.coerceDataGridCellValue (cyclomatic 24) · ×1
  • dataGridCellCoercion.coerceDataGridCellValue (cyclomatic 24) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:25 — dataGridCellCoercion.coerceDataGridCellValue has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.nativeJobDefinitionForEdit (cyclomatic 24) · ×1
  • nativeJobAdmin.nativeJobDefinitionForEdit (cyclomatic 24) apps/desktop/src/lib/database/nativeJobAdmin.ts:324 — nativeJobAdmin.nativeJobDefinitionForEdit has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cyclomatic 24) · ×1
  • oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cyclomatic 24) apps/desktop/src/lib/database/oracleIndexes.ts:263 — oracleIndexes.mergeOracleIndexDraftsAfterRefresh has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · keyboardShortcuts.matchesShortcut (cyclomatic 24) · ×1
  • keyboardShortcuts.matchesShortcut (cyclomatic 24) apps/desktop/src/lib/editor/keyboardShortcuts.ts:223 — keyboardShortcuts.matchesShortcut has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elasticsearchCompletion.inspectJsonBody (cyclomatic 24) · ×1
  • elasticsearchCompletion.inspectJsonBody (cyclomatic 24) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:461 — elasticsearchCompletion.inspectJsonBody has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoQueryInputBrackets.handleMongoQueryInputBrackets (cyclomatic 24) · ×1
  • mongoQueryInputBrackets.handleMongoQueryInputBrackets (cyclomatic 24) apps/desktop/src/lib/mongo/mongoQueryInputBrackets.ts:22 — mongoQueryInputBrackets.handleMongoQueryInputBrackets has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mqConsoleDefaults.resolveAvailableMqTabs (cyclomatic 24) · ×1
  • mqConsoleDefaults.resolveAvailableMqTabs (cyclomatic 24) apps/desktop/src/lib/mq/mqConsoleDefaults.ts:184 — mqConsoleDefaults.resolveAvailableMqTabs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.synchronizeOracleRoutineSelection (cyclomatic 24) · ×1
  • oracleRoutineDeploy.synchronizeOracleRoutineSelection (cyclomatic 24) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:94 — oracleRoutineDeploy.synchronizeOracleRoutineSelection has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayoutMonitor.detectLayoutAnomalies (cyclomatic 24) · ×1
  • sidebarLayoutMonitor.detectLayoutAnomalies (cyclomatic 24) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:443 — sidebarLayoutMonitor.detectLayoutAnomalies has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cyclomatic 24) · ×1
  • sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cyclomatic 24) apps/desktop/src/lib/sidebar/sidebarNodeOrdering.ts:80 — sidebarNodeOrdering.orderSidebarTreeChildrenForParent has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.parseRowSourcesAtDepth (cyclomatic 24) · ×1
  • model.parseRowSourcesAtDepth (cyclomatic 24) apps/desktop/src/lib/sql/semantic/model.ts:705 — model.parseRowSourcesAtDepth has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.analyzeSelectStructureForDisplay (cyclomatic 24) · ×1
  • sqlAnalysis.analyzeSelectStructureForDisplay (cyclomatic 24) apps/desktop/src/lib/sql/sqlAnalysis.ts:333 — sqlAnalysis.analyzeSelectStructureForDisplay has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.maskSqlLiteralsAndComments (cyclomatic 24) · ×1
  • sqlCompletion.maskSqlLiteralsAndComments (cyclomatic 24) apps/desktop/src/lib/sql/sqlCompletion.ts:4149 — sqlCompletion.maskSqlLiteralsAndComments has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.buildForeignKeyRelatedTableItems (cyclomatic 24) · ×1
  • sqlCompletion.buildForeignKeyRelatedTableItems (cyclomatic 24) apps/desktop/src/lib/sql/sqlCompletion.ts:5217 — sqlCompletion.buildForeignKeyRelatedTableItems has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlVariables.replaceReferences (cyclomatic 24) · ×1
  • sqlVariables.replaceReferences (cyclomatic 24) apps/desktop/src/lib/sql/sqlVariables.ts:245 — sqlVariables.replaceReferences has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectRenameSql.supportsObjectRename (cyclomatic 24) · ×1
  • objectRenameSql.supportsObjectRename (cyclomatic 24) apps/desktop/src/lib/table/objectRenameSql.ts:19 — objectRenameSql.supportsObjectRename has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTableRename.readOnlyReconcile (cyclomatic 24) · ×1
  • oracleTableRename.readOnlyReconcile (cyclomatic 24) REDACTED:794 — oracleTableRename.readOnlyReconcile has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeManagement.stepSatisfied (cyclomatic 24) · ×1
  • oracleTypeManagement.stepSatisfied (cyclomatic 24) apps/desktop/src/lib/table/oracleTypeManagement.ts:449 — oracleTypeManagement.stepSatisfied has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeDataMapping.executeOracleTypeDataInsert (cyclomatic 24) · ×1
  • oracleTypeDataMapping.executeOracleTypeDataInsert (cyclomatic 24) apps/desktop/src/lib/table/oracleTypeDataMapping.ts:82 — oracleTypeDataMapping.executeOracleTypeDataInsert has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.disconnect (cyclomatic 24) · ×1
  • connectionStore.useConnectionStore.disconnect (cyclomatic 24) apps/desktop/src/stores/connectionStore.ts:5809 — connectionStore.useConnectionStore.disconnect has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.migrateTimeoutInheritance (cyclomatic 24) · ×1
  • connectionStore.useConnectionStore.migrateTimeoutInheritance (cyclomatic 24) apps/desktop/src/stores/connectionStore.ts:11008 — connectionStore.useConnectionStore.migrateTimeoutInheritance has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (resolveInheritance). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> (cyclomatic 24) · ×1
  • queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> (cyclomatic 24) apps/desktop/src/stores/queryStore.ts:11860 — queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TdengineDriver · ×1
  • TdengineDriver::completion_assistant_search (cyclomatic 23) agents/drivers/tdengine/src/driver.rs:256 — TdengineDriver::completion_assistant_search has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlServerBatchSplitter · ×1
  • SqlServerBatchSplitter::push_line (cyclomatic 23) REDACTED:2211 — SqlServerBatchSplitter::push_line has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SnippetSyncClient · ×1
  • SnippetSyncClient::put_snapshot_with_expected_remote_hash (cyclomatic 23) crates/dbx-core/src/persistence/cloud_sync.rs:2061 — SnippetSyncClient::put_snapshot_with_expected_remote_hash has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextEncoding · ×1
  • TextEncoding::encode_copy_text (cyclomatic 23) crates/dbx-driver-postgres/src/text_encoding.rs:149 — TextEncoding::encode_copy_text has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · EwkbWktDecoder.geometryToWkt (cyclomatic 23) · ×1
  • EwkbWktDecoder.geometryToWkt (cyclomatic 23) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:489 — EwkbWktDecoder.geometryToWkt has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handleRequest (cyclomatic 23) · ×1
  • DbxJdbcPlugin.handleRequest (cyclomatic 23) REDACTED:693 — DbxJdbcPlugin.handleRequest has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.stripCommentsAndLiterals (cyclomatic 23) · ×1
  • DbxJdbcPlugin.stripCommentsAndLiterals (cyclomatic 23) REDACTED:2839 — DbxJdbcPlugin.stripCommentsAndLiterals has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FirebirdObjectSource.read (cyclomatic 23) · ×1
  • FirebirdObjectSource.read (cyclomatic 23) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:12 — FirebirdObjectSource.read has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KafkaAgent.applySecurityProperties (cyclomatic 23) · ×1
  • KafkaAgent.applySecurityProperties (cyclomatic 23) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:527 — KafkaAgent.applySecurityProperties has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugCondition.evaluate (cyclomatic 23) · ×1
  • PlDebugCondition.evaluate (cyclomatic 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCondition.java:33 — PlDebugCondition.evaluate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.copy (cyclomatic 23) · ×1
  • PlDebugTemporalJson.copy (cyclomatic 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:132 — PlDebugTemporalJson.copy has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.renderCQLValue (cyclomatic 23) · ×1
  • main.renderCQLValue (cyclomatic 23) agents/drivers/cassandra-go/values.go:39 — main.renderCQLValue has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · main.pumpLongPollWatch (cyclomatic 23) · ×1
  • main.pumpLongPollWatch (cyclomatic 23) agents/drivers/etcd2-go/watch.go:273 — main.pumpLongPollWatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcd2Session.put (cyclomatic 23) · ×1
  • etcd2Session.put (cyclomatic 23) agents/drivers/etcd2-go/kv.go:178 — etcd2Session.put has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.plDebugExecuteNativeStatement (cyclomatic 23) · ×1
  • main.plDebugExecuteNativeStatement (cyclomatic 23) REDACTED:86 — main.plDebugExecuteNativeStatement has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.plDebugDecodeBinaryOrLobInput (cyclomatic 23) · ×1
  • main.plDebugDecodeBinaryOrLobInput (cyclomatic 23) agents/drivers/oracle-go/pldebug_lob_input.go:28 — main.plDebugDecodeBinaryOrLobInput has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.listIndexesWithIdentity (cyclomatic 23) · ×1
  • server.listIndexesWithIdentity (cyclomatic 23) REDACTED:3212 — server.listIndexesWithIdentity has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.compileNativeTarget (cyclomatic 23) · ×1
  • runtimeServer.compileNativeTarget (cyclomatic 23) agents/drivers/oracle-go/pldebug_compile.go:69 — runtimeServer.compileNativeTarget has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugRecordDecoder.leaf (cyclomatic 23) · ×1
  • plDebugRecordDecoder.leaf (cyclomatic 23) agents/drivers/oracle-go/pldebug_record_input.go:204 — plDebugRecordDecoder.leaf has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · proxyManager.rewriteJSON (cyclomatic 23) · ×1
  • proxyManager.rewriteJSON (cyclomatic 23) REDACTED:462 — proxyManager.rewriteJSON has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rocketMQAgent.connectProxy (cyclomatic 23) · ×1
  • rocketMQAgent.connectProxy (cyclomatic 23) agents/drivers/rocketmq/proxy.go:427 — rocketMQAgent.connectProxy has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.isQuerySQL (cyclomatic 23) · ×1
  • main.isQuerySQL (cyclomatic 23) agents/drivers/vastbase-go/main.go:1416 — main.isQuerySQL has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: server.dispatch (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · main.renderXuguIndexPartitionDDL (cyclomatic 23) · ×1
  • main.renderXuguIndexPartitionDDL (cyclomatic 23) REDACTED:5254 — main.renderXuguIndexPartitionDDL has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.scanSqlServerControlFlow (cyclomatic 23) · ×1
  • sqlStatementRanges.scanSqlServerControlFlow (cyclomatic 23) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1019 — sqlStatementRanges.scanSqlServerControlFlow has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cyclomatic 23) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cyclomatic 23) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1631 — useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferDdl.sqlServerDescriptionParameters (cyclomatic 23) · ×1
  • queryResultTransferDdl.sqlServerDescriptionParameters (cyclomatic 23) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:203 — queryResultTransferDdl.sqlServerDescriptionParameters has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportSql (cyclomatic 23) · ×1
  • useDataGridExport.useDataGridExport.exportSql (cyclomatic 23) apps/desktop/src/composables/useDataGridExport.ts:2849 — useDataGridExport.useDataGridExport.exportSql has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2853, 2856). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cyclomatic 23) · ×1
  • useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cyclomatic 23) apps/desktop/src/composables/useDataGridExtractor.ts:549 — useDataGridExtractor.useDataGridExtractor.copyWithExtractor has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridSearch.useDataGridSearch (cyclomatic 23) · ×1
  • useDataGridSearch.useDataGridSearch (cyclomatic 23) apps/desktop/src/composables/useDataGridSearch.ts:41 — useDataGridSearch.useDataGridSearch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDialogSources.useDialogSources (cyclomatic 23) · ×1
  • useDialogSources.useDialogSources (cyclomatic 23) apps/desktop/src/composables/useDialogSources.ts:165 — useDialogSources.useDialogSources has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 20 function literals inside it that branch (lines 270, 176, 193, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ai.buildSystemPrompt (cyclomatic 23) · ×1
  • ai.buildSystemPrompt (cyclomatic 23) apps/desktop/src/lib/ai/ai.ts:397 — ai.buildSystemPrompt has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aiGenerationStatus.applyStatusEvent (cyclomatic 23) · ×1
  • aiGenerationStatus.applyStatusEvent (cyclomatic 23) apps/desktop/src/lib/ai/aiGenerationStatus.ts:102 — aiGenerationStatus.applyStatusEvent has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aiIntentRouter.routeByRulesUnchecked (cyclomatic 23) · ×1
  • aiIntentRouter.routeByRulesUnchecked (cyclomatic 23) apps/desktop/src/lib/ai/aiIntentRouter.ts:220 — aiIntentRouter.routeByRulesUnchecked has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · documentStoreProvider.rewriteUnsafeIntegerTokens (cyclomatic 23) · ×1
  • documentStoreProvider.rewriteUnsafeIntegerTokens (cyclomatic 23) apps/desktop/src/lib/app/documentStoreProvider.ts:777 — documentStoreProvider.rewriteUnsafeIntegerTokens has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cyclomatic 23) · ×1
  • oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cyclomatic 23) REDACTED:268 — oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cyclomatic 23) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cyclomatic 23) apps/desktop/src/lib/database/oracleForeignKeys.ts:515 — oracleForeignKeys.prepareOracleForeignKeyCreatePlan has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirrorCurrentStatementFrameLayer.currentStatementFrameLayer (cyclomatic 23) · ×1
  • codemirrorCurrentStatementFrameLayer.currentStatementFrameLayer (cyclomatic 23) apps/desktop/src/lib/editor/codemirrorCurrentStatementFrameLayer.ts:183 — codemirrorCurrentStatementFrameLayer.currentStatementFrameLayer has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · keyboardShortcuts.eventToShortcut (cyclomatic 23) · ×1
  • keyboardShortcuts.eventToShortcut (cyclomatic 23) apps/desktop/src/lib/editor/keyboardShortcuts.ts:174 — keyboardShortcuts.eventToShortcut has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mcpCapabilitySearch.searchMcpCapabilities (cyclomatic 23) · ×1
  • mcpCapabilitySearch.searchMcpCapabilities (cyclomatic 23) apps/desktop/src/lib/mcp/mcpCapabilitySearch.ts:53 — mcpCapabilitySearch.searchMcpCapabilities has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableMetadataCache.loadTableMetadata (cyclomatic 23) · ×1
  • tableMetadataCache.loadTableMetadata (cyclomatic 23) apps/desktop/src/lib/metadata/tableMetadataCache.ts:361 — tableMetadataCache.loadTableMetadata has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.classifyFilter (cyclomatic 23) · ×1
  • mongoCompletion.classifyFilter (cyclomatic 23) REDACTED:1218 — mongoCompletion.classifyFilter has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoCommand (cyclomatic 23) · ×1
  • mongoShellCommand.parseMongoCommand (cyclomatic 23) REDACTED:1041 — mongoShellCommand.parseMongoCommand has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1053, 1057, 1061, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Parser.parsePredicate (cyclomatic 23) · ×1
  • Parser.parsePredicate (cyclomatic 23) apps/desktop/src/lib/mongo/mongoSql.ts:350 — Parser.parsePredicate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryCursorOffsetPagination.executeCursorOffsetPage (cyclomatic 23) · ×1
  • queryCursorOffsetPagination.executeCursorOffsetPage (cyclomatic 23) apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:4 — queryCursorOffsetPagination.executeCursorOffsetPage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisKeyTree.sortRedisTreeLevelCooperatively (cyclomatic 23) · ×1
  • redisKeyTree.sortRedisTreeLevelCooperatively (cyclomatic 23) apps/desktop/src/lib/redis/redisKeyTree.ts:242 — redisKeyTree.sortRedisTreeLevelCooperatively has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sidebarSearch.matchSidebarLabelWithRegex (cyclomatic 23) · ×1
  • sidebarSearch.matchSidebarLabelWithRegex (cyclomatic 23) apps/desktop/src/lib/sidebar/sidebarSearch.ts:174 — sidebarSearch.matchSidebarLabelWithRegex has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarTreeLabel.sidebarTreeDisplayLabel (cyclomatic 23) · ×1
  • sidebarTreeLabel.sidebarTreeDisplayLabel (cyclomatic 23) apps/desktop/src/lib/sidebar/sidebarTreeLabel.ts:8 — sidebarTreeLabel.sidebarTreeDisplayLabel has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CypherPrinter.format (cyclomatic 23) · ×1
  • CypherPrinter.format (cyclomatic 23) apps/desktop/src/lib/sql/cypherFormatter.ts:369 — CypherPrinter.format has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlDisplay.findCreateTableBody (cyclomatic 23) · ×1
  • ddlDisplay.findCreateTableBody (cyclomatic 23) apps/desktop/src/lib/sql/ddlDisplay.ts:394 — ddlDisplay.findCreateTableBody has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · completion.sqlSemanticSelectStarIsOnlyProjection (cyclomatic 23) · ×1
  • completion.sqlSemanticSelectStarIsOnlyProjection (cyclomatic 23) apps/desktop/src/lib/sql/semantic/completion.ts:77 — completion.sqlSemanticSelectStarIsOnlyProjection has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · diagnostics.buildSqlSemanticDiagnostics (cyclomatic 23) · ×1
  • diagnostics.buildSqlSemanticDiagnostics (cyclomatic 23) apps/desktop/src/lib/sql/semantic/diagnostics.ts:268 — diagnostics.buildSqlSemanticDiagnostics has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.parseCteSources (cyclomatic 23) · ×1
  • model.parseCteSources (cyclomatic 23) apps/desktop/src/lib/sql/semantic/model.ts:400 — model.parseCteSources has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.containsTopLevelAggregate (cyclomatic 23) · ×1
  • sqlAnalysis.containsTopLevelAggregate (cyclomatic 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:833 — sqlAnalysis.containsTopLevelAggregate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.currentSqlLikeLineBlockSpan (cyclomatic 23) · ×1
  • sqlCompletion.currentSqlLikeLineBlockSpan (cyclomatic 23) apps/desktop/src/lib/sql/sqlCompletion.ts:2754 — sqlCompletion.currentSqlLikeLineBlockSpan has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildJoinConditionItemsForPair (cyclomatic 23) · ×1
  • sqlCompletion.buildJoinConditionItemsForPair (cyclomatic 23) apps/desktop/src/lib/sql/sqlCompletion.ts:6518 — sqlCompletion.buildJoinConditionItemsForPair has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.isPostgresQuestionMarkOperator (cyclomatic 23) · ×1
  • sqlParameters.isPostgresQuestionMarkOperator (cyclomatic 23) apps/desktop/src/lib/sql/sqlParameters.ts:887 — sqlParameters.isPostgresQuestionMarkOperator has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlServerHostPort.parseSqlServerHostPort (cyclomatic 23) · ×1
  • sqlServerHostPort.parseSqlServerHostPort (cyclomatic 23) apps/desktop/src/lib/sqlserver/sqlServerHostPort.ts:7 — sqlServerHostPort.parseSqlServerHostPort has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.tokenizeXuguRoutineDefinition (cyclomatic 23) · ×1
  • routineParameters.tokenizeXuguRoutineDefinition (cyclomatic 23) apps/desktop/src/lib/table/routineParameters.ts:248 — routineParameters.tokenizeXuguRoutineDefinition has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableSelectSql.sqlCteVisibilities (cyclomatic 23) · ×1
  • tableSelectSql.sqlCteVisibilities (cyclomatic 23) apps/desktop/src/lib/table/tableSelectSql.ts:335 — tableSelectSql.sqlCteVisibilities has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableSelectSql.requiresIdentifierQuote (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tabPresentation.tabModeLabel (cyclomatic 23) · ×1
  • tabPresentation.tabModeLabel (cyclomatic 23) apps/desktop/src/lib/tabs/tabPresentation.ts:820 — tabPresentation.tabModeLabel has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.invalidateMetadataCachesForNode (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.invalidateMetadataCachesForNode (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:2852 — connectionStore.useConnectionStore.invalidateMetadataCachesForNode has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTableGroups (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.loadTableGroups (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:8514 — connectionStore.useConnectionStore.loadTableGroups has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTriggers (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.loadTriggers (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:8815 — connectionStore.useConnectionStore.loadTriggers has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 8838). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.decodeVariable (cyclomatic 23) · ×1
  • plDebugStore.decodeVariable (cyclomatic 23) apps/desktop/src/stores/plDebugStore.ts:2153 — plDebugStore.decodeVariable has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.applyRestoredOpenTabs (cyclomatic 23) · ×1
  • queryStore.useQueryStore.applyRestoredOpenTabs (cyclomatic 23) apps/desktop/src/stores/queryStore.ts:2806 — queryStore.useQueryStore.applyRestoredOpenTabs has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cyclomatic 23) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cyclomatic 23) apps/desktop/src/stores/queryStore.ts:10893 — queryStore.useQueryStore.captureResultLegacyValuesForExport.read has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cyclomatic 23) · ×1
  • savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cyclomatic 23) apps/desktop/src/stores/savedSqlStore.ts:744 — savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LandingSelect.LandingSelect (cyclomatic 23) · ×1
  • LandingSelect.LandingSelect (cyclomatic 23) docs/components/landing/LandingSelect.tsx:18 — LandingSelect.LandingSelect has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (toggle, onListKeyDown, onButtonKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · agentBundle.assembleCustomBundle (cyclomatic 23) · ×1
  • agentBundle.assembleCustomBundle (cyclomatic 23) docs/lib/agentBundle.ts:469 — agentBundle.assembleCustomBundle has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 506, a function literal at line 535, reportDownload). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Resolver · ×1
  • Resolver::call (cyclomatic 22) crates/dbx-core/src/schema/oracle_routines/references.rs:363 — Resolver::call has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentRuntimeClient · ×1
  • AgentRuntimeClient::call_typed_with_policy (cyclomatic 22) crates/dbx-driver-agent/src/agent_driver.rs:234 — AgentRuntimeClient::call_typed_with_policy has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AgentMethod::as_str (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dbx_plugin_cli · ×1
  • dbx_plugin_cli::dev::build_config (cyclomatic 22) plugins/sdk/cli/src/dev.rs:52 — dbx_plugin_cli::dev::build_config has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.getExplainInfo (cyclomatic 22) · ×1
  • DbxJdbcPlugin.getExplainInfo (cyclomatic 22) REDACTED:2334 — DbxJdbcPlugin.getExplainInfo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KafkaAgent.brokerEndpoints (cyclomatic 22) · ×1
  • KafkaAgent.brokerEndpoints (cyclomatic 22) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:437 — KafkaAgent.brokerEndpoints has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Writer.composite (cyclomatic 22) · ×1
  • Writer.composite (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:321 — Writer.composite has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSource.load (cyclomatic 22) · ×1
  • PlDebugSource.load (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:64 — PlDebugSource.load has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.constructorLobProfile (cyclomatic 22) · ×1
  • PlDebugTarget.constructorLobProfile (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:144 — PlDebugTarget.constructorLobProfile has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.decodeZoned (cyclomatic 22) · ×1
  • PlDebugTarget.decodeZoned (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1211 — PlDebugTarget.decodeZoned has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Loader.ddlSource (cyclomatic 22) · ×1
  • Loader.ddlSource (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:223 — Loader.ddlSource has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentSession.dispatch (cyclomatic 22) · ×1
  • agentSession.dispatch (cyclomatic 22) agents/drivers/nebula-go/query.go:87 — agentSession.dispatch has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · main.readOracleTNSAliases (cyclomatic 22) · ×1
  • main.readOracleTNSAliases (cyclomatic 22) agents/drivers/oracle-go/tns.go:102 — main.readOracleTNSAliases has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listObjects (cyclomatic 22) · ×1
  • server.listObjects (cyclomatic 22) REDACTED:2210 — server.listObjects has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.statementRangeAtCursor (cyclomatic 22) · ×1
  • sqlStatementRanges.statementRangeAtCursor (cyclomatic 22) apps/desktop/src/lib/sql/sqlStatementRanges.ts:775 — sqlStatementRanges.statementRangeAtCursor has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.escapedTextLiteral (cyclomatic 22) · ×1
  • queryResultTransferValues.escapedTextLiteral (cyclomatic 22) apps/desktop/src/components/transfer/queryResultTransferValues.ts:272 — queryResultTransferValues.escapedTextLiteral has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.performInstall (cyclomatic 22) · ×1
  • useAppUpdater.useAppUpdater.performInstall (cyclomatic 22) apps/desktop/src/composables/useAppUpdater.ts:518 — useAppUpdater.useAppUpdater.performInstall has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridCellDetail.useDataGridCellDetail (cyclomatic 22) · ×1
  • useDataGridCellDetail.useDataGridCellDetail (cyclomatic 22) apps/desktop/src/composables/useDataGridCellDetail.ts:9 — useDataGridCellDetail.useDataGridCellDetail has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 38, 67, 30, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useQuickOpen.matchQuickOpenText (cyclomatic 22) · ×1
  • useQuickOpen.matchQuickOpenText (cyclomatic 22) apps/desktop/src/composables/useQuickOpen.ts:200 — useQuickOpen.matchQuickOpenText has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · documentStoreProvider.translateFieldFilterToElasticsearchQuery (cyclomatic 22) · ×1
  • documentStoreProvider.translateFieldFilterToElasticsearchQuery (cyclomatic 22) apps/desktop/src/lib/app/documentStoreProvider.ts:1053 — documentStoreProvider.translateFieldFilterToElasticsearchQuery has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrl.databendUrlOptions (cyclomatic 22) · ×1
  • connectionUrl.databendUrlOptions (cyclomatic 22) REDACTED:418 — connectionUrl.databendUrlOptions has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridColumnLayoutStorage.queryLayoutSql (cyclomatic 22) · ×1
  • dataGridColumnLayoutStorage.queryLayoutSql (cyclomatic 22) apps/desktop/src/lib/dataGrid/dataGridColumnLayoutStorage.ts:78 — dataGridColumnLayoutStorage.queryLayoutSql has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · geometryMapPreview.buildGeometryMapFeatureCollection (cyclomatic 22) · ×1
  • geometryMapPreview.buildGeometryMapFeatureCollection (cyclomatic 22) apps/desktop/src/lib/dataGrid/geometryMapPreview.ts:44 — geometryMapPreview.buildGeometryMapFeatureCollection has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.parseAtom (cyclomatic 22) · ×1
  • regexGenerate.parseAtom (cyclomatic 22) REDACTED:240 — regexGenerate.parseAtom has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.prepareUniqueTargetIndex (cyclomatic 22) · ×1
  • oracleConstraints.prepareUniqueTargetIndex (cyclomatic 22) apps/desktop/src/lib/database/oracleConstraints.ts:496 — oracleConstraints.prepareUniqueTargetIndex has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTriggerPlan.verifyBinding (cyclomatic 22) · ×1
  • oracleTriggerPlan.verifyBinding (cyclomatic 22) apps/desktop/src/lib/database/oracleTriggerPlan.ts:642 — oracleTriggerPlan.verifyBinding has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cyclomatic 22) · ×1
  • codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cyclomatic 22) apps/desktop/src/lib/editor/codemirrorTrimmedSelectionLayer.ts:193 — codemirrorTrimmedSelectionLayer.trimmedSelectionLayer has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · keyboardShortcuts.matchesModifierOnlyShortcut (cyclomatic 22) · ×1
  • keyboardShortcuts.matchesModifierOnlyShortcut (cyclomatic 22) apps/desktop/src/lib/editor/keyboardShortcuts.ts:209 — keyboardShortcuts.matchesModifierOnlyShortcut has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · shortcutRegistry.computeNormalizedShortcutSettings (cyclomatic 22) · ×1
  • shortcutRegistry.computeNormalizedShortcutSettings (cyclomatic 22) apps/desktop/src/lib/editor/shortcutRegistry.ts:1018 — shortcutRegistry.computeNormalizedShortcutSettings has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1021, 1060, 1075). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoCompletion.classifyMethodOptions (cyclomatic 22) · ×1
  • mongoCompletion.classifyMethodOptions (cyclomatic 22) REDACTED:1416 — mongoCompletion.classifyMethodOptions has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoDocumentValues.parseMongoDocumentInputValue (cyclomatic 22) · ×1
  • mongoDocumentValues.parseMongoDocumentInputValue (cyclomatic 22) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:151 — mongoDocumentValues.parseMongoDocumentInputValue has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoFindCommand (cyclomatic 22) · ×1
  • mongoShellCommand.parseMongoFindCommand (cyclomatic 22) REDACTED:378 — mongoShellCommand.parseMongoFindCommand has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarRemoteSearch.collectSidebarRemoteSearchResults (cyclomatic 22) · ×1
  • sidebarRemoteSearch.collectSidebarRemoteSearchResults (cyclomatic 22) apps/desktop/src/lib/sidebar/sidebarRemoteSearch.ts:15 — sidebarRemoteSearch.collectSidebarRemoteSearchResults has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function items inside it that branch (visit, a function literal at line 30, publish, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · treeNodeClick.treeNodeRowAction (cyclomatic 22) · ×1
  • treeNodeClick.treeNodeRowAction (cyclomatic 22) apps/desktop/src/lib/sidebar/treeNodeClick.ts:169 — treeNodeClick.treeNodeRowAction has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.computeMatchScore (cyclomatic 22) · ×1
  • sqlCompletion.computeMatchScore (cyclomatic 22) apps/desktop/src/lib/sql/sqlCompletion.ts:7095 — sqlCompletion.computeMatchScore has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabUiState.sanitizeValue (cyclomatic 22) · ×1
  • tabUiState.sanitizeValue (cyclomatic 22) apps/desktop/src/lib/tabs/tabUiState.ts:72 — tabUiState.sanitizeValue has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cyclomatic 22) · ×1
  • connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cyclomatic 22) apps/desktop/src/stores/connectionStore.ts:4236 — connectionStore.useConnectionStore.buildSidebarTableSearchIndex has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadSchemas (cyclomatic 22) · ×1
  • connectionStore.useConnectionStore.loadSchemas (cyclomatic 22) apps/desktop/src/stores/connectionStore.ts:7179 — connectionStore.useConnectionStore.loadSchemas has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7194, 7237). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.refreshStack (cyclomatic 22) · ×1
  • plDebugStore.usePlDebugStore.refreshStack (cyclomatic 22) apps/desktop/src/stores/plDebugStore.ts:1599 — plDebugStore.usePlDebugStore.refreshStack has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore (cyclomatic 22) · ×1
  • queryStore.useQueryStore (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:1189 — queryStore.useQueryStore has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 4882, 1237, 11150, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openTableStructure (cyclomatic 22) · ×1
  • queryStore.useQueryStore.openTableStructure (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:4800 — queryStore.useQueryStore.openTableStructure has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.ensureManualTransactionSession (cyclomatic 22) · ×1
  • queryStore.useQueryStore.ensureManualTransactionSession (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:6266 — queryStore.useQueryStore.ensureManualTransactionSession has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RuntimeConfig · ×1
  • RuntimeConfig::from_environment_and_args (cyclomatic 21) crates/dbx-mcp/src/runtime.rs:43 — RuntimeConfig::from_environment_and_args has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dbx_plugin_packager · ×1
  • dbx_plugin_packager::run_package_cli (cyclomatic 21) plugins/sdk/packager/src/main.rs:80 — dbx_plugin_packager::run_package_cli has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackedPhysicalConnection.<init> (cyclomatic 21) · ×1
  • TrackedPhysicalConnection.<init> (cyclomatic 21) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1917 — TrackedPhysicalConnection.<init> has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.<init> (cyclomatic 21) · ×1
  • NativeLegacyJobSession.<init> (cyclomatic 21) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:50 — NativeLegacyJobSession.<init> has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DamengAgent.queryConstrainedTables (cyclomatic 21) · ×1
  • DamengAgent.queryConstrainedTables (cyclomatic 21) REDACTED:606 — DamengAgent.queryConstrainedTables has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OceanBaseLobValues.read (cyclomatic 21) · ×1
  • OceanBaseLobValues.read (cyclomatic 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:170 — OceanBaseLobValues.read has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlDebugCapabilities.probe (cyclomatic 21) · ×1
  • PlDebugCapabilities.probe (cyclomatic 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:21 — PlDebugCapabilities.probe has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TranswarpAgent.getColumns (cyclomatic 21) · ×1
  • TranswarpAgent.getColumns (cyclomatic 21) REDACTED:200 — TranswarpAgent.getColumns has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ci-gradle.acquire_and_run (cyclomatic 21) · ×1
  • ci-gradle.acquire_and_run (cyclomatic 21) .github/scripts/ci-gradle.py:122 — ci-gradle.acquire_and_run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cassandraConfig.clusterConfig (cyclomatic 21) · ×1
  • cassandraConfig.clusterConfig (cyclomatic 21) agents/drivers/cassandra-go/config.go:364 — cassandraConfig.clusterConfig has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcd2Session.status (cyclomatic 21) · ×1
  • etcd2Session.status (cyclomatic 21) agents/drivers/etcd2-go/status.go:14 — etcd2Session.status has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.completionAssistantSearch (cyclomatic 21) · ×1
  • server.completionAssistantSearch (cyclomatic 21) agents/drivers/iotdb/metadata.go:486 — server.completionAssistantSearch has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.hasTopLevelSQLKeyword (cyclomatic 21) · ×1
  • main.hasTopLevelSQLKeyword (cyclomatic 21) agents/drivers/kingbase-go/main.go:2088 — main.hasTopLevelSQLKeyword has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.skipSQLParenthesized (cyclomatic 21) · ×1
  • main.skipSQLParenthesized (cyclomatic 21) agents/drivers/kingbase-go/main.go:2182 — main.skipSQLParenthesized has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getTablePartitioning (cyclomatic 21) · ×1
  • server.getTablePartitioning (cyclomatic 21) REDACTED:1204 — server.getTablePartitioning has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listIndexes (cyclomatic 21) · ×1
  • server.listIndexes (cyclomatic 21) REDACTED:2126 — server.listIndexes has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.appendGraphDisplay (cyclomatic 21) · ×1
  • main.appendGraphDisplay (cyclomatic 21) agents/drivers/nebula-go/graph_display.go:20 — main.appendGraphDisplay has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyIndexType (cyclomatic 21) · ×1
  • main.plDebugLegacyIndexType (cyclomatic 21) agents/drivers/oracle-go/pldebug_legacy_declarations.go:94 — main.plDebugLegacyIndexType has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · main.plDebugNativeInputTransport (cyclomatic 21) · ×1
  • main.plDebugNativeInputTransport (cyclomatic 21) agents/drivers/oracle-go/pldebug_transport_preflight.go:90 — main.plDebugNativeInputTransport has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.completionAssistantTables (cyclomatic 21) · ×1
  • server.completionAssistantTables (cyclomatic 21) REDACTED:2452 — server.completionAssistantTables has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugSession.currentProgramLabel (cyclomatic 21) · ×1
  • plDebugSession.currentProgramLabel (cyclomatic 21) REDACTED:5517 — plDebugSession.currentProgramLabel has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugCollectionInitializer.object (cyclomatic 21) · ×1
  • plDebugCollectionInitializer.object (cyclomatic 21) agents/drivers/oracle-go/pldebug_object_initialize.go:5 — plDebugCollectionInitializer.object has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.resolveNativeAnonymousSources (cyclomatic 21) · ×1
  • plDebugNativeEntry.resolveNativeAnonymousSources (cyclomatic 21) agents/drivers/oracle-go/pldebug_anonymous_source.go:85 — plDebugNativeEntry.resolveNativeAnonymousSources has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.listNativeBreakpoints (cyclomatic 21) · ×1
  • plDebugNativeEntry.listNativeBreakpoints (cyclomatic 21) agents/drivers/oracle-go/pldebug_breakpoint.go:132 — plDebugNativeEntry.listNativeBreakpoints has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 146). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugNativeEntry.control (cyclomatic 21) · ×1
  • plDebugNativeEntry.control (cyclomatic 21) agents/drivers/oracle-go/pldebug_manager.go:739 — plDebugNativeEntry.control has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.publishNativeStackLocked (cyclomatic 21) · ×1
  • plDebugNativeEntry.publishNativeStackLocked (cyclomatic 21) agents/drivers/oracle-go/pldebug_stack.go:266 — plDebugNativeEntry.publishNativeStackLocked has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugResultCache.page (cyclomatic 21) · ×1
  • plDebugResultCache.page (cyclomatic 21) agents/drivers/oracle-go/pldebug_results.go:143 — plDebugResultCache.page has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.convertObjectKeyedMap (cyclomatic 21) · ×1
  • main.convertObjectKeyedMap (cyclomatic 21) REDACTED:336 — main.convertObjectKeyedMap has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.completionAssistantSearchTypeMembers (cyclomatic 21) · ×1
  • server.completionAssistantSearchTypeMembers (cyclomatic 21) agents/drivers/xugu/type_members.go:163 — server.completionAssistantSearchTypeMembers has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · krb5.newInitiatorClient (cyclomatic 21) · ×1
  • krb5.newInitiatorClient (cyclomatic 21) agents/go-common/go-gssapi/krb5/krb5.go:807 — krb5.newInitiatorClient has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · client.valuesToBytes (cyclomatic 21) · ×1
  • client.valuesToBytes (cyclomatic 21) agents/go-common/iotdb-client-go/client/session.go:1316 — client.valuesToBytes has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ddlStorage.oracleStorageClauseEnd (cyclomatic 21) · ×1
  • ddlStorage.oracleStorageClauseEnd (cyclomatic 21) apps/desktop/src/lib/sql/ddlStorage.ts:173 — ddlStorage.oracleStorageClauseEnd has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cyclomatic 21) · ×1
  • queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cyclomatic 21) apps/desktop/src/components/editor/queryEditorHoverContent.ts:20 — queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.extractorCellValue (cyclomatic 21) · ×1
  • useDataGridExtractor.useDataGridExtractor.extractorCellValue (cyclomatic 21) apps/desktop/src/composables/useDataGridExtractor.ts:147 — useDataGridExtractor.useDataGridExtractor.extractorCellValue has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cyclomatic 21) · ×1
  • useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cyclomatic 21) apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:654 — useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cyclomatic 21) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cyclomatic 21) REDACTED:291 — scheduledDatabaseBackup.normalizeDatabaseBackupSchedule has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionConfigTransfer.prepareConnectionConfigImport (cyclomatic 21) · ×1
  • connectionConfigTransfer.prepareConnectionConfigImport (cyclomatic 21) apps/desktop/src/lib/connection/connectionConfigTransfer.ts:209 — connectionConfigTransfer.prepareConnectionConfigImport has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnWidthState.saveDataGridColumnWidthState (cyclomatic 21) · ×1
  • dataGridColumnWidthState.saveDataGridColumnWidthState (cyclomatic 21) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:266 — dataGridColumnWidthState.saveDataGridColumnWidthState has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · largeValueSnapshot.readLargeValueSnapshot (cyclomatic 21) · ×1
  • largeValueSnapshot.readLargeValueSnapshot (cyclomatic 21) apps/desktop/src/lib/dataGrid/largeValueSnapshot.ts:31 — largeValueSnapshot.readLargeValueSnapshot has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.gen (cyclomatic 21) · ×1
  • regexGenerate.gen (cyclomatic 21) REDACTED:361 — regexGenerate.gen has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cyclomatic 21) · ×1
  • databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cyclomatic 21) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:148 — databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cyclomatic 21) · ×1
  • databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cyclomatic 21) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:467 — databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobs.damengChildChanges (cyclomatic 21) · ×1
  • nativeJobs.damengChildChanges (cyclomatic 21) apps/desktop/src/lib/database/nativeJobs.ts:365 — nativeJobs.damengChildChanges has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.validateChange (cyclomatic 21) · ×1
  • oracleConstraints.validateChange (cyclomatic 21) apps/desktop/src/lib/database/oracleConstraints.ts:405 — oracleConstraints.validateChange has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.validateOracleForeignKeyReference (cyclomatic 21) · ×1
  • oracleForeignKeys.validateOracleForeignKeyReference (cyclomatic 21) apps/desktop/src/lib/database/oracleForeignKeys.ts:427 — oracleForeignKeys.validateOracleForeignKeyReference has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.loadedColumnType (cyclomatic 21) · ×1
  • oracleIndexes.loadedColumnType (cyclomatic 21) apps/desktop/src/lib/database/oracleIndexes.ts:104 — oracleIndexes.loadedColumnType has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguExplainPlan.parseXuguExplainText (cyclomatic 21) · ×1
  • xuguExplainPlan.parseXuguExplainText (cyclomatic 21) REDACTED:20 — xuguExplainPlan.parseXuguExplainText has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.parseOracleExplainText (cyclomatic 21) · ×1
  • explainPlan.parseOracleExplainText (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:175 — explainPlan.parseOracleExplainText has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.parseDamengPlanLine (cyclomatic 21) · ×1
  • explainPlan.parseDamengPlanLine (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:312 — explainPlan.parseDamengPlanLine has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.buildDamengTree (cyclomatic 21) · ×1
  • explainPlan.buildDamengTree (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:730 — explainPlan.buildDamengTree has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hoverTableSql.parseColumnLine (cyclomatic 21) · ×1
  • hoverTableSql.parseColumnLine (cyclomatic 21) apps/desktop/src/lib/editor/hoverTableSql.ts:549 — hoverTableSql.parseColumnLine has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown (cyclomatic 21) · ×1
  • modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown (cyclomatic 21) apps/desktop/src/lib/editor/modifierDoubleTapShortcut.ts:51 — modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup (cyclomatic 21) · ×1
  • modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup (cyclomatic 21) apps/desktop/src/lib/editor/modifierDoubleTapShortcut.ts:68 — modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · schemaTreeCache.decodeTableSearchIndexManifest (cyclomatic 21) · ×1
  • schemaTreeCache.decodeTableSearchIndexManifest (cyclomatic 21) apps/desktop/src/lib/metadata/schemaTreeCache.ts:49 — schemaTreeCache.decodeTableSearchIndexManifest has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 54, 62). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · schemaTreeCache.decodeTableSearchIndex (cyclomatic 21) · ×1
  • schemaTreeCache.decodeTableSearchIndex (cyclomatic 21) apps/desktop/src/lib/metadata/schemaTreeCache.ts:90 — schemaTreeCache.decodeTableSearchIndex has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoCompletion.collectScopeVariables (cyclomatic 21) · ×1
  • mongoCompletion.collectScopeVariables (cyclomatic 21) REDACTED:1109 — mongoCompletion.collectScopeVariables has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoConnectionOptions.mongodbAuthFailureHint (cyclomatic 21) · ×1
  • mongoConnectionOptions.mongodbAuthFailureHint (cyclomatic 21) apps/desktop/src/lib/mongo/mongoConnectionOptions.ts:85 — mongoConnectionOptions.mongodbAuthFailureHint has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginShortcuts.collectPluginShortcuts (cyclomatic 21) · ×1
  • pluginShortcuts.collectPluginShortcuts (cyclomatic 21) apps/desktop/src/lib/plugins/pluginShortcuts.ts:64 — pluginShortcuts.collectPluginShortcuts has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · javaSerialized.normalizeJavaSerializedValue (cyclomatic 21) · ×1
  • javaSerialized.normalizeJavaSerializedValue (cyclomatic 21) apps/desktop/src/lib/redis/codec/javaSerialized.ts:392 — javaSerialized.normalizeJavaSerializedValue has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · redisCommandTokenizer.tokenizeRedisLine (cyclomatic 21) · ×1
  • redisCommandTokenizer.tokenizeRedisLine (cyclomatic 21) apps/desktop/src/lib/redis/redisCommandTokenizer.ts:28 — redisCommandTokenizer.tokenizeRedisLine has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.executeOracleRoutineDeployment (cyclomatic 21) · ×1
  • oracleRoutineDeploy.executeOracleRoutineDeployment (cyclomatic 21) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:670 — oracleRoutineDeploy.executeOracleRoutineDeployment has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 679). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · settingsTransfer.isSqlShortcutActionItem (cyclomatic 21) · ×1
  • settingsTransfer.isSqlShortcutActionItem (cyclomatic 21) apps/desktop/src/lib/settings/settingsTransfer.ts:523 — settingsTransfer.isSqlShortcutActionItem has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarMenuLayout.sidebarMenuActionGroup (cyclomatic 21) · ×1
  • sidebarMenuLayout.sidebarMenuActionGroup (cyclomatic 21) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:135 — sidebarMenuLayout.sidebarMenuActionGroup has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sidebarSearchTree.isUnloadedTypeFilterContainer (cyclomatic 21) · ×1
  • sidebarSearchTree.isUnloadedTypeFilterContainer (cyclomatic 21) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:458 — sidebarSearchTree.isUnloadedTypeFilterContainer has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · treeNodeClick.copyDisplayPathForTreeNode (cyclomatic 21) · ×1
  • treeNodeClick.copyDisplayPathForTreeNode (cyclomatic 21) apps/desktop/src/lib/sidebar/treeNodeClick.ts:249 — treeNodeClick.copyDisplayPathForTreeNode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · identifierSearch.identifierMatchScore (cyclomatic 21) · ×1
  • identifierSearch.identifierMatchScore (cyclomatic 21) apps/desktop/src/lib/sql/identifierSearch.ts:8 — identifierSearch.identifierMatchScore has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlServerQueryWrapping.topLevelSqlTokens (cyclomatic 21) · ×1
  • sqlServerQueryWrapping.topLevelSqlTokens (cyclomatic 21) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:32 — sqlServerQueryWrapping.topLevelSqlTokens has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sqlSourcePaste.unescapeLiteralContent (cyclomatic 21) · ×1
  • sqlSourcePaste.unescapeLiteralContent (cyclomatic 21) apps/desktop/src/lib/sql/sqlSourcePaste.ts:99 — sqlSourcePaste.unescapeLiteralContent has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sqlSourcePaste.readStringLiteral (cyclomatic 21) · ×1
  • sqlSourcePaste.readStringLiteral (cyclomatic 21) apps/desktop/src/lib/sql/sqlSourcePaste.ts:224 — sqlSourcePaste.readStringLiteral has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cyclomatic 21) · ×1
  • connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cyclomatic 21) apps/desktop/src/stores/connectionStore.ts:5417 — connectionStore.useConnectionStore.reloadConnectionDatabaseChildren has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.normalizeGroups (cyclomatic 21) · ×1
  • queryStore.useQueryStore.normalizeGroups (cyclomatic 21) apps/desktop/src/stores/queryStore.ts:1352 — queryStore.useQueryStore.normalizeGroups has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.inferAiProviderFromConfig (cyclomatic 21) · ×1
  • settingsStore.inferAiProviderFromConfig (cyclomatic 21) apps/desktop/src/stores/settingsStore.ts:760 — settingsStore.inferAiProviderFromConfig has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · start (cyclomatic 21) · ×1
  • start (cyclomatic 21) plugins/sdk/dev-host/sidecar.mjs:99 — start has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 157, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Nb3Archive · ×1
  • Nb3Archive::restore_steps (cyclomatic 20) REDACTED:481 — Nb3Archive::restore_steps has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RetainedResults · ×1
  • RetainedResults::manifest (cyclomatic 20) crates/dbx-core/src/query/pl_debug/results.rs:89 — RetainedResults::manifest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_support · ×1
  • dbx_driver_support::ssh_config::apply_host_entry (cyclomatic 20) crates/dbx-driver-support/src/ssh_config.rs:198 — dbx_driver_support::ssh_config::apply_host_entry has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExpressionCompiler · ×1
  • ExpressionCompiler::field_condition (cyclomatic 20) crates/dbx-drivers/src/db/dynamodb_driver.rs:218 — ExpressionCompiler::field_condition has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ScalarType · ×1
  • ScalarType::read (cyclomatic 20) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:254 — ScalarType::read has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OraclePlSqlBlockWalk · ×1
  • OraclePlSqlBlockWalk::step (cyclomatic 20) REDACTED:4231 — OraclePlSqlBlockWalk::step has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DamengAgent.getExplainInfo (cyclomatic 20) · ×1
  • DamengAgent.getExplainInfo (cyclomatic 20) REDACTED:3559 — DamengAgent.getExplainInfo has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MongoAgent.parseDropIndexesValue (cyclomatic 20) · ×1
  • MongoAgent.parseDropIndexesValue (cyclomatic 20) REDACTED:1703 — MongoAgent.parseDropIndexesValue has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OceanBaseLobValues.preview (cyclomatic 20) · ×1
  • OceanBaseLobValues.preview (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:65 — OceanBaseLobValues.preview has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.getColumnsInContext (cyclomatic 20) · ×1
  • OceanBaseOracleAgent.getColumnsInContext (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1607 — OceanBaseOracleAgent.getColumnsInContext has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugNative.stackResult (cyclomatic 20) · ×1
  • PlDebugNative.stackResult (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:236 — PlDebugNative.stackResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.start (cyclomatic 20) · ×1
  • PlDebugSession.start (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:279 — PlDebugSession.start has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.legacyMaterializedViewOptions (cyclomatic 20) · ×1
  • main.legacyMaterializedViewOptions (cyclomatic 20) agents/drivers/cassandra-go/materialized_view.go:183 — main.legacyMaterializedViewOptions has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseKingbasePartitionBound (cyclomatic 20) · ×1
  • main.parseKingbasePartitionBound (cyclomatic 20) REDACTED:1506 — main.parseKingbasePartitionBound has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.dispatch (cyclomatic 20) · ×1
  • runtimeServer.dispatch (cyclomatic 20) agents/drivers/nebula-go/main.go:121 — runtimeServer.dispatch has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.completionAssistantSearch (cyclomatic 20) · ×1
  • server.completionAssistantSearch (cyclomatic 20) agents/drivers/neo4j-go/metadata.go:268 — server.completionAssistantSearch has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.oracleLegacyOptions (cyclomatic 20) · ×1
  • main.oracleLegacyOptions (cyclomatic 20) agents/drivers/oracle-go/legacy_charset.go:31 — main.oracleLegacyOptions has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.oracleColumnTypeDDL (cyclomatic 20) · ×1
  • main.oracleColumnTypeDDL (cyclomatic 20) REDACTED:4352 — main.oracleColumnTypeDDL has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugSubprogramRange (cyclomatic 20) · ×1
  • main.plDebugSubprogramRange (cyclomatic 20) REDACTED:5063 — main.plDebugSubprogramRange has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugLegacyDerivedType (cyclomatic 20) · ×1
  • main.plDebugLegacyDerivedType (cyclomatic 20) agents/drivers/oracle-go/pldebug_legacy_type_graph.go:136 — main.plDebugLegacyDerivedType has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.plDebugLoadNativeSourceBounded (cyclomatic 20) · ×1
  • main.plDebugLoadNativeSourceBounded (cyclomatic 20) agents/drivers/oracle-go/pldebug_source.go:59 — main.plDebugLoadNativeSourceBounded has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 69). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · main.plDebugValidateTypedUnicode (cyclomatic 20) · ×1
  • main.plDebugValidateTypedUnicode (cyclomatic 20) agents/drivers/oracle-go/pldebug_unicode.go:9 — main.plDebugValidateTypedUnicode has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.queryRowsWithOracleValueRewriteIfNeeded (cyclomatic 20) · ×1
  • server.queryRowsWithOracleValueRewriteIfNeeded (cyclomatic 20) REDACTED:5217 — server.queryRowsWithOracleValueRewriteIfNeeded has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.pendingNativeCompletion (cyclomatic 20) · ×1
  • server.pendingNativeCompletion (cyclomatic 20) agents/drivers/oracle-go/pldebug_drain.go:76 — server.pendingNativeCompletion has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeEntry.originalPhysicalReleaseConfirmed (cyclomatic 20) · ×1
  • plDebugNativeEntry.originalPhysicalReleaseConfirmed (cyclomatic 20) agents/drivers/oracle-go/pldebug_manager.go:1061 — plDebugNativeEntry.originalPhysicalReleaseConfirmed has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugNativeEntry.readNativeMappedStack (cyclomatic 20) · ×1
  • plDebugNativeEntry.readNativeMappedStack (cyclomatic 20) agents/drivers/oracle-go/pldebug_stack.go:225 — plDebugNativeEntry.readNativeMappedStack has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugNativePlan.boundInputs (cyclomatic 20) · ×1
  • plDebugNativePlan.boundInputs (cyclomatic 20) agents/drivers/oracle-go/pldebug_target_invoke.go:73 — plDebugNativePlan.boundInputs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · proxyMessagingClient.Send (cyclomatic 20) · ×1
  • proxyMessagingClient.Send (cyclomatic 20) agents/drivers/rocketmq/proxy.go:229 — proxyMessagingClient.Send has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getColumns (cyclomatic 20) · ×1
  • server.getColumns (cyclomatic 20) REDACTED:2749 — server.getColumns has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType (cyclomatic 20) · ×1
  • IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType (cyclomatic 20) agents/go-common/iotdb-client-go/client/rpcdataset.go:633 — IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cyclomatic 20) · ×1
  • useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cyclomatic 20) apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts:532 — useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cyclomatic 20) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cyclomatic 20) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:552 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cyclomatic 20) · ×1
  • useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cyclomatic 20) apps/desktop/src/composables/useDataGridEditor.ts:2063 — useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cyclomatic 20) · ×1
  • useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cyclomatic 20) apps/desktop/src/composables/useDataGridEditor.ts:2361 — useDataGridEditor.useDataGridEditor.executeConditionalUpdate has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.captureSqlInsertExportData (cyclomatic 20) · ×1
  • useDataGridExport.useDataGridExport.captureSqlInsertExportData (cyclomatic 20) apps/desktop/src/composables/useDataGridExport.ts:3031 — useDataGridExport.useDataGridExport.captureSqlInsertExportData has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · aiPluginConversation.createPluginAiConversation (cyclomatic 20) · ×1
  • aiPluginConversation.createPluginAiConversation (cyclomatic 20) apps/desktop/src/lib/ai/aiPluginConversation.ts:27 — aiPluginConversation.createPluginAiConversation has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionDeepLink.parseConnectionDeepLink (cyclomatic 20) · ×1
  • connectionDeepLink.parseConnectionDeepLink (cyclomatic 20) REDACTED:375 — connectionDeepLink.parseConnectionDeepLink has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionUrl.parseZooKeeperUrl (cyclomatic 20) · ×1
  • connectionUrl.parseZooKeeperUrl (cyclomatic 20) REDACTED:243 — connectionUrl.parseZooKeeperUrl has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · columnFormatter.formatNumber (cyclomatic 20) · ×1
  • columnFormatter.formatNumber (cyclomatic 20) apps/desktop/src/lib/dataGrid/columnFormatter.ts:501 — columnFormatter.formatNumber has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridColumnHighlight.computeColumnHighlightMatchKeys (cyclomatic 20) · ×1
  • dataGridColumnHighlight.computeColumnHighlightMatchKeys (cyclomatic 20) apps/desktop/src/lib/dataGrid/dataGridColumnHighlight.ts:91 — dataGridColumnHighlight.computeColumnHighlightMatchKeys has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnVisibility.areCellValuesEqual (cyclomatic 20) · ×1
  • dataGridColumnVisibility.areCellValuesEqual (cyclomatic 20) apps/desktop/src/lib/dataGrid/dataGridColumnVisibility.ts:154 — dataGridColumnVisibility.areCellValuesEqual has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridSort.compareDataGridValues (cyclomatic 20) · ×1
  • dataGridSort.compareDataGridValues (cyclomatic 20) apps/desktop/src/lib/dataGrid/dataGridSort.ts:109 — dataGridSort.compareDataGridValues has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryPreview.drawGroups (cyclomatic 20) · ×1
  • geometryPreview.drawGroups (cyclomatic 20) apps/desktop/src/lib/dataGrid/geometryPreview.ts:135 — geometryPreview.drawGroups has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · gridClientFilter.matchesResultClientFilter (cyclomatic 20) · ×1
  • gridClientFilter.matchesResultClientFilter (cyclomatic 20) apps/desktop/src/lib/dataGrid/gridClientFilter.ts:72 — gridClientFilter.matchesResultClientFilter has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executeTriggerSequence · ×1
  • oracleTriggerPlan.executeTriggerSequence::run (cyclomatic 20) apps/desktop/src/lib/database/oracleTriggerPlan.ts:516 — oracleTriggerPlan.executeTriggerSequence::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · erDiagram.buildDiagramJoinSql (cyclomatic 20) · ×1
  • erDiagram.buildDiagramJoinSql (cyclomatic 20) apps/desktop/src/lib/diagram/erDiagram.ts:371 — erDiagram.buildDiagramJoinSql has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · databaseExportOptions.loadSavedDatabaseExportOptions (cyclomatic 20) · ×1
  • databaseExportOptions.loadSavedDatabaseExportOptions (cyclomatic 20) apps/desktop/src/lib/export/databaseExportOptions.ts:38 — databaseExportOptions.loadSavedDatabaseExportOptions has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · diagramSvgExport.buildTableDiagramSvg (cyclomatic 20) · ×1
  • diagramSvgExport.buildTableDiagramSvg (cyclomatic 20) apps/desktop/src/lib/export/diagramSvgExport.ts:218 — diagramSvgExport.buildTableDiagramSvg has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.mergeFragments (cyclomatic 20) · ×1
  • datagripImport.mergeFragments (cyclomatic 20) REDACTED:508 — datagripImport.mergeFragments has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · objectMetadataCache.loadObjectMetadataFacetInternal (cyclomatic 20) · ×1
  • objectMetadataCache.loadObjectMetadataFacetInternal (cyclomatic 20) apps/desktop/src/lib/metadata/objectMetadataCache.ts:140 — objectMetadataCache.loadObjectMetadataFacetInternal has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableMetadataCache.loadTableColumns (cyclomatic 20) · ×1
  • tableMetadataCache.loadTableColumns (cyclomatic 20) apps/desktop/src/lib/metadata/tableMetadataCache.ts:218 — tableMetadataCache.loadTableColumns has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · neo4jNodeResult.projectNeo4jNodeResult (cyclomatic 20) · ×1
  • neo4jNodeResult.projectNeo4jNodeResult (cyclomatic 20) apps/desktop/src/lib/neo4j/neo4jNodeResult.ts:62 — neo4jNodeResult.projectNeo4jNodeResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dynamicContextMenu.parseEntry (cyclomatic 20) · ×1
  • dynamicContextMenu.parseEntry (cyclomatic 20) apps/desktop/src/lib/plugins/dynamicContextMenu.ts:34 — dynamicContextMenu.parseEntry has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginUiHtmlCache.inlineLocalUiAssets (cyclomatic 20) · ×1
  • pluginUiHtmlCache.inlineLocalUiAssets (cyclomatic 20) apps/desktop/src/lib/plugins/pluginUiHtmlCache.ts:88 — pluginUiHtmlCache.inlineLocalUiAssets has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · batchQueryPagination.prepareBatchQueryPagination (cyclomatic 20) · ×1
  • batchQueryPagination.prepareBatchQueryPagination (cyclomatic 20) apps/desktop/src/lib/query/batchQueryPagination.ts:11 — batchQueryPagination.prepareBatchQueryPagination has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 58). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cyclomatic 20) · ×1
  • redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cyclomatic 20) apps/desktop/src/lib/redis/redisSyntaxDiagnostics.ts:50 — redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlAnalysis.parseTableSourceAt (cyclomatic 20) · ×1
  • sqlAnalysis.parseTableSourceAt (cyclomatic 20) apps/desktop/src/lib/sql/sqlAnalysis.ts:694 — sqlAnalysis.parseTableSourceAt has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlAnalysis.stripSqlComments (cyclomatic 20) · ×1
  • sqlAnalysis.stripSqlComments (cyclomatic 20) apps/desktop/src/lib/sql/sqlAnalysis.ts:878 — sqlAnalysis.stripSqlComments has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.maskSqlForStructureScan (cyclomatic 20) · ×1
  • sqlCompletion.maskSqlForStructureScan (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:2701 — sqlCompletion.maskSqlForStructureScan has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractSelectColumnNames (cyclomatic 20) · ×1
  • sqlCompletion.extractSelectColumnNames (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:4583 — sqlCompletion.extractSelectColumnNames has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildCompositeHeuristicJoinConditionItems (cyclomatic 20) · ×1
  • sqlCompletion.buildCompositeHeuristicJoinConditionItems (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:6611 — sqlCompletion.buildCompositeHeuristicJoinConditionItems has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlParameters.collectSqlServerModuleBatchRanges (cyclomatic 20) · ×1
  • sqlParameters.collectSqlServerModuleBatchRanges (cyclomatic 20) apps/desktop/src/lib/sql/sqlParameters.ts:667 — sqlParameters.collectSqlServerModuleBatchRanges has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlNavigation.matchSqlObject (cyclomatic 20) · ×1
  • sqlNavigation.matchSqlObject (cyclomatic 20) apps/desktop/src/lib/sql/sqlNavigation.ts:717 — sqlNavigation.matchSqlObject has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlVariables.collectDeclarations (cyclomatic 20) · ×1
  • sqlVariables.collectDeclarations (cyclomatic 20) apps/desktop/src/lib/sql/sqlVariables.ts:67 — sqlVariables.collectDeclarations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columnDefaultPresets.starRocksDefaultPresets (cyclomatic 20) · ×1
  • columnDefaultPresets.starRocksDefaultPresets (cyclomatic 20) apps/desktop/src/lib/table/columnDefaultPresets.ts:29 — columnDefaultPresets.starRocksDefaultPresets has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTableRename.maskTriggerCommentsAndStrings (cyclomatic 20) · ×1
  • oracleTableRename.maskTriggerCommentsAndStrings (cyclomatic 20) REDACTED:196 — oracleTableRename.maskTriggerCommentsAndStrings has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.parseXuguRoutineParameter (cyclomatic 20) · ×1
  • routineParameters.parseXuguRoutineParameter (cyclomatic 20) apps/desktop/src/lib/table/routineParameters.ts:353 — routineParameters.parseXuguRoutineParameter has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableVGroup.resolveTableVGroupScopeFromNode (cyclomatic 20) · ×1
  • tableVGroup.resolveTableVGroupScopeFromNode (cyclomatic 20) apps/desktop/src/lib/table/tableVGroup.ts:803 — tableVGroup.resolveTableVGroupScopeFromNode has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tabPresentation.resultRunSourceLabel (cyclomatic 20) · ×1
  • tabPresentation.resultRunSourceLabel (cyclomatic 20) apps/desktop/src/lib/tabs/tabPresentation.ts:675 — tabPresentation.resultRunSourceLabel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cyclomatic 20) · ×1
  • connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cyclomatic 20) apps/desktop/src/stores/connectionStore.ts:5065 — connectionStore.useConnectionStore.updateConnectionDatabaseInfo has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.refreshSidebarObjectPagination · ×1
  • connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes (cyclomatic 20) apps/desktop/src/stores/connectionStore.ts:11464 — connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.setBreakpointEnabled (cyclomatic 20) · ×1
  • plDebugStore.usePlDebugStore.setBreakpointEnabled (cyclomatic 20) apps/desktop/src/stores/plDebugStore.ts:1195 — plDebugStore.usePlDebugStore.setBreakpointEnabled has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.annotateQueryResultSources (cyclomatic 20) · ×1
  • queryStore.annotateQueryResultSources (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:555 — queryStore.annotateQueryResultSources has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openPluginWorkbench (cyclomatic 20) · ×1
  • queryStore.useQueryStore.openPluginWorkbench (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:4561 — queryStore.useQueryStore.openPluginWorkbench has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reorderFolders (cyclomatic 20) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFolders (cyclomatic 20) apps/desktop/src/stores/savedSqlStore.ts:999 — savedSqlStore.useSavedSqlStore.reorderFolders has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1026, 1022, 1008). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.moveFolderToFolder (cyclomatic 20) · ×1
  • savedSqlStore.useSavedSqlStore.moveFolderToFolder (cyclomatic 20) apps/desktop/src/stores/savedSqlStore.ts:1045 — savedSqlStore.useSavedSqlStore.moveFolderToFolder has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1060, 1054, 1055). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.moveFolderToFolder (cyclomatic 20) · ×1
  • transferTaskStore.useTransferTaskStore.moveFolderToFolder (cyclomatic 20) apps/desktop/src/stores/transferTaskStore.ts:400 — transferTaskStore.useTransferTaskStore.moveFolderToFolder has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 418, 409, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.reorderFolders (cyclomatic 20) · ×1
  • transferTaskStore.useTransferTaskStore.reorderFolders (cyclomatic 20) apps/desktop/src/stores/transferTaskStore.ts:422 — transferTaskStore.useTransferTaskStore.reorderFolders has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 445, 441, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RouteProgress.RouteProgress (cyclomatic 20) · ×1
  • RouteProgress.RouteProgress (cyclomatic 20) docs/components/RouteProgress.tsx:11 — RouteProgress.RouteProgress has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 74, 65, 17, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ContributorsExperience.ContributorsExperience (cyclomatic 20) · ×1
  • ContributorsExperience.ContributorsExperience (cyclomatic 20) docs/components/contributors/ContributorsExperience.tsx:190 — ContributorsExperience.ContributorsExperience has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · json.hasUnclosedMongoDelimiters (cyclomatic 20) · ×1
  • json.hasUnclosedMongoDelimiters (cyclomatic 20) packages/mongo-shell/src/json.ts:306 — json.hasUnclosedMongoDelimiters has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuckDbWorkerRuntime · ×1
  • DuckDbWorkerRuntime::handle_request (cyclomatic 19) agents/drivers/duckdb/src/runtime.rs:295 — DuckDbWorkerRuntime::handle_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BlobBoundStatement.validate (cyclomatic 19) · ×1
  • BlobBoundStatement.validate (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:20 — BlobBoundStatement.validate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EwkbWktDecoder.tryParseHex (cyclomatic 19) · ×1
  • EwkbWktDecoder.tryParseHex (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:238 — EwkbWktDecoder.tryParseHex has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StandardJdbcMetadata.getColumns (cyclomatic 19) · ×1
  • StandardJdbcMetadata.getColumns (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:247 — StandardJdbcMetadata.getColumns has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.registerDrivers (cyclomatic 19) · ×1
  • DbxJdbcPlugin.registerDrivers (cyclomatic 19) REDACTED:1106 — DbxJdbcPlugin.registerDrivers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MongoAgent.bulkWriteModel (cyclomatic 19) · ×1
  • MongoAgent.bulkWriteModel (cyclomatic 19) REDACTED:2275 — MongoAgent.bulkWriteModel has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.listConstraints (cyclomatic 19) · ×1
  • OceanBaseOracleAgent.listConstraints (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2198 — OceanBaseOracleAgent.listConstraints has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleForeignKeyDefinition.read (cyclomatic 19) · ×1
  • OracleForeignKeyDefinition.read (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OracleForeignKeyDefinition.java:21 — OracleForeignKeyDefinition.read has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.objectValue (cyclomatic 19) · ×1
  • PlDebugCompositeInput.objectValue (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:180 — PlDebugCompositeInput.objectValue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.requireInputAdapter (cyclomatic 19) · ×1
  • PlDebugCompositeInput.requireInputAdapter (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:70 — PlDebugCompositeInput.requireInputAdapter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Writer.child (cyclomatic 19) · ×1
  • Writer.child (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:392 — Writer.child has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugManager.mutate (cyclomatic 19) · ×1
  • PlDebugManager.mutate (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:227 — PlDebugManager.mutate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.select (cyclomatic 19) · ×1
  • PlDebugObjectConstructors.select (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:98 — PlDebugObjectConstructors.select has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.evaluateBreakpointRules (cyclomatic 19) · ×1
  • PlDebugSession.evaluateBreakpointRules (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1262 — PlDebugSession.evaluateBreakpointRules has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.rawInput (cyclomatic 19) · ×1
  • PlDebugTarget.rawInput (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1055 — PlDebugTarget.rawInput has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugTypeMetadata.resolveObjectOwner (cyclomatic 19) · ×1
  • PlDebugTypeMetadata.resolveObjectOwner (cyclomatic 19) REDACTED:37 — PlDebugTypeMetadata.resolveObjectOwner has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcdSession.status (cyclomatic 19) · ×1
  • etcdSession.status (cyclomatic 19) agents/drivers/etcd-go/status.go:12 — etcdSession.status has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcd2Session.rename (cyclomatic 19) · ×1
  • etcd2Session.rename (cyclomatic 19) agents/drivers/etcd2-go/kv.go:286 — etcd2Session.rename has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.splitTopLevelCommas (cyclomatic 19) · ×1
  • main.splitTopLevelCommas (cyclomatic 19) REDACTED:1635 — main.splitTopLevelCommas has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.getRoutineSource (cyclomatic 19) · ×1
  • server.getRoutineSource (cyclomatic 19) agents/drivers/kingbase-go/routine_metadata.go:106 — server.getRoutineSource has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.appendGraphValue (cyclomatic 19) · ×1
  • main.appendGraphValue (cyclomatic 19) agents/drivers/nebula-go/query.go:307 — main.appendGraphValue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · server.closeNativeAllocations (cyclomatic 19) · ×1
  • server.closeNativeAllocations (cyclomatic 19) agents/drivers/oracle-go/pldebug_connections.go:64 — server.closeNativeAllocations has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeCapture.page (cyclomatic 19) · ×1
  • plDebugNativeCapture.page (cyclomatic 19) agents/drivers/oracle-go/pldebug_output.go:375 — plDebugNativeCapture.page has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.peekMessages (cyclomatic 19) · ×1
  • server.peekMessages (cyclomatic 19) agents/drivers/rabbitmq/operations.go:1162 — server.peekMessages has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseConnection (cyclomatic 19) · ×1
  • main.parseConnection (cyclomatic 19) agents/drivers/rocketmq/connection.go:41 — main.parseConnection has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rocketMQAgent.listACLs (cyclomatic 19) · ×1
  • rocketMQAgent.listACLs (cyclomatic 19) agents/drivers/rocketmq/acl.go:30 — rocketMQAgent.listACLs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rocketMQAgent.listProducers (cyclomatic 19) · ×1
  • rocketMQAgent.listProducers (cyclomatic 19) REDACTED:27 — rocketMQAgent.listProducers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rocketMQAgent.listTopics (cyclomatic 19) · ×1
  • rocketMQAgent.listTopics (cyclomatic 19) REDACTED:32 — rocketMQAgent.listTopics has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wkbGeometry.wkt (cyclomatic 19) · ×1
  • wkbGeometry.wkt (cyclomatic 19) agents/drivers/vastbase-go/spatial.go:218 — wkbGeometry.wkt has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.parseXuguObjectTypeMethod (cyclomatic 19) · ×1
  • main.parseXuguObjectTypeMethod (cyclomatic 19) agents/drivers/xugu/type_members.go:324 — main.parseXuguObjectTypeMethod has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-partition-ddl.main (cyclomatic 19) · ×1
  • verify-partition-ddl.main (cyclomatic 19) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:10 — verify-partition-ddl.main has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cyclomatic 19) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cyclomatic 19) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:706 — useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cyclomatic 19) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cyclomatic 19) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1240 — useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataCompareConfig.sanitizeConfig (cyclomatic 19) · ×1
  • useDataCompareConfig.sanitizeConfig (cyclomatic 19) apps/desktop/src/composables/useDataCompareConfig.ts:67 — useDataCompareConfig.sanitizeConfig has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.stageCellReplacements (cyclomatic 19) · ×1
  • useDataGridEditor.useDataGridEditor.stageCellReplacements (cyclomatic 19) apps/desktop/src/composables/useDataGridEditor.ts:1346 — useDataGridEditor.useDataGridEditor.stageCellReplacements has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cyclomatic 19) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cyclomatic 19) apps/desktop/src/composables/useDataGridLargeValues.ts:726 — useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useQuickOpen.useQuickOpen.remoteSearchContexts (cyclomatic 19) · ×1
  • useQuickOpen.useQuickOpen.remoteSearchContexts (cyclomatic 19) apps/desktop/src/composables/useQuickOpen.ts:836 — useQuickOpen.useQuickOpen.remoteSearchContexts has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decodeText.decodeImportFileText (cyclomatic 19) · ×1
  • decodeText.decodeImportFileText (cyclomatic 19) apps/desktop/src/lib/common/decodeText.ts:11 — decodeText.decodeImportFileText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionParameterCatalog.connectionParameterCatalog (cyclomatic 19) · ×1
  • connectionParameterCatalog.connectionParameterCatalog (cyclomatic 19) apps/desktop/src/lib/connection/connectionParameterCatalog.ts:83 — connectionParameterCatalog.connectionParameterCatalog has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columnFormatter.normalizeForeignKeyDisplayFilter (cyclomatic 19) · ×1
  • columnFormatter.normalizeForeignKeyDisplayFilter (cyclomatic 19) apps/desktop/src/lib/dataGrid/columnFormatter.ts:317 — columnFormatter.normalizeForeignKeyDisplayFilter has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridColumnFilter.unwrapOuterParentheses (cyclomatic 19) · ×1
  • dataGridColumnFilter.unwrapOuterParentheses (cyclomatic 19) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:85 — dataGridColumnFilter.unwrapOuterParentheses has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cyclomatic 19) · ×1
  • dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cyclomatic 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:123 — dataGridColumnWidthState.loadPersistentDataGridColumnWidthState has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.parseClass (cyclomatic 19) · ×1
  • regexGenerate.parseClass (cyclomatic 19) REDACTED:190 — regexGenerate.parseClass has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.collectOracleSessionDiagnostics (cyclomatic 19) · ×1
  • oracleSessionDiagnostics.collectOracleSessionDiagnostics (cyclomatic 19) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:270 — oracleSessionDiagnostics.collectOracleSessionDiagnostics has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirrorSqlDialect.codeMirrorBaseDialect (cyclomatic 19) · ×1
  • codemirrorSqlDialect.codeMirrorBaseDialect (cyclomatic 19) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:358 — codemirrorSqlDialect.codeMirrorBaseDialect has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · anotherRedisImport.parseAnotherRedisImport (cyclomatic 19) · ×1
  • anotherRedisImport.parseAnotherRedisImport (cyclomatic 19) apps/desktop/src/lib/imports/anotherRedisImport.ts:103 — anotherRedisImport.parseAnotherRedisImport has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · datagripImport.extractUserName (cyclomatic 19) · ×1
  • datagripImport.extractUserName (cyclomatic 19) REDACTED:335 — datagripImport.extractUserName has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.parseDbForestGroupPaths (cyclomatic 19) · ×1
  • datagripImport.parseDbForestGroupPaths (cyclomatic 19) REDACTED:455 — datagripImport.parseDbForestGroupPaths has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.buildConnection (cyclomatic 19) · ×1
  • datagripImport.buildConnection (cyclomatic 19) REDACTED:554 — datagripImport.buildConnection has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.classifyJsonSchema (cyclomatic 19) · ×1
  • mongoCompletion.classifyJsonSchema (cyclomatic 19) REDACTED:1285 — mongoCompletion.classifyJsonSchema has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoCompletion.classifyUpdate (cyclomatic 19) · ×1
  • mongoCompletion.classifyUpdate (cyclomatic 19) REDACTED:1315 — mongoCompletion.classifyUpdate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoSql.comparisonToFilter (cyclomatic 19) · ×1
  • mongoSql.comparisonToFilter (cyclomatic 19) apps/desktop/src/lib/mongo/mongoSql.ts:1023 — mongoSql.comparisonToFilter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginClipboardImage.requirePluginClipboardImage (cyclomatic 19) · ×1
  • pluginClipboardImage.requirePluginClipboardImage (cyclomatic 19) apps/desktop/src/lib/plugins/pluginClipboardImage.ts:7 — pluginClipboardImage.requirePluginClipboardImage has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PluginHostBridge.postInit (cyclomatic 19) · ×1
  • PluginHostBridge.postInit (cyclomatic 19) REDACTED:504 — PluginHostBridge.postInit has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginShortcuts.normalizePluginShortcutSettings (cyclomatic 19) · ×1
  • pluginShortcuts.normalizePluginShortcutSettings (cyclomatic 19) apps/desktop/src/lib/plugins/pluginShortcuts.ts:15 — pluginShortcuts.normalizePluginShortcutSettings has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RedisCollectionSearchController.scan (cyclomatic 19) · ×1
  • RedisCollectionSearchController.scan (cyclomatic 19) apps/desktop/src/lib/redis/redisCollectionSearchController.ts:178 — RedisCollectionSearchController.scan has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandDocs.commandKeySpecs (cyclomatic 19) · ×1
  • redisCommandDocs.commandKeySpecs (cyclomatic 19) apps/desktop/src/lib/redis/redisCommandDocs.ts:126 — redisCommandDocs.commandKeySpecs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandPreview.redisDeleteKeysPreview (cyclomatic 19) · ×1
  • redisCommandPreview.redisDeleteKeysPreview (cyclomatic 19) apps/desktop/src/lib/redis/redisCommandPreview.ts:248 — redisCommandPreview.redisDeleteKeysPreview has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCompletion.argumentTokenItems (cyclomatic 19) · ×1
  • redisCompletion.argumentTokenItems (cyclomatic 19) apps/desktop/src/lib/redis/redisCompletion.ts:389 — redisCompletion.argumentTokenItems has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.editOraclePackageOptions (cyclomatic 19) · ×1
  • oracleRoutineDeploy.editOraclePackageOptions (cyclomatic 19) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:186 — oracleRoutineDeploy.editOraclePackageOptions has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoCollectionMutation.buildMongoCreateIndexRequest (cyclomatic 19) · ×1
  • mongoCollectionMutation.buildMongoCreateIndexRequest (cyclomatic 19) apps/desktop/src/lib/sidebar/mongoCollectionMutation.ts:160 — mongoCollectionMutation.buildMongoCreateIndexRequest has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes · ×1
  • sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit (cyclomatic 19) apps/desktop/src/lib/sidebar/sidebarGlobalSearchIndex.ts:41 — sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayout.restoreSidebarLayoutDeletion.restore (cyclomatic 19) · ×1
  • sidebarLayout.restoreSidebarLayoutDeletion.restore (cyclomatic 19) apps/desktop/src/lib/sidebar/sidebarLayout.ts:702 — sidebarLayout.restoreSidebarLayoutDeletion.restore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarTableSearchControl.resolveLocalTableSearchParent (cyclomatic 19) · ×1
  • sidebarTableSearchControl.resolveLocalTableSearchParent (cyclomatic 19) apps/desktop/src/lib/sidebar/sidebarTableSearchControl.ts:42 — sidebarTableSearchControl.resolveLocalTableSearchParent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.compressCypherText (cyclomatic 19) · ×1
  • cypherFormatter.compressCypherText (cyclomatic 19) apps/desktop/src/lib/sql/cypherFormatter.ts:524 — cypherFormatter.compressCypherText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlDisplay.applyDdlDatabaseQualifier (cyclomatic 19) · ×1
  • ddlDisplay.applyDdlDatabaseQualifier (cyclomatic 19) apps/desktop/src/lib/sql/ddlDisplay.ts:348 — ddlDisplay.applyDdlDatabaseQualifier has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddl.createTableLayout (cyclomatic 19) · ×1
  • ddl.createTableLayout (cyclomatic 19) apps/desktop/src/lib/sql/layout/ddl.ts:86 — ddl.createTableLayout has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 111, 100, 106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · printer.printStatement (cyclomatic 19) · ×1
  • printer.printStatement (cyclomatic 19) apps/desktop/src/lib/sql/layout/printer.ts:642 — printer.printStatement has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cyclomatic 19) · ×1
  • mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cyclomatic 19) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:138 — mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cteNavigation.findCteColumnResolution (cyclomatic 19) · ×1
  • cteNavigation.findCteColumnResolution (cyclomatic 19) apps/desktop/src/lib/sql/semantic/cteNavigation.ts:118 — cteNavigation.findCteColumnResolution has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.findTopLevelKeyword (cyclomatic 19) · ×1
  • sqlAnalysis.findTopLevelKeyword (cyclomatic 19) apps/desktop/src/lib/sql/sqlAnalysis.ts:981 — sqlAnalysis.findTopLevelKeyword has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.shouldAutoOpenSqlCompletion (cyclomatic 19) · ×1
  • sqlCompletion.shouldAutoOpenSqlCompletion (cyclomatic 19) apps/desktop/src/lib/sql/sqlCompletion.ts:2294 — sqlCompletion.shouldAutoOpenSqlCompletion has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.splitQualifiedNameRawParts (cyclomatic 19) · ×1
  • sqlCompletion.splitQualifiedNameRawParts (cyclomatic 19) apps/desktop/src/lib/sql/sqlCompletion.ts:4858 — sqlCompletion.splitQualifiedNameRawParts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectSetStatementVariables (cyclomatic 19) · ×1
  • sqlParameters.collectSetStatementVariables (cyclomatic 19) apps/desktop/src/lib/sql/sqlParameters.ts:1498 — sqlParameters.collectSetStatementVariables has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sqlParameters.collectExecNamedArgumentStarts) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlParameters.collectExecNamedArgumentStarts (cyclomatic 19) · ×1
  • sqlParameters.collectExecNamedArgumentStarts (cyclomatic 19) apps/desktop/src/lib/sql/sqlParameters.ts:1652 — sqlParameters.collectExecNamedArgumentStarts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sqlParameters.collectSetStatementVariables) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences (cyclomatic 19) · ×1
  • sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences (cyclomatic 19) apps/desktop/src/lib/sql/sqlDiagnosticKeywordRecovery.ts:28 — sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineRename.prepareOracleRoutineRename · ×1
  • oracleRoutineRename.prepareOracleRoutineRename::walk (cyclomatic 19) apps/desktop/src/lib/table/oracleRoutineRename.ts:292 — oracleRoutineRename.prepareOracleRoutineRename::walk has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · oracleTableRename.verifyFinalSnapshots (cyclomatic 19) · ×1
  • oracleTableRename.verifyFinalSnapshots (cyclomatic 19) REDACTED:759 — oracleTableRename.verifyFinalSnapshots has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableImport.suggestDataTypeForGenerator (cyclomatic 19) · ×1
  • tableImport.suggestDataTypeForGenerator (cyclomatic 19) apps/desktop/src/lib/table/tableImport.ts:387 — tableImport.suggestDataTypeForGenerator has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · tableVGroup.reorderTableVGroupEntry (cyclomatic 19) · ×1
  • tableVGroup.reorderTableVGroupEntry (cyclomatic 19) apps/desktop/src/lib/table/tableVGroup.ts:281 — tableVGroup.reorderTableVGroupEntry has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (insertNear, removeEntry, entryId). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: tableVGroup.tableVGroupKindOfContainerNode (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPagedTableGroupChildren (cyclomatic 19) · ×1
  • connectionStore.useConnectionStore.loadPagedTableGroupChildren (cyclomatic 19) apps/desktop/src/stores/connectionStore.ts:3116 — connectionStore.useConnectionStore.loadPagedTableGroupChildren has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cyclomatic 19) · ×1
  • connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cyclomatic 19) apps/desktop/src/stores/connectionStore.ts:3861 — connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 3886, findPath). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.parseConnectionsImport (cyclomatic 19) · ×1
  • connectionStore.useConnectionStore.parseConnectionsImport (cyclomatic 19) apps/desktop/src/stores/connectionStore.ts:11750 — connectionStore.useConnectionStore.parseConnectionsImport has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.loadObjectSourceIntoTab (cyclomatic 19) · ×1
  • queryStore.useQueryStore.loadObjectSourceIntoTab (cyclomatic 19) apps/desktop/src/stores/queryStore.ts:3600 — queryStore.useQueryStore.loadObjectSourceIntoTab has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureQueryResultExportRequest (cyclomatic 19) · ×1
  • queryStore.useQueryStore.captureQueryResultExportRequest (cyclomatic 19) apps/desktop/src/stores/queryStore.ts:11818 — queryStore.useQueryStore.captureQueryResultExportRequest has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (assertSourceAvailable). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reorderFiles (cyclomatic 19) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFiles (cyclomatic 19) apps/desktop/src/stores/savedSqlStore.ts:1130 — savedSqlStore.useSavedSqlStore.reorderFiles has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1155, 1153, 1136). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.reorderTasks (cyclomatic 19) · ×1
  • transferTaskStore.useTransferTaskStore.reorderTasks (cyclomatic 19) apps/desktop/src/stores/transferTaskStore.ts:449 — transferTaskStore.useTransferTaskStore.reorderTasks has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 467, 465, 455). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · worker.handleInstallBeacon (cyclomatic 19) · ×1
  • worker.handleInstallBeacon (cyclomatic 19) REDACTED:446 — worker.handleInstallBeacon has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InstallTabs.InstallTabs (cyclomatic 19) · ×1
  • InstallTabs.InstallTabs (cyclomatic 19) docs/components/landing/InstallTabs.tsx:232 — InstallTabs.InstallTabs has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 325, 242, 251, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · diagnostics.redact · ×1
  • diagnostics.redact::visit (cyclomatic 19) plugins/sdk/dev-host/diagnostics.mjs:9 — diagnostics.redact::visit has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · outline · ×1
  • outline::walk (cyclomatic 19) REDACTED:66 — outline::walk has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bringIntoView (cyclomatic 19) · ×1
  • bringIntoView (cyclomatic 19) REDACTED:398 — bringIntoView has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 401, 434). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Plan · ×1
  • Plan::after_tables (cyclomatic 18) crates/dbx-core/src/data/transfer/xugu_objects.rs:653 — Plan::after_tables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugRegistry · ×1
  • PlDebugRegistry::register (cyclomatic 18) crates/dbx-core/src/query/pl_debug.rs:594 — PlDebugRegistry::register has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsonRpcServer.legacyJob (cyclomatic 18) · ×1
  • JsonRpcServer.legacyJob (cyclomatic 18) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:671 — JsonRpcServer.legacyJob has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.prepare (cyclomatic 18) · ×1
  • NativeLegacyJobSession.prepare (cyclomatic 18) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78 — NativeLegacyJobSession.prepare has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listSchemas (cyclomatic 18) · ×1
  • DbxJdbcPlugin.listSchemas (cyclomatic 18) REDACTED:3081 — DbxJdbcPlugin.listSchemas has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DamengAgent.queryConstrainedObjectsWithoutValidity (cyclomatic 18) · ×1
  • DamengAgent.queryConstrainedObjectsWithoutValidity (cyclomatic 18) REDACTED:1283 — DamengAgent.queryConstrainedObjectsWithoutValidity has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · H2DriverVersion.select (cyclomatic 18) · ×1
  • H2DriverVersion.select (cyclomatic 18) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2DriverVersion.java:41 — H2DriverVersion.select has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KafkaAgent.getConsumerGroupSnapshot (cyclomatic 18) · ×1
  • KafkaAgent.getConsumerGroupSnapshot (cyclomatic 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1290 — KafkaAgent.getConsumerGroupSnapshot has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.listConsumerGroups (cyclomatic 18) · ×1
  • KafkaAgent.listConsumerGroups (cyclomatic 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1130 — KafkaAgent.listConsumerGroups has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MongoAgent.collationOrNull (cyclomatic 18) · ×1
  • MongoAgent.collationOrNull (cyclomatic 18) REDACTED:1119 — MongoAgent.collationOrNull has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugManager.start (cyclomatic 18) · ×1
  • PlDebugManager.start (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:104 — PlDebugManager.start has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.callables (cyclomatic 18) · ×1
  • PlDebugObjectConstructors.callables (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:27 — PlDebugObjectConstructors.callables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.recoverOutput (cyclomatic 18) · ×1
  • PlDebugSession.recoverOutput (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1925 — PlDebugSession.recoverOutput has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.zonedInput (cyclomatic 18) · ×1
  • PlDebugTarget.zonedInput (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1115 — PlDebugTarget.zonedInput has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · main.materializedViewDDLFromCatalog (cyclomatic 18) · ×1
  • main.materializedViewDDLFromCatalog (cyclomatic 18) agents/drivers/cassandra-go/materialized_view.go:253 — main.materializedViewDDLFromCatalog has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.takeParenGroup (cyclomatic 18) · ×1
  • main.takeParenGroup (cyclomatic 18) REDACTED:1593 — main.takeParenGroup has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · main.plDebugNativeResultField (cyclomatic 18) · ×1
  • main.plDebugNativeResultField (cyclomatic 18) agents/drivers/oracle-go/pldebug_target_invoke.go:702 — main.plDebugNativeResultField has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listObjects (cyclomatic 18) · ×1
  • server.listObjects (cyclomatic 18) REDACTED:2349 — server.listObjects has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionConfig.equal (cyclomatic 18) · ×1
  • connectionConfig.equal (cyclomatic 18) agents/drivers/rocketmq/connection.go:282 — connectionConfig.equal has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.getObjectSource (cyclomatic 18) · ×1
  • server.getObjectSource (cyclomatic 18) REDACTED:3193 — server.getObjectSource has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · client.NewIoTDBRpcDataSet (cyclomatic 18) · ×1
  • client.NewIoTDBRpcDataSet (cyclomatic 18) agents/go-common/iotdb-client-go/client/rpcdataset.go:62 — client.NewIoTDBRpcDataSet has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.binaryLiteral (cyclomatic 18) · ×1
  • queryResultTransferValues.binaryLiteral (cyclomatic 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:330 — queryResultTransferValues.binaryLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGenerateSession.runDataGenerateSession (cyclomatic 18) · ×1
  • useDataGenerateSession.runDataGenerateSession (cyclomatic 18) apps/desktop/src/composables/useDataGenerateSession.ts:265 — useDataGenerateSession.runDataGenerateSession has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cyclomatic 18) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cyclomatic 18) REDACTED:666 — useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.applyDeleteRows (cyclomatic 18) · ×1
  • useDataGridEditor.useDataGridEditor.applyDeleteRows (cyclomatic 18) apps/desktop/src/composables/useDataGridEditor.ts:1750 — useDataGridEditor.useDataGridEditor.applyDeleteRows has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.savePendingSnapshot (cyclomatic 18) · ×1
  • useDataGridEditor.useDataGridEditor.savePendingSnapshot (cyclomatic 18) apps/desktop/src/composables/useDataGridEditor.ts:2845 — useDataGridEditor.useDataGridEditor.savePendingSnapshot has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult (cyclomatic 18) · ×1
  • useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult (cyclomatic 18) apps/desktop/src/composables/useDataGridExport.ts:2313 — useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 2314, 2365, 2335, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useNativeJobExecution.useNativeJobExecution.prepare (cyclomatic 18) · ×1
  • useNativeJobExecution.useNativeJobExecution.prepare (cyclomatic 18) apps/desktop/src/composables/useNativeJobExecution.ts:78 — useNativeJobExecution.useNativeJobExecution.prepare has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useQuickOpen.useQuickOpen.runRemoteSearch (cyclomatic 18) · ×1
  • useQuickOpen.useQuickOpen.runRemoteSearch (cyclomatic 18) apps/desktop/src/composables/useQuickOpen.ts:911 — useQuickOpen.useQuickOpen.runRemoteSearch has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 931, 915, 935). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cyclomatic 18) · ×1
  • useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cyclomatic 18) apps/desktop/src/composables/useSidebarTableMutationRuntime.ts:463 — useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cyclomatic 18) · ×1
  • useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cyclomatic 18) apps/desktop/src/composables/useSnippetAutoUpload.ts:40 — useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupRun (cyclomatic 18) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupRun (cyclomatic 18) REDACTED:380 — scheduledDatabaseBackup.normalizeDatabaseBackupRun has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · safeJsonFormat.decodeJsonSource (cyclomatic 18) · ×1
  • safeJsonFormat.decodeJsonSource (cyclomatic 18) REDACTED:129 — safeJsonFormat.decodeJsonSource has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentDriverInstallHint.agentDriverInstallKey (cyclomatic 18) · ×1
  • agentDriverInstallHint.agentDriverInstallKey (cyclomatic 18) apps/desktop/src/lib/connection/agentDriverInstallHint.ts:35 — agentDriverInstallHint.agentDriverInstallKey has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · jdbcDialect.connectionObjectTreeNodeSchema (cyclomatic 18) · ×1
  • jdbcDialect.connectionObjectTreeNodeSchema (cyclomatic 18) apps/desktop/src/lib/database/jdbcDialect.ts:394 — jdbcDialect.connectionObjectTreeNodeSchema has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cyclomatic 18) · ×1
  • oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cyclomatic 18) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:125 — oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguUserPermissions.decodeXuguAuthority (cyclomatic 18) · ×1
  • xuguUserPermissions.decodeXuguAuthority (cyclomatic 18) apps/desktop/src/lib/database/xuguUserPermissions.ts:476 — xuguUserPermissions.decodeXuguAuthority has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ltr-auto-layout.orderTablesByConnectivity (cyclomatic 18) · ×1
  • ltr-auto-layout.orderTablesByConnectivity (cyclomatic 18) apps/desktop/src/lib/diagram/ltr-auto-layout.ts:40 — ltr-auto-layout.orderTablesByConnectivity has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseExport.runDatabaseExportUntilTerminal (cyclomatic 18) · ×1
  • databaseExport.runDatabaseExportUntilTerminal (cyclomatic 18) apps/desktop/src/lib/export/databaseExport.ts:133 — databaseExport.runDatabaseExportUntilTerminal has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphCompletionScope.projections (cyclomatic 18) · ×1
  • graphCompletionScope.projections (cyclomatic 18) apps/desktop/src/lib/graph/graphCompletionScope.ts:17 — graphCompletionScope.projections has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (add, a function literal at line 24). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · historyRestoreTarget.canReuseTabForHistoryRestore (cyclomatic 18) · ×1
  • historyRestoreTarget.canReuseTabForHistoryRestore (cyclomatic 18) apps/desktop/src/lib/history/historyRestoreTarget.ts:60 — historyRestoreTarget.canReuseTabForHistoryRestore has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · redisDesktopManagerImport.connection (cyclomatic 18) · ×1
  • redisDesktopManagerImport.connection (cyclomatic 18) apps/desktop/src/lib/imports/redisDesktopManagerImport.ts:42 — redisDesktopManagerImport.connection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · kvValueFormat.detectKvValueFormat (cyclomatic 18) · ×1
  • kvValueFormat.detectKvValueFormat (cyclomatic 18) apps/desktop/src/lib/kv/kvValueFormat.ts:17 — kvValueFormat.detectKvValueFormat has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoCommentAwareBodyEnd (cyclomatic 18) · ×1
  • mongoShellCommand.mongoCommentAwareBodyEnd (cyclomatic 18) REDACTED:1675 — mongoShellCommand.mongoCommentAwareBodyEnd has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoSyntaxDiagnostics.describeMongoWriteRisk (cyclomatic 18) · ×1
  • mongoSyntaxDiagnostics.describeMongoWriteRisk (cyclomatic 18) apps/desktop/src/lib/mongo/mongoSyntaxDiagnostics.ts:81 — mongoSyntaxDiagnostics.describeMongoWriteRisk has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nacosConfigValidation.closeImplicitHtmlTags (cyclomatic 18) · ×1
  • nacosConfigValidation.closeImplicitHtmlTags (cyclomatic 18) REDACTED:95 — nacosConfigValidation.closeImplicitHtmlTags has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · redisCommandDocs.mapEntries (cyclomatic 18) · ×1
  • redisCommandDocs.mapEntries (cyclomatic 18) apps/desktop/src/lib/redis/redisCommandDocs.ts:37 — redisCommandDocs.mapEntries has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · redisCommandDocs.commandArguments (cyclomatic 18) · ×1
  • redisCommandDocs.commandArguments (cyclomatic 18) apps/desktop/src/lib/redis/redisCommandDocs.ts:97 — redisCommandDocs.commandArguments has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cyclomatic 18) · ×1
  • schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cyclomatic 18) apps/desktop/src/lib/schema/schemaDiffTableMapping.ts:47 — schemaDiffTableMapping.reconcileSchemaDiffTableMappings has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cyclomatic 18) · ×1
  • sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cyclomatic 18) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:742 — sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ddlDisplay.findColumnAttributePositions (cyclomatic 18) · ×1
  • ddlDisplay.findColumnAttributePositions (cyclomatic 18) apps/desktop/src/lib/sql/ddlDisplay.ts:428 — ddlDisplay.findColumnAttributePositions has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · errorPosition.resolveSqlErrorOffset (cyclomatic 18) · ×1
  • errorPosition.resolveSqlErrorOffset (cyclomatic 18) apps/desktop/src/lib/sql/errorPosition.ts:156 — errorPosition.resolveSqlErrorOffset has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · executableStatementRangeCache.executableStartAfterLeadingComments (cyclomatic 18) · ×1
  • executableStatementRangeCache.executableStartAfterLeadingComments (cyclomatic 18) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:98 — executableStatementRangeCache.executableStartAfterLeadingComments has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.isTableListContinuation (cyclomatic 18) · ×1
  • model.isTableListContinuation (cyclomatic 18) apps/desktop/src/lib/sql/semantic/model.ts:934 — model.isTableListContinuation has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.isStandaloneSelectWildcard (cyclomatic 18) · ×1
  • sqlCompletion.isStandaloneSelectWildcard (cyclomatic 18) apps/desktop/src/lib/sql/sqlCompletion.ts:1906 — sqlCompletion.isStandaloneSelectWildcard has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.splitRoutineSignatureParameters (cyclomatic 18) · ×1
  • sqlCompletion.splitRoutineSignatureParameters (cyclomatic 18) apps/desktop/src/lib/sql/sqlCompletion.ts:5379 — sqlCompletion.splitRoutineSignatureParameters has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.findMatchingXmlTagClose (cyclomatic 18) · ×1
  • sqlParameters.findMatchingXmlTagClose (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:821 — sqlParameters.findMatchingXmlTagClose has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectDeclareStatementVariables (cyclomatic 18) · ×1
  • sqlParameters.collectDeclareStatementVariables (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:1458 — sqlParameters.collectDeclareStatementVariables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectRoutineDefinitionVariables (cyclomatic 18) · ×1
  • sqlParameters.collectRoutineDefinitionVariables (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:1612 — sqlParameters.collectRoutineDefinitionVariables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.formatLeadingCommas (cyclomatic 18) · ×1
  • sqlFormatter.formatLeadingCommas (cyclomatic 18) apps/desktop/src/lib/sql/sqlFormatter.ts:863 — sqlFormatter.formatLeadingCommas has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: sqlFormatter.sqlFormatDialectForDbType (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cyclomatic 18) · ×1
  • sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cyclomatic 18) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:192 — sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectBrowserRows.buildObjectBrowserRows.rows (cyclomatic 18) · ×1
  • objectBrowserRows.buildObjectBrowserRows.rows (cyclomatic 18) apps/desktop/src/lib/table/objectBrowserRows.ts:185 — objectBrowserRows.buildObjectBrowserRows.rows has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · objectBrowserRows.groupObjectBrowserRows (cyclomatic 18) · ×1
  • objectBrowserRows.groupObjectBrowserRows (cyclomatic 18) apps/desktop/src/lib/table/objectBrowserRows.ts:309 — objectBrowserRows.groupObjectBrowserRows has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (appendPartitions, a function literal at line 336, a function literal at line 350). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · objectSourceLoad.inspectExactOracleTriggerSource (cyclomatic 18) · ×1
  • objectSourceLoad.inspectExactOracleTriggerSource (cyclomatic 18) apps/desktop/src/lib/table/objectSourceLoad.ts:17 — objectSourceLoad.inspectExactOracleTriggerSource has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pgPartitionPresentation.splitPgPartitionBoundValues (cyclomatic 18) · ×1
  • pgPartitionPresentation.splitPgPartitionBoundValues (cyclomatic 18) apps/desktop/src/lib/table/pgPartitionPresentation.ts:89 — pgPartitionPresentation.splitPgPartitionBoundValues has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · postgresDataTypeHelp.gaussdbMTypeDisplayName (cyclomatic 18) · ×1
  • postgresDataTypeHelp.gaussdbMTypeDisplayName (cyclomatic 18) apps/desktop/src/lib/table/postgresDataTypeHelp.ts:164 — postgresDataTypeHelp.gaussdbMTypeDisplayName has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · routineParameters.sqlServerParameterDeclarationType (cyclomatic 18) · ×1
  • routineParameters.sqlServerParameterDeclarationType (cyclomatic 18) apps/desktop/src/lib/table/routineParameters.ts:512 — routineParameters.sqlServerParameterDeclarationType has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.validateDefaultExpression · ×1
  • tableColumnDefinitionPaste.validateDefaultExpression::operand (cyclomatic 18) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:99 — tableColumnDefinitionPaste.validateDefaultExpression::operand has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.isWrappedByOuterParens (cyclomatic 18) · ×1
  • tableStructureEditorState.isWrappedByOuterParens (cyclomatic 18) apps/desktop/src/lib/table/tableStructureEditorState.ts:1019 — tableStructureEditorState.isWrappedByOuterParens has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.coalesceXuguPackageObjects (cyclomatic 18) · ×1
  • tableTree.coalesceXuguPackageObjects (cyclomatic 18) apps/desktop/src/lib/table/tableTree.ts:679 — tableTree.coalesceXuguPackageObjects has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:3971 — connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.persistConnectionDeletion (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.persistConnectionDeletion (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:10901 — connectionStore.useConnectionStore.persistConnectionDeletion has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.initFromDisk (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.initFromDisk (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:11895 — connectionStore.useConnectionStore.initFromDisk has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.executeInDebuggee (cyclomatic 18) · ×1
  • plDebugStore.usePlDebugStore.executeInDebuggee (cyclomatic 18) apps/desktop/src/stores/plDebugStore.ts:1659 — plDebugStore.usePlDebugStore.executeInDebuggee has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.findMatchingObjectSourceTab (cyclomatic 18) · ×1
  • queryStore.useQueryStore.findMatchingObjectSourceTab (cyclomatic 18) apps/desktop/src/stores/queryStore.ts:3311 — queryStore.useQueryStore.findMatchingObjectSourceTab has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 3313). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.moveTaskToFolder (cyclomatic 18) · ×1
  • transferTaskStore.useTransferTaskStore.moveTaskToFolder (cyclomatic 18) apps/desktop/src/stores/transferTaskStore.ts:383 — transferTaskStore.useTransferTaskStore.moveTaskToFolder has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 390, 391). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · json.readMongoRegexLiteral (cyclomatic 18) · ×1
  • json.readMongoRegexLiteral (cyclomatic 18) packages/mongo-shell/src/json.ts:47 — json.readMongoRegexLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · json.splitTopLevel (cyclomatic 18) · ×1
  • json.splitTopLevel (cyclomatic 18) packages/mongo-shell/src/json.ts:226 — json.splitTopLevel has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Diagnostics.query (cyclomatic 18) · ×1
  • Diagnostics.query (cyclomatic 18) plugins/sdk/dev-host/diagnostics.mjs:70 — Diagnostics.query has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TupleScanner · ×1
  • TupleScanner::next (cyclomatic 17) REDACTED:225 — TupleScanner::next has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · McpGlobalPolicy · ×1
  • McpGlobalPolicy::normalized (cyclomatic 17) REDACTED:906 — McpGlobalPolicy::normalized has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupConfig · ×1
  • BackupConfig::validate (cyclomatic 17) crates/dbx-core/src/scheduled_backup/models.rs:146 — BackupConfig::validate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuckDbWorkerClient · ×1
  • DuckDbWorkerClient::execute_typed_with_options (cyclomatic 17) crates/dbx-drivers/src/db/duckdb_worker_process.rs:287 — DuckDbWorkerClient::execute_typed_with_options has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AbstractJdbcAgent.finishPooledRequest (cyclomatic 17) · ×1
  • AbstractJdbcAgent.finishPooledRequest (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:421 — AbstractJdbcAgent.finishPooledRequest has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AgentRpcError.classify (cyclomatic 17) · ×1
  • AgentRpcError.classify (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/AgentRpcError.java:108 — AgentRpcError.classify has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PoolEntry.borrow (cyclomatic 17) · ×1
  • PoolEntry.borrow (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:905 — PoolEntry.borrow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cyclomatic 17) · ×1
  • DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cyclomatic 17) REDACTED:3372 — DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handleLogicalSession (cyclomatic 17) · ×1
  • DbxJdbcPlugin.handleLogicalSession (cyclomatic 17) REDACTED:641 — DbxJdbcPlugin.handleLogicalSession has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleTriggerMetadataReader.listObjects (cyclomatic 17) · ×1
  • OracleTriggerMetadataReader.listObjects (cyclomatic 17) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:57 — OracleTriggerMetadataReader.listObjects has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DamengAgent.buildCatalogObjectSource (cyclomatic 17) · ×1
  • DamengAgent.buildCatalogObjectSource (cyclomatic 17) REDACTED:1611 — DamengAgent.buildCatalogObjectSource has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FirebirdObjectSource.triggerSource (cyclomatic 17) · ×1
  • FirebirdObjectSource.triggerSource (cyclomatic 17) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:57 — FirebirdObjectSource.triggerSource has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MongoAgent.applyAggregateOptions (cyclomatic 17) · ×1
  • MongoAgent.applyAggregateOptions (cyclomatic 17) REDACTED:878 — MongoAgent.applyAggregateOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OceanBaseLobValues.mark (cyclomatic 17) · ×1
  • OceanBaseLobValues.mark (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:231 — OceanBaseLobValues.mark has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 2.read (cyclomatic 17) · ×1
  • 2.read (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:444 — 2.read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugBreakpointRegistry.set (cyclomatic 17) · ×1
  • PlDebugBreakpointRegistry.set (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:94 — PlDebugBreakpointRegistry.set has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Execution.run (cyclomatic 17) · ×1
  • Execution.run (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:144 — Execution.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.payloadBytes (cyclomatic 17) · ×1
  • PlDebugCompositeInput.payloadBytes (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:49 — PlDebugCompositeInput.payloadBytes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Writer.childDeclaration (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.helperDeclarations (cyclomatic 17) · ×1
  • PlDebugCompositeOutput.helperDeclarations (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — PlDebugCompositeOutput.helperDeclarations has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.<init> (cyclomatic 17) · ×1
  • PlDebugCompositeOutput.<init> (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:27 — PlDebugCompositeOutput.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.bindComposite (cyclomatic 17) · ×1
  • Plan.bindComposite (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:473 — Plan.bindComposite has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SqlServerLegacyAgent.shouldFallbackToJtds (cyclomatic 17) · ×1
  • SqlServerLegacyAgent.shouldFallbackToJtds (cyclomatic 17) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:326 — SqlServerLegacyAgent.shouldFallbackToJtds has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_tunnel.run_worker (cyclomatic 17) · ×1
  • dbx_tunnel.run_worker (cyclomatic 17) deploy/dbx_tunnel.php:168 — dbx_tunnel.run_worker has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · etcdSession.readableKeyRanges (cyclomatic 17) · ×1
  • etcdSession.readableKeyRanges (cyclomatic 17) agents/drivers/etcd-go/auth.go:39 — etcdSession.readableKeyRanges has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getTableDialectDDL (cyclomatic 17) · ×1
  • server.getTableDialectDDL (cyclomatic 17) agents/drivers/iotdb/metadata.go:438 — server.getTableDialectDDL has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listForeignKeysFromCatalog (cyclomatic 17) · ×1
  • server.listForeignKeysFromCatalog (cyclomatic 17) REDACTED:2420 — server.listForeignKeysFromCatalog has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listTriggerDefinitionsFor (cyclomatic 17) · ×1
  • server.listTriggerDefinitionsFor (cyclomatic 17) REDACTED:3027 — server.listTriggerDefinitionsFor has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.runOracleAgent (cyclomatic 17) · ×1
  • main.runOracleAgent (cyclomatic 17) REDACTED:710 — main.runOracleAgent has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.oracleFullPassthroughInnerSelectRange (cyclomatic 17) · ×1
  • main.oracleFullPassthroughInnerSelectRange (cyclomatic 17) REDACTED:5419 — main.oracleFullPassthroughInnerSelectRange has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.oracleRequestedMetadataListQuery (cyclomatic 17) · ×1
  • main.oracleRequestedMetadataListQuery (cyclomatic 17) agents/drivers/oracle-go/metadata_queries.go:11 — main.oracleRequestedMetadataListQuery has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugNativeCaptureRender (cyclomatic 17) · ×1
  • main.plDebugNativeCaptureRender (cyclomatic 17) agents/drivers/oracle-go/pldebug_output.go:44 — main.plDebugNativeCaptureRender has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.plDebugNativeTypedTransport (cyclomatic 17) · ×1
  • main.plDebugNativeTypedTransport (cyclomatic 17) agents/drivers/oracle-go/pldebug_transport_preflight.go:42 — main.plDebugNativeTypedTransport has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.getTableDDLWithIdentity (cyclomatic 17) · ×1
  • server.getTableDDLWithIdentity (cyclomatic 17) REDACTED:3886 — server.getTableDDLWithIdentity has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.openNativeDebuggee (cyclomatic 17) · ×1
  • server.openNativeDebuggee (cyclomatic 17) agents/drivers/oracle-go/pldebug_connections.go:10 — server.openNativeDebuggee has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugRecordDecoder.collection (cyclomatic 17) · ×1
  • plDebugRecordDecoder.collection (cyclomatic 17) agents/drivers/oracle-go/pldebug_collection_input.go:39 — plDebugRecordDecoder.collection has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugResultCache.retainWithState (cyclomatic 17) · ×1
  • plDebugResultCache.retainWithState (cyclomatic 17) agents/drivers/oracle-go/pldebug_results.go:67 — plDebugResultCache.retainWithState has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugNativeRoutineScan.ownerAtLine (cyclomatic 17) · ×1
  • plDebugNativeRoutineScan.ownerAtLine (cyclomatic 17) agents/drivers/oracle-go/pldebug_routine.go:567 — plDebugNativeRoutineScan.ownerAtLine has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeTypeLoader.query (cyclomatic 17) · ×1
  • plDebugNativeTypeLoader.query (cyclomatic 17) agents/drivers/oracle-go/pldebug_type_graph.go:135 — plDebugNativeTypeLoader.query has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugNativeTypeLoader.containerVersion (cyclomatic 17) · ×1
  • plDebugNativeTypeLoader.containerVersion (cyclomatic 17) agents/drivers/oracle-go/pldebug_type_graph.go:263 — plDebugNativeTypeLoader.containerVersion has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.paginateManagementArray (cyclomatic 17) · ×1
  • main.paginateManagementArray (cyclomatic 17) REDACTED:318 — main.paginateManagementArray has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rocketMQAgent.viewMessage (cyclomatic 17) · ×1
  • rocketMQAgent.viewMessage (cyclomatic 17) REDACTED:149 — rocketMQAgent.viewMessage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.listTablespaces (cyclomatic 17) · ×1
  • server.listTablespaces (cyclomatic 17) REDACTED:1760 — server.listTablespaces has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: main.normalizeValueWithType (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · server.listPrefix (cyclomatic 17) · ×1
  • server.listPrefix (cyclomatic 17) agents/drivers/zookeeper/operations.go:268 — server.listPrefix has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gosasl.parseChallenge (cyclomatic 17) · ×1
  • gosasl.parseChallenge (cyclomatic 17) REDACTED:198 — gosasl.parseChallenge has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.sapHanaScriptBlockIsComplete (cyclomatic 17) · ×1
  • sqlStatementRanges.sapHanaScriptBlockIsComplete (cyclomatic 17) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2525 — sqlStatementRanges.sapHanaScriptBlockIsComplete has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorLayout.useQueryEditorLayout (cyclomatic 17) · ×1
  • useQueryEditorLayout.useQueryEditorLayout (cyclomatic 17) apps/desktop/src/components/editor/useQueryEditorLayout.ts:5 — useQueryEditorLayout.useQueryEditorLayout has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 6 function items inside it that branch (editorBoxTrackStep, a function literal at line 72, editorAvailableSize, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · queryResultTransferDdl.columnDefinitions (cyclomatic 17) · ×1
  • queryResultTransferDdl.columnDefinitions (cyclomatic 17) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:56 — queryResultTransferDdl.columnDefinitions has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.compareParsedUpdateVersions (cyclomatic 17) · ×1
  • useAppUpdater.compareParsedUpdateVersions (cyclomatic 17) apps/desktop/src/composables/useAppUpdater.ts:51 — useAppUpdater.compareParsedUpdateVersions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.downloadUpdateInBackground · ×1
  • useAppUpdater.useAppUpdater.downloadUpdateInBackground::run (cyclomatic 17) apps/desktop/src/composables/useAppUpdater.ts:391 — useAppUpdater.useAppUpdater.downloadUpdateInBackground::run has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useCellDetailEditor.useCellDetailEditor (cyclomatic 17) · ×1
  • useCellDetailEditor.useCellDetailEditor (cyclomatic 17) apps/desktop/src/composables/useCellDetailEditor.ts:83 — useCellDetailEditor.useCellDetailEditor has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 194, 212, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cyclomatic 17) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cyclomatic 17) REDACTED:492 — useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.sqlExportChoices (cyclomatic 17) · ×1
  • useDataGridExport.useDataGridExport.sqlExportChoices (cyclomatic 17) apps/desktop/src/composables/useDataGridExport.ts:2831 — useDataGridExport.useDataGridExport.sqlExportChoices has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridSearch.useDataGridSearch.matchState (cyclomatic 17) · ×1
  • useDataGridSearch.useDataGridSearch.matchState (cyclomatic 17) apps/desktop/src/composables/useDataGridSearch.ts:55 — useDataGridSearch.useDataGridSearch.matchState has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 80, includes, a function literal at line 75). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cyclomatic 17) · ×1
  • useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cyclomatic 17) apps/desktop/src/composables/useDataGridSelection.ts:264 — useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cyclomatic 17) · ×1
  • useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cyclomatic 17) apps/desktop/src/composables/useSidebarTreeToolRuntime.ts:191 — useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.continueExecute (cyclomatic 17) · ×1
  • useSqlExecution.useSqlExecution.continueExecute (cyclomatic 17) apps/desktop/src/composables/useSqlExecution.ts:374 — useSqlExecution.useSqlExecution.continueExecute has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aiSqlTargetTab.resolveAiSqlTargetTabId (cyclomatic 17) · ×1
  • aiSqlTargetTab.resolveAiSqlTargetTabId (cyclomatic 17) apps/desktop/src/lib/ai/aiSqlTargetTab.ts:31 — aiSqlTargetTab.resolveAiSqlTargetTabId has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsonSourceScanner.readNumberToken (cyclomatic 17) · ×1
  • JsonSourceScanner.readNumberToken (cyclomatic 17) REDACTED:536 — JsonSourceScanner.readNumberToken has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · looseJsonFormat.formatLooseJsonText (cyclomatic 17) · ×1
  • looseJsonFormat.formatLooseJsonText (cyclomatic 17) apps/desktop/src/lib/common/looseJsonFormat.ts:20 — looseJsonFormat.formatLooseJsonText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sessionModel.normalizeConsulSession (cyclomatic 17) · ×1
  • sessionModel.normalizeConsulSession (cyclomatic 17) apps/desktop/src/lib/consul/sessionModel.ts:5 — sessionModel.normalizeConsulSession has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cellValueGeneration.generateCellValues (cyclomatic 17) · ×1
  • cellValueGeneration.generateCellValues (cyclomatic 17) apps/desktop/src/lib/dataGrid/cellValueGeneration.ts:51 — cellValueGeneration.generateCellValues has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · dataGenerate.generateByType (cyclomatic 17) · ×1
  • dataGenerate.generateByType (cyclomatic 17) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1866 — dataGenerate.generateByType has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · databaseObjectCapabilities.normalizeSidebarObjectKind (cyclomatic 17) · ×1
  • databaseObjectCapabilities.normalizeSidebarObjectKind (cyclomatic 17) apps/desktop/src/lib/database/databaseObjectCapabilities.ts:262 — databaseObjectCapabilities.normalizeSidebarObjectKind has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cyclomatic 17) · ×1
  • oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cyclomatic 17) REDACTED:100 — oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleConstraints.expressionTokens (cyclomatic 17) · ×1
  • oracleConstraints.expressionTokens (cyclomatic 17) apps/desktop/src/lib/database/oracleConstraints.ts:194 — oracleConstraints.expressionTokens has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.candidateBinding (cyclomatic 17) · ×1
  • oracleTriggerPlan.candidateBinding (cyclomatic 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:611 — oracleTriggerPlan.candidateBinding has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleUserAdmin.oraclePrivilegeSql (cyclomatic 17) · ×1
  • oracleUserAdmin.oraclePrivilegeSql (cyclomatic 17) apps/desktop/src/lib/database/oracleUserAdmin.ts:92 — oracleUserAdmin.oraclePrivilegeSql has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · xuguUserPermissions.parseXuguAclRows (cyclomatic 17) · ×1
  • xuguUserPermissions.parseXuguAclRows (cyclomatic 17) apps/desktop/src/lib/database/xuguUserPermissions.ts:422 — xuguUserPermissions.parseXuguAclRows has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 426, field). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · elk-layout.extractHierarchicalLayoutResult (cyclomatic 17) · ×1
  • elk-layout.extractHierarchicalLayoutResult (cyclomatic 17) apps/desktop/src/lib/diagram/elk-layout.ts:321 — elk-layout.extractHierarchicalLayoutResult has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · codemirrorSqlBlockFolding.computeBlockFoldRanges (cyclomatic 17) · ×1
  • codemirrorSqlBlockFolding.computeBlockFoldRanges (cyclomatic 17) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:193 — codemirrorSqlBlockFolding.computeBlockFoldRanges has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editorThemes.resolveEditorTheme (cyclomatic 17) · ×1
  • editorThemes.resolveEditorTheme (cyclomatic 17) apps/desktop/src/lib/editor/editorThemes.ts:738 — editorThemes.resolveEditorTheme has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: editorThemes.loadEditorTheme (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · keyboardShortcuts.matchesShortcutKey (cyclomatic 17) · ×1
  • keyboardShortcuts.matchesShortcutKey (cyclomatic 17) apps/desktop/src/lib/editor/keyboardShortcuts.ts:123 — keyboardShortcuts.matchesShortcutKey has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · elasticsearchJsonResponse.elasticsearchJsonResponseForResult (cyclomatic 17) · ×1
  • elasticsearchJsonResponse.elasticsearchJsonResponseForResult (cyclomatic 17) apps/desktop/src/lib/elasticsearch/elasticsearchJsonResponse.ts:16 — elasticsearchJsonResponse.elasticsearchJsonResponseForResult has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · xlsxExport.cellXml (cyclomatic 17) · ×1
  • xlsxExport.cellXml (cyclomatic 17) apps/desktop/src/lib/export/xlsxExport.ts:163 — xlsxExport.cellXml has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · neo4jGraph.applyNeo4jGraphPropertyToResult (cyclomatic 17) · ×1
  • neo4jGraph.applyNeo4jGraphPropertyToResult (cyclomatic 17) apps/desktop/src/lib/graph/neo4jGraph.ts:65 — neo4jGraph.applyNeo4jGraphPropertyToResult has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 76, a function literal at line 97, propertiesDisplay, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · dbeaverImport.parseJdbcUrl (cyclomatic 17) · ×1
  • dbeaverImport.parseJdbcUrl (cyclomatic 17) REDACTED:148 — dbeaverImport.parseJdbcUrl has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginData.unwrapVueProxies (cyclomatic 17) · ×1
  • pluginData.unwrapVueProxies (cyclomatic 17) apps/desktop/src/lib/plugins/pluginData.ts:62 — pluginData.unwrapVueProxies has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginHostBridge.requirePluginDataQueryRequest (cyclomatic 17) · ×1
  • pluginHostBridge.requirePluginDataQueryRequest (cyclomatic 17) REDACTED:1813 — pluginHostBridge.requirePluginDataQueryRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginFloatingWindow.startFloatingWindowReaper (cyclomatic 17) · ×1
  • pluginFloatingWindow.startFloatingWindowReaper (cyclomatic 17) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:768 — pluginFloatingWindow.startFloatingWindowReaper has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 787, 803, 774, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · redisContentSearch.worker.onmessage (cyclomatic 17) · ×1
  • redisContentSearch.worker.onmessage (cyclomatic 17) apps/desktop/src/lib/redis/redisContentSearch.worker.ts:5 — redisContentSearch.worker.onmessage has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · savedSqlDatabaseTree.withDatabaseSavedSqlRoot (cyclomatic 17) · ×1
  • savedSqlDatabaseTree.withDatabaseSavedSqlRoot (cyclomatic 17) apps/desktop/src/lib/savedSql/savedSqlDatabaseTree.ts:87 — savedSqlDatabaseTree.withDatabaseSavedSqlRoot has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · savedSqlTreeRows.compareSiblingItems (cyclomatic 17) · ×1
  • savedSqlTreeRows.compareSiblingItems (cyclomatic 17) apps/desktop/src/lib/savedSql/savedSqlTreeRows.ts:32 — savedSqlTreeRows.compareSiblingItems has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cyclomatic 17) · ×1
  • oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cyclomatic 17) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:253 — oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sidebarDatabaseStorage.applySidebarTableStorage (cyclomatic 17) · ×1
  • sidebarDatabaseStorage.applySidebarTableStorage (cyclomatic 17) apps/desktop/src/lib/sidebar/sidebarDatabaseStorage.ts:53 — sidebarDatabaseStorage.applySidebarTableStorage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 55). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sidebarSearchTree.filterLocallySearchedTableNodes (cyclomatic 17) · ×1
  • sidebarSearchTree.filterLocallySearchedTableNodes (cyclomatic 17) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:113 — sidebarSearchTree.filterLocallySearchedTableNodes has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 114, 135, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sidebarTreeArrowNavigation.sidebarTreeArrowAction (cyclomatic 17) · ×1
  • sidebarTreeArrowNavigation.sidebarTreeArrowAction (cyclomatic 17) apps/desktop/src/lib/sidebar/sidebarTreeArrowNavigation.ts:16 — sidebarTreeArrowNavigation.sidebarTreeArrowAction has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguTypeMembers.buildXuguTypeMemberNodes (cyclomatic 17) · ×1
  • xuguTypeMembers.buildXuguTypeMemberNodes (cyclomatic 17) apps/desktop/src/lib/sidebar/xuguTypeMembers.ts:12 — xuguTypeMembers.buildXuguTypeMemberNodes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · soqlCompletion.fieldItems (cyclomatic 17) · ×1
  • soqlCompletion.fieldItems (cyclomatic 17) apps/desktop/src/lib/soql/soqlCompletion.ts:420 — soqlCompletion.fieldItems has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · soqlCompletion.valueItems (cyclomatic 17) · ×1
  • soqlCompletion.valueItems (cyclomatic 17) apps/desktop/src/lib/soql/soqlCompletion.ts:456 — soqlCompletion.valueItems has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · executableStatementRangeCache.executableStatementRangeAtCursor (cyclomatic 17) · ×1
  • executableStatementRangeCache.executableStatementRangeAtCursor (cyclomatic 17) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:140 — executableStatementRangeCache.executableStatementRangeAtCursor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · diagnostics.leadingUnquotedSqlKeywords (cyclomatic 17) · ×1
  • diagnostics.leadingUnquotedSqlKeywords (cyclomatic 17) apps/desktop/src/lib/sql/semantic/diagnostics.ts:88 — diagnostics.leadingUnquotedSqlKeywords has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.trailingIdentifier (cyclomatic 17) · ×1
  • model.trailingIdentifier (cyclomatic 17) apps/desktop/src/lib/sql/semantic/model.ts:851 — model.trailingIdentifier has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.parseSelectColumns (cyclomatic 17) · ×1
  • sqlAnalysis.parseSelectColumns (cyclomatic 17) apps/desktop/src/lib/sql/sqlAnalysis.ts:431 — sqlAnalysis.parseSelectColumns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.decodeMyBatisXmlComparisonEntities (cyclomatic 17) · ×1
  • sqlParameters.decodeMyBatisXmlComparisonEntities (cyclomatic 17) apps/desktop/src/lib/sql/sqlParameters.ts:369 — sqlParameters.decodeMyBatisXmlComparisonEntities has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.tryReadQuotedSubstitutionPlaceholder (cyclomatic 17) · ×1
  • sqlParameters.tryReadQuotedSubstitutionPlaceholder (cyclomatic 17) apps/desktop/src/lib/sql/sqlParameters.ts:1819 — sqlParameters.tryReadQuotedSubstitutionPlaceholder has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlFileTreeFilter.filterAndSortSqlFileEntries (cyclomatic 17) · ×1
  • sqlFileTreeFilter.filterAndSortSqlFileEntries (cyclomatic 17) apps/desktop/src/lib/sql/sqlFileTreeFilter.ts:87 — sqlFileTreeFilter.filterAndSortSqlFileEntries has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (filterEntries, countNodes). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sqlNavigation.resolveSqlObjectNavigationIdentity (cyclomatic 17) · ×1
  • sqlNavigation.resolveSqlObjectNavigationIdentity (cyclomatic 17) apps/desktop/src/lib/sql/sqlNavigation.ts:501 — sqlNavigation.resolveSqlObjectNavigationIdentity has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlSelectionCase.convertSqlSelectionCase (cyclomatic 17) · ×1
  • sqlSelectionCase.convertSqlSelectionCase (cyclomatic 17) apps/desktop/src/lib/sql/sqlSelectionCase.ts:14 — sqlSelectionCase.convertSqlSelectionCase has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · batchTableDrop.runBatchTableDrop (cyclomatic 17) · ×1
  • batchTableDrop.runBatchTableDrop (cyclomatic 17) apps/desktop/src/lib/table/batchTableDrop.ts:36 — batchTableDrop.runBatchTableDrop has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.validateDraftRelations (cyclomatic 17) · ×1
  • oracleTableRename.validateDraftRelations (cyclomatic 17) REDACTED:344 — oracleTableRename.validateDraftRelations has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (normalize, a function literal at line 415, a function literal at line 354, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · routineParameters.routineParametersQuery (cyclomatic 17) · ×1
  • routineParameters.routineParametersQuery (cyclomatic 17) apps/desktop/src/lib/table/routineParameters.ts:42 — routineParameters.routineParametersQuery has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · routineParameters.xuguFunctionReturnType (cyclomatic 17) · ×1
  • routineParameters.xuguFunctionReturnType (cyclomatic 17) apps/desktop/src/lib/table/routineParameters.ts:401 — routineParameters.xuguFunctionReturnType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.getDefaultLengthForType (cyclomatic 17) · ×1
  • tableStructureEditorState.getDefaultLengthForType (cyclomatic 17) apps/desktop/src/lib/table/tableStructureEditorState.ts:1816 — tableStructureEditorState.getDefaultLengthForType has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.mergeTableInfosIntoObjects (cyclomatic 17) · ×1
  • tableTree.mergeTableInfosIntoObjects (cyclomatic 17) apps/desktop/src/lib/table/tableTree.ts:244 — tableTree.mergeTableInfosIntoObjects has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editorToolbarLayout.resolveNextEditorToolbarTier (cyclomatic 17) · ×1
  • editorToolbarLayout.resolveNextEditorToolbarTier (cyclomatic 17) apps/desktop/src/lib/tabs/editorToolbarLayout.ts:49 — editorToolbarLayout.resolveNextEditorToolbarTier has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.updateConnection (cyclomatic 17) · ×1
  • connectionStore.useConnectionStore.updateConnection (cyclomatic 17) apps/desktop/src/stores/connectionStore.ts:4986 — connectionStore.useConnectionStore.updateConnection has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadXuguTypeMembers (cyclomatic 17) · ×1
  • connectionStore.useConnectionStore.loadXuguTypeMembers (cyclomatic 17) apps/desktop/src/stores/connectionStore.ts:9502 — connectionStore.useConnectionStore.loadXuguTypeMembers has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeResultSession (cyclomatic 17) · ×1
  • queryStore.useQueryStore.closeResultSession (cyclomatic 17) apps/desktop/src/stores/queryStore.ts:1894 — queryStore.useQueryStore.closeResultSession has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.moveFileToFolder (cyclomatic 17) · ×1
  • savedSqlStore.useSavedSqlStore.moveFileToFolder (cyclomatic 17) apps/desktop/src/stores/savedSqlStore.ts:1064 — savedSqlStore.useSavedSqlStore.moveFileToFolder has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1089, 1072, 1071). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settingsStore.normalizeSqlShortcuts (cyclomatic 17) · ×1
  • settingsStore.normalizeSqlShortcuts (cyclomatic 17) apps/desktop/src/stores/settingsStore.ts:2010 — settingsStore.normalizeSqlShortcuts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask (cyclomatic 17) · ×1
  • tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask (cyclomatic 17) apps/desktop/src/stores/tableCopyTaskStore.ts:78 — tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentBundle.extractDriverPackage (cyclomatic 17) · ×1
  • agentBundle.extractDriverPackage (cyclomatic 17) docs/lib/agentBundle.ts:239 — agentBundle.extractDriverPackage has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · i18n.localizeManifest (cyclomatic 17) · ×1
  • i18n.localizeManifest (cyclomatic 17) plugins/sdk/dev-host/ui/i18n.js:98 — i18n.localizeManifest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NacosOpenApiAdmin · ×1
  • NacosOpenApiAdmin::test_connection (cyclomatic 16) crates/dbx-core/src/admin/nacos/http.rs:1844 — NacosOpenApiAdmin::test_connection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DegradationChain · ×1
  • DegradationChain::decide (cyclomatic 16) REDACTED:1708 — DegradationChain::decide has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Nb3ExportWriter · ×1
  • Nb3ExportWriter::handle_statement (cyclomatic 16) REDACTED:1396 — Nb3ExportWriter::handle_statement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Expansion · ×1
  • Expansion::file (cyclomatic 16) crates/dbx-core/src/data/sql_file_import/includes.rs:141 — Expansion::file has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OwnedPoolSession · ×1
  • OwnedPoolSession::legacy_call (cyclomatic 16) crates/dbx-core/src/schema/native_jobs/operations.rs:1169 — OwnedPoolSession::legacy_call has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LegacyReader · ×1
  • LegacyReader::summaries (cyclomatic 16) crates/dbx-core/src/schema/oracle_triggers.rs:409 — LegacyReader::summaries has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · OracleSchemaSyncTableDdl · ×1
  • OracleSchemaSyncTableDdl::render_triggers (cyclomatic 16) crates/dbx-sql-schema/src/schema_diff/oracle_indexes.rs:185 — OracleSchemaSyncTableDdl::render_triggers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConnectionFactoryDataSource.getConnection (cyclomatic 16) · ×1
  • ConnectionFactoryDataSource.getConnection (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1115 — ConnectionFactoryDataSource.getConnection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JdbcExecutor.executePage (cyclomatic 16) · ×1
  • JdbcExecutor.executePage (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:560 — JdbcExecutor.executePage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: JdbcExecutor.defaultResultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · JsonRpcServer.ensureLiveConnection (cyclomatic 16) · ×1
  • JsonRpcServer.ensureLiveConnection (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:793 — JsonRpcServer.ensureLiveConnection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MultiSessionJsonRpcServer.handleRequest (cyclomatic 16) · ×1
  • MultiSessionJsonRpcServer.handleRequest (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198 — MultiSessionJsonRpcServer.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.executeQueryOnConnection (cyclomatic 16) · ×1
  • DbxJdbcPlugin.executeQueryOnConnection (cyclomatic 16) REDACTED:1573 — DbxJdbcPlugin.executeQueryOnConnection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.openConnection (cyclomatic 16) · ×1
  • DbxJdbcPlugin.openConnection (cyclomatic 16) REDACTED:1176 — DbxJdbcPlugin.openConnection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleListObjects (cyclomatic 16) · ×1
  • DbxJdbcPlugin.oracleListObjects (cyclomatic 16) REDACTED:5402 — DbxJdbcPlugin.oracleListObjects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DamengAgent.splitTableDdlDefinitions (cyclomatic 16) · ×1
  • DamengAgent.splitTableDdlDefinitions (cyclomatic 16) REDACTED:2353 — DamengAgent.splitTableDdlDefinitions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Entry.snapshot (cyclomatic 16) · ×1
  • Entry.snapshot (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:650 — Entry.snapshot has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSource.reference (cyclomatic 16) · ×1
  • PlDebugSource.reference (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:20 — PlDebugSource.reference has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.inputPayloadBytes (cyclomatic 16) · ×1
  • PlDebugTarget.inputPayloadBytes (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:908 — PlDebugTarget.inputPayloadBytes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SpannerAgent.completionAssistantSearch (cyclomatic 16) · ×1
  • SpannerAgent.completionAssistantSearch (cyclomatic 16) agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:345 — SpannerAgent.completionAssistantSearch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · configure-docker-mirror.configure (cyclomatic 16) · ×1
  • configure-docker-mirror.configure (cyclomatic 16) .github/scripts/configure-docker-mirror.py:16 — configure-docker-mirror.configure has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.parseCassandraConfig (cyclomatic 16) · ×1
  • main.parseCassandraConfig (cyclomatic 16) agents/drivers/cassandra-go/config.go:54 — main.parseCassandraConfig has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.applyNativeHOCON (cyclomatic 16) · ×1
  • main.applyNativeHOCON (cyclomatic 16) agents/drivers/cassandra-go/config_file.go:288 — main.applyNativeHOCON has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · etcdSession.listReadableRanges (cyclomatic 16) · ×1
  • etcdSession.listReadableRanges (cyclomatic 16) agents/drivers/etcd-go/kv.go:118 — etcdSession.listReadableRanges has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.rewriteNativeConnectionStringSSLMode (cyclomatic 16) · ×1
  • main.rewriteNativeConnectionStringSSLMode (cyclomatic 16) agents/drivers/kingbase-go/main.go:1466 — main.rewriteNativeConnectionStringSSLMode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.withTerminalKeyword (cyclomatic 16) · ×1
  • main.withTerminalKeyword (cyclomatic 16) agents/drivers/kingbase-go/main.go:2032 — main.withTerminalKeyword has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.queryInformationSchemaColumns (cyclomatic 16) · ×1
  • server.queryInformationSchemaColumns (cyclomatic 16) REDACTED:2038 — server.queryInformationSchemaColumns has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.newAgentSession (cyclomatic 16) · ×1
  • main.newAgentSession (cyclomatic 16) agents/drivers/nebula-go/main.go:219 — main.newAgentSession has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.normalizeNestedValue (cyclomatic 16) · ×1
  • main.normalizeNestedValue (cyclomatic 16) agents/drivers/neo4j-go/query.go:332 — main.normalizeNestedValue has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: main.neo4jTypeName (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · main.oracleExplainPlanBindParams (cyclomatic 16) · ×1
  • main.oracleExplainPlanBindParams (cyclomatic 16) REDACTED:4556 — main.oracleExplainPlanBindParams has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.rewriteNestedOracleSelects (cyclomatic 16) · ×1
  • main.rewriteNestedOracleSelects (cyclomatic 16) REDACTED:5461 — main.rewriteNestedOracleSelects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.splitTopLevelSQLList (cyclomatic 16) · ×1
  • main.splitTopLevelSQLList (cyclomatic 16) REDACTED:6006 — main.splitTopLevelSQLList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.plDebugPreviewNativeCompile (cyclomatic 16) · ×1
  • main.plDebugPreviewNativeCompile (cyclomatic 16) agents/drivers/oracle-go/pldebug_compile.go:358 — main.plDebugPreviewNativeCompile has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.plDebugNativeTemporal (cyclomatic 16) · ×1
  • main.plDebugNativeTemporal (cyclomatic 16) agents/drivers/oracle-go/pldebug_temporal.go:29 — main.plDebugNativeTemporal has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.queryRowsWithTimeout (cyclomatic 16) · ×1
  • server.queryRowsWithTimeout (cyclomatic 16) REDACTED:6326 — server.queryRowsWithTimeout has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.awaitNativeDrain (cyclomatic 16) · ×1
  • runtimeServer.awaitNativeDrain (cyclomatic 16) agents/drivers/oracle-go/pldebug_drain.go:8 — runtimeServer.awaitNativeDrain has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtimeServer.startNativeDebug (cyclomatic 16) · ×1
  • runtimeServer.startNativeDebug (cyclomatic 16) agents/drivers/oracle-go/pldebug_manager.go:201 — runtimeServer.startNativeDebug has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.sanitizeSessionStateSQL (cyclomatic 16) · ×1
  • main.sanitizeSessionStateSQL (cyclomatic 16) agents/drivers/vastbase-go/connection_state.go:122 — main.sanitizeSessionStateSQL has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · server.listObjects (cyclomatic 16) · ×1
  • server.listObjects (cyclomatic 16) agents/drivers/vastbase-go/vastbase_metadata.go:1029 — server.listObjects has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.put (cyclomatic 16) · ×1
  • server.put (cyclomatic 16) agents/drivers/zookeeper/operations.go:89 — server.put has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · semver.recursivePreReleaseCompare (cyclomatic 16) · ×1
  • semver.recursivePreReleaseCompare (cyclomatic 16) agents/go-common/go-semver/semver.go:207 — semver.recursivePreReleaseCompare has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dbxpluginsdk.validProtocolName (cyclomatic 16) · ×1
  • dbxpluginsdk.validProtocolName (cyclomatic 16) plugins/sdk/go/dbx-plugin-sdk/sdk.go:399 — dbxpluginsdk.validProtocolName has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlStatementRanges.nextSqlWordToken (cyclomatic 16) · ×1
  • sqlStatementRanges.nextSqlWordToken (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1654 — sqlStatementRanges.nextSqlWordToken has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cyclomatic 16) · ×1
  • sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2231 — sqlStatementRanges.advanceMysqlRoutineBlockCompleteness has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.startsWithFirebirdRoutineBlock (cyclomatic 16) · ×1
  • sqlStatementRanges.startsWithFirebirdRoutineBlock (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2574 — sqlStatementRanges.startsWithFirebirdRoutineBlock has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · build_offline_jdbc_payload.validateAndCopyBundle (cyclomatic 16) · ×1
  • build_offline_jdbc_payload.validateAndCopyBundle (cyclomatic 16) agents/scripts/build_offline_jdbc_payload.mjs:75 — build_offline_jdbc_payload.validateAndCopyBundle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldBypassCompletionFilter (cyclomatic 16) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldBypassCompletionFilter (cyclomatic 16) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:434 — useQueryEditorCompletion.useQueryEditorCompletion.shouldBypassCompletionFilter has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition (cyclomatic 16) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition (cyclomatic 16) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1215 — useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView (cyclomatic 16) · ×1
  • useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView (cyclomatic 16) apps/desktop/src/components/editor/useQueryEditorExecution.ts:75 — useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryResultTransferDdl.transactionalMysqlTableDdl (cyclomatic 16) · ×1
  • queryResultTransferDdl.transactionalMysqlTableDdl (cyclomatic 16) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:34 — queryResultTransferDdl.transactionalMysqlTableDdl has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.temporalFractionalPrecision (cyclomatic 16) · ×1
  • queryResultTransferValues.temporalFractionalPrecision (cyclomatic 16) apps/desktop/src/components/transfer/queryResultTransferValues.ts:96 — queryResultTransferValues.temporalFractionalPrecision has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cyclomatic 16) · ×1
  • useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cyclomatic 16) apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:140 — useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.restoreCellValue (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.restoreCellValue (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:1375 — useDataGridEditor.useDataGridEditor.restoreCellValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.prepareAddedRows (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.prepareAddedRows (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:1496 — useDataGridEditor.useDataGridEditor.prepareAddedRows has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.syncCurrentSave (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.syncCurrentSave (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:2176 — useDataGridEditor.useDataGridEditor.syncCurrentSave has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.captureFullResultProjection.<returned closure> (cyclomatic 16) · ×1
  • useDataGridExport.useDataGridExport.captureFullResultProjection.<returned closure> (cyclomatic 16) apps/desktop/src/composables/useDataGridExport.ts:586 — useDataGridExport.useDataGridExport.captureFullResultProjection.<returned closure> has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cyclomatic 16) · ×1
  • useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cyclomatic 16) apps/desktop/src/composables/useScheduledDatabaseBackups.ts:26 — useScheduledDatabaseBackups.useScheduledDatabaseBackups.update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cyclomatic 16) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cyclomatic 16) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:945 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.tryExecute (cyclomatic 16) · ×1
  • useSqlExecution.useSqlExecution.tryExecute (cyclomatic 16) apps/desktop/src/composables/useSqlExecution.ts:320 — useSqlExecution.useSqlExecution.tryExecute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai.buildBasePromptLines (cyclomatic 16) · ×1
  • ai.buildBasePromptLines (cyclomatic 16) apps/desktop/src/lib/ai/ai.ts:560 — ai.buildBasePromptLines has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai.formatSchema (cyclomatic 16) · ×1
  • ai.formatSchema (cyclomatic 16) apps/desktop/src/lib/ai/ai.ts:800 — ai.formatSchema has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 804). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · aiAgentStepPresentation.upsertAgentStep (cyclomatic 16) · ×1
  • aiAgentStepPresentation.upsertAgentStep (cyclomatic 16) apps/desktop/src/lib/ai/aiAgentStepPresentation.ts:66 — aiAgentStepPresentation.upsertAgentStep has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · aiSqlActionFeedback.aiSqlActionFeedback (cyclomatic 16) · ×1
  • aiSqlActionFeedback.aiSqlActionFeedback (cyclomatic 16) apps/desktop/src/lib/ai/aiSqlActionFeedback.ts:43 — aiSqlActionFeedback.aiSqlActionFeedback has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · documentStoreProvider.buildElasticsearchRuleQuery (cyclomatic 16) · ×1
  • documentStoreProvider.buildElasticsearchRuleQuery (cyclomatic 16) apps/desktop/src/lib/app/documentStoreProvider.ts:511 — documentStoreProvider.buildElasticsearchRuleQuery has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · tauri.startTableExport (cyclomatic 16) · ×1
  • tauri.startTableExport (cyclomatic 16) apps/desktop/src/lib/backend/tauri.ts:6903 — tauri.startTableExport has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (tauri.startQueryResultExport) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · tauri.startQueryResultExport (cyclomatic 16) · ×1
  • tauri.startQueryResultExport (cyclomatic 16) apps/desktop/src/lib/backend/tauri.ts:6955 — tauri.startQueryResultExport has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (tauri.startTableExport) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · connectionUrl.parseJdbcSqlServerUrl (cyclomatic 16) · ×1
  • connectionUrl.parseJdbcSqlServerUrl (cyclomatic 16) REDACTED:512 — connectionUrl.parseJdbcSqlServerUrl has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionUrlBuilder.standardUrlQuery (cyclomatic 16) · ×1
  • connectionUrlBuilder.standardUrlQuery (cyclomatic 16) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:268 — connectionUrlBuilder.standardUrlQuery has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · binaryCellDownload.binaryCellDisplayText (cyclomatic 16) · ×1
  • binaryCellDownload.binaryCellDisplayText (cyclomatic 16) apps/desktop/src/lib/dataGrid/binaryCellDownload.ts:259 — binaryCellDownload.binaryCellDisplayText has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · columnFormatter.parseIoTDBTimestampEditorValue (cyclomatic 16) · ×1
  • columnFormatter.parseIoTDBTimestampEditorValue (cyclomatic 16) apps/desktop/src/lib/dataGrid/columnFormatter.ts:392 — columnFormatter.parseIoTDBTimestampEditorValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGenerate.generatePhone (cyclomatic 16) · ×1
  • dataGenerate.generatePhone (cyclomatic 16) apps/desktop/src/lib/dataGrid/dataGenerate.ts:953 — dataGenerate.generatePhone has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridColumnFilter.splitTopLevelAnd (cyclomatic 16) · ×1
  • dataGridColumnFilter.splitTopLevelAnd (cyclomatic 16) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:121 — dataGridColumnFilter.splitTopLevelAnd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryPreview.tokenize (cyclomatic 16) · ×1
  • geometryPreview.tokenize (cyclomatic 16) apps/desktop/src/lib/dataGrid/geometryPreview.ts:14 — geometryPreview.tokenize has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · joinedRowChanges.joinedRowChanges (cyclomatic 16) · ×1
  • joinedRowChanges.joinedRowChanges (cyclomatic 16) apps/desktop/src/lib/dataGrid/joinedRowChanges.ts:54 — joinedRowChanges.joinedRowChanges has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · legacyLargeValueExport.resolveCapturedLegacyLargeValueCells (cyclomatic 16) · ×1
  • legacyLargeValueExport.resolveCapturedLegacyLargeValueCells (cyclomatic 16) apps/desktop/src/lib/dataGrid/legacyLargeValueExport.ts:166 — legacyLargeValueExport.resolveCapturedLegacyLargeValueCells has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · databaseStructureSearch.mapStructureSearchRows (cyclomatic 16) · ×1
  • databaseStructureSearch.mapStructureSearchRows (cyclomatic 16) apps/desktop/src/lib/database/databaseStructureSearch.ts:70 — databaseStructureSearch.mapStructureSearchRows has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.parseOracleCanonicalType (cyclomatic 16) · ×1
  • oracleForeignKeys.parseOracleCanonicalType (cyclomatic 16) apps/desktop/src/lib/database/oracleForeignKeys.ts:392 — oracleForeignKeys.parseOracleCanonicalType has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleIndexes.expectedCreatedIndex (cyclomatic 16) · ×1
  • oracleIndexes.expectedCreatedIndex (cyclomatic 16) apps/desktop/src/lib/database/oracleIndexes.ts:207 — oracleIndexes.expectedCreatedIndex has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleIndexes.sameExpectedIndexes (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · oracleInvalidObjects.buildOracleCompileSql (cyclomatic 16) · ×1
  • oracleInvalidObjects.buildOracleCompileSql (cyclomatic 16) apps/desktop/src/lib/database/oracleInvalidObjects.ts:136 — oracleInvalidObjects.buildOracleCompileSql has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.captureOracleDiagnosticTarget (cyclomatic 16) · ×1
  • oracleSessionDiagnostics.captureOracleDiagnosticTarget (cyclomatic 16) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:93 — oracleSessionDiagnostics.captureOracleDiagnosticTarget has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · productionSafety.referencedDatabases (cyclomatic 16) · ×1
  • productionSafety.referencedDatabases (cyclomatic 16) apps/desktop/src/lib/database/productionSafety.ts:148 — productionSafety.referencedDatabases has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugAnonymousBlock.stripPlSqlComments (cyclomatic 16) · ×1
  • plDebugAnonymousBlock.stripPlSqlComments (cyclomatic 16) apps/desktop/src/lib/debug/plDebugAnonymousBlock.ts:22 — plDebugAnonymousBlock.stripPlSqlComments has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.buildBatchQualifyActions (cyclomatic 16) · ×1
  • sqlIntentionActions.buildBatchQualifyActions (cyclomatic 16) apps/desktop/src/lib/editor/sqlIntentionActions.ts:199 — sqlIntentionActions.buildBatchQualifyActions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.resolveNavigationTarget (cyclomatic 16) · ×1
  • sqlIntentionActions.resolveNavigationTarget (cyclomatic 16) apps/desktop/src/lib/editor/sqlIntentionActions.ts:749 — sqlIntentionActions.resolveNavigationTarget has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.stringContentRange (cyclomatic 16) · ×1
  • sqlSemanticSelectionRanges.stringContentRange (cyclomatic 16) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:406 — sqlSemanticSelectionRanges.stringContentRange has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · elasticsearchCompletion.flattenElasticsearchMappingFields (cyclomatic 16) · ×1
  • elasticsearchCompletion.flattenElasticsearchMappingFields (cyclomatic 16) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:232 — elasticsearchCompletion.flattenElasticsearchMappingFields has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.inferProfile (cyclomatic 16) · ×1
  • datagripImport.inferProfile (cyclomatic 16) REDACTED:302 — datagripImport.inferProfile has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · influxDbV1Delete.validRfc3339Timestamp (cyclomatic 16) · ×1
  • influxDbV1Delete.validRfc3339Timestamp (cyclomatic 16) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:145 — influxDbV1Delete.validRfc3339Timestamp has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.skipMongoStringOrComment (cyclomatic 16) · ×1
  • mongoCompletion.skipMongoStringOrComment (cyclomatic 16) REDACTED:2298 — mongoCompletion.skipMongoStringOrComment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoDocumentValues.mongoTypedNumberInputValue (cyclomatic 16) · ×1
  • mongoDocumentValues.mongoTypedNumberInputValue (cyclomatic 16) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:422 — mongoDocumentValues.mongoTypedNumberInputValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoFilterContainsOpaqueLogic (cyclomatic 16) · ×1
  • mongoShellCommand.mongoFilterContainsOpaqueLogic (cyclomatic 16) REDACTED:2006 — mongoShellCommand.mongoFilterContainsOpaqueLogic has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 2007). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoPureFieldPredicate (cyclomatic 16) · ×1
  • mongoShellCommand.mongoPureFieldPredicate (cyclomatic 16) REDACTED:2041 — mongoShellCommand.mongoPureFieldPredicate has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoFilterObjectIsUnbounded (cyclomatic 16) · ×1
  • mongoShellCommand.mongoFilterObjectIsUnbounded (cyclomatic 16) REDACTED:2120 — mongoShellCommand.mongoFilterObjectIsUnbounded has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 2125). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · pluginData.snapshotValue (cyclomatic 16) · ×1
  • pluginData.snapshotValue (cyclomatic 16) apps/desktop/src/lib/plugins/pluginData.ts:30 — pluginData.snapshotValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · frontendPlugin.pluginConnectionFormValues (cyclomatic 16) · ×1
  • frontendPlugin.pluginConnectionFormValues (cyclomatic 16) apps/desktop/src/lib/plugins/frontendPlugin.ts:252 — frontendPlugin.pluginConnectionFormValues has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginHostBridge.requirePluginAiRecommendationUpdate.items (cyclomatic 16) · ×1
  • pluginHostBridge.requirePluginAiRecommendationUpdate.items (cyclomatic 16) REDACTED:1861 — pluginHostBridge.requirePluginAiRecommendationUpdate.items has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginMarketplace.comparePrerelease (cyclomatic 16) · ×1
  • pluginMarketplace.comparePrerelease (cyclomatic 16) apps/desktop/src/lib/plugins/pluginMarketplace.ts:364 — pluginMarketplace.comparePrerelease has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandTable.firstRedisArgvUpper (cyclomatic 16) · ×1
  • redisCommandTable.firstRedisArgvUpper (cyclomatic 16) apps/desktop/src/lib/redis/redisCommandTable.ts:463 — redisCommandTable.firstRedisArgvUpper has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCompletion.argumentGrammar (cyclomatic 16) · ×1
  • redisCompletion.argumentGrammar (cyclomatic 16) apps/desktop/src/lib/redis/redisCompletion.ts:323 — redisCompletion.argumentGrammar has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (compileContent, compileArgument, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · redisKeyGrouping.compileRedisGroupGlob (cyclomatic 16) · ×1
  • redisKeyGrouping.compileRedisGroupGlob (cyclomatic 16) apps/desktop/src/lib/redis/redisKeyGrouping.ts:42 — redisKeyGrouping.compileRedisGroupGlob has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiffTableFilter.compileExcludePatterns (cyclomatic 16) · ×1
  • schemaDiffTableFilter.compileExcludePatterns (cyclomatic 16) REDACTED:27 — schemaDiffTableFilter.compileExcludePatterns has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayout.reorderEntry (cyclomatic 16) · ×1
  • sidebarLayout.reorderEntry (cyclomatic 16) apps/desktop/src/lib/sidebar/sidebarLayout.ts:476 — sidebarLayout.reorderEntry has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarUserAdminVisibility.sidebarUserAdminVisibility · ×1
  • sidebarUserAdminVisibility.sidebarUserAdminVisibility::filterNodes (cyclomatic 16) apps/desktop/src/lib/sidebar/sidebarUserAdminVisibility.ts:24 — sidebarUserAdminVisibility.sidebarUserAdminVisibility::filterNodes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aggregateCombinators.buildCombinatorSequences (cyclomatic 16) · ×1
  • aggregateCombinators.buildCombinatorSequences (cyclomatic 16) apps/desktop/src/lib/sql/clickhouse/aggregateCombinators.ts:12 — aggregateCombinators.buildCombinatorSequences has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.formatCypherText (cyclomatic 16) · ×1
  • cypherFormatter.formatCypherText (cyclomatic 16) apps/desktop/src/lib/sql/cypherFormatter.ts:504 — cypherFormatter.formatCypherText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.hasTopLevelSemicolon (cyclomatic 16) · ×1
  • sqlAnalysis.hasTopLevelSemicolon (cyclomatic 16) apps/desktop/src/lib/sql/sqlAnalysis.ts:938 — sqlAnalysis.hasTopLevelSemicolon has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildSelectAllColumnItems (cyclomatic 16) · ×1
  • sqlCompletion.buildSelectAllColumnItems (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts:5667 — sqlCompletion.buildSelectAllColumnItems has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.completionColumnPrefixCandidates (cyclomatic 16) · ×1
  • sqlCompletion.completionColumnPrefixCandidates (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts:6077 — sqlCompletion.completionColumnPrefixCandidates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectComplexTypeFieldSeparators (cyclomatic 16) · ×1
  • sqlParameters.collectComplexTypeFieldSeparators (cyclomatic 16) apps/desktop/src/lib/sql/sqlParameters.ts:1189 — sqlParameters.collectComplexTypeFieldSeparators has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.readSubstitutionParameterOccurrence (cyclomatic 16) · ×1
  • sqlParameters.readSubstitutionParameterOccurrence (cyclomatic 16) apps/desktop/src/lib/sql/sqlParameters.ts:1861 — sqlParameters.readSubstitutionParameterOccurrence has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlDiagnostics.sqlErrorDecorationRange (cyclomatic 16) · ×1
  • sqlDiagnostics.sqlErrorDecorationRange (cyclomatic 16) apps/desktop/src/lib/sql/sqlDiagnostics.ts:166 — sqlDiagnostics.sqlErrorDecorationRange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlServerActivityTraceRuntime.pollEvents (cyclomatic 16) · ×1
  • sqlServerActivityTraceRuntime.pollEvents (cyclomatic 16) apps/desktop/src/lib/sqlserver/sqlServerActivityTraceRuntime.ts:230 — sqlServerActivityTraceRuntime.pollEvents has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 240, 249, 256). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · objectBrowserRowAction.doubleClickRowAction (cyclomatic 16) · ×1
  • objectBrowserRowAction.doubleClickRowAction (cyclomatic 16) apps/desktop/src/lib/table/objectBrowserRowAction.ts:37 — objectBrowserRowAction.doubleClickRowAction has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.verifyCreatedPackage (cyclomatic 16) · ×1
  • oraclePackageSaveAs.verifyCreatedPackage (cyclomatic 16) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:245 — oraclePackageSaveAs.verifyCreatedPackage has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · starrocksPhysicalOptions.buildStarRocksDialectOptions (cyclomatic 16) · ×1
  • starrocksPhysicalOptions.buildStarRocksDialectOptions (cyclomatic 16) apps/desktop/src/lib/table/starrocksPhysicalOptions.ts:78 — starrocksPhysicalOptions.buildStarRocksDialectOptions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableDataExport.fetchTableDataForExport (cyclomatic 16) · ×1
  • tableDataExport.fetchTableDataForExport (cyclomatic 16) apps/desktop/src/lib/table/tableDataExport.ts:28 — tableDataExport.fetchTableDataForExport has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.specialIndexColumnIssue (cyclomatic 16) · ×1
  • tableStructureEditorState.specialIndexColumnIssue (cyclomatic 16) apps/desktop/src/lib/table/tableStructureEditorState.ts:1413 — tableStructureEditorState.specialIndexColumnIssue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.simpleObjectNodeType (cyclomatic 16) · ×1
  • tableTree.simpleObjectNodeType (cyclomatic 16) apps/desktop/src/lib/table/tableTree.ts:846 — tableTree.simpleObjectNodeType has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableVGroup.normalizeTableVGroupLayout · ×1
  • tableVGroup.normalizeTableVGroupLayout::normalizeEntries (cyclomatic 16) apps/desktop/src/lib/table/tableVGroup.ts:704 — tableVGroup.normalizeTableVGroupLayout::normalizeEntries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableVGroup.tableVGroupKindOfContainerNode (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadCachedMetadataListPage (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.loadCachedMetadataListPage (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:821 — connectionStore.useConnectionStore.loadCachedMetadataListPage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.syncOracleTriggerNodeState (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.syncOracleTriggerNodeState (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:2885 — connectionStore.useConnectionStore.syncOracleTriggerNodeState has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPersistedTreeChildren (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.loadPersistedTreeChildren (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:3622 — connectionStore.useConnectionStore.loadPersistedTreeChildren has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.removeConnectionGroups (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.removeConnectionGroups (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:11380 — connectionStore.useConnectionStore.removeConnectionGroups has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.bindColumnsForSource.columns (cyclomatic 16) · ×1
  • queryStore.bindColumnsForSource.columns (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:1007 — queryStore.bindColumnsForSource.columns has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.recoverDetachedTabsToMain (cyclomatic 16) · ×1
  • queryStore.useQueryStore.recoverDetachedTabsToMain (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:2861 — queryStore.useQueryStore.recoverDetachedTabsToMain has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.adoptDetachedTab (cyclomatic 16) · ×1
  • queryStore.useQueryStore.adoptDetachedTab (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:3183 — queryStore.useQueryStore.adoptDetachedTab has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeTabsWhere (cyclomatic 16) · ×1
  • queryStore.useQueryStore.closeTabsWhere (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:5805 — queryStore.useQueryStore.closeTabsWhere has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.commitTransaction (cyclomatic 16) · ×1
  • queryStore.useQueryStore.commitTransaction (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:6432 — queryStore.useQueryStore.commitTransaction has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openSavedSql (cyclomatic 16) · ×1
  • queryStore.useQueryStore.openSavedSql (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:6737 — queryStore.useQueryStore.openSavedSql has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.restoreCachedResultPayload (cyclomatic 16) · ×1
  • queryStore.useQueryStore.restoreCachedResultPayload (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:11158 — queryStore.useQueryStore.restoreCachedResultPayload has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureTabResultForExport (cyclomatic 16) · ×1
  • queryStore.useQueryStore.captureTabResultForExport (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:11311 — queryStore.useQueryStore.captureTabResultForExport has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cyclomatic 16) · ×1
  • savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cyclomatic 16) apps/desktop/src/stores/savedSqlStore.ts:651 — savedSqlStore.useSavedSqlStore.updateFileExecutionTarget has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settingsStore.normalizeTabGroupCustomizations (cyclomatic 16) · ×1
  • settingsStore.normalizeTabGroupCustomizations (cyclomatic 16) apps/desktop/src/stores/settingsStore.ts:1750 — settingsStore.normalizeTabGroupCustomizations has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · platformDetection.detectPlatformId (cyclomatic 16) · ×1
  • platformDetection.detectPlatformId (cyclomatic 16) docs/lib/platformDetection.ts:22 — platformDetection.detectPlatformId has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · seedApi (cyclomatic 16) · ×1
  • seedApi (cyclomatic 16) .github/ui-preview/seed.mjs:130 — seedApi has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 8 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D12 · Dependency Hygiene · No REDACTED committed (REDACTED) · ×1
  • No REDACTED committed (REDACTED) — REDACTED requires 1 module(s) but no `REDACTED` is committed beside it, so nothing records the expected checksum of the code this module builds against — `go build` accepts whatever the module proxy serves, and two builds of this commit are not guaranteed to be the same build. Run `go mod tidy` and commit the resulting `REDACTED`.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeTabSql (cognitive 713) · ×1
  • queryStore.useQueryStore.executeTabSql (cognitive 713) apps/desktop/src/stores/queryStore.ts:8415 — queryStore.useQueryStore.executeTabSql has cognitive complexity 713 (threshold 15). Drivers by points: if/else 212 (421 pts), boolean chains 184, ternaries 76 (170 pts), error handling 7 (17 pts), loops 7 (13 pts), match/switch 1 (3 pts) (nesting depth added 321). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql::bindLargeValueContext, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · main.plDebugSelectNativeTarget (cognitive 333) · ×1
  • main.plDebugSelectNativeTarget (cognitive 333) agents/drivers/oracle-go/pldebug_target.go:492 — main.plDebugSelectNativeTarget has cognitive complexity 333 (threshold 15). Drivers by points: if/else 113 (287 pts), boolean chains 37, loops 5, match/switch 1 (4 pts) (nesting depth added 177). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · settingsStore.useSettingsStore.applyEditorSettingsPatch (cognitive 279) · ×1
  • settingsStore.useSettingsStore.applyEditorSettingsPatch (cognitive 279) apps/desktop/src/stores/settingsStore.ts:3117 — settingsStore.useSettingsStore.applyEditorSettingsPatch has cognitive complexity 279 (threshold 15). Drivers by points: if/else 264 (265 pts), boolean chains 14 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.fetchCapturedTabResultForExport (cognitive 272) · ×1
  • queryStore.useQueryStore.fetchCapturedTabResultForExport (cognitive 272) apps/desktop/src/stores/queryStore.ts:11358 — queryStore.useQueryStore.fetchCapturedTabResultForExport has cognitive complexity 272 (threshold 15). Drivers by points: if/else 66 (134 pts), boolean chains 63, ternaries 31 (60 pts), error handling 6 (10 pts), loops 3 (5 pts) (nesting depth added 103). Of this number, 226 points are the body's own statements and 46 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHostBridge.dispatch (cognitive 267) · ×1
  • PluginHostBridge.dispatch (cognitive 267) REDACTED:664 — PluginHostBridge.dispatch has cognitive complexity 267 (threshold 15). Drivers by points: if/else 123 (199 pts), ternaries 21 (42 pts), boolean chains 20, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 100). Of this number, 265 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlStatementSplitter · ×1
  • SqlStatementSplitter::push_chunk_with_control (cognitive 226) REDACTED:753 — SqlStatementSplitter::push_chunk_with_control has cognitive complexity 226 (threshold 15). Drivers by points: if/else 57 (173 pts), boolean chains 30, loops 5 (21 pts), match/switch 1 (2 pts) (nesting depth added 133). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Plan.read (cognitive 220) · ×1
  • Plan.read (cognitive 220) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:510 — Plan.read has cognitive complexity 220 (threshold 15). Drivers by points: if/else 40 (119 pts), ternaries 14 (50 pts), error handling 8 (32 pts), boolean chains 18, loops 1 (nesting depth added 139). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · plDebugNativePlan.render (cognitive 212) · ×1
  • plDebugNativePlan.render (cognitive 212) agents/drivers/oracle-go/pldebug_target_invoke.go:138 — plDebugNativePlan.render has cognitive complexity 212 (threshold 15). Drivers by points: if/else 75 (156 pts), boolean chains 32, loops 14 (24 pts) (nesting depth added 91). Of this number, 182 points are the body's own statements and 30 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · oracleTypeManagement.prepareOracleTypeManagement (cognitive 208) · ×1
  • oracleTypeManagement.prepareOracleTypeManagement (cognitive 208) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — oracleTypeManagement.prepareOracleTypeManagement has cognitive complexity 208 (threshold 15). Drivers by points: if/else 53 (105 pts), boolean chains 49, loops 12 (23 pts), ternaries 9 (23 pts), error handling 4 (8 pts) (nesting depth added 81). Of this number, 196 points are the body's own statements and 12 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLoadNativeTypeGraphOnLoader (cognitive 200) · ×1
  • main.plDebugLoadNativeTypeGraphOnLoader (cognitive 200) agents/drivers/oracle-go/pldebug_type_graph.go:323 — main.plDebugLoadNativeTypeGraphOnLoader has cognitive complexity 200 (threshold 15). Drivers by points: if/else 46 (145 pts), loops 14 (34 pts), boolean chains 21 (nesting depth added 119). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlStatementRanges.splitSqlStatementRanges (cognitive 190) · ×1
  • sqlStatementRanges.splitSqlStatementRanges (cognitive 190) apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — sqlStatementRanges.splitSqlStatementRanges has cognitive complexity 190 (threshold 15). Drivers by points: if/else 57 (146 pts), boolean chains 30, loops 3 (9 pts), ternaries 2 (5 pts) (nesting depth added 98). Of this number, 173 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryResultTransferDdl.rewriteCreateTableName (cognitive 188) · ×1
  • queryResultTransferDdl.rewriteCreateTableName (cognitive 188) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:231 — queryResultTransferDdl.rewriteCreateTableName has cognitive complexity 188 (threshold 15). Drivers by points: if/else 43 (112 pts), ternaries 10 (35 pts), boolean chains 29, loops 5 (12 pts) (nesting depth added 101). Of this number, 179 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cognitive 185) · ×1
  • useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cognitive 185) apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:93 — useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown has cognitive complexity 185 (threshold 15). Drivers by points: if/else 56 (124 pts), boolean chains 34, ternaries 13 (18 pts), error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 77). Most of this is not in the body itself: 15 of the 185 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 136, 224, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.parseColumn (cognitive 183) · ×1
  • tableColumnDefinitionPaste.parseColumn (cognitive 183) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156 — tableColumnDefinitionPaste.parseColumn has cognitive complexity 183 (threshold 15). Drivers by points: if/else 66 (140 pts), boolean chains 29, ternaries 3 (9 pts), loops 3 (5 pts) (nesting depth added 82). Of this number, 168 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.explainTabSql (cognitive 174) · ×1
  • queryStore.useQueryStore.explainTabSql (cognitive 174) apps/desktop/src/stores/queryStore.ts:10386 — queryStore.useQueryStore.explainTabSql has cognitive complexity 174 (threshold 15). Drivers by points: if/else 58 (112 pts), ternaries 11 (25 pts), error handling 11 (23 pts), boolean chains 14 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.mutateNativeBreakpoint (cognitive 169) · ×1
  • plDebugNativeEntry.mutateNativeBreakpoint (cognitive 169) agents/drivers/oracle-go/pldebug_breakpoint_write.go:46 — plDebugNativeEntry.mutateNativeBreakpoint has cognitive complexity 169 (threshold 15). Drivers by points: if/else 63 (116 pts), boolean chains 33, loops 9 (20 pts) (nesting depth added 64). Of this number, 154 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.queryResultTransferTargetType (cognitive 166) · ×1
  • queryResultTransferValues.queryResultTransferTargetType (cognitive 166) apps/desktop/src/components/transfer/queryResultTransferValues.ts:158 — queryResultTransferValues.queryResultTransferTargetType has cognitive complexity 166 (threshold 15). Drivers by points: if/else 61 (115 pts), ternaries 10 (28 pts), boolean chains 23 (nesting depth added 72). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JsonRpcServer.dispatch (cognitive 165) · ×1
  • JsonRpcServer.dispatch (cognitive 165) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — JsonRpcServer.dispatch has cognitive complexity 165 (threshold 15). Drivers by points: if/else 79 (113 pts), ternaries 9 (22 pts), boolean chains 15, error handling 5 (11 pts), loops 2 (4 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cognitive 165) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cognitive 165) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1700 — useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult has cognitive complexity 165 (threshold 15). Drivers by points: if/else 52 (90 pts), boolean chains 36, ternaries 14 (27 pts), error handling 3 (7 pts), loops 3 (5 pts) (nesting depth added 57). Of this number, 133 points are the body's own statements and 32 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsStore.normalizeEditorSettings (cognitive 164) · ×1
  • settingsStore.normalizeEditorSettings (cognitive 164) apps/desktop/src/stores/settingsStore.ts:2081 — settingsStore.normalizeEditorSettings has cognitive complexity 164 (threshold 15). Drivers by points: ternaries 119 (129 pts), boolean chains 32, if/else 3 (nesting depth added 10). Of this number, 153 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createMockHost (cognitive 160) · ×1
  • createMockHost (cognitive 160) plugins/sdk/dev-host/server.mjs:77 — createMockHost has cognitive complexity 160 (threshold 15). Drivers by points: if/else 40 (68 pts), boolean chains 35, ternaries 16 (30 pts), error handling 10 (15 pts), loops 6 (10 pts), other 2 (nesting depth added 51). Of this number, 22 points are the body's own statements and 138 belong to 28 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.compressSqlText (cognitive 154) · ×1
  • sqlFormatter.compressSqlText (cognitive 154) apps/desktop/src/lib/sql/sqlFormatter.ts:982 — sqlFormatter.compressSqlText has cognitive complexity 154 (threshold 15). Drivers by points: if/else 35 (90 pts), boolean chains 29, loops 10 (22 pts), ternaries 4 (13 pts) (nesting depth added 76). Of this number, 133 points are the body's own statements and 21 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugParseNativeConstructors (cognitive 147) · ×1
  • main.plDebugParseNativeConstructors (cognitive 147) agents/drivers/oracle-go/pldebug_object_constructors.go:270 — main.plDebugParseNativeConstructors has cognitive complexity 147 (threshold 15). Drivers by points: if/else 48 (111 pts), boolean chains 22, loops 8 (14 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeNamedCall.result (cognitive 145) · ×1
  • plDebugNativeNamedCall.result (cognitive 145) agents/drivers/oracle-go/pldebug_target_invoke.go:734 — plDebugNativeNamedCall.result has cognitive complexity 145 (threshold 15). Drivers by points: if/else 51 (126 pts), boolean chains 13, loops 2 (6 pts) (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlDebugObjectConstructors.parse (cognitive 139) · ×1
  • PlDebugObjectConstructors.parse (cognitive 139) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:175 — PlDebugObjectConstructors.parse has cognitive complexity 139 (threshold 15). Drivers by points: if/else 42 (102 pts), boolean chains 20, loops 7 (13 pts), ternaries 2 (4 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeDeclarations (cognitive 134) · ×1
  • main.plDebugNativeDeclarations (cognitive 134) agents/drivers/oracle-go/pldebug_variables.go:264 — main.plDebugNativeDeclarations has cognitive complexity 134 (threshold 15). Drivers by points: if/else 32 (80 pts), loops 13 (33 pts), boolean chains 21 (nesting depth added 68). Of this number, 129 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canvasDataGridRenderer.drawCanvasDataGrid (cognitive 133) · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid (cognitive 133) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:442 — canvasDataGridRenderer.drawCanvasDataGrid has cognitive complexity 133 (threshold 15). Drivers by points: ternaries 32 (118 pts), if/else 37 (73 pts), boolean chains 39, loops 5 (9 pts) (nesting depth added 126). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid::drawCell) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · main.plDebugScanNativeRoutinesMode (cognitive 132) · ×1
  • main.plDebugScanNativeRoutinesMode (cognitive 132) agents/drivers/oracle-go/pldebug_routine.go:369 — main.plDebugScanNativeRoutinesMode has cognitive complexity 132 (threshold 15). Drivers by points: if/else 47 (105 pts), boolean chains 23, loops 3 (4 pts) (nesting depth added 59). Of this number, 24 points are the body's own statements and 108 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.saveChanges (cognitive 130) · ×1
  • useDataGridEditor.useDataGridEditor.saveChanges (cognitive 130) apps/desktop/src/composables/useDataGridEditor.ts:2464 — useDataGridEditor.useDataGridEditor.saveChanges has cognitive complexity 130 (threshold 15). Drivers by points: if/else 52 (81 pts), error handling 12 (22 pts), boolean chains 20, ternaries 4 (5 pts), loops 1 (2 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.executeTargetSql (cognitive 130) · ×1
  • useSqlExecution.useSqlExecution.executeTargetSql (cognitive 130) apps/desktop/src/composables/useSqlExecution.ts:678 — useSqlExecution.useSqlExecution.executeTargetSql has cognitive complexity 130 (threshold 15). Drivers by points: if/else 45 (67 pts), ternaries 18 (34 pts), boolean chains 18, error handling 5 (7 pts), loops 2 (4 pts) (nesting depth added 42). Of this number, 112 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportLocalSnapshot (cognitive 127) · ×1
  • useDataGridExport.useDataGridExport.exportLocalSnapshot (cognitive 127) apps/desktop/src/composables/useDataGridExport.ts:1215 — useDataGridExport.useDataGridExport.exportLocalSnapshot has cognitive complexity 127 (threshold 15). Drivers by points: if/else 38 (47 pts), boolean chains 37, ternaries 25 (29 pts), error handling 5 (9 pts), loops 2 (5 pts) (nesting depth added 20). Of this number, 46 points are the body's own statements and 81 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cognitive 126) · ×1
  • useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cognitive 126) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData has cognitive complexity 126 (threshold 15). Drivers by points: if/else 49 (66 pts), boolean chains 33, ternaries 16 (22 pts), error handling 4 (5 pts) (nesting depth added 24). Of this number, 105 points are the body's own statements and 21 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.maskStringAndCommentSpans (cognitive 126) · ×1
  • sqlFormatter.maskStringAndCommentSpans (cognitive 126) apps/desktop/src/lib/sql/sqlFormatter.ts:613 — sqlFormatter.maskStringAndCommentSpans has cognitive complexity 126 (threshold 15). Drivers by points: if/else 29 (78 pts), boolean chains 26, loops 8 (20 pts), ternaries 2 (nesting depth added 61). Of this number, 116 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.findSqlParameterOccurrences (cognitive 125) · ×1
  • sqlParameters.findSqlParameterOccurrences (cognitive 125) apps/desktop/src/lib/sql/sqlParameters.ts:429 — sqlParameters.findSqlParameterOccurrences has cognitive complexity 125 (threshold 15). Drivers by points: if/else 36 (90 pts), boolean chains 25, ternaries 6, loops 2 (4 pts) (nesting depth added 56). Of this number, 123 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MysqlDumpBinaryLiteralNormalizer · ×1
  • MysqlDumpBinaryLiteralNormalizer::normalize (cognitive 123) REDACTED:1734 — MysqlDumpBinaryLiteralNormalizer::normalize has cognitive complexity 123 (threshold 15). Drivers by points: if/else 36 (91 pts), boolean chains 13, match/switch 4 (13 pts), loops 2 (6 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.convertToSchemaDiffObjects (cognitive 121) · ×1
  • schemaDiff.convertToSchemaDiffObjects (cognitive 121) apps/desktop/src/lib/schema/schemaDiff.ts:708 — schemaDiff.convertToSchemaDiffObjects has cognitive complexity 121 (threshold 15). Drivers by points: ternaries 34 (87 pts), if/else 4 (13 pts), boolean chains 11, loops 7 (10 pts) (nesting depth added 65). Of this number, 90 points are the body's own statements and 31 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.executeOracleRoutineRename (cognitive 120) · ×1
  • oracleRoutineRename.executeOracleRoutineRename (cognitive 120) apps/desktop/src/lib/table/oracleRoutineRename.ts:470 — oracleRoutineRename.executeOracleRoutineRename has cognitive complexity 120 (threshold 15). Drivers by points: if/else 34 (79 pts), boolean chains 22, ternaries 3 (11 pts), error handling 3 (7 pts), loops 1 (nesting depth added 57). Of this number, 118 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.buildGroupedObjectTreeNodes (cognitive 120) · ×1
  • tableTree.buildGroupedObjectTreeNodes (cognitive 120) apps/desktop/src/lib/table/tableTree.ts:1055 — tableTree.buildGroupedObjectTreeNodes has cognitive complexity 120 (threshold 15). Drivers by points: ternaries 27 (83 pts), boolean chains 19, if/else 7 (16 pts), loops 2 (nesting depth added 65). Of this number, 35 points are the body's own statements and 85 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onReloadData (cognitive 119) · ×1
  • useDataGridActions.useDataGridActions.onReloadData (cognitive 119) apps/desktop/src/composables/useDataGridActions.ts:319 — useDataGridActions.useDataGridActions.onReloadData has cognitive complexity 119 (threshold 15). Drivers by points: if/else 28 (58 pts), boolean chains 26, ternaries 11 (23 pts), error handling 4 (12 pts) (nesting depth added 50). Of this number, 108 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · main (cognitive 119) · ×1
  • main (cognitive 119) REDACTED:593 — main has cognitive complexity 119 (threshold 15). Drivers by points: error handling 13 (46 pts), if/else 11 (36 pts), loops 6 (19 pts), boolean chains 11, ternaries 5 (7 pts) (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doltVersionControl.layoutDoltCommitGraph (cognitive 117) · ×1
  • doltVersionControl.layoutDoltCommitGraph (cognitive 117) apps/desktop/src/lib/dolt/doltVersionControl.ts:467 — doltVersionControl.layoutDoltCommitGraph has cognitive complexity 117 (threshold 15). Drivers by points: if/else 27 (68 pts), loops 10 (19 pts), boolean chains 16, ternaries 6 (14 pts) (nesting depth added 58). Of this number, 64 points are the body's own statements and 53 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadDatabases (cognitive 116) · ×1
  • connectionStore.useConnectionStore.loadDatabases (cognitive 116) apps/desktop/src/stores/connectionStore.ts:6373 — connectionStore.useConnectionStore.loadDatabases has cognitive complexity 116 (threshold 15). Drivers by points: if/else 41 (92 pts), boolean chains 14, ternaries 4 (9 pts), error handling 1 (nesting depth added 56). Most of this is not in the body itself: 5 of the 116 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6399, 6541). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cognitive 115) · ×1
  • oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cognitive 115) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:260 — oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan has cognitive complexity 115 (threshold 15). Drivers by points: if/else 29 (60 pts), ternaries 10 (26 pts), boolean chains 20, error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoWriteCommand (cognitive 115) · ×1
  • mongoShellCommand.parseMongoWriteCommand (cognitive 115) REDACTED:912 — mongoShellCommand.parseMongoWriteCommand has cognitive complexity 115 (threshold 15). Drivers by points: if/else 38 (67 pts), ternaries 13 (27 pts), boolean chains 19, loops 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Loader.load (cognitive 114) · ×1
  • Loader.load (cognitive 114) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:66 — Loader.load has cognitive complexity 114 (threshold 15). Drivers by points: if/else 24 (68 pts), loops 13 (29 pts), boolean chains 12, ternaries 2 (5 pts) (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.buildNativeJobDefinitionEdit (cognitive 113) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionEdit (cognitive 113) apps/desktop/src/lib/database/nativeJobAdmin.ts:147 — nativeJobAdmin.buildNativeJobDefinitionEdit has cognitive complexity 113 (threshold 15). Drivers by points: if/else 29 (42 pts), ternaries 16 (42 pts), boolean chains 24, loops 3 (5 pts) (nesting depth added 41). Of this number, 103 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.executeOracleConstraintPlan (cognitive 113) · ×1
  • oracleConstraints.executeOracleConstraintPlan (cognitive 113) apps/desktop/src/lib/database/oracleConstraints.ts:720 — oracleConstraints.executeOracleConstraintPlan has cognitive complexity 113 (threshold 15). Drivers by points: if/else 35 (63 pts), boolean chains 22, ternaries 7 (15 pts), error handling 5 (12 pts), loops 1 (nesting depth added 43). Of this number, 111 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cognitive 111) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cognitive 111) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:871 — useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions has cognitive complexity 111 (threshold 15). Drivers by points: if/else 47 (74 pts), boolean chains 24, error handling 4 (8 pts), ternaries 3 (5 pts) (nesting depth added 33). Of this number, 106 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.buildDefaultGeneratorParams (cognitive 111) · ×1
  • dataGenerate.buildDefaultGeneratorParams (cognitive 111) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1343 — dataGenerate.buildDefaultGeneratorParams has cognitive complexity 111 (threshold 15). Drivers by points: if/else 73 (95 pts), boolean chains 16 (nesting depth added 22). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · oracleTableRename.prepareOracleTableRename (cognitive 111) · ×1
  • oracleTableRename.prepareOracleTableRename (cognitive 111) REDACTED:542 — oracleTableRename.prepareOracleTableRename has cognitive complexity 111 (threshold 15). Drivers by points: if/else 27 (59 pts), ternaries 7 (22 pts), boolean chains 17, error handling 4 (7 pts), loops 4 (6 pts) (nesting depth added 52). Of this number, 100 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeRoutineHeaderMode (cognitive 109) · ×1
  • main.plDebugNativeRoutineHeaderMode (cognitive 109) agents/drivers/oracle-go/pldebug_routine.go:164 — main.plDebugNativeRoutineHeaderMode has cognitive complexity 109 (threshold 15). Drivers by points: if/else 30 (82 pts), boolean chains 18, loops 4 (9 pts) (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cognitive 108) · ×1
  • useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cognitive 108) apps/desktop/src/components/editor/useQueryEditorHover.ts:85 — useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip has cognitive complexity 108 (threshold 15). Drivers by points: if/else 25 (45 pts), ternaries 19 (28 pts), boolean chains 22, error handling 5 (12 pts), loops 1 (nesting depth added 36). Of this number, 89 points are the body's own statements and 19 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineVariables.collectMysqlRoutineVariables (cognitive 108) · ×1
  • mysqlRoutineVariables.collectMysqlRoutineVariables (cognitive 108) apps/desktop/src/lib/sql/mysqlRoutineVariables.ts:34 — mysqlRoutineVariables.collectMysqlRoutineVariables has cognitive complexity 108 (threshold 15). Drivers by points: if/else 27 (74 pts), boolean chains 21, loops 5 (11 pts), ternaries 1 (2 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.executeOracleTableRename (cognitive 104) · ×1
  • oracleTableRename.executeOracleTableRename (cognitive 104) REDACTED:825 — oracleTableRename.executeOracleTableRename has cognitive complexity 104 (threshold 15). Drivers by points: if/else 33 (71 pts), boolean chains 15, ternaries 5 (14 pts), error handling 2 (3 pts), loops 1 (nesting depth added 48). Of this number, 102 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.buildRedisKeySnapshotCooperatively (cognitive 101) · ×1
  • redisKeyTree.buildRedisKeySnapshotCooperatively (cognitive 101) apps/desktop/src/lib/redis/redisKeyTree.ts:333 — redisKeyTree.buildRedisKeySnapshotCooperatively has cognitive complexity 101 (threshold 15). Drivers by points: if/else 23 (64 pts), loops 9 (20 pts), boolean chains 15, ternaries 2 (nesting depth added 52). Of this number, 99 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineBlockLayout.indentRoutineBlocks (cognitive 101) · ×1
  • routineBlockLayout.indentRoutineBlocks (cognitive 101) apps/desktop/src/lib/sql/routineBlockLayout.ts:90 — routineBlockLayout.indentRoutineBlocks has cognitive complexity 101 (threshold 15). Drivers by points: boolean chains 45, if/else 29 (45 pts), ternaries 5 (10 pts), loops 1 (nesting depth added 21). Of this number, 99 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tokens.tokenizeSqlSemantic (cognitive 101) · ×1
  • tokens.tokenizeSqlSemantic (cognitive 101) apps/desktop/src/lib/sql/semantic/tokens.ts:104 — tokens.tokenizeSqlSemantic has cognitive complexity 101 (threshold 15). Drivers by points: if/else 20 (47 pts), boolean chains 26, loops 7 (19 pts), ternaries 4 (9 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.resolve (cognitive 100) · ×1
  • PlDebugTarget.resolve (cognitive 100) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:803 — PlDebugTarget.resolve has cognitive complexity 100 (threshold 15). Drivers by points: if/else 30 (63 pts), boolean chains 17, ternaries 9 (15 pts), loops 4 (5 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.executeOracleForeignKeyPlan (cognitive 100) · ×1
  • oracleForeignKeys.executeOracleForeignKeyPlan (cognitive 100) apps/desktop/src/lib/database/oracleForeignKeys.ts:699 — oracleForeignKeys.executeOracleForeignKeyPlan has cognitive complexity 100 (threshold 15). Drivers by points: if/else 31 (61 pts), boolean chains 25, ternaries 5 (9 pts), error handling 2 (3 pts), loops 2 (nesting depth added 35). Of this number, 98 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSource.rewriteOraclePackageSource (cognitive 100) · ×1
  • oraclePackageSource.rewriteOraclePackageSource (cognitive 100) apps/desktop/src/lib/table/oraclePackageSource.ts:103 — oraclePackageSource.rewriteOraclePackageSource has cognitive complexity 100 (threshold 15). Drivers by points: if/else 29 (61 pts), boolean chains 20, loops 8 (16 pts), ternaries 2 (3 pts) (nesting depth added 41). Of this number, 93 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.topLevelSoftStatementLineStarts (cognitive 99) · ×1
  • sqlStatementRanges.topLevelSoftStatementLineStarts (cognitive 99) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1212 — sqlStatementRanges.topLevelSoftStatementLineStarts has cognitive complexity 99 (threshold 15). Drivers by points: if/else 34 (87 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksAlterOptions.starRocksAlterOptionsFromDdl (cognitive 98) · ×1
  • starrocksAlterOptions.starRocksAlterOptionsFromDdl (cognitive 98) apps/desktop/src/lib/table/starrocksAlterOptions.ts:45 — starrocksAlterOptions.starRocksAlterOptionsFromDdl has cognitive complexity 98 (threshold 15). Drivers by points: if/else 24 (48 pts), boolean chains 34, ternaries 5 (9 pts), loops 4 (7 pts) (nesting depth added 31). Of this number, 80 points are the body's own statements and 18 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabDisplayTitle (cognitive 98) · ×1
  • tabPresentation.tabDisplayTitle (cognitive 98) apps/desktop/src/lib/tabs/tabPresentation.ts:311 — tabPresentation.tabDisplayTitle has cognitive complexity 98 (threshold 15). Drivers by points: if/else 48 (74 pts), boolean chains 12, ternaries 6 (12 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.topLevelWordsInRange (cognitive 97) · ×1
  • sqlStatementRanges.topLevelWordsInRange (cognitive 97) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1469 — sqlStatementRanges.topLevelWordsInRange has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (89 pts), boolean chains 7, loops 1 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativePlan.bind (cognitive 96) · ×1
  • plDebugNativePlan.bind (cognitive 96) agents/drivers/oracle-go/pldebug_target_invoke.go:521 — plDebugNativePlan.bind has cognitive complexity 96 (threshold 15). Drivers by points: if/else 37 (86 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mongoCompletion.scanMongoCallArguments (cognitive 96) · ×1
  • mongoCompletion.scanMongoCallArguments (cognitive 96) REDACTED:871 — mongoCompletion.scanMongoCallArguments has cognitive complexity 96 (threshold 15). Drivers by points: if/else 22 (64 pts), boolean chains 16, ternaries 6 (15 pts), loops 1 (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · printer.printRuleElement (cognitive 96) · ×1
  • printer.printRuleElement (cognitive 96) apps/desktop/src/lib/sql/layout/printer.ts:254 — printer.printRuleElement has cognitive complexity 96 (threshold 15). Drivers by points: if/else 31 (59 pts), ternaries 7 (24 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cognitive 95) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cognitive 95) apps/desktop/src/composables/useDataGridExport.ts:2013 — useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx has cognitive complexity 95 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 25, ternaries 12 (16 pts), error handling 4 (7 pts), loops 3 (6 pts) (nesting depth added 27). Of this number, 18 points are the body's own statements and 77 belong to 16 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.render (cognitive 94) · ×1
  • Plan.render (cognitive 94) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:262 — Plan.render has cognitive complexity 94 (threshold 15). Drivers by points: if/else 38 (63 pts), loops 13 (18 pts), ternaries 4 (9 pts), boolean chains 4 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginDetailClient.PluginDetailClient (cognitive 94) · ×1
  • PluginDetailClient.PluginDetailClient (cognitive 94) docs/app/[lang]/plugins/[id]/PluginDetailClient.tsx:107 — PluginDetailClient.PluginDetailClient has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 25 (78 pts), if/else 11, boolean chains 5 (nesting depth added 53). Of this number, 56 points are the body's own statements and 38 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlStatementRanges.oraclePlSqlBlockEnd (cognitive 92) · ×1
  • sqlStatementRanges.oraclePlSqlBlockEnd (cognitive 92) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2632 — sqlStatementRanges.oraclePlSqlBlockEnd has cognitive complexity 92 (threshold 15). Drivers by points: if/else 26 (64 pts), boolean chains 14, ternaries 5 (13 pts), loops 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.injectColumnRenameSql (cognitive 92) · ×1
  • schemaDiff.injectColumnRenameSql (cognitive 92) apps/desktop/src/lib/schema/schemaDiff.ts:1056 — schemaDiff.injectColumnRenameSql has cognitive complexity 92 (threshold 15). Drivers by points: if/else 16 (47 pts), loops 9 (22 pts), boolean chains 15, ternaries 2 (8 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlCompletionProvider.build (cognitive 92) · ×1
  • SqlCompletionProvider.build (cognitive 92) apps/desktop/src/lib/sql/sqlCompletion.ts:2097 — SqlCompletionProvider.build has cognitive complexity 92 (threshold 15). Drivers by points: if/else 33 (50 pts), boolean chains 33, ternaries 3 (7 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 88 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.setSchemaDiffObjectSelectedWithDependencies · ×1
  • schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply (cognitive 90) apps/desktop/src/lib/schema/schemaDiff.ts:1234 — schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (54 pts), loops 7 (19 pts), boolean chains 11, ternaries 3 (6 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyStageOptions (cognitive 88) · ×1
  • mongoCompletion.classifyStageOptions (cognitive 88) REDACTED:1644 — mongoCompletion.classifyStageOptions has cognitive complexity 88 (threshold 15). Drivers by points: if/else 27 (68 pts), ternaries 5 (14 pts), boolean chains 6 (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · graphCompletion.getGraphCompletionContext (cognitive 87) · ×1
  • graphCompletion.getGraphCompletionContext (cognitive 87) apps/desktop/src/lib/graph/graphCompletion.ts:23 — graphCompletion.getGraphCompletionContext has cognitive complexity 87 (threshold 15). Drivers by points: if/else 31 (59 pts), boolean chains 19, loops 5 (9 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeContext (cognitive 87) · ×1
  • codeContext (cognitive 87) REDACTED:164 — codeContext has cognitive complexity 87 (threshold 15). Drivers by points: if/else 14 (47 pts), loops 9 (24 pts), boolean chains 6, ternaries 3 (5 pts), error handling 2 (4 pts), other 1 (nesting depth added 52). Of this number, 73 points are the body's own statements and 14 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.scalarInput (cognitive 86) · ×1
  • PlDebugTarget.scalarInput (cognitive 86) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:986 — PlDebugTarget.scalarInput has cognitive complexity 86 (threshold 15). Drivers by points: if/else 31 (51 pts), ternaries 6 (20 pts), boolean chains 13, error handling 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.buildSpecialJdbcUrl (cognitive 86) · ×1
  • connectionUrlBuilder.buildSpecialJdbcUrl (cognitive 86) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:372 — connectionUrlBuilder.buildSpecialJdbcUrl has cognitive complexity 86 (threshold 15). Drivers by points: ternaries 23 (47 pts), if/else 11 (23 pts), boolean chains 15, match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aliasHighlights.sqlAliasHighlightGroups (cognitive 86) · ×1
  • aliasHighlights.sqlAliasHighlightGroups (cognitive 86) apps/desktop/src/lib/sql/semantic/aliasHighlights.ts:34 — aliasHighlights.sqlAliasHighlightGroups has cognitive complexity 86 (threshold 15). Drivers by points: if/else 22 (54 pts), loops 10 (16 pts), boolean chains 15, ternaries 1 (nesting depth added 38). Of this number, 83 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletionScope.graphCompletionScope (cognitive 85) · ×1
  • graphCompletionScope.graphCompletionScope (cognitive 85) apps/desktop/src/lib/graph/graphCompletionScope.ts:41 — graphCompletionScope.graphCompletionScope has cognitive complexity 85 (threshold 15). Drivers by points: if/else 18 (54 pts), boolean chains 13, ternaries 4 (13 pts), loops 2 (5 pts) (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · tableTree.buildSimpleObjectTreeNodes (cognitive 85) · ×1
  • tableTree.buildSimpleObjectTreeNodes (cognitive 85) apps/desktop/src/lib/table/tableTree.ts:741 — tableTree.buildSimpleObjectTreeNodes has cognitive complexity 85 (threshold 15). Drivers by points: ternaries 18 (55 pts), boolean chains 15, if/else 7 (14 pts), loops 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cognitive 85) · ×1
  • connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cognitive 85) apps/desktop/src/stores/connectionStore.ts:7988 — connectionStore.useConnectionStore.loadMoreObjectGroupChildren has cognitive complexity 85 (threshold 15). Drivers by points: if/else 27 (40 pts), boolean chains 34, ternaries 6 (10 pts), error handling 1 (nesting depth added 17). Most of this is not in the body itself: 11 of the 85 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 8031, searchIsCurrent, a function literal at line 8065, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cognitive 84) · ×1
  • useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cognitive 84) apps/desktop/src/composables/useQuickOpen.ts:615 — useQuickOpen.useQuickOpen.processDatabaseTreeNodes has cognitive complexity 84 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 29, ternaries 8 (24 pts), loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.generateValue (cognitive 84) · ×1
  • dataGenerate.generateValue (cognitive 84) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1701 — dataGenerate.generateValue has cognitive complexity 84 (threshold 15). Drivers by points: if/else 35 (52 pts), ternaries 9 (19 pts), boolean chains 7, loops 2 (6 pts) (nesting depth added 31). Of this number, 82 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionObjects (cognitive 84) · ×1
  • connectionStore.useConnectionStore.listCompletionObjects (cognitive 84) apps/desktop/src/stores/connectionStore.ts:10515 — connectionStore.useConnectionStore.listCompletionObjects has cognitive complexity 84 (threshold 15). Drivers by points: if/else 18 (40 pts), ternaries 9 (24 pts), boolean chains 13, error handling 2 (7 pts) (nesting depth added 42). Most of this is not in the body itself: 15 of the 84 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 10541, 10582). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.doExecute (cognitive 83) · ×1
  • useSqlExecution.useSqlExecution.doExecute (cognitive 83) apps/desktop/src/composables/useSqlExecution.ts:510 — useSqlExecution.useSqlExecution.doExecute has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (42 pts), ternaries 16 (24 pts), boolean chains 17 (nesting depth added 23). Of this number, 78 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.getFunctionDescriptions (cognitive 83) · ×1
  • sqlCompletion.getFunctionDescriptions (cognitive 83) apps/desktop/src/lib/sql/sqlCompletion.ts:1137 — sqlCompletion.getFunctionDescriptions has cognitive complexity 83 (threshold 15). Drivers by points: boolean chains 83. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTables (cognitive 83) · ×1
  • connectionStore.useConnectionStore.loadTables (cognitive 83) apps/desktop/src/stores/connectionStore.ts:7588 — connectionStore.useConnectionStore.loadTables has cognitive complexity 83 (threshold 15). Drivers by points: if/else 26 (35 pts), boolean chains 25, ternaries 17 (22 pts), error handling 1 (nesting depth added 14). Of this number, 18 points are the body's own statements and 65 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTreeNodeChildren (cognitive 83) · ×1
  • connectionStore.useConnectionStore.loadTreeNodeChildren (cognitive 83) apps/desktop/src/stores/connectionStore.ts:8971 — connectionStore.useConnectionStore.loadTreeNodeChildren has cognitive complexity 83 (threshold 15). Drivers by points: if/else 47 (51 pts), boolean chains 32 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.plDebugLoadNativeTargets (cognitive 82) · ×1
  • main.plDebugLoadNativeTargets (cognitive 82) agents/drivers/oracle-go/pldebug_target.go:304 — main.plDebugLoadNativeTargets has cognitive complexity 82 (threshold 15). Drivers by points: if/else 30 (66 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 39). Of this number, 38 points are the body's own statements and 44 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.trimRangeEndBeforeNextBoundary (cognitive 82) · ×1
  • sqlStatementRanges.trimRangeEndBeforeNextBoundary (cognitive 82) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1923 — sqlStatementRanges.trimRangeEndBeforeNextBoundary has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (75 pts), boolean chains 6, loops 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openTabsPersistence.serializeOpenTabs (cognitive 82) · ×1
  • openTabsPersistence.serializeOpenTabs (cognitive 82) apps/desktop/src/lib/app/openTabsPersistence.ts:217 — openTabsPersistence.serializeOpenTabs has cognitive complexity 82 (threshold 15). Drivers by points: ternaries 62 (72 pts), boolean chains 10 (nesting depth added 10). None of this is in the body itself: all 82 points belong to 2 function literals inside it that branch (lines 218, 284). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSchemaDiffSession.runSchemaDiffSession (cognitive 81) · ×1
  • useSchemaDiffSession.runSchemaDiffSession (cognitive 81) apps/desktop/src/composables/useSchemaDiffSession.ts:164 — useSchemaDiffSession.runSchemaDiffSession has cognitive complexity 81 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 27, ternaries 12 (13 pts), loops 3 (6 pts), error handling 1 (nesting depth added 19). Of this number, 79 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugComposite.compositeInputComplete (cognitive 81) · ×1
  • plDebugComposite.compositeInputComplete (cognitive 81) apps/desktop/src/lib/debug/plDebugComposite.ts:91 — plDebugComposite.compositeInputComplete has cognitive complexity 81 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 22, ternaries 1 (2 pts) (nesting depth added 25). Of this number, 59 points are the body's own statements and 22 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.applyCassandraURLParams (cognitive 80) · ×1
  • main.applyCassandraURLParams (cognitive 80) agents/drivers/cassandra-go/config.go:167 — main.applyCassandraURLParams has cognitive complexity 80 (threshold 15). Drivers by points: if/else 24 (71 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cognitive 80) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cognitive 80) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1282 — useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 17 (37 pts), if/else 14 (24 pts), boolean chains 18, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cognitive 80) · ×1
  • oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cognitive 80) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111 — oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (43 pts), boolean chains 28, ternaries 6, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.mutateBreakpoint (cognitive 79) · ×1
  • PlDebugSession.mutateBreakpoint (cognitive 79) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:788 — PlDebugSession.mutateBreakpoint has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (53 pts), boolean chains 15, ternaries 4 (7 pts), loops 1 (3 pts), error handling 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.runDebuggeeTarget (cognitive 79) · ×1
  • PlDebugSession.runDebuggeeTarget (cognitive 79) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2284 — PlDebugSession.runDebuggeeTarget has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 17 (39 pts), if/else 20 (31 pts), error handling 4 (6 pts), boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportMemoryDataFile (cognitive 79) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryDataFile (cognitive 79) apps/desktop/src/composables/useDataGridExport.ts:1452 — useDataGridExport.useDataGridExport.exportMemoryDataFile has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 20 (29 pts), if/else 21 (26 pts), boolean chains 22, error handling 1 (2 pts) (nesting depth added 15). Of this number, 34 points are the body's own statements and 45 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoFormatter.formatMongoShellText (cognitive 79) · ×1
  • mongoFormatter.formatMongoShellText (cognitive 79) apps/desktop/src/lib/mongo/mongoFormatter.ts:20 — mongoFormatter.formatMongoShellText has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 13, loops 1, ternaries 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarMenuLayout.buildSidebarMenuLayout (cognitive 79) · ×1
  • sidebarMenuLayout.buildSidebarMenuLayout (cognitive 79) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:177 — sidebarMenuLayout.buildSidebarMenuLayout has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 13 (47 pts), if/else 11 (17 pts), boolean chains 13, loops 2 (nesting depth added 40). Of this number, 78 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cognitive 78) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cognitive 78) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:357 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (42 pts), ternaries 9 (17 pts), boolean chains 13, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 25). Of this number, 76 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSql.tokenize (cognitive 78) · ×1
  • mongoSql.tokenize (cognitive 78) apps/desktop/src/lib/mongo/mongoSql.ts:577 — mongoSql.tokenize has cognitive complexity 78 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 8 (23 pts), boolean chains 16, ternaries 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedisKeyGroupIndex.project (cognitive 78) · ×1
  • RedisKeyGroupIndex.project (cognitive 78) apps/desktop/src/lib/redis/redisKeyGroupIndex.ts:124 — RedisKeyGroupIndex.project has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (46 pts), loops 7 (14 pts), ternaries 8 (10 pts), boolean chains 8 (nesting depth added 33). Of this number, 55 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.invalidateCompletionCache (cognitive 78) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionCache (cognitive 78) apps/desktop/src/stores/connectionStore.ts:4817 — connectionStore.useConnectionStore.invalidateCompletionCache has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (42 pts), loops 20, boolean chains 14, ternaries 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.queryResultTransferSqlLiteral (cognitive 77) · ×1
  • queryResultTransferValues.queryResultTransferSqlLiteral (cognitive 77) apps/desktop/src/components/transfer/queryResultTransferValues.ts:412 — queryResultTransferValues.queryResultTransferSqlLiteral has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 23, ternaries 9 (17 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferSource.loadQueryResultTransferSourceDdl (cognitive 77) · ×1
  • queryResultTransferSource.loadQueryResultTransferSourceDdl (cognitive 77) apps/desktop/src/components/transfer/queryResultTransferSource.ts:23 — queryResultTransferSource.loadQueryResultTransferSourceDdl has cognitive complexity 77 (threshold 15). Drivers by points: if/else 26 (45 pts), boolean chains 24, ternaries 4 (5 pts), loops 1 (2 pts), error handling 1 (nesting depth added 21). Of this number, 68 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.parseTableColumnDefinitions (cognitive 77) · ×1
  • tableColumnDefinitionPaste.parseTableColumnDefinitions (cognitive 77) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:321 — tableColumnDefinitionPaste.parseTableColumnDefinitions has cognitive complexity 77 (threshold 15). Drivers by points: if/else 25 (59 pts), boolean chains 15, loops 2, error handling 1 (nesting depth added 34). Of this number, 63 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onPaginate (cognitive 76) · ×1
  • useDataGridActions.useDataGridActions.onPaginate (cognitive 76) apps/desktop/src/composables/useDataGridActions.ts:606 — useDataGridActions.useDataGridActions.onPaginate has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (40 pts), ternaries 13 (23 pts), boolean chains 10, loops 1 (3 pts) (nesting depth added 36). Of this number, 67 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mongoShellCommand.diagnoseMongoCommand (cognitive 76) · ×1
  • mongoShellCommand.diagnoseMongoCommand (cognitive 76) REDACTED:132 — mongoShellCommand.diagnoseMongoCommand has cognitive complexity 76 (threshold 15). Drivers by points: if/else 26 (40 pts), ternaries 11 (22 pts), boolean chains 13, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.validateOracleRoutineDeployment (cognitive 76) · ×1
  • oracleRoutineDeploy.validateOracleRoutineDeployment (cognitive 76) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:468 — oracleRoutineDeploy.validateOracleRoutineDeployment has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 9 (20 pts), boolean chains 17, error handling 2, loops 2 (nesting depth added 26). Of this number, 73 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsTransfer.parseSettingsTransferFile (cognitive 76) · ×1
  • settingsTransfer.parseSettingsTransferFile (cognitive 76) apps/desktop/src/lib/settings/settingsTransfer.ts:661 — settingsTransfer.parseSettingsTransferFile has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (44 pts), boolean chains 14, ternaries 9 (10 pts), loops 5 (7 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StarRocksAlter · ×1
  • StarRocksAlter::build (cognitive 75) crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs:63 — StarRocksAlter::build has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (54 pts), boolean chains 19, loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DdlBuilder.buildTableDdl (cognitive 75) · ×1
  • DdlBuilder.buildTableDdl (cognitive 75) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:94 — DdlBuilder.buildTableDdl has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (36 pts), ternaries 8 (20 pts), loops 9 (13 pts), boolean chains 6 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugBuildNativeTypedSignaturePrepared (cognitive 75) · ×1
  • main.plDebugBuildNativeTypedSignaturePrepared (cognitive 75) agents/drivers/oracle-go/pldebug_typed_signature.go:144 — main.plDebugBuildNativeTypedSignaturePrepared has cognitive complexity 75 (threshold 15). Drivers by points: if/else 26 (57 pts), loops 6 (12 pts), boolean chains 6 (nesting depth added 37). Of this number, 57 points are the body's own statements and 18 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlGeneratePartitions.constrainMysqlGenerateColumns (cognitive 75) · ×1
  • mysqlGeneratePartitions.constrainMysqlGenerateColumns (cognitive 75) apps/desktop/src/lib/dataGrid/mysqlGeneratePartitions.ts:28 — mysqlGeneratePartitions.constrainMysqlGenerateColumns has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 14, ternaries 5 (11 pts), loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 29). Of this number, 61 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.tokens (cognitive 74) · ×1
  • PlDebugObjectConstructors.tokens (cognitive 74) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:298 — PlDebugObjectConstructors.tokens has cognitive complexity 74 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 16, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hoverTableSql.normalizeAlignedSqlWhitespace (cognitive 74) · ×1
  • hoverTableSql.normalizeAlignedSqlWhitespace (cognitive 74) apps/desktop/src/lib/editor/hoverTableSql.ts:163 — hoverTableSql.normalizeAlignedSqlWhitespace has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (55 pts), loops 4 (10 pts), boolean chains 9 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadObjectGroupFirstPage (cognitive 74) · ×1
  • connectionStore.useConnectionStore.loadObjectGroupFirstPage (cognitive 74) apps/desktop/src/stores/connectionStore.ts:7768 — connectionStore.useConnectionStore.loadObjectGroupFirstPage has cognitive complexity 74 (threshold 15). Drivers by points: if/else 31 (42 pts), boolean chains 25, ternaries 5 (6 pts), error handling 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 49 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canvasDataGridRenderer.drawCanvasDataGrid · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid::drawCell (cognitive 73) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:649 — canvasDataGridRenderer.drawCanvasDataGrid::drawCell has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 14 (31 pts), if/else 19 (22 pts), boolean chains 20 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PlDebugSession.setBreakpoints (cognitive 72) · ×1
  • PlDebugSession.setBreakpoints (cognitive 72) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:893 — PlDebugSession.setBreakpoints has cognitive complexity 72 (threshold 15). Drivers by points: if/else 13 (31 pts), ternaries 11 (26 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugCompositeOutputTypes (cognitive 72) · ×1
  • main.plDebugCompositeOutputTypes (cognitive 72) agents/drivers/oracle-go/pldebug_record_output.go:13 — main.plDebugCompositeOutputTypes has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 14, loops 4 (8 pts), match/switch 1 (4 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.renderXuguPartitionDDL (cognitive 72) · ×1
  • main.renderXuguPartitionDDL (cognitive 72) REDACTED:4984 — main.renderXuguPartitionDDL has cognitive complexity 72 (threshold 15). Drivers by points: if/else 21 (60 pts), loops 2 (8 pts), boolean chains 4 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.preparePastedRows (cognitive 72) · ×1
  • useDataGridEditor.useDataGridEditor.preparePastedRows (cognitive 72) apps/desktop/src/composables/useDataGridEditor.ts:1559 — useDataGridEditor.useDataGridEditor.preparePastedRows has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (44 pts), boolean chains 14, ternaries 6 (9 pts), loops 3 (5 pts) (nesting depth added 20). Of this number, 67 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.cleanup (cognitive 71) · ×1
  • plDebugNativeEntry.cleanup (cognitive 71) agents/drivers/oracle-go/pldebug_manager.go:930 — plDebugNativeEntry.cleanup has cognitive complexity 71 (threshold 15). Drivers by points: if/else 33 (58 pts), boolean chains 8, loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cognitive 71) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cognitive 71) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1448 — useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (49 pts), boolean chains 15, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 27). Of this number, 49 points are the body's own statements and 22 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.buildRequest (cognitive 71) · ×1
  • useDataGridExtractor.useDataGridExtractor.buildRequest (cognitive 71) apps/desktop/src/composables/useDataGridExtractor.ts:186 — useDataGridExtractor.useDataGridExtractor.buildRequest has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 30, ternaries 17 (20 pts), if/else 13 (19 pts), loops 1 (2 pts) (nesting depth added 10). Of this number, 63 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useNavigationTargets.openTableTarget (cognitive 71) · ×1
  • useNavigationTargets.openTableTarget (cognitive 71) apps/desktop/src/composables/useNavigationTargets.ts:66 — useNavigationTargets.openTableTarget has cognitive complexity 71 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 23, error handling 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 14). Of this number, 69 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai.buildModePromptLines (cognitive 71) · ×1
  • ai.buildModePromptLines (cognitive 71) apps/desktop/src/lib/ai/ai.ts:682 — ai.buildModePromptLines has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 22 (61 pts), if/else 7 (10 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlIntentionActions.buildQualifierActions (cognitive 71) · ×1
  • sqlIntentionActions.buildQualifierActions (cognitive 71) apps/desktop/src/lib/editor/sqlIntentionActions.ts:562 — sqlIntentionActions.buildQualifierActions has cognitive complexity 71 (threshold 15). Drivers by points: if/else 18 (40 pts), ternaries 5 (13 pts), loops 3 (10 pts), boolean chains 8 (nesting depth added 37). Of this number, 70 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EwkbWktDecoder.parseGeometry (cognitive 70) · ×1
  • EwkbWktDecoder.parseGeometry (cognitive 70) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:300 — EwkbWktDecoder.parseGeometry has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 8 (17 pts), ternaries 2 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.readExactTriggerRows (cognitive 70) · ×1
  • server.readExactTriggerRows (cognitive 70) agents/drivers/oracle-go/trigger_metadata.go:133 — server.readExactTriggerRows has cognitive complexity 70 (threshold 15). Drivers by points: if/else 23 (52 pts), boolean chains 11, match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseTableClone.buildOceanbaseTableClone (cognitive 70) · ×1
  • oceanbaseTableClone.buildOceanbaseTableClone (cognitive 70) apps/desktop/src/lib/database/oceanbaseTableClone.ts:41 — oceanbaseTableClone.buildOceanbaseTableClone has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (37 pts), boolean chains 20, ternaries 6 (10 pts), loops 3 (nesting depth added 14). Of this number, 54 points are the body's own statements and 16 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cognitive 70) · ×1
  • sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cognitive 70) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:46 — sqlDatabaseLinks.collectSqlDatabaseLinkStarts has cognitive complexity 70 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 25, loops 4 (9 pts), ternaries 2 (nesting depth added 25). Of this number, 64 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMockHost.bridge (cognitive 70) · ×1
  • createMockHost.bridge (cognitive 70) plugins/sdk/dev-host/server.mjs:267 — createMockHost.bridge has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 21, ternaries 6 (13 pts), other 3, match/switch 1 (nesting depth added 22). Of this number, 58 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeferredLobValues.readAhead (cognitive 69) · ×1
  • DeferredLobValues.readAhead (cognitive 69) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152 — DeferredLobValues.readAhead has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (36 pts), ternaries 7 (15 pts), boolean chains 6, error handling 2 (6 pts), loops 4 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugCollectionInitializer.collection (cognitive 69) · ×1
  • plDebugCollectionInitializer.collection (cognitive 69) agents/drivers/oracle-go/pldebug_collection_initialize.go:60 — plDebugCollectionInitializer.collection has cognitive complexity 69 (threshold 15). Drivers by points: if/else 28 (55 pts), loops 5 (9 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cognitive 69) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cognitive 69) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:694 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports has cognitive complexity 69 (threshold 15). Drivers by points: if/else 24 (44 pts), boolean chains 11, ternaries 4 (8 pts), error handling 2 (4 pts), loops 2 (nesting depth added 26). Most of this is not in the body itself: 6 of the 69 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 720, 744, 738, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.getSqlCompletionContext (cognitive 69) · ×1
  • sqlCompletion.getSqlCompletionContext (cognitive 69) apps/desktop/src/lib/sql/sqlCompletion.ts:3053 — sqlCompletion.getSqlCompletionContext has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 35, ternaries 16 (18 pts), if/else 5 (10 pts), loops 4 (6 pts) (nesting depth added 9). Of this number, 68 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · oracleTypeManagement.executeOracleTypeManagement (cognitive 69) · ×1
  • oracleTypeManagement.executeOracleTypeManagement (cognitive 69) apps/desktop/src/lib/table/oracleTypeManagement.ts:572 — oracleTypeManagement.executeOracleTypeManagement has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 17, error handling 6 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 24). Of this number, 67 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.temporal (cognitive 68) · ×1
  • PlDebugTemporalJson.temporal (cognitive 68) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:145 — PlDebugTemporalJson.temporal has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 16, ternaries 7 (15 pts), loops 2 (3 pts), error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.splitTopLevelStatements (cognitive 68) · ×1
  • dataGridInsertPaste.splitTopLevelStatements (cognitive 68) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:26 — dataGridInsertPaste.splitTopLevelStatements has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 9, ternaries 3 (9 pts), loops 2 (5 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeSourceTokens (cognitive 67) · ×1
  • main.plDebugNativeSourceTokens (cognitive 67) agents/drivers/oracle-go/pldebug_routine.go:21 — main.plDebugNativeSourceTokens has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (52 pts), boolean chains 7, loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.getSqlLexicalContext (cognitive 67) · ×1
  • sqlCompletion.getSqlLexicalContext (cognitive 67) apps/desktop/src/lib/sql/sqlCompletion.ts:2562 — sqlCompletion.getSqlLexicalContext has cognitive complexity 67 (threshold 15). Drivers by points: if/else 29 (54 pts), boolean chains 12, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.ensureConnected (cognitive 67) · ×1
  • connectionStore.useConnectionStore.ensureConnected (cognitive 67) apps/desktop/src/stores/connectionStore.ts:5992 — connectionStore.useConnectionStore.ensureConnected has cognitive complexity 67 (threshold 15). Drivers by points: if/else 31 (48 pts), boolean chains 15, error handling 3 (4 pts) (nesting depth added 18). Of this number, 48 points are the body's own statements and 19 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionTables (cognitive 67) · ×1
  • connectionStore.useConnectionStore.listCompletionTables (cognitive 67) apps/desktop/src/stores/connectionStore.ts:10359 — connectionStore.useConnectionStore.listCompletionTables has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (36 pts), error handling 5 (21 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 36). Most of this is not in the body itself: 5 of the 67 points are its own statements and the rest belongs to one function literal inside it that branches (line 10381). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TableRestoreFilter · ×1
  • TableRestoreFilter::classify (cognitive 66) REDACTED:67 — TableRestoreFilter::classify has cognitive complexity 66 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 11, loops 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLegacyArgumentTree (cognitive 66) · ×1
  • main.plDebugLegacyArgumentTree (cognitive 66) agents/drivers/oracle-go/pldebug_legacy_arguments.go:30 — main.plDebugLegacyArgumentTree has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 5 (9 pts), boolean chains 8 (nesting depth added 32). Of this number, 44 points are the body's own statements and 22 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ai.buildAiContext (cognitive 66) · ×1
  • ai.buildAiContext (cognitive 66) apps/desktop/src/lib/ai/ai.ts:906 — ai.buildAiContext has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 9 (16 pts), boolean chains 8, loops 4 (8 pts), error handling 2 (4 pts) (nesting depth added 30). Of this number, 61 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlDisplay.collectDdlStatementNameTargets (cognitive 66) · ×1
  • ddlDisplay.collectDdlStatementNameTargets (cognitive 66) apps/desktop/src/lib/sql/ddlDisplay.ts:208 — ddlDisplay.collectDdlStatementNameTargets has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (51 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableImport.importDataTypeForDatabase (cognitive 66) · ×1
  • tableImport.importDataTypeForDatabase (cognitive 66) apps/desktop/src/lib/table/tableImport.ts:338 — tableImport.importDataTypeForDatabase has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 15, match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · tableSelectSql.qualifiedTableName (cognitive 66) · ×1
  • tableSelectSql.qualifiedTableName (cognitive 66) apps/desktop/src/lib/table/tableSelectSql.ts:209 — tableSelectSql.qualifiedTableName has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (34 pts), ternaries 8 (17 pts), boolean chains 15 (nesting depth added 23). Of this number, 64 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createMockHost.bridge (cognitive 66) · ×1
  • server.createMockHost.bridge (cognitive 66) plugins/sdk/dev-host/server.mjs:267 — server.createMockHost.bridge has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 19, ternaries 6 (14 pts), match/switch 1 (nesting depth added 23). Of this number, 54 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.start (cognitive 65) · ×1
  • plDebugNativeEntry.start (cognitive 65) agents/drivers/oracle-go/pldebug_manager.go:377 — plDebugNativeEntry.start has cognitive complexity 65 (threshold 15). Drivers by points: if/else 38 (55 pts), boolean chains 9, match/switch 1 (nesting depth added 17). Of this number, 61 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.mysqlRoutineTokens (cognitive 65) · ×1
  • sqlStatementRanges.mysqlRoutineTokens (cognitive 65) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2293 — sqlStatementRanges.mysqlRoutineTokens has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (56 pts), boolean chains 8, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyCellValueToItem (cognitive 65) · ×1
  • useDataGridEditor.useDataGridEditor.applyCellValueToItem (cognitive 65) apps/desktop/src/composables/useDataGridEditor.ts:1247 — useDataGridEditor.useDataGridEditor.applyCellValueToItem has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (58 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cellValueTransform.transformCellValue (cognitive 65) · ×1
  • cellValueTransform.transformCellValue (cognitive 65) apps/desktop/src/lib/dataGrid/cellValueTransform.ts:111 — cellValueTransform.transformCellValue has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 13 (30 pts), if/else 12 (25 pts), boolean chains 6, error handling 2 (3 pts), match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cognitive 65) · ×1
  • oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cognitive 65) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:33 — oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 16, ternaries 5 (11 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.buildGrantAuthorizationPlan (cognitive 64) · ×1
  • databaseAuthorizationPlan.buildGrantAuthorizationPlan (cognitive 64) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:299 — databaseAuthorizationPlan.buildGrantAuthorizationPlan has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 13 (38 pts), if/else 8 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.history (cognitive 63) · ×1
  • etcdSession.history (cognitive 63) agents/drivers/etcd-go/history.go:39 — etcdSession.history has cognitive complexity 63 (threshold 15). Drivers by points: if/else 29 (52 pts), boolean chains 5, loops 3 (4 pts), match/switch 2 (nesting depth added 24). Of this number, 27 points are the body's own statements and 36 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.applyNativeBreakpointRules (cognitive 63) · ×1
  • plDebugNativeEntry.applyNativeBreakpointRules (cognitive 63) agents/drivers/oracle-go/pldebug_breakpoint_rules.go:37 — plDebugNativeEntry.applyNativeBreakpointRules has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (53 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 33). Of this number, 58 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.parseExplainLikePrefixAt (cognitive 63) · ×1
  • sqlStatementRanges.parseExplainLikePrefixAt (cognitive 63) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1699 — sqlStatementRanges.parseExplainLikePrefixAt has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (49 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 30). Of this number, 54 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.prepareOracleTriggerPlan (cognitive 63) · ×1
  • oracleTriggerPlan.prepareOracleTriggerPlan (cognitive 63) apps/desktop/src/lib/database/oracleTriggerPlan.ts:166 — oracleTriggerPlan.prepareOracleTriggerPlan has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 14, ternaries 3 (5 pts), error handling 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadAllObjectGroupChildren (cognitive 63) · ×1
  • connectionStore.useConnectionStore.loadAllObjectGroupChildren (cognitive 63) apps/desktop/src/stores/connectionStore.ts:8362 — connectionStore.useConnectionStore.loadAllObjectGroupChildren has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 21, ternaries 2 (6 pts), error handling 1, loops 1 (nesting depth added 20). Of this number, 55 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.splitStatementRangeAtSoftStarts (cognitive 62) · ×1
  • sqlStatementRanges.splitStatementRangeAtSoftStarts (cognitive 62) apps/desktop/src/lib/sql/sqlStatementRanges.ts:868 — sqlStatementRanges.splitStatementRangeAtSoftStarts has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 18, ternaries 2 (3 pts), loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseTableEmpty.buildLayers (cognitive 62) · ×1
  • databaseTableEmpty.buildLayers (cognitive 62) apps/desktop/src/lib/sidebar/databaseTableEmpty.ts:46 — databaseTableEmpty.buildLayers has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 9 (17 pts), ternaries 6 (13 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 31). Of this number, 54 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.tokenizeCypher (cognitive 62) · ×1
  • cypherFormatter.tokenizeCypher (cognitive 62) apps/desktop/src/lib/sql/cypherFormatter.ts:176 — cypherFormatter.tokenizeCypher has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 4 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Db2ExplainPlan.singleQuery (cognitive 61) · ×1
  • Db2ExplainPlan.singleQuery (cognitive 61) REDACTED:277 — Db2ExplainPlan.singleQuery has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 4 (11 pts), boolean chains 9, ternaries 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · main.parseWKBGeometry (cognitive 61) · ×1
  • main.parseWKBGeometry (cognitive 61) agents/drivers/vastbase-go/spatial.go:413 — main.parseWKBGeometry has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 6 (12 pts), boolean chains 8, match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cognitive 61) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cognitive 61) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:553 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 21, ternaries 7 (10 pts), error handling 1 (nesting depth added 12). Of this number, 40 points are the body's own statements and 21 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · db2ExplainPlan.parseDb2ExplainText (cognitive 61) · ×1
  • db2ExplainPlan.parseDb2ExplainText (cognitive 61) apps/desktop/src/lib/diagram/db2ExplainPlan.ts:50 — db2ExplainPlan.parseDb2ExplainText has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 7 (17 pts), loops 6 (7 pts), boolean chains 6, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.collectInnermostObjectKeys (cognitive 61) · ×1
  • mongoCompletion.collectInnermostObjectKeys (cognitive 61) REDACTED:972 — mongoCompletion.collectInnermostObjectKeys has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (46 pts), boolean chains 7, ternaries 2 (7 pts), loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.mongoTopLevelCommandLineStarts (cognitive 61) · ×1
  • mongoShellCommand.mongoTopLevelCommandLineStarts (cognitive 61) REDACTED:1562 — mongoShellCommand.mongoTopLevelCommandLineStarts has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 16, loops 1, ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherReadOnly.isProvenReadOnlyCypher (cognitive 61) · ×1
  • cypherReadOnly.isProvenReadOnlyCypher (cognitive 61) apps/desktop/src/lib/sql/cypherReadOnly.ts:4 — cypherReadOnly.isProvenReadOnlyCypher has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 5 (13 pts), boolean chains 12 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SPNEGORoundTripper.RoundTrip (cognitive 60) · ×1
  • SPNEGORoundTripper.RoundTrip (cognitive 60) agents/go-common/gosasl/http_spnego.go:73 — SPNEGORoundTripper.RoundTrip has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (55 pts), boolean chains 4, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.rewriteUnsafeIntegerTokens (cognitive 60) · ×1
  • documentStoreProvider.rewriteUnsafeIntegerTokens (cognitive 60) apps/desktop/src/lib/app/documentStoreProvider.ts:777 — documentStoreProvider.rewriteUnsafeIntegerTokens has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 5 (16 pts), boolean chains 4, error handling 1 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · regexGenerate.parseEscape (cognitive 60) · ×1
  • regexGenerate.parseEscape (cognitive 60) REDACTED:123 — regexGenerate.parseEscape has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (29 pts), ternaries 13 (28 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.stripSqlCommentsAndStringLiterals (cognitive 60) · ×1
  • schemaDiff.stripSqlCommentsAndStringLiterals (cognitive 60) apps/desktop/src/lib/schema/schemaDiff.ts:501 — schemaDiff.stripSqlCommentsAndStringLiterals has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (46 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aggregateCombinators.buildCombinatorSequences (cognitive 60) · ×1
  • aggregateCombinators.buildCombinatorSequences (cognitive 60) apps/desktop/src/lib/sql/clickhouse/aggregateCombinators.ts:12 — aggregateCombinators.buildCombinatorSequences has cognitive complexity 60 (threshold 15). Drivers by points: if/else 8 (42 pts), loops 7 (18 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.refreshTreeNode (cognitive 60) · ×1
  • connectionStore.useConnectionStore.refreshTreeNode (cognitive 60) apps/desktop/src/stores/connectionStore.ts:9091 — connectionStore.useConnectionStore.refreshTreeNode has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 10, loops 2 (8 pts), ternaries 3 (6 pts), error handling 1 (nesting depth added 24). Of this number, 56 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriversClient.DriversClient (cognitive 60) · ×1
  • DriversClient.DriversClient (cognitive 60) docs/app/[lang]/drivers/DriversClient.tsx:216 — DriversClient.DriversClient has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 18 (51 pts), boolean chains 29, if/else 16 (25 pts), loops 5 (7 pts), error handling 2 (3 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (DriversClient.DriversClient::fetchBundlePackage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · installBridge (cognitive 60) · ×1
  • installBridge (cognitive 60) REDACTED:2 — installBridge has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 17, loops 7 (12 pts), error handling 2 (3 pts), ternaries 3 (nesting depth added 9). None of this is in the body itself: all 60 points belong to 53 function items inside it that branch (a function literal at line 171, stream::start::onEvent, applyTheme, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · BlobBoundStatement.scanSql (cognitive 59) · ×1
  • BlobBoundStatement.scanSql (cognitive 59) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:58 — BlobBoundStatement.scanSql has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 7 (26 pts), if/else 9 (19 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DbxJdbcPlugin.listObjects (cognitive 59) · ×1
  • DbxJdbcPlugin.listObjects (cognitive 59) REDACTED:3229 — DbxJdbcPlugin.listObjects has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 13, error handling 3 (7 pts), ternaries 3 (7 pts), loops 3 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeCallMatches (cognitive 59) · ×1
  • main.plDebugNativeCallMatches (cognitive 59) agents/drivers/oracle-go/pldebug_target.go:903 — main.plDebugNativeCallMatches has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 14, loops 6 (9 pts) (nesting depth added 20). Of this number, 58 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.plDebugProbeOnConnection (cognitive 59) · ×1
  • server.plDebugProbeOnConnection (cognitive 59) agents/drivers/oracle-go/pldebug_probe.go:113 — server.plDebugProbeOnConnection has cognitive complexity 59 (threshold 15). Drivers by points: if/else 27 (36 pts), boolean chains 12, loops 8 (11 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jdbcProperties.parseJdbcProperties (cognitive 59) · ×1
  • jdbcProperties.parseJdbcProperties (cognitive 59) apps/desktop/src/lib/connection/jdbcProperties.ts:39 — jdbcProperties.parseJdbcProperties has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 7 (16 pts), boolean chains 8, ternaries 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.buildCustomTypeDDL (cognitive 58) · ×1
  • server.buildCustomTypeDDL (cognitive 58) REDACTED:1093 — server.buildCustomTypeDDL has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 12, loops 4 (8 pts), match/switch 1 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · plDebugNativeEntry.readNativeValues (cognitive 58) · ×1
  • plDebugNativeEntry.readNativeValues (cognitive 58) agents/drivers/oracle-go/pldebug_frame_value.go:63 — plDebugNativeEntry.readNativeValues has cognitive complexity 58 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 13, loops 1 (nesting depth added 17). Of this number, 46 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.ordinaryProxyMessage (cognitive 58) · ×1
  • main.ordinaryProxyMessage (cognitive 58) agents/drivers/rocketmq/proxy.go:306 — main.ordinaryProxyMessage has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 9, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 19). Of this number, 54 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.buildCustomTypeDDL (cognitive 58) · ×1
  • main.buildCustomTypeDDL (cognitive 58) agents/drivers/vastbase-go/vastbase_metadata.go:918 — main.buildCustomTypeDDL has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 12, loops 4 (8 pts), match/switch 1 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cognitive 58) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cognitive 58) apps/desktop/src/composables/useDataGridLargeValues.ts:292 — useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews has cognitive complexity 58 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 12, loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 17). Of this number, 57 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.readTableReferenceToken (cognitive 58) · ×1
  • dataGridInsertPaste.readTableReferenceToken (cognitive 58) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:174 — dataGridInsertPaste.readTableReferenceToken has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (43 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarActiveTabTarget.activeTabSidebarTarget (cognitive 58) · ×1
  • sidebarActiveTabTarget.activeTabSidebarTarget (cognitive 58) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:125 — sidebarActiveTabTarget.activeTabSidebarTarget has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36 (46 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.rewriteOracleSelectItems (cognitive 57) · ×1
  • main.rewriteOracleSelectItems (cognitive 57) REDACTED:5681 — main.rewriteOracleSelectItems has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (46 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionPickerTree.buildConnectionPickerRows (cognitive 57) · ×1
  • connectionPickerTree.buildConnectionPickerRows (cognitive 57) apps/desktop/src/lib/connection/connectionPickerTree.ts:47 — connectionPickerTree.buildConnectionPickerRows has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 30). Most of this is not in the body itself: 14 of the 57 points are its own statements and the rest belongs to 3 function items inside it that branch (visitSearch, visitTree, subtreeHasConnection). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionUrl.parseConnectionUrl (cognitive 57) · ×1
  • connectionUrl.parseConnectionUrl (cognitive 57) REDACTED:776 — connectionUrl.parseConnectionUrl has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 20 (28 pts), if/else 16, boolean chains 12, error handling 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarActiveTabTarget.matchesTarget (cognitive 57) · ×1
  • sidebarActiveTabTarget.matchesTarget (cognitive 57) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:312 — sidebarActiveTabTarget.matchesTarget has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 31, if/else 23 (26 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cognitive 57) · ×1
  • sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cognitive 57) apps/desktop/src/lib/sql/sqlParameters.ts:1244 — sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 8, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.protectDuckDbPrefixAliasSeparators (cognitive 57) · ×1
  • sqlFormatter.protectDuckDbPrefixAliasSeparators (cognitive 57) apps/desktop/src/lib/sql/sqlFormatter.ts:336 — sqlFormatter.protectDuckDbPrefixAliasSeparators has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 11, loops 5 (11 pts), ternaries 2 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.readValueEnd (cognitive 57) · ×1
  • sqlVariables.readValueEnd (cognitive 57) apps/desktop/src/lib/sql/sqlVariables.ts:175 — sqlVariables.readValueEnd has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 14, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSource.tokens (cognitive 57) · ×1
  • oraclePackageSource.tokens (cognitive 57) apps/desktop/src/lib/table/oraclePackageSource.ts:10 — oraclePackageSource.tokens has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 4 (10 pts), boolean chains 6 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugRecordDecoder.object (cognitive 56) · ×1
  • plDebugRecordDecoder.object (cognitive 56) agents/drivers/oracle-go/pldebug_object_input.go:37 — plDebugRecordDecoder.object has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30 (41 pts), boolean chains 10, loops 4 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.commitEdit (cognitive 56) · ×1
  • useDataGridEditor.useDataGridEditor.commitEdit (cognitive 56) apps/desktop/src/composables/useDataGridEditor.ts:1122 — useDataGridEditor.useDataGridEditor.commitEdit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (42 pts), ternaries 5 (8 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cognitive 56) · ×1
  • useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cognitive 56) apps/desktop/src/composables/useDatabaseTableEmpty.ts:40 — useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 17 (22 pts), if/else 15 (20 pts), boolean chains 9, error handling 3, loops 1 (2 pts) (nesting depth added 11). Of this number, 47 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dataGridContextMenu.createDataGridColumnContextMenuItems (cognitive 56) · ×1
  • dataGridContextMenu.createDataGridColumnContextMenuItems (cognitive 56) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:116 — dataGridContextMenu.createDataGridColumnContextMenuItems has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (44 pts), boolean chains 12 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kvValueFormat.validateKvValue (cognitive 56) · ×1
  • kvValueFormat.validateKvValue (cognitive 56) apps/desktop/src/lib/kv/kvValueFormat.ts:33 — kvValueFormat.validateKvValue has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 10, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 21). Of this number, 45 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.filterSidebarTreeWithMatcher (cognitive 56) · ×1
  • sidebarSearchTree.filterSidebarTreeWithMatcher (cognitive 56) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:486 — sidebarSearchTree.filterSidebarTreeWithMatcher has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 6 (18 pts), boolean chains 17, loops 1 (nesting depth added 22). Of this number, 46 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarTableNameCopy.qualifiedNameForSidebarNode (cognitive 56) · ×1
  • sidebarTableNameCopy.qualifiedNameForSidebarNode (cognitive 56) apps/desktop/src/lib/sidebar/sidebarTableNameCopy.ts:96 — sidebarTableNameCopy.qualifiedNameForSidebarNode has cognitive complexity 56 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 16, ternaries 4 (6 pts) (nesting depth added 13). Of this number, 51 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSelectList (cognitive 56) · ×1
  • sqlCompletion.extractSelectList (cognitive 56) apps/desktop/src/lib/sql/sqlCompletion.ts:4438 — sqlCompletion.extractSelectList has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 15, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.buildQueryMetadataPatch (cognitive 56) · ×1
  • queryStore.useQueryStore.buildQueryMetadataPatch (cognitive 56) apps/desktop/src/stores/queryStore.ts:7971 — queryStore.useQueryStore.buildQueryMetadataPatch has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (24 pts), ternaries 11 (19 pts), boolean chains 12, error handling 1 (nesting depth added 16). Of this number, 49 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeJobRegistry · ×1
  • NativeJobRegistry::remember (cognitive 55) crates/dbx-core/src/schema/native_jobs/service.rs:102 — NativeJobRegistry::remember has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (36 pts), match/switch 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlDebugCompositeInput.composite (cognitive 55) · ×1
  • PlDebugCompositeInput.composite (cognitive 55) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:113 — PlDebugCompositeInput.composite has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 6, loops 3 (5 pts), error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeRoutineParamMode (cognitive 55) · ×1
  • main.plDebugNativeRoutineParamMode (cognitive 55) agents/drivers/oracle-go/pldebug_routine.go:283 — main.plDebugNativeRoutineParamMode has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 13, loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proxyManager.rewriteJSON (cognitive 55) · ×1
  • proxyManager.rewriteJSON (cognitive 55) REDACTED:462 — proxyManager.rewriteJSON has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 6 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 34). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cognitive 55) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cognitive 55) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:578 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 4 (7 pts), loops 4 (6 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 21). Of this number, 54 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useFileDrop.useFileDrop.setupFileDrop (cognitive 55) · ×1
  • useFileDrop.useFileDrop.setupFileDrop (cognitive 55) apps/desktop/src/composables/useFileDrop.ts:44 — useFileDrop.useFileDrop.setupFileDrop has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (30 pts), error handling 3 (11 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 31). Most of this is not in the body itself: 2 of the 55 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 48, 125, 139). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · datagripImport.parseJdbcUrl (cognitive 55) · ×1
  • datagripImport.parseJdbcUrl (cognitive 55) REDACTED:135 — datagripImport.parseJdbcUrl has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (39 pts), boolean chains 8, loops 2 (4 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listConstraints (cognitive 54) · ×1
  • server.listConstraints (cognitive 54) REDACTED:2524 — server.listConstraints has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 5 (8 pts), boolean chains 6 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.inspectNativeCurrentProgram (cognitive 54) · ×1
  • plDebugNativeEntry.inspectNativeCurrentProgram (cognitive 54) agents/drivers/oracle-go/pldebug_entry.go:85 — plDebugNativeEntry.inspectNativeCurrentProgram has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 12, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.verifyStep (cognitive 54) · ×1
  • oracleTriggerPlan.verifyStep (cognitive 54) apps/desktop/src/lib/database/oracleTriggerPlan.ts:669 — oracleTriggerPlan.verifyStep has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (29 pts), ternaries 7 (14 pts), boolean chains 11 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectDuckDbStructFieldSeparators (cognitive 54) · ×1
  • sqlParameters.collectDuckDbStructFieldSeparators (cognitive 54) apps/desktop/src/lib/sql/sqlParameters.ts:931 — sqlParameters.collectDuckDbStructFieldSeparators has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (36 pts), ternaries 2 (7 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seo.auditPages (cognitive 54) · ×1
  • seo.auditPages (cognitive 54) docs/scripts/seo.mjs:84 — seo.auditPages has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 9, loops 4 (9 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Projection · ×1
  • Projection::read (cognitive 53) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:673 — Projection::read has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 9, match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StarRocksCreateTable · ×1
  • StarRocksCreateTable::validate (cognitive 53) crates/dbx-sql-schema/src/table_structure_sql/create_dialect.rs:107 — StarRocksCreateTable::validate has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (38 pts), match/switch 2 (6 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugSession.setBreakpoints (cognitive 53) · ×1
  • plDebugSession.setBreakpoints (cognitive 53) REDACTED:2066 — plDebugSession.setBreakpoints has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (41 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.resolveNativeNamedSources (cognitive 53) · ×1
  • plDebugNativeEntry.resolveNativeNamedSources (cognitive 53) agents/drivers/oracle-go/pldebug_source.go:126 — plDebugNativeEntry.resolveNativeNamedSources has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 14, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listConstraints (cognitive 53) · ×1
  • server.listConstraints (cognitive 53) agents/drivers/vastbase-go/vastbase_metadata.go:1525 — server.listConstraints has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 5 (8 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.skipBalancedParens (cognitive 53) · ×1
  • sqlStatementRanges.skipBalancedParens (cognitive 53) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1798 — sqlStatementRanges.skipBalancedParens has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 6, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnFormatter.normalizeColumnFormatter (cognitive 53) · ×1
  • columnFormatter.normalizeColumnFormatter (cognitive 53) apps/desktop/src/lib/dataGrid/columnFormatter.ts:235 — columnFormatter.normalizeColumnFormatter has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 15, ternaries 7 (14 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.parseOracleForeignKeyDdl (cognitive 53) · ×1
  • oracleForeignKeys.parseOracleForeignKeyDdl (cognitive 53) apps/desktop/src/lib/database/oracleForeignKeys.ts:26 — oracleForeignKeys.parseOracleForeignKeyDdl has cognitive complexity 53 (threshold 15). Drivers by points: if/else 29 (43 pts), boolean chains 5, loops 5 (nesting depth added 14). Of this number, 35 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.applyJavaDriverHOCON (cognitive 52) · ×1
  • main.applyJavaDriverHOCON (cognitive 52) agents/drivers/cassandra-go/config_file.go:49 — main.applyJavaDriverHOCON has cognitive complexity 52 (threshold 15). Drivers by points: if/else 42 (50 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.parseConnectionConfig (cognitive 52) · ×1
  • main.parseConnectionConfig (cognitive 52) agents/drivers/iotdb/driver.go:104 — main.parseConnectionConfig has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (45 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listObjects (cognitive 52) · ×1
  • server.listObjects (cognitive 52) REDACTED:2210 — server.listObjects has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 3 (10 pts), boolean chains 3 (nesting depth added 31). Of this number, 46 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · dataGridCellCoercion.parsePostgresArrayText (cognitive 52) · ×1
  • dataGridCellCoercion.parsePostgresArrayText (cognitive 52) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:384 — dataGridCellCoercion.parsePostgresArrayText has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 6 (14 pts), boolean chains 6 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandPreview.quoteRedisBytes (cognitive 52) · ×1
  • redisCommandPreview.quoteRedisBytes (cognitive 52) apps/desktop/src/lib/redis/redisCommandPreview.ts:67 — redisCommandPreview.quoteRedisBytes has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 10, error handling 1 (4 pts), loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleViewRename.prepareOracleViewRename (cognitive 52) · ×1
  • oracleViewRename.prepareOracleViewRename (cognitive 52) apps/desktop/src/lib/table/oracleViewRename.ts:128 — oracleViewRename.prepareOracleViewRename has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, ternaries 4 (10 pts), error handling 4 (9 pts), loops 2 (nesting depth added 19). Of this number, 46 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cognitive 52) · ×1
  • connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cognitive 52) apps/desktop/src/stores/connectionStore.ts:3476 — connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 7 (13 pts), boolean chains 11, error handling 1 (2 pts), loops 1 (nesting depth added 21). Of this number, 45 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.bind (cognitive 51) · ×1
  • Plan.bind (cognitive 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:432 — Plan.bind has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 6 (19 pts), loops 4, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.node (cognitive 51) · ×1
  • PlDebugTemporalJson.node (cognitive 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:58 — PlDebugTemporalJson.node has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 9, ternaries 4 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listConstraintsWithIdentity (cognitive 51) · ×1
  • server.listConstraintsWithIdentity (cognitive 51) REDACTED:3380 — server.listConstraintsWithIdentity has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 10, loops 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · plDebugNativeEntry.executeStatement (cognitive 51) · ×1
  • plDebugNativeEntry.executeStatement (cognitive 51) REDACTED:149 — plDebugNativeEntry.executeStatement has cognitive complexity 51 (threshold 15). Drivers by points: if/else 29 (36 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 9). Of this number, 27 points are the body's own statements and 24 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugRecordDecoder.record (cognitive 51) · ×1
  • plDebugRecordDecoder.record (cognitive 51) agents/drivers/oracle-go/pldebug_record_input.go:77 — plDebugRecordDecoder.record has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 9, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.readThriftValue (cognitive 51) · ×1
  • main.readThriftValue (cognitive 51) agents/drivers/rabbitmq/thrift_binary.go:171 — main.readThriftValue has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (40 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cognitive 51) · ×1
  • useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cognitive 51) apps/desktop/src/composables/useDataGridExtractor.ts:452 — useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 19 (nesting depth added 10). Of this number, 47 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCopyExtractor.normalizeDataGridExtractorOptions (cognitive 51) · ×1
  • dataGridCopyExtractor.normalizeDataGridExtractorOptions (cognitive 51) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:239 — dataGridCopyExtractor.normalizeDataGridExtractorOptions has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 28 (29 pts), boolean chains 22 (nesting depth added 1). Of this number, 49 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoShellCommand.validateBulkWriteOperations (cognitive 51) · ×1
  • mongoShellCommand.validateBulkWriteOperations (cognitive 51) REDACTED:1919 — mongoShellCommand.validateBulkWriteOperations has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 5, ternaries 1 (4 pts), loops 2 (3 pts), error handling 1 (nesting depth added 25). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.mergeSidebarRegexIndexScopes (cognitive 51) · ×1
  • sidebarSearchTree.mergeSidebarRegexIndexScopes (cognitive 51) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:289 — sidebarSearchTree.mergeSidebarRegexIndexScopes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 8 (10 pts), ternaries 5 (9 pts), boolean chains 3 (nesting depth added 21). Of this number, 37 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.leaseList (cognitive 50) · ×1
  • etcdSession.leaseList (cognitive 50) agents/drivers/etcd-go/lease.go:38 — etcdSession.leaseList has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (38 pts), loops 4 (7 pts), boolean chains 4, jumps 1 (nesting depth added 19). Of this number, 44 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cognitive 50) · ×1
  • databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cognitive 50) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:191 — databaseAuthorizationPlan.buildCreateUserAuthorizationPlan has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 6 (19 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.readOracleConstraintSnapshot (cognitive 50) · ×1
  • oracleConstraints.readOracleConstraintSnapshot (cognitive 50) apps/desktop/src/lib/database/oracleConstraints.ts:274 — oracleConstraints.readOracleConstraintSnapshot has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 20, if/else 15 (17 pts), ternaries 9, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 4). Of this number, 47 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.currentLineBlockEnd (cognitive 50) · ×1
  • sqlCompletion.currentLineBlockEnd (cognitive 50) apps/desktop/src/lib/sql/sqlCompletion.ts:2816 — sqlCompletion.currentLineBlockEnd has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 11, loops 4 (6 pts), ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.formatSqlText (cognitive 50) · ×1
  • sqlFormatter.formatSqlText (cognitive 50) apps/desktop/src/lib/sql/sqlFormatter.ts:457 — sqlFormatter.formatSqlText has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 16 (25 pts), if/else 10 (13 pts), error handling 4 (7 pts), boolean chains 5 (nesting depth added 15). Of this number, 34 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTypeManagement.restoreOracleTypeManagementDraft (cognitive 50) · ×1
  • oracleTypeManagement.restoreOracleTypeManagementDraft (cognitive 50) apps/desktop/src/lib/table/oracleTypeManagement.ts:706 — oracleTypeManagement.restoreOracleTypeManagementDraft has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 35, if/else 11 (13 pts), loops 2 (nesting depth added 2). Of this number, 29 points are the body's own statements and 21 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · oracleViewRename.executeOracleViewRename (cognitive 50) · ×1
  • oracleViewRename.executeOracleViewRename (cognitive 50) apps/desktop/src/lib/table/oracleViewRename.ts:268 — oracleViewRename.executeOracleViewRename has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.evaluateCondition (cognitive 50) · ×1
  • plDebugStore.evaluateCondition (cognitive 50) apps/desktop/src/stores/plDebugStore.ts:2104 — plDebugStore.evaluateCondition has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 10 (28 pts), if/else 13 (17 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.prepareEditableQueryExecution (cognitive 50) · ×1
  • queryStore.useQueryStore.prepareEditableQueryExecution (cognitive 50) apps/desktop/src/stores/queryStore.ts:7739 — queryStore.useQueryStore.prepareEditableQueryExecution has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 18, ternaries 4 (5 pts), error handling 1 (nesting depth added 8). Of this number, 48 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createMockHost.server (cognitive 50) · ×1
  • server.createMockHost.server (cognitive 50) plugins/sdk/dev-host/server.mjs:474 — server.createMockHost.server has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 15, ternaries 5 (8 pts), loops 1 (2 pts), error handling 1 (nesting depth added 13). Of this number, 37 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TdengineDriver · ×1
  • TdengineDriver::completion_assistant_search (cognitive 49) agents/drivers/tdengine/src/driver.rs:256 — TdengineDriver::completion_assistant_search has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundExecutor.execute (cognitive 49) · ×1
  • BlobBoundExecutor.execute (cognitive 49) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:35 — BlobBoundExecutor.execute has cognitive complexity 49 (threshold 15). Drivers by points: error handling 9 (23 pts), if/else 13 (20 pts), boolean chains 5, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.lobInput (cognitive 49) · ×1
  • PlDebugTarget.lobInput (cognitive 49) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:935 — PlDebugTarget.lobInput has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 5 (13 pts), boolean chains 6, loops 1 (2 pts), error handling 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.sqlRequiresSessionAffinity (cognitive 49) · ×1
  • main.sqlRequiresSessionAffinity (cognitive 49) agents/drivers/vastbase-go/connection_state.go:47 — main.sqlRequiresSessionAffinity has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (30 pts), boolean chains 10, loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.exportQuerySqlDirect (cognitive 49) · ×1
  • queryStore.useQueryStore.exportQuerySqlDirect (cognitive 49) apps/desktop/src/stores/queryStore.ts:11920 — queryStore.useQueryStore.exportQuerySqlDirect has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 11, ternaries 6 (7 pts), error handling 3 (4 pts) (nesting depth added 14). Most of this is not in the body itself: 9 of the 49 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 11998, assertQueuedSourceAvailable, startExport, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Plan · ×1
  • Plan::after_tables (cognitive 48) crates/dbx-core/src/data/transfer/xugu_objects.rs:653 — Plan::after_tables has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (31 pts), match/switch 4 (14 pts), boolean chains 2, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.nativeVariableNames (cognitive 48) · ×1
  • plDebugNativeEntry.nativeVariableNames (cognitive 48) agents/drivers/oracle-go/pldebug_variables.go:11 — plDebugNativeEntry.nativeVariableNames has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 11, loops 3 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.dispatch (cognitive 48) · ×1
  • server.dispatch (cognitive 48) REDACTED:1051 — server.dispatch has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (47 pts), match/switch 1 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · xuguWKBReader.geometry (cognitive 48) · ×1
  • xuguWKBReader.geometry (cognitive 48) agents/drivers/xugu/spatial.go:322 — xuguWKBReader.geometry has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (40 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.oraclePlSqlTokens (cognitive 48) · ×1
  • sqlStatementRanges.oraclePlSqlTokens (cognitive 48) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2755 — sqlStatementRanges.oraclePlSqlTokens has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionParameterDocument.parseConnectionParameters (cognitive 48) · ×1
  • connectionParameterDocument.parseConnectionParameters (cognitive 48) apps/desktop/src/lib/connection/connectionParameterDocument.ts:61 — connectionParameterDocument.parseConnectionParameters has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 6 (11 pts), boolean chains 8, error handling 1 (2 pts), loops 1 (nesting depth added 21). Of this number, 36 points are the body's own statements and 12 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnHighlight.computeColumnHighlightMatchKeys (cognitive 48) · ×1
  • dataGridColumnHighlight.computeColumnHighlightMatchKeys (cognitive 48) apps/desktop/src/lib/dataGrid/dataGridColumnHighlight.ts:91 — dataGridColumnHighlight.computeColumnHighlightMatchKeys has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 30). Of this number, 47 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.parseOracleCachedPlan (cognitive 48) · ×1
  • oracleSessionDiagnostics.parseOracleCachedPlan (cognitive 48) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:163 — oracleSessionDiagnostics.parseOracleCachedPlan has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 11 (20 pts), boolean chains 12, if/else 7 (12 pts), loops 4 (nesting depth added 14). Of this number, 46 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executePreparedTriggerPlan · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan::run (cognitive 48) apps/desktop/src/lib/database/oracleTriggerPlan.ts:268 — oracleTriggerPlan.executePreparedTriggerPlan::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 7 (17 pts), boolean chains 7, error handling 3 (6 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · mongoSql.compileSelect (cognitive 48) · ×1
  • mongoSql.compileSelect (cognitive 48) apps/desktop/src/lib/mongo/mongoSql.ts:671 — mongoSql.compileSelect has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 7 (14 pts), boolean chains 10, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frontendPlugin.buildPluginConnectionConfig (cognitive 48) · ×1
  • frontendPlugin.buildPluginConnectionConfig (cognitive 48) apps/desktop/src/lib/plugins/frontendPlugin.ts:270 — frontendPlugin.buildPluginConnectionConfig has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 24, if/else 14 (20 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlCompletion.scanCteDefinitions (cognitive 48) · ×1
  • sqlCompletion.scanCteDefinitions (cognitive 48) apps/desktop/src/lib/sql/sqlCompletion.ts:4667 — sqlCompletion.scanCteDefinitions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (15 pts), boolean chains 8 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableCopyTaskStore.useTableCopyTaskStore.run (cognitive 48) · ×1
  • tableCopyTaskStore.useTableCopyTaskStore.run (cognitive 48) apps/desktop/src/stores/tableCopyTaskStore.ts:155 — tableCopyTaskStore.useTableCopyTaskStore.run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 7, loops 3 (6 pts), error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 19). Of this number, 33 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startDevelopment (cognitive 48) · ×1
  • startDevelopment (cognitive 48) plugins/sdk/dev-host/runtime.mjs:39 — startDevelopment has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 10, error handling 3 (7 pts), ternaries 4, loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 12 of the 48 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 131, spawnCommand, run, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DbxJdbcPlugin.getObjectSource (cognitive 47) · ×1
  • DbxJdbcPlugin.getObjectSource (cognitive 47) REDACTED:5664 — DbxJdbcPlugin.getObjectSource has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (30 pts), ternaries 3 (8 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.readOracleTNSAliases (cognitive 47) · ×1
  • main.readOracleTNSAliases (cognitive 47) agents/drivers/oracle-go/tns.go:102 — main.readOracleTNSAliases has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 26). Of this number, 40 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · server.getObjectSource (cognitive 47) · ×1
  • server.getObjectSource (cognitive 47) REDACTED:3702 — server.getObjectSource has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 4, loops 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · plDebugNativeEntry.snapshotLocked (cognitive 47) · ×1
  • plDebugNativeEntry.snapshotLocked (cognitive 47) agents/drivers/oracle-go/pldebug_manager.go:274 — plDebugNativeEntry.snapshotLocked has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectSqlRanges (cognitive 47) · ×1
  • sqlSemanticSelectionRanges.collectSqlRanges (cognitive 47) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:331 — sqlSemanticSelectionRanges.collectSqlRanges has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 9, ternaries 3 (9 pts), loops 4 (nesting depth added 20). Of this number, 43 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nacosConfigValidation.validateHtml (cognitive 47) · ×1
  • nacosConfigValidation.validateHtml (cognitive 47) REDACTED:108 — nacosConfigValidation.validateHtml has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.buildCursorIntent (cognitive 47) · ×1
  • model.buildCursorIntent (cognitive 47) apps/desktop/src/lib/sql/semantic/model.ts:988 — model.buildCursorIntent has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 8 (16 pts), boolean chains 14 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.collectSqlServerRoutineParameters (cognitive 47) · ×1
  • sqlCompletion.collectSqlServerRoutineParameters (cognitive 47) apps/desktop/src/lib/sql/sqlCompletion.ts:3278 — sqlCompletion.collectSqlServerRoutineParameters has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 24). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSelectColumnNames (cognitive 47) · ×1
  • sqlCompletion.extractSelectColumnNames (cognitive 47) apps/desktop/src/lib/sql/sqlCompletion.ts:4583 — sqlCompletion.extractSelectColumnNames has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 4 (9 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 27). Of this number, 35 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildColumnItems (cognitive 47) · ×1
  • sqlCompletion.buildColumnItems (cognitive 47) apps/desktop/src/lib/sql/sqlCompletion.ts:6141 — sqlCompletion.buildColumnItems has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (15 pts), ternaries 10 (13 pts), loops 2 (nesting depth added 9). Of this number, 33 points are the body's own statements and 14 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.parseExtraToColumnExtra (cognitive 47) · ×1
  • tableStructureEditorState.parseExtraToColumnExtra (cognitive 47) apps/desktop/src/lib/table/tableStructureEditorState.ts:884 — tableStructureEditorState.parseExtraToColumnExtra has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (43 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTableForLocate (cognitive 47) · ×1
  • connectionStore.useConnectionStore.loadTableForLocate (cognitive 47) apps/desktop/src/stores/connectionStore.ts:8217 — connectionStore.useConnectionStore.loadTableForLocate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 9, ternaries 4 (9 pts), loops 2 (3 pts) (nesting depth added 19). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 8234, 8312, 8269). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · queryStore.useQueryStore.countQueryTotalRowsInBackground (cognitive 47) · ×1
  • queryStore.useQueryStore.countQueryTotalRowsInBackground (cognitive 47) apps/desktop/src/stores/queryStore.ts:8243 — queryStore.useQueryStore.countQueryTotalRowsInBackground has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (29 pts), ternaries 6 (9 pts), boolean chains 8, error handling 1 (nesting depth added 10). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 8290, clearPendingCount). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · main.plDebugNativeMapStack (cognitive 46) · ×1
  • main.plDebugNativeMapStack (cognitive 46) agents/drivers/oracle-go/pldebug_stack.go:111 — main.plDebugNativeMapStack has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 10, loops 2 (nesting depth added 18). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.renderXuguTableDDL (cognitive 46) · ×1
  • main.renderXuguTableDDL (cognitive 46) REDACTED:4742 — main.renderXuguTableDDL has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 5, match/switch 2 (5 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.temporalColumnTypesFromDdl (cognitive 46) · ×1
  • queryResultTransferDdl.temporalColumnTypesFromDdl (cognitive 46) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:90 — queryResultTransferDdl.temporalColumnTypesFromDdl has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 12, ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printRuleList (cognitive 46) · ×1
  • printer.printRuleList (cognitive 46) apps/desktop/src/lib/sql/layout/printer.ts:172 — printer.printRuleList has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 11 (17 pts), boolean chains 11 (nesting depth added 14). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 189, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · oraclePackageSaveAs.prepareOraclePackageSaveAs (cognitive 46) · ×1
  • oraclePackageSaveAs.prepareOraclePackageSaveAs (cognitive 46) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:164 — oraclePackageSaveAs.prepareOraclePackageSaveAs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 5 (15 pts), error handling 5 (10 pts), boolean chains 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.tokenizeXuguRoutineDefinition (cognitive 46) · ×1
  • routineParameters.tokenizeXuguRoutineDefinition (cognitive 46) apps/desktop/src/lib/table/routineParameters.ts:248 — routineParameters.tokenizeXuguRoutineDefinition has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (10 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionColumns (cognitive 46) · ×1
  • connectionStore.useConnectionStore.listCompletionColumns (cognitive 46) apps/desktop/src/stores/connectionStore.ts:10676 — connectionStore.useConnectionStore.listCompletionColumns has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 8 (15 pts), boolean chains 12, error handling 1 (3 pts) (nesting depth added 14). Of this number, 24 points are the body's own statements and 22 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.publishSnapshot (cognitive 46) · ×1
  • plDebugStore.usePlDebugStore.publishSnapshot (cognitive 46) apps/desktop/src/stores/plDebugStore.ts:308 — plDebugStore.usePlDebugStore.publishSnapshot has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 19, ternaries 3, loops 1 (2 pts) (nesting depth added 7). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.createMockHost.api (cognitive 46) · ×1
  • server.createMockHost.api (cognitive 46) plugins/sdk/dev-host/server.mjs:374 — server.createMockHost.api has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 17). Of this number, 17 points are the body's own statements and 29 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runStep (cognitive 46) · ×1
  • runStep (cognitive 46) REDACTED:482 — runStep has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (8 pts), boolean chains 5, other 5, error handling 2 (4 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.listIndexes (cognitive 45) · ×1
  • DbxJdbcPlugin.listIndexes (cognitive 45) REDACTED:3530 — DbxJdbcPlugin.listIndexes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 10, error handling 6 (10 pts), ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.completionAssistantPackageMembers (cognitive 45) · ×1
  • OceanBaseOracleAgent.completionAssistantPackageMembers (cognitive 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:878 — OceanBaseOracleAgent.completionAssistantPackageMembers has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 7 (14 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.load (cognitive 45) · ×1
  • PlDebugTarget.load (cognitive 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1321 — PlDebugTarget.load has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (12 pts), boolean chains 8, ternaries 4 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeSelectConstructor (cognitive 45) · ×1
  • main.plDebugNativeSelectConstructor (cognitive 45) agents/drivers/oracle-go/pldebug_object_select.go:51 — main.plDebugNativeSelectConstructor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 19). Of this number, 42 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gosasl.parseChallenge (cognitive 45) · ×1
  • gosasl.parseChallenge (cognitive 45) REDACTED:198 — gosasl.parseChallenge has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (35 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridConditionHighlight.tokenizeDataGridCondition (cognitive 45) · ×1
  • dataGridConditionHighlight.tokenizeDataGridCondition (cognitive 45) apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts:51 — dataGridConditionHighlight.tokenizeDataGridCondition has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 15, loops 4 (11 pts), if/else 5 (10 pts), ternaries 3 (9 pts) (nesting depth added 18). Of this number, 43 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.parseCteSources (cognitive 45) · ×1
  • model.parseCteSources (cognitive 45) apps/desktop/src/lib/sql/semantic/model.ts:400 — model.parseCteSources has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 5 (10 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 23). Of this number, 44 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.parsePostgresRegclassPrefix (cognitive 45) · ×1
  • sqlCompletion.parsePostgresRegclassPrefix (cognitive 45) apps/desktop/src/lib/sql/sqlCompletion.ts:2489 — sqlCompletion.parsePostgresRegclassPrefix has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 10, loops 4 (8 pts), ternaries 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.replaceReferences (cognitive 45) · ×1
  • sqlVariables.replaceReferences (cognitive 45) apps/desktop/src/lib/sql/sqlVariables.ts:245 — sqlVariables.replaceReferences has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IssueSubmissionLimiter.fetch (cognitive 45) · ×1
  • IssueSubmissionLimiter.fetch (cognitive 45) docs/worker.ts:565 — IssueSubmissionLimiter.fetch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), ternaries 7 (14 pts), boolean chains 4, error handling 1 (nesting depth added 17). Of this number, 29 points are the body's own statements and 16 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeferredLobValues.read (cognitive 44) · ×1
  • DeferredLobValues.read (cognitive 44) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:222 — DeferredLobValues.read has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 7 (9 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlDebugSession.debugBefore (cognitive 44) · ×1
  • PlDebugSession.debugBefore (cognitive 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:525 — PlDebugSession.debugBefore has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 8, ternaries 4 (7 pts), error handling 3, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSource.load (cognitive 44) · ×1
  • PlDebugSource.load (cognitive 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:64 — PlDebugSource.load has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 3 (7 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.appendGraphDisplay (cognitive 44) · ×1
  • main.appendGraphDisplay (cognitive 44) agents/drivers/nebula-go/graph_display.go:20 — main.appendGraphDisplay has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 3 (10 pts), match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.pendingNativeCompletion (cognitive 44) · ×1
  • server.pendingNativeCompletion (cognitive 44) agents/drivers/oracle-go/pldebug_drain.go:76 — server.pendingNativeCompletion has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.writeValue (cognitive 44) · ×1
  • plDebugNativeEntry.writeValue (cognitive 44) REDACTED:75 — plDebugNativeEntry.writeValue has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 10, loops 1 (nesting depth added 7). Of this number, 30 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.checkUpdates (cognitive 44) · ×1
  • useAppUpdater.useAppUpdater.checkUpdates (cognitive 44) apps/desktop/src/composables/useAppUpdater.ts:305 — useAppUpdater.useAppUpdater.checkUpdates has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 13, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xmlFormat.parseXmlDocument (cognitive 44) · ×1
  • xmlFormat.parseXmlDocument (cognitive 44) apps/desktop/src/lib/common/xmlFormat.ts:37 — xmlFormat.parseXmlDocument has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 21). Of this number, 42 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridExecutedQuery.dataGridExecutedQueryConditions (cognitive 44) · ×1
  • dataGridExecutedQuery.dataGridExecutedQueryConditions (cognitive 44) apps/desktop/src/lib/dataGrid/dataGridExecutedQuery.ts:7 — dataGridExecutedQuery.dataGridExecutedQueryConditions has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 15, loops 4 (5 pts), ternaries 2 (nesting depth added 9). Of this number, 40 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cognitive 44) · ×1
  • databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cognitive 44) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:467 — databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 8 (18 pts), loops 3 (7 pts) (nesting depth added 24). Of this number, 42 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · productionSafety.sqlTargetSafetyText (cognitive 44) · ×1
  • productionSafety.sqlTargetSafetyText (cognitive 44) apps/desktop/src/lib/database/productionSafety.ts:276 — productionSafety.sqlTargetSafetyText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cognitive 44) · ×1
  • codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cognitive 44) apps/desktop/src/lib/editor/codemirrorTrimmedSelectionLayer.ts:193 — codemirrorTrimmedSelectionLayer.trimmedSelectionLayer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 25). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mcpCapabilitySearch.searchMcpCapabilities (cognitive 44) · ×1
  • mcpCapabilitySearch.searchMcpCapabilities (cognitive 44) apps/desktop/src/lib/mcp/mcpCapabilitySearch.ts:53 — mcpCapabilitySearch.searchMcpCapabilities has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 5 (9 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 22). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiffDdlNormalize.stripSchemaFromSql (cognitive 44) · ×1
  • schemaDiffDdlNormalize.stripSchemaFromSql (cognitive 44) REDACTED:50 — schemaDiffDdlNormalize.stripSchemaFromSql has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 19). Of this number, 42 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.collectSqlServerLocalVariables (cognitive 44) · ×1
  • sqlCompletion.collectSqlServerLocalVariables (cognitive 44) apps/desktop/src/lib/sql/sqlCompletion.ts:3220 — sqlCompletion.collectSqlServerLocalVariables has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 10, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 18). Of this number, 40 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildObjectItems (cognitive 44) · ×1
  • sqlCompletion.buildObjectItems (cognitive 44) apps/desktop/src/lib/sql/sqlCompletion.ts:5319 — sqlCompletion.buildObjectItems has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 16 (22 pts), boolean chains 20, if/else 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5341, 5335). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlParameters.collectTriggerPseudoRecordFieldStarts (cognitive 44) · ×1
  • sqlParameters.collectTriggerPseudoRecordFieldStarts (cognitive 44) apps/desktop/src/lib/sql/sqlParameters.ts:1031 — sqlParameters.collectTriggerPseudoRecordFieldStarts has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 8, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlRisk.sqlSafetyText (cognitive 44) · ×1
  • sqlRisk.sqlSafetyText (cognitive 44) apps/desktop/src/lib/sql/sqlRisk.ts:252 — sqlRisk.sqlSafetyText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMockHost.api (cognitive 44) · ×1
  • createMockHost.api (cognitive 44) plugins/sdk/dev-host/server.mjs:374 — createMockHost.api has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 17). Of this number, 16 points are the body's own statements and 28 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginManifest · ×1
  • PluginManifest::compatibility (cognitive 43) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1180 — PluginManifest::compatibility has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 3, match/switch 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.isSelectWithClause (cognitive 43) · ×1
  • OceanBaseOracleAgent.isSelectWithClause (cognitive 43) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:277 — OceanBaseOracleAgent.isSelectWithClause has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 10, loops 3 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Loader.ddlSource (cognitive 43) · ×1
  • Loader.ddlSource (cognitive 43) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:223 — Loader.ddlSource has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 3 (10 pts), loops 3 (4 pts), error handling 3, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.renderXuguIndexPartitionDDL (cognitive 43) · ×1
  • main.renderXuguIndexPartitionDDL (cognitive 43) REDACTED:5254 — main.renderXuguIndexPartitionDDL has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryMapPreview.buildGeometryMapFeatureCollection (cognitive 43) · ×1
  • geometryMapPreview.buildGeometryMapFeatureCollection (cognitive 43) apps/desktop/src/lib/dataGrid/geometryMapPreview.ts:44 — geometryMapPreview.buildGeometryMapFeatureCollection has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 3 (6 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.extractActiveDatabase (cognitive 43) · ×1
  • mongoCompletion.extractActiveDatabase (cognitive 43) REDACTED:2526 — mongoCompletion.extractActiveDatabase has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (9 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frontendPlugin.pluginConnectionFormValues (cognitive 43) · ×1
  • frontendPlugin.pluginConnectionFormValues (cognitive 43) apps/desktop/src/lib/plugins/frontendPlugin.ts:252 — frontendPlugin.pluginConnectionFormValues has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 8 (36 pts), if/else 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · treeNodeClick.treeNodeRowDoubleClickAction (cognitive 43) · ×1
  • treeNodeClick.treeNodeRowDoubleClickAction (cognitive 43) apps/desktop/src/lib/sidebar/treeNodeClick.ts:196 — treeNodeClick.treeNodeRowDoubleClickAction has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 4 (12 pts), boolean chains 7 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.activeSingleQuotedLiteralStart (cognitive 43) · ×1
  • sqlCompletion.activeSingleQuotedLiteralStart (cognitive 43) apps/desktop/src/lib/sql/sqlCompletion.ts:2428 — sqlCompletion.activeSingleQuotedLiteralStart has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.validateDependentDeclaration (cognitive 43) · ×1
  • oracleTableRename.validateDependentDeclaration (cognitive 43) REDACTED:282 — oracleTableRename.validateDependentDeclaration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 11, ternaries 5 (6 pts), loops 1 (nesting depth added 14). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IssueSubmissionClient.IssueSubmissionClient (cognitive 43) · ×1
  • IssueSubmissionClient.IssueSubmissionClient (cognitive 43) docs/components/issues/IssueSubmissionClient.tsx:168 — IssueSubmissionClient.IssueSubmissionClient has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (15 pts), ternaries 8 (13 pts), boolean chains 11, error handling 4 (nesting depth added 6). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 11 function items inside it that branch (generateDraft, parseResponse, submitIssue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SshConfigLoader · ×1
  • SshConfigLoader::parse_lines (cognitive 42) crates/dbx-driver-support/src/ssh_config.rs:343 — SshConfigLoader::parse_lines has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.readValue (cognitive 42) · ×1
  • DbxJdbcPlugin.readValue (cognitive 42) REDACTED:6283 — DbxJdbcPlugin.readValue has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.pumpLongPollWatch (cognitive 42) · ×1
  • main.pumpLongPollWatch (cognitive 42) agents/drivers/etcd2-go/watch.go:273 — main.pumpLongPollWatch has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeObjectCallables (cognitive 42) · ×1
  • main.plDebugNativeObjectCallables (cognitive 42) agents/drivers/oracle-go/pldebug_object_constructors.go:90 — main.plDebugNativeObjectCallables has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (10 pts), boolean chains 7 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugRecordDecoder.leaf (cognitive 42) · ×1
  • plDebugRecordDecoder.leaf (cognitive 42) agents/drivers/oracle-go/pldebug_record_input.go:204 — plDebugRecordDecoder.leaf has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (38 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.stripOceanBaseOracleStorageOptions (cognitive 42) · ×1
  • ddlStorage.stripOceanBaseOracleStorageOptions (cognitive 42) apps/desktop/src/lib/sql/ddlStorage.ts:91 — ddlStorage.stripOceanBaseOracleStorageOptions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 3 (9 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cognitive 42) · ×1
  • useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cognitive 42) apps/desktop/src/composables/useDataGridActions.ts:176 — useDataGridActions.useDataGridActions.refreshDataTabTableMeta has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 12, if/else 8 (nesting depth added 11). Of this number, 16 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.executeOracleIndexPlan (cognitive 42) · ×1
  • oracleIndexes.executeOracleIndexPlan (cognitive 42) apps/desktop/src/lib/database/oracleIndexes.ts:379 — oracleIndexes.executeOracleIndexPlan has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triggerToggleSql.buildTriggerToggleSql (cognitive 42) · ×1
  • triggerToggleSql.buildTriggerToggleSql (cognitive 42) apps/desktop/src/lib/database/triggerToggleSql.ts:29 — triggerToggleSql.buildTriggerToggleSql has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 8 (14 pts), boolean chains 10, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.parseDamengExplainText (cognitive 42) · ×1
  • explainPlan.parseDamengExplainText (cognitive 42) apps/desktop/src/lib/diagram/explainPlan.ts:89 — explainPlan.parseDamengExplainText has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (27 pts), ternaries 4 (7 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.parseRowSourcesAtDepth (cognitive 42) · ×1
  • model.parseRowSourcesAtDepth (cognitive 42) apps/desktop/src/lib/sql/semantic/model.ts:705 — model.parseRowSourcesAtDepth has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractReferencedTables (cognitive 42) · ×1
  • sqlCompletion.extractReferencedTables (cognitive 42) apps/desktop/src/lib/sql/sqlCompletion.ts:4199 — sqlCompletion.extractReferencedTables has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 10 (23 pts), boolean chains 10, if/else 4 (8 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectNativeSqlServerParameters (cognitive 42) · ×1
  • sqlParameters.collectNativeSqlServerParameters (cognitive 42) apps/desktop/src/lib/sql/sqlParameters.ts:1380 — sqlParameters.collectNativeSqlServerParameters has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.columnDataTypeForEditor (cognitive 42) · ×1
  • tableStructureEditorState.columnDataTypeForEditor (cognitive 42) apps/desktop/src/lib/table/tableStructureEditorState.ts:1082 — tableStructureEditorState.columnDataTypeForEditor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 12, ternaries 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLegacyCollectionFromSource (cognitive 41) · ×1
  • main.plDebugLegacyCollectionFromSource (cognitive 41) agents/drivers/oracle-go/pldebug_legacy_declarations.go:126 — main.plDebugLegacyCollectionFromSource has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.openClient (cognitive 41) · ×1
  • main.openClient (cognitive 41) agents/drivers/zookeeper/connection.go:151 — main.openClient has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cognitive 41) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cognitive 41) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1631 — useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 20). Of this number, 39 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGenerateSession.streamInsertTable (cognitive 41) · ×1
  • useDataGenerateSession.streamInsertTable (cognitive 41) apps/desktop/src/composables/useDataGenerateSession.ts:161 — useDataGenerateSession.streamInsertTable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 7, error handling 2 (3 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cognitive 41) · ×1
  • useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cognitive 41) apps/desktop/src/composables/useDataGridExport.ts:2453 — useDataGridExport.useDataGridExport.exportFullTableDataViaBackend has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 19 (20 pts), boolean chains 11, if/else 8 (10 pts) (nesting depth added 3). Of this number, 37 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDialogSources.useDialogSources (cognitive 41) · ×1
  • useDialogSources.useDialogSources (cognitive 41) apps/desktop/src/composables/useDialogSources.ts:165 — useDialogSources.useDialogSources has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (41 pts) (nesting depth added 20). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 20 function literals inside it that branch (lines 176, 193, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · regexGenerate.parseClass (cognitive 41) · ×1
  • regexGenerate.parseClass (cognitive 41) REDACTED:190 — regexGenerate.parseClass has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (33 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 20). Of this number, 37 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.tokenizeSelectionIdentifiers (cognitive 41) · ×1
  • sqlIntentionActions.tokenizeSelectionIdentifiers (cognitive 41) apps/desktop/src/lib/editor/sqlIntentionActions.ts:292 — sqlIntentionActions.tokenizeSelectionIdentifiers has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphSignatureHelp.getGraphFunctionSignatureHelp (cognitive 41) · ×1
  • graphSignatureHelp.getGraphFunctionSignatureHelp (cognitive 41) apps/desktop/src/lib/graph/graphSignatureHelp.ts:6 — graphSignatureHelp.getGraphFunctionSignatureHelp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 11, ternaries 3 (5 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryCursorOffsetPagination.executeCursorOffsetPage (cognitive 41) · ×1
  • queryCursorOffsetPagination.executeCursorOffsetPage (cognitive 41) apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:4 — queryCursorOffsetPagination.executeCursorOffsetPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 3 (6 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.sortRedisTreeLevelCooperatively (cognitive 41) · ×1
  • redisKeyTree.sortRedisTreeLevelCooperatively (cognitive 41) apps/desktop/src/lib/redis/redisKeyTree.ts:242 — redisKeyTree.sortRedisTreeLevelCooperatively has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 7 (14 pts), boolean chains 9 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.stepLexState (cognitive 41) · ×1
  • insertValueHints.stepLexState (cognitive 41) apps/desktop/src/lib/sql/insertValueHints.ts:452 — insertValueHints.stepLexState has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.scanSelectListContext (cognitive 41) · ×1
  • sqlCompletion.scanSelectListContext (cognitive 41) apps/desktop/src/lib/sql/sqlCompletion.ts:3621 — sqlCompletion.scanSelectListContext has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectSelectAssignmentVariables (cognitive 41) · ×1
  • sqlParameters.collectSelectAssignmentVariables (cognitive 41) apps/desktop/src/lib/sql/sqlParameters.ts:1538 — sqlParameters.collectSelectAssignmentVariables has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 10, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableSelectSql.sqlCteVisibilities (cognitive 41) · ×1
  • tableSelectSql.sqlCteVisibilities (cognitive 41) apps/desktop/src/lib/table/tableSelectSql.ts:335 — tableSelectSql.sqlCteVisibilities has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.refreshSidebarObjectPagination · ×1
  • connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes (cognitive 41) apps/desktop/src/stores/connectionStore.ts:11464 — connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 5, loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.refreshDataTabInternal (cognitive 41) · ×1
  • queryStore.useQueryStore.refreshDataTabInternal (cognitive 41) apps/desktop/src/stores/queryStore.ts:5930 — queryStore.useQueryStore.refreshDataTabInternal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 11, error handling 3 (4 pts), ternaries 3 (nesting depth added 8). Of this number, 39 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsStore.normalizeMcpGlobalPolicy (cognitive 41) · ×1
  • settingsStore.normalizeMcpGlobalPolicy (cognitive 41) apps/desktop/src/stores/settingsStore.ts:212 — settingsStore.normalizeMcpGlobalPolicy has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 24, ternaries 11 (13 pts), if/else 4 (nesting depth added 2). Of this number, 17 points are the body's own statements and 24 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SnippetSyncClient · ×1
  • SnippetSyncClient::put_snapshot_with_expected_remote_hash (cognitive 40) crates/dbx-core/src/persistence/cloud_sync.rs:2061 — SnippetSyncClient::put_snapshot_with_expected_remote_hash has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 3, match/switch 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.stripCommentsAndLiterals (cognitive 40) · ×1
  • DbxJdbcPlugin.stripCommentsAndLiterals (cognitive 40) REDACTED:2839 — DbxJdbcPlugin.stripCommentsAndLiterals has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.requiresTypedLobConnection (cognitive 40) · ×1
  • PlDebugTarget.requiresTypedLobConnection (cognitive 40) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:113 — PlDebugTarget.requiresTypedLobConnection has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 12, loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listIndexesWithoutOrdinality (cognitive 40) · ×1
  • server.listIndexesWithoutOrdinality (cognitive 40) REDACTED:2227 — server.listIndexesWithoutOrdinality has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugDecodeCollectionEnvelope (cognitive 40) · ×1
  • main.plDebugDecodeCollectionEnvelope (cognitive 40) agents/drivers/oracle-go/pldebug_collection_input.go:130 — main.plDebugDecodeCollectionEnvelope has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.executeTarget (cognitive 40) · ×1
  • plDebugNativeEntry.executeTarget (cognitive 40) agents/drivers/oracle-go/pldebug_manager.go:618 — plDebugNativeEntry.executeTarget has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 14). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 621, 682, 672). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.convertObjectKeyedInt64Map (cognitive 40) · ×1
  • main.convertObjectKeyedInt64Map (cognitive 40) REDACTED:403 — main.convertObjectKeyedInt64Map has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 6 (11 pts), boolean chains 9 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridPaintTheme.resolveDataGridPaintTheme (cognitive 40) · ×1
  • dataGridPaintTheme.resolveDataGridPaintTheme (cognitive 40) apps/desktop/src/lib/dataGrid/dataGridPaintTheme.ts:270 — dataGridPaintTheme.resolveDataGridPaintTheme has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 39, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cognitive 40) · ×1
  • oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cognitive 40) REDACTED:376 — oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 6 (13 pts), boolean chains 8, error handling 4 (6 pts) (nesting depth added 10). Of this number, 39 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executePreparedTriggerPlan (cognitive 40) · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan (cognitive 40) apps/desktop/src/lib/database/oracleTriggerPlan.ts:257 — oracleTriggerPlan.executePreparedTriggerPlan has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (30 pts), ternaries 9 (22 pts), error handling 7 (14 pts), boolean chains 12, loops 5 (10 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sidebarTableSearchControl.resolveLocalTableSearchParent (cognitive 40) · ×1
  • sidebarTableSearchControl.resolveLocalTableSearchParent (cognitive 40) apps/desktop/src/lib/sidebar/sidebarTableSearchControl.ts:42 — sidebarTableSearchControl.resolveLocalTableSearchParent has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · insertValueHints.selectProjectionStarts (cognitive 40) · ×1
  • insertValueHints.selectProjectionStarts (cognitive 40) apps/desktop/src/lib/sql/insertValueHints.ts:222 — insertValueHints.selectProjectionStarts has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · primitives.renderInline (cognitive 40) · ×1
  • primitives.renderInline (cognitive 40) apps/desktop/src/lib/sql/layout/primitives.ts:464 — primitives.renderInline has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateRecord (cognitive 40) · ×1
  • validateRecord (cognitive 40) plugins/sdk/dev-host/connections.mjs:13 — validateRecord has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (16 pts), ternaries 2 (6 pts), loops 1, other 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoutineOperationRegistry · ×1
  • RoutineOperationRegistry::prepare_batch (cognitive 39) crates/dbx-core/src/schema/oracle_routines/operations/retention.rs:186 — RoutineOperationRegistry::prepare_batch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 6 (7 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.brokerEndpoints (cognitive 39) · ×1
  • KafkaAgent.brokerEndpoints (cognitive 39) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:437 — KafkaAgent.brokerEndpoints has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 4 (8 pts), boolean chains 7, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.select (cognitive 39) · ×1
  • PlDebugObjectConstructors.select (cognitive 39) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:98 — PlDebugObjectConstructors.select has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kerberosConfig.finalize (cognitive 39) · ×1
  • kerberosConfig.finalize (cognitive 39) agents/drivers/cassandra-go/kerberos.go:89 — kerberosConfig.finalize has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.status (cognitive 39) · ×1
  • etcdSession.status (cognitive 39) agents/drivers/etcd-go/status.go:12 — etcdSession.status has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (13 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLegacyCollectionElementMatches (cognitive 39) · ×1
  • main.plDebugLegacyCollectionElementMatches (cognitive 39) agents/drivers/oracle-go/pldebug_legacy_type_graph.go:72 — main.plDebugLegacyCollectionElementMatches has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 9, loops 2 (3 pts), match/switch 1 (nesting depth added 14). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.dispatch (cognitive 39) · ×1
  • server.dispatch (cognitive 39) REDACTED:1107 — server.dispatch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cognitive 39) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cognitive 39) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:522 — useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 12 (18 pts), if/else 10 (15 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.escapedTextLiteral (cognitive 39) · ×1
  • queryResultTransferValues.escapedTextLiteral (cognitive 39) apps/desktop/src/components/transfer/queryResultTransferValues.ts:272 — queryResultTransferValues.escapedTextLiteral has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 3 (9 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 18). Of this number, 32 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cognitive 39) · ×1
  • useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cognitive 39) apps/desktop/src/composables/useDataGridExport.ts:2708 — useDataGridExport.useDataGridExport.exportQueryResultViaBackend has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 12, boolean chains 9, error handling 1 (nesting depth added 4). Of this number, 33 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · regexGenerate.pickFromClass (cognitive 39) · ×1
  • regexGenerate.pickFromClass (cognitive 39) REDACTED:95 — regexGenerate.pickFromClass has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (16 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbAdminSql.buildDuplicateTableStructurePlan (cognitive 39) · ×1
  • dbAdminSql.buildDuplicateTableStructurePlan (cognitive 39) apps/desktop/src/lib/database/dbAdminSql.ts:263 — dbAdminSql.buildDuplicateTableStructurePlan has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, ternaries 6 (11 pts), if/else 7 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cognitive 39) · ×1
  • oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cognitive 39) apps/desktop/src/lib/database/oracleForeignKeys.ts:312 — oracleForeignKeys.readOracleForeignKeyReferenceSnapshot has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, if/else 6 (11 pts), ternaries 6 (7 pts), loops 1 (2 pts) (nesting depth added 7). Of this number, 38 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · mongoCompletion.collectScopeVariables (cognitive 39) · ×1
  • mongoCompletion.collectScopeVariables (cognitive 39) REDACTED:1109 — mongoCompletion.collectScopeVariables has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printClause (cognitive 39) · ×1
  • printer.printClause (cognitive 39) apps/desktop/src/lib/sql/layout/printer.ts:57 — printer.printClause has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 8, ternaries 4 (7 pts) (nesting depth added 9). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 85, 99). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.parseTrailingIdentifierContext (cognitive 39) · ×1
  • sqlCompletion.parseTrailingIdentifierContext (cognitive 39) apps/desktop/src/lib/sql/sqlCompletion.ts:3457 — sqlCompletion.parseTrailingIdentifierContext has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 8 (14 pts), boolean chains 8, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.parseTrailingIdentifierPart (cognitive 39) · ×1
  • sqlCompletion.parseTrailingIdentifierPart (cognitive 39) apps/desktop/src/lib/sql/sqlCompletion.ts:3518 — sqlCompletion.parseTrailingIdentifierPart has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.searchSidebarObjects (cognitive 39) · ×1
  • connectionStore.useConnectionStore.searchSidebarObjects (cognitive 39) apps/desktop/src/stores/connectionStore.ts:3273 — connectionStore.useConnectionStore.searchSidebarObjects has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 5 (9 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 15). Of this number, 27 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.connect (cognitive 39) · ×1
  • connectionStore.useConnectionStore.connect (cognitive 39) apps/desktop/src/stores/connectionStore.ts:5556 — connectionStore.useConnectionStore.connect has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 13, error handling 2 (nesting depth added 5). Of this number, 36 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveResultMetadataForBatch (cognitive 39) · ×1
  • queryStore.useQueryStore.resolveResultMetadataForBatch (cognitive 39) apps/desktop/src/stores/queryStore.ts:10954 — queryStore.useQueryStore.resolveResultMetadataForBatch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 9, ternaries 3 (6 pts), loops 1 (nesting depth added 15). Of this number, 33 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PluginPackageInstaller · ×1
  • PluginPackageInstaller::install_bytes_locked (cognitive 38) crates/dbx-plugin-runtime/src/plugins/installer.rs:529 — PluginPackageInstaller::install_bytes_locked has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (31 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleListIndexes (cognitive 38) · ×1
  • DbxJdbcPlugin.oracleListIndexes (cognitive 38) REDACTED:5554 — DbxJdbcPlugin.oracleListIndexes has cognitive complexity 38 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 11, ternaries 3 (7 pts), error handling 3 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.summaries (cognitive 38) · ×1
  • OracleTriggerMetadataReader.summaries (cognitive 38) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:146 — OracleTriggerMetadataReader.summaries has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 6 (12 pts), boolean chains 7, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseConnectionConfig (cognitive 38) · ×1
  • main.parseConnectionConfig (cognitive 38) agents/drivers/hive-go/config.go:145 — main.parseConnectionConfig has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.rewriteNativeConnectionStringSSLMode (cognitive 38) · ×1
  • main.rewriteNativeConnectionStringSSLMode (cognitive 38) agents/drivers/kingbase-go/main.go:1466 — main.rewriteNativeConnectionStringSSLMode has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 4 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.listProducers (cognitive 38) · ×1
  • rocketMQAgent.listProducers (cognitive 38) REDACTED:27 — rocketMQAgent.listProducers has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 6 (12 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSessionDiagnostics.useSessionDiagnostics.refresh (cognitive 38) · ×1
  • useSessionDiagnostics.useSessionDiagnostics.refresh (cognitive 38) apps/desktop/src/composables/useSessionDiagnostics.ts:40 — useSessionDiagnostics.useSessionDiagnostics.refresh has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 3 (7 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 14). Of this number, 34 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cognitive 38) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cognitive 38) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:399 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 8 (12 pts), boolean chains 7, error handling 1 (nesting depth added 10). Of this number, 22 points are the body's own statements and 16 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.buildDocumentFilterCondition (cognitive 38) · ×1
  • documentStoreProvider.buildDocumentFilterCondition (cognitive 38) apps/desktop/src/lib/app/documentStoreProvider.ts:560 — documentStoreProvider.buildDocumentFilterCondition has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 5 (8 pts), boolean chains 6, match/switch 1 (nesting depth added 13). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeSnapshot.snapshotElementToPng (cognitive 38) · ×1
  • codeSnapshot.snapshotElementToPng (cognitive 38) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:343 — codeSnapshot.snapshotElementToPng has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 17, if/else 7 (13 pts), ternaries 6, error handling 1 (2 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.splitMongoSemicolonSeparatedSegments (cognitive 38) · ×1
  • mongoShellCommand.splitMongoSemicolonSeparatedSegments (cognitive 38) REDACTED:1465 — mongoShellCommand.splitMongoSemicolonSeparatedSegments has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 10, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cognitive 38) · ×1
  • oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cognitive 38) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:275 — oraclePackageSaveAs.executePreparedOraclePackageSaveAs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 9, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 6). Of this number, 35 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleRoutineRename.prepareOracleRoutineRename (cognitive 38) · ×1
  • oracleRoutineRename.prepareOracleRoutineRename (cognitive 38) apps/desktop/src/lib/table/oracleRoutineRename.ts:253 — oracleRoutineRename.prepareOracleRoutineRename has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (33 pts), error handling 7 (11 pts), boolean chains 8, ternaries 2 (5 pts), loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SqlScanner · ×1
  • SqlScanner::step (cognitive 37) REDACTED:3326 — SqlScanner::step has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 16, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.getExplainInfo (cognitive 37) · ×1
  • DbxJdbcPlugin.getExplainInfo (cognitive 37) REDACTED:2334 — DbxJdbcPlugin.getExplainInfo has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 5 (12 pts), loops 2 (5 pts), boolean chains 2, ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.listConsumerGroups (cognitive 37) · ×1
  • KafkaAgent.listConsumerGroups (cognitive 37) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1130 — KafkaAgent.listConsumerGroups has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (13 pts), error handling 3 (9 pts), if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.peekMessages (cognitive 37) · ×1
  • KafkaAgent.peekMessages (cognitive 37) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1699 — KafkaAgent.peekMessages has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 7 (11 pts), ternaries 4 (7 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlDebugTarget.inputPayloadBytes (cognitive 37) · ×1
  • PlDebugTarget.inputPayloadBytes (cognitive 37) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:908 — PlDebugTarget.inputPayloadBytes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · main.parseConnectionConfig (cognitive 37) · ×1
  • main.parseConnectionConfig (cognitive 37) agents/drivers/argo-go/config.go:142 — main.parseConnectionConfig has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLegacyPackageDeclarations (cognitive 37) · ×1
  • main.plDebugLegacyPackageDeclarations (cognitive 37) agents/drivers/oracle-go/pldebug_legacy_declarations.go:19 — main.plDebugLegacyPackageDeclarations has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugDecodeTimezoneInput (cognitive 37) · ×1
  • main.plDebugDecodeTimezoneInput (cognitive 37) agents/drivers/oracle-go/pldebug_timezone.go:57 — main.plDebugDecodeTimezoneInput has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 12). Of this number, 33 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.awaitNativeDrain (cognitive 37) · ×1
  • runtimeServer.awaitNativeDrain (cognitive 37) agents/drivers/oracle-go/pldebug_drain.go:8 — runtimeServer.awaitNativeDrain has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 7 (15 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeCapture.finishReferences (cognitive 37) · ×1
  • plDebugNativeCapture.finishReferences (cognitive 37) agents/drivers/oracle-go/pldebug_output.go:271 — plDebugNativeCapture.finishReferences has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 8, loops 2 (nesting depth added 10). Of this number, 35 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.connectProxy (cognitive 37) · ×1
  • rocketMQAgent.connectProxy (cognitive 37) agents/drivers/rocketmq/proxy.go:427 — rocketMQAgent.connectProxy has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onSort (cognitive 37) · ×1
  • useDataGridActions.useDataGridActions.onSort (cognitive 37) apps/desktop/src/composables/useDataGridActions.ts:771 — useDataGridActions.useDataGridActions.onSort has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 8 (16 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.submitBackendExport · ×1
  • useDataGridExport.useDataGridExport.submitBackendExport::execute (cognitive 37) apps/desktop/src/composables/useDataGridExport.ts:2629 — useDataGridExport.useDataGridExport.submitBackendExport::execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 8, ternaries 3 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryPreview.drawGroups (cognitive 37) · ×1
  • geometryPreview.drawGroups (cognitive 37) apps/desktop/src/lib/dataGrid/geometryPreview.ts:135 — geometryPreview.drawGroups has cognitive complexity 37 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 9 (15 pts), boolean chains 2 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · joinedRowChanges.joinedRowChanges (cognitive 37) · ×1
  • joinedRowChanges.joinedRowChanges (cognitive 37) apps/desktop/src/lib/dataGrid/joinedRowChanges.ts:54 — joinedRowChanges.joinedRowChanges has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (26 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 22). Of this number, 21 points are the body's own statements and 16 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · anotherRedisImport.connection (cognitive 37) · ×1
  • anotherRedisImport.connection (cognitive 37) apps/desktop/src/lib/imports/anotherRedisImport.ts:32 — anotherRedisImport.connection has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 12, ternaries 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.getMongoCompletionContext (cognitive 37) · ×1
  • mongoCompletion.getMongoCompletionContext (cognitive 37) REDACTED:368 — mongoCompletion.getMongoCompletionContext has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (20 pts), if/else 12 (13 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · model.cteBodyProjectionShape (cognitive 37) · ×1
  • model.cteBodyProjectionShape (cognitive 37) apps/desktop/src/lib/sql/semantic/model.ts:274 — model.cteBodyProjectionShape has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildForeignKeyRelatedTableItems (cognitive 37) · ×1
  • sqlCompletion.buildForeignKeyRelatedTableItems (cognitive 37) apps/desktop/src/lib/sql/sqlCompletion.ts:5217 — sqlCompletion.buildForeignKeyRelatedTableItems has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 9, loops 3 (6 pts), ternaries 5 (6 pts) (nesting depth added 15). Of this number, 25 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cognitive 37) · ×1
  • starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cognitive 37) apps/desktop/src/lib/table/starrocksLayoutCopy.ts:43 — starrocksLayoutCopy.buildStarRocksLayoutCopyDdl has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 11, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 10). Of this number, 21 points are the body's own statements and 16 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.shellConstructorToExtendedJson (cognitive 37) · ×1
  • json.shellConstructorToExtendedJson (cognitive 37) packages/mongo-shell/src/json.ts:638 — json.shellConstructorToExtendedJson has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 7 (13 pts), boolean chains 7, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentDriverClient · ×1
  • AgentDriverClient::call_typed_with_timeout_and_cancel (cognitive 36) crates/dbx-driver-agent/src/agent_driver.rs:2259 — AgentDriverClient::call_typed_with_timeout_and_cancel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 8 (15 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DamengAgent.getExplainInfo (cognitive 36) · ×1
  • DamengAgent.getExplainInfo (cognitive 36) REDACTED:3559 — DamengAgent.getExplainInfo has cognitive complexity 36 (threshold 15). Drivers by points: error handling 6 (14 pts), if/else 9 (14 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getColumnsInContext (cognitive 36) · ×1
  • OceanBaseOracleAgent.getColumnsInContext (cognitive 36) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1607 — OceanBaseOracleAgent.getColumnsInContext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.hasTopLevelSQLKeyword (cognitive 36) · ×1
  • main.hasTopLevelSQLKeyword (cognitive 36) agents/drivers/kingbase-go/main.go:2088 — main.hasTopLevelSQLKeyword has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (30 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-schema-objects.main (cognitive 36) · ×1
  • verify-schema-objects.main (cognitive 36) REDACTED:10 — verify-schema-objects.main has cognitive complexity 36 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 11 (12 pts), boolean chains 6, ternaries 3 (4 pts), loops 1 (nesting depth added 8). Of this number, 26 points are the body's own statements and 10 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor (cognitive 36) · ×1
  • useDataGridEditor.useDataGridEditor (cognitive 36) apps/desktop/src/composables/useDataGridEditor.ts:394 — useDataGridEditor.useDataGridEditor has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 16 points are the body's own statements and 20 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cognitive 36) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cognitive 36) apps/desktop/src/composables/useDataGridLargeValues.ts:549 — useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 17). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cognitive 36) · ×1
  • useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cognitive 36) apps/desktop/src/composables/useMultiDbTargetSelection.ts:241 — useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 5, error handling 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cognitive 36) · ×1
  • useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cognitive 36) apps/desktop/src/composables/useScheduledDatabaseBackups.ts:26 — useScheduledDatabaseBackups.useScheduledDatabaseBackups.update has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 6 (14 pts), boolean chains 5, loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · http.aiAgentStream (cognitive 36) · ×1
  • http.aiAgentStream (cognitive 36) apps/desktop/src/lib/backend/http.ts:2480 — http.aiAgentStream has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (25 pts), error handling 1 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridClipboard.prepareDataGridClipboard (cognitive 36) · ×1
  • dataGridClipboard.prepareDataGridClipboard (cognitive 36) apps/desktop/src/lib/dataGrid/dataGridClipboard.ts:65 — dataGridClipboard.prepareDataGridClipboard has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 14). Of this number, 32 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.readBracketedGroup (cognitive 36) · ×1
  • dataGridInsertPaste.readBracketedGroup (cognitive 36) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:128 — dataGridInsertPaste.readBracketedGroup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 5, loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cognitive 36) · ×1
  • legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cognitive 36) apps/desktop/src/lib/dataGrid/legacyLargeValueExport.ts:98 — legacyLargeValueExport.fetchLegacyLargeValueRequestChunk has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 10 (12 pts), boolean chains 8, loops 2 (nesting depth added 7). Of this number, 25 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.expressionTokens (cognitive 36) · ×1
  • oracleConstraints.expressionTokens (cognitive 36) apps/desktop/src/lib/database/oracleConstraints.ts:194 — oracleConstraints.expressionTokens has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSecurity.oracleGrantSources (cognitive 36) · ×1
  • oracleSecurity.oracleGrantSources (cognitive 36) apps/desktop/src/lib/database/oracleSecurity.ts:186 — oracleSecurity.oracleGrantSources has cognitive complexity 36 (threshold 15). Drivers by points: if/else 3 (12 pts), ternaries 4 (12 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.xuguGrantSql (cognitive 36) · ×1
  • xuguUserPermissions.xuguGrantSql (cognitive 36) apps/desktop/src/lib/database/xuguUserPermissions.ts:580 — xuguUserPermissions.xuguGrantSql has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · match-engine.inferRelationships (cognitive 36) · ×1
  • match-engine.inferRelationships (cognitive 36) apps/desktop/src/lib/diagram/match-engine.ts:9 — match-engine.inferRelationships has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (21 pts), ternaries 3 (12 pts), loops 2 (3 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · keyboardShortcuts.matchesShortcut (cognitive 36) · ×1
  • keyboardShortcuts.matchesShortcut (cognitive 36) apps/desktop/src/lib/editor/keyboardShortcuts.ts:223 — keyboardShortcuts.matchesShortcut has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 12 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginAiCompletion.createPluginAiCompletion.runGeneration (cognitive 36) · ×1
  • pluginAiCompletion.createPluginAiCompletion.runGeneration (cognitive 36) apps/desktop/src/lib/plugins/pluginAiCompletion.ts:131 — pluginAiCompletion.createPluginAiCompletion.runGeneration has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4, error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 12). Of this number, 31 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandTokenizer.tokenizeRedisLine (cognitive 36) · ×1
  • redisCommandTokenizer.tokenizeRedisLine (cognitive 36) apps/desktop/src/lib/redis/redisCommandTokenizer.ts:28 — redisCommandTokenizer.tokenizeRedisLine has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 3 (nesting depth added 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solrAdmin.buildSolrQuery (cognitive 36) · ×1
  • solrAdmin.buildSolrQuery (cognitive 36) apps/desktop/src/lib/solr/solrAdmin.ts:302 — solrAdmin.buildSolrQuery has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 10). Of this number, 31 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.needsSpace (cognitive 36) · ×1
  • cypherFormatter.needsSpace (cognitive 36) apps/desktop/src/lib/sql/cypherFormatter.ts:318 — cypherFormatter.needsSpace has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.buildSqlSemanticDiagnostics (cognitive 36) · ×1
  • diagnostics.buildSqlSemanticDiagnostics (cognitive 36) apps/desktop/src/lib/sql/semantic/diagnostics.ts:268 — diagnostics.buildSqlSemanticDiagnostics has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 5, boolean chains 3, ternaries 2 (3 pts) (nesting depth added 14). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · locate (cognitive 36) · ×1
  • locate (cognitive 36) REDACTED:316 — locate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 5 (7 pts), ternaries 3, error handling 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 16 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.isIgnorableDbmsOutputError (cognitive 35) · ×1
  • DamengAgent.isIgnorableDbmsOutputError (cognitive 35) REDACTED:410 — DamengAgent.isIgnorableDbmsOutputError has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.queryConstrainedTables (cognitive 35) · ×1
  • DamengAgent.queryConstrainedTables (cognitive 35) REDACTED:606 — DamengAgent.queryConstrainedTables has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.requireInputAdapter (cognitive 35) · ×1
  • PlDebugCompositeInput.requireInputAdapter (cognitive 35) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:70 — PlDebugCompositeInput.requireInputAdapter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.helperDeclarations (cognitive 35) · ×1
  • PlDebugCompositeOutput.helperDeclarations (cognitive 35) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — PlDebugCompositeOutput.helperDeclarations has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 8 (24 pts), if/else 5 (8 pts), loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.listACLs (cognitive 35) · ×1
  • rocketMQAgent.listACLs (cognitive 35) agents/drivers/rocketmq/acl.go:30 — rocketMQAgent.listACLs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · krb5.newInitiatorClient (cognitive 35) · ×1
  • krb5.newInitiatorClient (cognitive 35) agents/go-common/go-gssapi/krb5/krb5.go:807 — krb5.newInitiatorClient has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportXlsxResult (cognitive 35) · ×1
  • useDataGridExport.useDataGridExport.exportXlsxResult (cognitive 35) apps/desktop/src/composables/useDataGridExport.ts:1866 — useDataGridExport.useDataGridExport.exportXlsxResult has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 11, ternaries 2 (3 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1872, 1911). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useQuickOpen.useQuickOpen.remoteSearchContexts (cognitive 35) · ×1
  • useQuickOpen.useQuickOpen.remoteSearchContexts (cognitive 35) apps/desktop/src/composables/useQuickOpen.ts:836 — useQuickOpen.useQuickOpen.remoteSearchContexts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (8 pts) (nesting depth added 17). Of this number, 33 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeJsonFormat.myersDiff (cognitive 35) · ×1
  • safeJsonFormat.myersDiff (cognitive 35) REDACTED:303 — safeJsonFormat.myersDiff has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 6 (10 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.parseConnectionDeepLinkUpdate (cognitive 35) · ×1
  • connectionDeepLink.parseConnectionDeepLinkUpdate (cognitive 35) REDACTED:113 — connectionDeepLink.parseConnectionDeepLinkUpdate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 5, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnFilter.unwrapOuterParentheses (cognitive 35) · ×1
  • dataGridColumnFilter.unwrapOuterParentheses (cognitive 35) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:85 — dataGridColumnFilter.unwrapOuterParentheses has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataDictionaryExportTask.startDataDictionaryExport (cognitive 35) · ×1
  • dataDictionaryExportTask.startDataDictionaryExport (cognitive 35) apps/desktop/src/lib/docs/dataDictionaryExportTask.ts:36 — dataDictionaryExportTask.startDataDictionaryExport has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 5 (11 pts), boolean chains 7, error handling 2 (3 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 43, 91, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectExpressionSection (cognitive 35) · ×1
  • sqlSemanticSelectionRanges.collectExpressionSection (cognitive 35) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:247 — sqlSemanticSelectionRanges.collectExpressionSection has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 12). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elasticsearchCompletion.inspectJsonBody (cognitive 35) · ×1
  • elasticsearchCompletion.inspectJsonBody (cognitive 35) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:461 — elasticsearchCompletion.inspectJsonBody has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 8, loops 3 (5 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildComparisonValueItems (cognitive 35) · ×1
  • sqlCompletion.buildComparisonValueItems (cognitive 35) apps/desktop/src/lib/sql/sqlCompletion.ts:5780 — sqlCompletion.buildComparisonValueItems has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.maskTriggerCommentsAndStrings (cognitive 35) · ×1
  • oracleTableRename.maskTriggerCommentsAndStrings (cognitive 35) REDACTED:196 — oracleTableRename.maskTriggerCommentsAndStrings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 15). Of this number, 31 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.normalizeConnection (cognitive 35) · ×1
  • connectionStore.useConnectionStore.normalizeConnection (cognitive 35) apps/desktop/src/stores/connectionStore.ts:1827 — connectionStore.useConnectionStore.normalizeConnection has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 17, if/else 9, ternaries 9. Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.setValue (cognitive 35) · ×1
  • plDebugStore.usePlDebugStore.setValue (cognitive 35) apps/desktop/src/stores/plDebugStore.ts:1702 — plDebugStore.usePlDebugStore.setValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 10, ternaries 6 (8 pts), error handling 3 (nesting depth added 3). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Nb3Archive · ×1
  • Nb3Archive::restore_steps (cognitive 34) REDACTED:481 — Nb3Archive::restore_steps has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 8 (10 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputResolver · ×1
  • InputResolver::resolve (cognitive 34) crates/dbx-sql-schema/src/sql_parser/input.rs:74 — InputResolver::resolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (9 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.handleRequest (cognitive 34) · ×1
  • DbxJdbcPlugin.handleRequest (cognitive 34) REDACTED:693 — DbxJdbcPlugin.handleRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (8 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugNative.stackResult (cognitive 34) · ×1
  • PlDebugNative.stackResult (cognitive 34) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:236 — PlDebugNative.stackResult has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 13 (28 pts), boolean chains 3, if/else 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTypeMetadata.resolveObjectOwner (cognitive 34) · ×1
  • PlDebugTypeMetadata.resolveObjectOwner (cognitive 34) REDACTED:37 — PlDebugTypeMetadata.resolveObjectOwner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 2 (5 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.applyHOCONAuthentication (cognitive 34) · ×1
  • main.applyHOCONAuthentication (cognitive 34) agents/drivers/cassandra-go/config_file.go:169 — main.applyHOCONAuthentication has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25 (28 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.getColumns (cognitive 34) · ×1
  • server.getColumns (cognitive 34) REDACTED:2749 — server.getColumns has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.stripOracleStorageAttributes (cognitive 34) · ×1
  • ddlStorage.stripOracleStorageAttributes (cognitive 34) apps/desktop/src/lib/sql/ddlStorage.ts:216 — ddlStorage.stripOracleStorageAttributes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 11, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cognitive 34) · ×1
  • useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cognitive 34) apps/desktop/src/components/editor/useQueryEditorCompletionMetadata.ts:430 — useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useCellDetailEditor.useCellDetailEditor.create (cognitive 34) · ×1
  • useCellDetailEditor.useCellDetailEditor.create (cognitive 34) apps/desktop/src/composables/useCellDetailEditor.ts:239 — useCellDetailEditor.useCellDetailEditor.create has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 8 (10 pts), boolean chains 4 (nesting depth added 7). Of this number, 20 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · safeJsonFormat.decodeJsonSource (cognitive 34) · ×1
  • safeJsonFormat.decodeJsonSource (cognitive 34) REDACTED:129 — safeJsonFormat.decodeJsonSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.kafkaConnectionDraft (cognitive 34) · ×1
  • connectionDeepLink.kafkaConnectionDraft (cognitive 34) REDACTED:306 — connectionDeepLink.kafkaConnectionDraft has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 14, ternaries 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.readPlan (cognitive 34) · ×1
  • oceanbaseSessionDiagnostics.readPlan (cognitive 34) REDACTED:320 — oceanbaseSessionDiagnostics.readPlan has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 10, if/else 7 (8 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.xuguRevokeSql (cognitive 34) · ×1
  • xuguUserPermissions.xuguRevokeSql (cognitive 34) apps/desktop/src/lib/database/xuguUserPermissions.ts:627 — xuguUserPermissions.xuguRevokeSql has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, ternaries 5 (7 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · xuguExplainPlan.parseXuguExplainText (cognitive 34) · ×1
  • xuguExplainPlan.parseXuguExplainText (cognitive 34) REDACTED:20 — xuguExplainPlan.parseXuguExplainText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 3 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlDialect.codeMirrorBaseDialect (cognitive 34) · ×1
  • codemirrorSqlDialect.codeMirrorBaseDialect (cognitive 34) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:358 — codemirrorSqlDialect.codeMirrorBaseDialect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cognitive 34) · ×1
  • queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cognitive 34) apps/desktop/src/lib/editor/queryEditorNativeSelection.ts:536 — queryEditorNativeSelection.createQueryEditorNativeSelectionGuard has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 12, ternaries 4 (8 pts) (nesting depth added 5). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 627, 645, 582, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · elasticsearchCompletion.flattenElasticsearchMappingFields (cognitive 34) · ×1
  • elasticsearchCompletion.flattenElasticsearchMappingFields (cognitive 34) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:232 — elasticsearchCompletion.flattenElasticsearchMappingFields has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 3 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandPreview.redisDeleteKeysPreview (cognitive 34) · ×1
  • redisCommandPreview.redisDeleteKeysPreview (cognitive 34) apps/desktop/src/lib/redis/redisCommandPreview.ts:248 — redisCommandPreview.redisDeleteKeysPreview has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (9 pts), error handling 1 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisContentSearch.worker.onmessage (cognitive 34) · ×1
  • redisContentSearch.worker.onmessage (cognitive 34) apps/desktop/src/lib/redis/redisContentSearch.worker.ts:5 — redisContentSearch.worker.onmessage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 18). Of this number, 21 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.leadingUnquotedSqlKeywords (cognitive 34) · ×1
  • diagnostics.leadingUnquotedSqlKeywords (cognitive 34) apps/desktop/src/lib/sql/semantic/diagnostics.ts:88 — diagnostics.leadingUnquotedSqlKeywords has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 2 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.stripSqlComments (cognitive 34) · ×1
  • sqlAnalysis.stripSqlComments (cognitive 34) apps/desktop/src/lib/sql/sqlAnalysis.ts:878 — sqlAnalysis.stripSqlComments has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.maskSqlForStructureScan (cognitive 34) · ×1
  • sqlCompletion.maskSqlForStructureScan (cognitive 34) apps/desktop/src/lib/sql/sqlCompletion.ts:2701 — sqlCompletion.maskSqlForStructureScan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.currentSqlLikeLineBlockSpan (cognitive 34) · ×1
  • sqlCompletion.currentSqlLikeLineBlockSpan (cognitive 34) apps/desktop/src/lib/sql/sqlCompletion.ts:2754 — sqlCompletion.currentSqlLikeLineBlockSpan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectSourceTabSave.saveObjectSourceTab (cognitive 34) · ×1
  • objectSourceTabSave.saveObjectSourceTab (cognitive 34) apps/desktop/src/lib/table/objectSourceTabSave.ts:18 — objectSourceTabSave.saveObjectSourceTab has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (14 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.verifyBeforeDrop (cognitive 34) · ×1
  • oracleRoutineRename.verifyBeforeDrop (cognitive 34) apps/desktop/src/lib/table/oracleRoutineRename.ts:614 — oracleRoutineRename.verifyBeforeDrop has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 4 (8 pts), loops 4 (5 pts) (nesting depth added 9). Of this number, 30 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.isReusableTreeSnapshot (cognitive 34) · ×1
  • connectionStore.useConnectionStore.isReusableTreeSnapshot (cognitive 34) apps/desktop/src/stores/connectionStore.ts:3757 — connectionStore.useConnectionStore.isReusableTreeSnapshot has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.runPublicOperation (cognitive 34) · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation (cognitive 34) apps/desktop/src/stores/plDebugStore.ts:433 — plDebugStore.usePlDebugStore.runPublicOperation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 28, error handling 3 (6 pts), ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation::dispatch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · queryStore.useQueryStore.createTab (cognitive 34) · ×1
  • queryStore.useQueryStore.createTab (cognitive 34) apps/desktop/src/stores/queryStore.ts:3241 — queryStore.useQueryStore.createTab has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 13, ternaries 5 (nesting depth added 8). Of this number, 29 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.duplicateTab (cognitive 34) · ×1
  • queryStore.useQueryStore.duplicateTab (cognitive 34) apps/desktop/src/stores/queryStore.ts:5613 — queryStore.useQueryStore.duplicateTab has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 21 (22 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · publish (cognitive 34) · ×1
  • publish (cognitive 34) .github/ui-preview/publish.mjs:167 — publish has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 8 (9 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registerDbxMcpBridge (cognitive 34) · ×1
  • registerDbxMcpBridge (cognitive 34) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:43 — registerDbxMcpBridge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (17 pts), other 8, boolean chains 4, error handling 2, loops 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 84, a function literal at line 111, execute, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · dbx_sqlite_worker · ×1
  • dbx_sqlite_worker::runtime::query_statement (cognitive 33) crates/dbx-sqlite-worker/src/runtime.rs:141 — dbx_sqlite_worker::runtime::query_statement has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 3 (10 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DbxJdbcPlugin.listSchemas (cognitive 33) · ×1
  • DbxJdbcPlugin.listSchemas (cognitive 33) REDACTED:3081 — DbxJdbcPlugin.listSchemas has cognitive complexity 33 (threshold 15). Drivers by points: error handling 8 (20 pts), if/else 8 (11 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeLegacyJobSession.prepare (cognitive 33) · ×1
  • NativeLegacyJobSession.prepare (cognitive 33) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:139 — NativeLegacyJobSession.prepare has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 6 (7 pts), boolean chains 6, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MongoAgent.bulkWriteModel (cognitive 33) · ×1
  • MongoAgent.bulkWriteModel (cognitive 33) REDACTED:2275 — MongoAgent.bulkWriteModel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (6 pts), ternaries 2 (5 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OceanBaseLobValues.mark (cognitive 33) · ×1
  • OceanBaseLobValues.mark (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:231 — OceanBaseLobValues.mark has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 4 (9 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.continueWith (cognitive 33) · ×1
  • PlDebugSession.continueWith (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2179 — PlDebugSession.continueWith has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.copy (cognitive 33) · ×1
  • PlDebugTemporalJson.copy (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:132 — PlDebugTemporalJson.copy has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ci-gradle.acquire_and_run (cognitive 33) · ×1
  • ci-gradle.acquire_and_run (cognitive 33) .github/scripts/ci-gradle.py:122 — ci-gradle.acquire_and_run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 8, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcd2Session.status (cognitive 33) · ×1
  • etcd2Session.status (cognitive 33) agents/drivers/etcd2-go/status.go:14 — etcd2Session.status has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (28 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantSearch (cognitive 33) · ×1
  • server.completionAssistantSearch (cognitive 33) agents/drivers/iotdb/metadata.go:486 — server.completionAssistantSearch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.skipSQLParenthesized (cognitive 33) · ×1
  • main.skipSQLParenthesized (cognitive 33) agents/drivers/kingbase-go/main.go:2182 — main.skipSQLParenthesized has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeTypeLoader.compiledSource (cognitive 33) · ×1
  • plDebugNativeTypeLoader.compiledSource (cognitive 33) agents/drivers/oracle-go/pldebug_legacy_source.go:39 — plDebugNativeTypeLoader.compiledSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · client.valuesToBytes (cognitive 33) · ×1
  • client.valuesToBytes (cognitive 33) agents/go-common/iotdb-client-go/client/session.go:1316 — client.valuesToBytes has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 9 (26 pts), if/else 2 (6 pts), loops 1 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.resultToExport (cognitive 33) · ×1
  • useDataGridExport.useDataGridExport.resultToExport (cognitive 33) apps/desktop/src/composables/useDataGridExport.ts:613 — useDataGridExport.useDataGridExport.resultToExport has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (17 pts), boolean chains 9, if/else 4 (7 pts) (nesting depth added 7). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openTabsPersistence.restoreOpenTabsArray (cognitive 33) · ×1
  • openTabsPersistence.restoreOpenTabsArray (cognitive 33) apps/desktop/src/lib/app/openTabsPersistence.ts:318 — openTabsPersistence.restoreOpenTabsArray has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 9, if/else 7 (8 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 341, 325, 345). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dataGridColumnFilter.splitTopLevelAnd (cognitive 33) · ×1
  • dataGridColumnFilter.splitTopLevelAnd (cognitive 33) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:121 — dataGridColumnFilter.splitTopLevelAnd has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.collectOracleSessionDiagnostics (cognitive 33) · ×1
  • oracleSessionDiagnostics.collectOracleSessionDiagnostics (cognitive 33) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:270 — oracleSessionDiagnostics.collectOracleSessionDiagnostics has cognitive complexity 33 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 9 (12 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.decodeXuguAuthority (cognitive 33) · ×1
  • xuguUserPermissions.decodeXuguAuthority (cognitive 33) apps/desktop/src/lib/database/xuguUserPermissions.ts:476 — xuguUserPermissions.decodeXuguAuthority has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugAnonymousBlock.stripPlSqlComments (cognitive 33) · ×1
  • plDebugAnonymousBlock.stripPlSqlComments (cognitive 33) apps/desktop/src/lib/debug/plDebugAnonymousBlock.ts:22 — plDebugAnonymousBlock.stripPlSqlComments has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shortcutDisplay.shortcutKeyLabel (cognitive 33) · ×1
  • shortcutDisplay.shortcutKeyLabel (cognitive 33) apps/desktop/src/lib/editor/shortcutDisplay.ts:84 — shortcutDisplay.shortcutKeyLabel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16, ternaries 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · pluginUiHtmlCache.inlineLocalUiAssets (cognitive 33) · ×1
  • pluginUiHtmlCache.inlineLocalUiAssets (cognitive 33) apps/desktop/src/lib/plugins/pluginUiHtmlCache.ts:88 — pluginUiHtmlCache.inlineLocalUiAssets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (7 pts), boolean chains 5, ternaries 2 (nesting depth added 13). Of this number, 23 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.commandKeySpecs (cognitive 33) · ×1
  • redisCommandDocs.commandKeySpecs (cognitive 33) apps/desktop/src/lib/redis/redisCommandDocs.ts:126 — redisCommandDocs.commandKeySpecs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarLayout.restoreSidebarLayoutDeletion.restore (cognitive 33) · ×1
  • sidebarLayout.restoreSidebarLayoutDeletion.restore (cognitive 33) apps/desktop/src/lib/sidebar/sidebarLayout.ts:702 — sidebarLayout.restoreSidebarLayoutDeletion.restore has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 4 (13 pts), boolean chains 5, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CypherPrinter.format (cognitive 33) · ×1
  • CypherPrinter.format (cognitive 33) apps/desktop/src/lib/sql/cypherFormatter.ts:369 — CypherPrinter.format has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.singularTableName (cognitive 33) · ×1
  • sqlCompletion.singularTableName (cognitive 33) apps/desktop/src/lib/sql/sqlCompletion.ts:6709 — sqlCompletion.singularTableName has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 12 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.computeMatchScore (cognitive 33) · ×1
  • sqlCompletion.computeMatchScore (cognitive 33) apps/desktop/src/lib/sql/sqlCompletion.ts:7095 — sqlCompletion.computeMatchScore has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences (cognitive 33) · ×1
  • sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences (cognitive 33) apps/desktop/src/lib/sql/sqlDiagnosticKeywordRecovery.ts:28 — sqlDiagnosticKeywordRecovery.analyzeSqlDiagnosticReferences has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 7, error handling 2 (5 pts), loops 2 (5 pts) (nesting depth added 17). Of this number, 31 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.runPublicOperation · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation::dispatch (cognitive 33) apps/desktop/src/stores/plDebugStore.ts:453 — plDebugStore.usePlDebugStore.runPublicOperation::dispatch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 11, error handling 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · queryStore.useQueryStore.applyLoadedObjectSource (cognitive 33) · ×1
  • queryStore.useQueryStore.applyLoadedObjectSource (cognitive 33) apps/desktop/src/stores/queryStore.ts:3648 — queryStore.useQueryStore.applyLoadedObjectSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 11, ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bringIntoView (cognitive 33) · ×1
  • bringIntoView (cognitive 33) REDACTED:398 — bringIntoView has cognitive complexity 33 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 3 (9 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 16). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 401, 434). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentRuntimeClient · ×1
  • AgentRuntimeClient::call_typed_with_policy (cognitive 32) crates/dbx-driver-agent/src/agent_driver.rs:234 — AgentRuntimeClient::call_typed_with_policy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 5 (10 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DialectYaml · ×1
  • DialectYaml::build_capability_flags (cognitive 32) REDACTED:539 — DialectYaml::build_capability_flags has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DamengAgent.splitTableDdlDefinitions (cognitive 32) · ×1
  • DamengAgent.splitTableDdlDefinitions (cognitive 32) REDACTED:2353 — DamengAgent.splitTableDdlDefinitions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.getConsumerGroupSnapshot (cognitive 32) · ×1
  • KafkaAgent.getConsumerGroupSnapshot (cognitive 32) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1290 — KafkaAgent.getConsumerGroupSnapshot has cognitive complexity 32 (threshold 15). Drivers by points: loops 7 (13 pts), error handling 3 (7 pts), if/else 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.validatePeekRequest (cognitive 32) · ×1
  • KafkaAgent.validatePeekRequest (cognitive 32) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2482 — KafkaAgent.validatePeekRequest has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.payloadBytes (cognitive 32) · ×1
  • PlDebugCompositeInput.payloadBytes (cognitive 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:49 — PlDebugCompositeInput.payloadBytes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (9 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · main.plDebugNativeTypedTransport (cognitive 32) · ×1
  • main.plDebugNativeTypedTransport (cognitive 32) agents/drivers/oracle-go/pldebug_transport_preflight.go:42 — main.plDebugNativeTypedTransport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugLobOutput.collect (cognitive 32) · ×1
  • plDebugLobOutput.collect (cognitive 32) agents/drivers/oracle-go/pldebug_lob_output.go:121 — plDebugLobOutput.collect has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 9, loops 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 125). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plDebugRecordDecoder.collection (cognitive 32) · ×1
  • plDebugRecordDecoder.collection (cognitive 32) agents/drivers/oracle-go/pldebug_collection_input.go:39 — plDebugRecordDecoder.collection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeTypeLoader.query (cognitive 32) · ×1
  • plDebugNativeTypeLoader.query (cognitive 32) agents/drivers/oracle-go/pldebug_type_graph.go:135 — plDebugNativeTypeLoader.query has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.convertObjectKeyedMap (cognitive 32) · ×1
  • main.convertObjectKeyedMap (cognitive 32) REDACTED:336 — main.convertObjectKeyedMap has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cognitive 32) · ×1
  • useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cognitive 32) apps/desktop/src/composables/useNavigationTargets.ts:432 — useNavigationTargets.useNavigationTargets.onStructureEditorSaved has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, error handling 4 (7 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 8). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useTauriEvents.useTauriEvents.setupTauriListeners (cognitive 32) · ×1
  • useTauriEvents.useTauriEvents.setupTauriListeners (cognitive 32) apps/desktop/src/composables/useTauriEvents.ts:28 — useTauriEvents.useTauriEvents.setupTauriListeners has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14, error handling 10, loops 5, boolean chains 3. None of this is in the body itself: all 32 points belong to 11 function literals inside it that branch (lines 41, 87, 64, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connectionConfigTransfer.prepareConnectionConfigImport (cognitive 32) · ×1
  • connectionConfigTransfer.prepareConnectionConfigImport (cognitive 32) apps/desktop/src/lib/connection/connectionConfigTransfer.ts:209 — connectionConfigTransfer.prepareConnectionConfigImport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 7 (12 pts), boolean chains 4, ternaries 2 (nesting depth added 13). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.readAudit (cognitive 32) · ×1
  • oceanbaseSessionDiagnostics.readAudit (cognitive 32) REDACTED:181 — oceanbaseSessionDiagnostics.readAudit has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 6 (10 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cognitive 32) · ×1
  • oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cognitive 32) REDACTED:268 — oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 6 (10 pts), boolean chains 7, loops 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.validateOracleForeignKeySourceChanges (cognitive 32) · ×1
  • oracleForeignKeys.validateOracleForeignKeySourceChanges (cognitive 32) apps/desktop/src/lib/database/oracleForeignKeys.ts:263 — oracleForeignKeys.validateOracleForeignKeySourceChanges has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 11, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cognitive 32) · ×1
  • oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cognitive 32) apps/desktop/src/lib/database/oracleIndexes.ts:263 — oracleIndexes.mergeOracleIndexDraftsAfterRefresh has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 5 (10 pts), boolean chains 9, loops 2 (nesting depth added 11). Of this number, 27 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executeTriggerSequence · ×1
  • oracleTriggerPlan.executeTriggerSequence::run (cognitive 32) apps/desktop/src/lib/database/oracleTriggerPlan.ts:516 — oracleTriggerPlan.executeTriggerSequence::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 3 (6 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.parseOracleExplainText (cognitive 32) · ×1
  • explainPlan.parseOracleExplainText (cognitive 32) apps/desktop/src/lib/diagram/explainPlan.ts:175 — explainPlan.parseOracleExplainText has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (10 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcpAccessTree.buildMcpAccessTreeRows (cognitive 32) · ×1
  • mcpAccessTree.buildMcpAccessTreeRows (cognitive 32) apps/desktop/src/lib/mcp/mcpAccessTree.ts:152 — mcpAccessTree.buildMcpAccessTreeRows has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 7 (8 pts), loops 2 (nesting depth added 5). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (summarize, connectionRows, a function literal at line 252, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · nacosAdmin.normalizeNacosEndpoint (cognitive 32) · ×1
  • nacosAdmin.normalizeNacosEndpoint (cognitive 32) apps/desktop/src/lib/nacos/nacosAdmin.ts:129 — nacosAdmin.normalizeNacosEndpoint has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 10, if/else 7 (10 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedisCollectionSearchController.scan (cognitive 32) · ×1
  • RedisCollectionSearchController.scan (cognitive 32) apps/desktop/src/lib/redis/redisCollectionSearchController.ts:178 — RedisCollectionSearchController.scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.refreshOracleRoutineDeployment (cognitive 32) · ×1
  • oracleRoutineDeploy.refreshOracleRoutineDeployment (cognitive 32) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:569 — oracleRoutineDeploy.refreshOracleRoutineDeployment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 12, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 6). Of this number, 27 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearch.matchSidebarLabelWithRegex (cognitive 32) · ×1
  • sidebarSearch.matchSidebarLabelWithRegex (cognitive 32) apps/desktop/src/lib/sidebar/sidebarSearch.ts:174 — sidebarSearch.matchSidebarLabelWithRegex has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.parseInsertClause (cognitive 32) · ×1
  • insertValueHints.parseInsertClause (cognitive 32) apps/desktop/src/lib/sql/insertValueHints.ts:312 — insertValueHints.parseInsertClause has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 8, ternaries 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cognitive 32) · ×1
  • mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cognitive 32) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:138 — mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (14 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlAnalysis.containsTopLevelAggregate (cognitive 32) · ×1
  • sqlAnalysis.containsTopLevelAggregate (cognitive 32) apps/desktop/src/lib/sql/sqlAnalysis.ts:833 — sqlAnalysis.containsTopLevelAggregate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerQueryWrapping.topLevelSqlTokens (cognitive 32) · ×1
  • sqlServerQueryWrapping.topLevelSqlTokens (cognitive 32) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:32 — sqlServerQueryWrapping.topLevelSqlTokens has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.collectDeclarations (cognitive 32) · ×1
  • sqlVariables.collectDeclarations (cognitive 32) apps/desktop/src/lib/sql/sqlVariables.ts:67 — sqlVariables.collectDeclarations has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.syncTabTitleNumbers (cognitive 32) · ×1
  • tabPresentation.syncTabTitleNumbers (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:260 — tabPresentation.syncTabTitleNumbers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabTooltipLines (cognitive 32) · ×1
  • tabPresentation.tabTooltipLines (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:431 — tabPresentation.tabTooltipLines has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 12 (14 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · tabPresentation.tabIconClass (cognitive 32) · ×1
  • tabPresentation.tabIconClass (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:860 — tabPresentation.tabIconClass has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.persistConnectionDeletion (cognitive 32) · ×1
  • connectionStore.useConnectionStore.persistConnectionDeletion (cognitive 32) apps/desktop/src/stores/connectionStore.ts:10901 — connectionStore.useConnectionStore.persistConnectionDeletion has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 4 (10 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 15). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cognitive 32) · ×1
  • queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cognitive 32) apps/desktop/src/stores/queryStore.ts:7435 — queryStore.useQueryStore.resolveEditableSourceMetadataTarget has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 24, ternaries 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · json.hasUnclosedMongoDelimiters (cognitive 32) · ×1
  • json.hasUnclosedMongoDelimiters (cognitive 32) packages/mongo-shell/src/json.ts:306 — json.hasUnclosedMongoDelimiters has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Nb3SqlReader · ×1
  • Nb3SqlReader::next_tuple (cognitive 31) REDACTED:741 — Nb3SqlReader::next_tuple has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Resolver · ×1
  • Resolver::call (cognitive 31) crates/dbx-core/src/schema/oracle_routines/references.rs:363 — Resolver::call has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleSchemaSyncTableDdl · ×1
  • OracleSchemaSyncTableDdl::render_triggers (cognitive 31) crates/dbx-sql-schema/src/schema_diff/oracle_indexes.rs:185 — OracleSchemaSyncTableDdl::render_triggers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.configureBuilder (cognitive 31) · ×1
  • MongoAgent.configureBuilder (cognitive 31) REDACTED:159 — MongoAgent.configureBuilder has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 11, ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.procedure (cognitive 31) · ×1
  • PlDebugCompositeOutput.procedure (cognitive 31) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:174 — PlDebugCompositeOutput.procedure has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (6 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cassandraConfig.finalize (cognitive 31) · ×1
  • cassandraConfig.finalize (cognitive 31) agents/drivers/cassandra-go/config.go:452 — cassandraConfig.finalize has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 9 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.put (cognitive 31) · ×1
  • etcdSession.put (cognitive 31) agents/drivers/etcd-go/kv.go:229 — etcdSession.put has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 6 (nesting depth added 7). Of this number, 20 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseKingbasePartitionBound (cognitive 31) · ×1
  • main.parseKingbasePartitionBound (cognitive 31) REDACTED:1506 — main.parseKingbasePartitionBound has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.runOracleAgent (cognitive 31) · ×1
  • main.runOracleAgent (cognitive 31) REDACTED:710 — main.runOracleAgent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugSubprogramRange (cognitive 31) · ×1
  • main.plDebugSubprogramRange (cognitive 31) REDACTED:5063 — main.plDebugSubprogramRange has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.closeNativeAllocations (cognitive 31) · ×1
  • server.closeNativeAllocations (cognitive 31) agents/drivers/oracle-go/pldebug_connections.go:64 — server.closeNativeAllocations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.driveNativeEntry (cognitive 31) · ×1
  • plDebugNativeEntry.driveNativeEntry (cognitive 31) agents/drivers/oracle-go/pldebug_entry.go:235 — plDebugNativeEntry.driveNativeEntry has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.isQuerySQL (cognitive 31) · ×1
  • main.isQuerySQL (cognitive 31) agents/drivers/vastbase-go/main.go:1416 — main.isQuerySQL has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.findGeneratorKey (cognitive 31) · ×1
  • dataGenerate.findGeneratorKey (cognitive 31) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1273 — dataGenerate.findGeneratorKey has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · regexGenerate.parseAtom (cognitive 31) · ×1
  • regexGenerate.parseAtom (cognitive 31) REDACTED:240 — regexGenerate.parseAtom has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.prepareOracleForeignKeyPlan (cognitive 31) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyPlan (cognitive 31) apps/desktop/src/lib/database/oracleForeignKeys.ts:647 — oracleForeignKeys.prepareOracleForeignKeyPlan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 12, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.extractUserName (cognitive 31) · ×1
  • datagripImport.extractUserName (cognitive 31) REDACTED:335 — datagripImport.extractUserName has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navicatImport.parseConnection (cognitive 31) · ×1
  • navicatImport.parseConnection (cognitive 31) REDACTED:283 — navicatImport.parseConnection has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, ternaries 8 (10 pts), if/else 5 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCompletion.classifyMethodOptions (cognitive 31) · ×1
  • mongoCompletion.classifyMethodOptions (cognitive 31) REDACTED:1416 — mongoCompletion.classifyMethodOptions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCompletion.argumentTokenItems (cognitive 31) · ×1
  • redisCompletion.argumentTokenItems (cognitive 31) apps/desktop/src/lib/redis/redisCompletion.ts:389 — redisCompletion.argumentTokenItems has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 7 (12 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 15). Of this number, 24 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyGrouping.compileRedisGroupGlob (cognitive 31) · ×1
  • redisKeyGrouping.compileRedisGroupGlob (cognitive 31) apps/desktop/src/lib/redis/redisKeyGrouping.ts:42 — redisKeyGrouping.compileRedisGroupGlob has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · identifierSearch.identifierMatchScore (cognitive 31) · ×1
  • identifierSearch.identifierMatchScore (cognitive 31) apps/desktop/src/lib/sql/identifierSearch.ts:8 — identifierSearch.identifierMatchScore has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddl.createTableLayout (cognitive 31) · ×1
  • ddl.createTableLayout (cognitive 31) apps/desktop/src/lib/sql/layout/ddl.ts:86 — ddl.createTableLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 111, 100, 106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · diagnostics.isSqlServerGoSeparatorLine (cognitive 31) · ×1
  • diagnostics.isSqlServerGoSeparatorLine (cognitive 31) apps/desktop/src/lib/sql/semantic/diagnostics.ts:167 — diagnostics.isSqlServerGoSeparatorLine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 6 (9 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.findTopLevelKeyword (cognitive 31) · ×1
  • sqlAnalysis.findTopLevelKeyword (cognitive 31) apps/desktop/src/lib/sql/sqlAnalysis.ts:981 — sqlAnalysis.findTopLevelKeyword has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDatabaseLinks.collectSqlXmlKeywordPositions (cognitive 31) · ×1
  • sqlDatabaseLinks.collectSqlXmlKeywordPositions (cognitive 31) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:10 — sqlDatabaseLinks.collectSqlXmlKeywordPositions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 9, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksDdlDisplay.formatStarRocksDdlForDisplay (cognitive 31) · ×1
  • starrocksDdlDisplay.formatStarRocksDdlForDisplay (cognitive 31) apps/desktop/src/lib/sql/starrocksDdlDisplay.ts:75 — starrocksDdlDisplay.formatStarRocksDdlForDisplay has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (10 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 4). Of this number, 23 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeTab (cognitive 31) · ×1
  • queryStore.useQueryStore.closeTab (cognitive 31) apps/desktop/src/stores/queryStore.ts:5317 — queryStore.useQueryStore.closeTab has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.commitTransaction (cognitive 31) · ×1
  • queryStore.useQueryStore.commitTransaction (cognitive 31) apps/desktop/src/stores/queryStore.ts:6432 — queryStore.useQueryStore.commitTransaction has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6447, 6482). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MySqlDataCharset · ×1
  • MySqlDataCharset::decode (cognitive 30) crates/dbx-driver-mysql/src/mysql_data_charset.rs:136 — MySqlDataCharset::decode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundStatement.validate (cognitive 30) · ×1
  • BlobBoundStatement.validate (cognitive 30) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:20 — BlobBoundStatement.validate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.child (cognitive 30) · ×1
  • PlDebugCompositeInput.child (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:217 — PlDebugCompositeInput.child has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Writer.composite (cognitive 30) · ×1
  • Writer.composite (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:321 — Writer.composite has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.bindComposite (cognitive 30) · ×1
  • Plan.bindComposite (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:473 — Plan.bindComposite has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 6 (9 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.<init> (cognitive 30) · ×1
  • Plan.<init> (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:203 — Plan.<init> has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantSearch (cognitive 30) · ×1
  • server.completionAssistantSearch (cognitive 30) agents/drivers/neo4j-go/metadata.go:268 — server.completionAssistantSearch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.enrichExactTriggerObjects (cognitive 30) · ×1
  • server.enrichExactTriggerObjects (cognitive 30) agents/drivers/oracle-go/trigger_metadata.go:274 — server.enrichExactTriggerObjects has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQuickOpen.matchQuickOpenText (cognitive 30) · ×1
  • useQuickOpen.matchQuickOpenText (cognitive 30) apps/desktop/src/composables/useQuickOpen.ts:200 — useQuickOpen.matchQuickOpenText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.localeFromLanguageTag (cognitive 30) · ×1
  • index.localeFromLanguageTag (cognitive 30) apps/desktop/src/i18n/index.ts:39 — index.localeFromLanguageTag has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 14 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ai.buildSystemPrompt (cognitive 30) · ×1
  • ai.buildSystemPrompt (cognitive 30) apps/desktop/src/lib/ai/ai.ts:397 — ai.buildSystemPrompt has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14 (22 pts), if/else 7, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.parseMongoFilterValueAs (cognitive 30) · ×1
  • documentStoreProvider.parseMongoFilterValueAs (cognitive 30) apps/desktop/src/lib/app/documentStoreProvider.ts:919 — documentStoreProvider.parseMongoFilterValueAs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · http.aiStream (cognitive 30) · ×1
  • http.aiStream (cognitive 30) apps/desktop/src/lib/backend/http.ts:2391 — http.aiStream has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), error handling 1 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnType.resolveDataGridTypeVisualKind (cognitive 30) · ×1
  • dataGridColumnType.resolveDataGridTypeVisualKind (cognitive 30) apps/desktop/src/lib/dataGrid/dataGridColumnType.ts:356 — dataGridColumnType.resolveDataGridTypeVisualKind has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dataGridColumnWidthState.saveDataGridColumnWidthState (cognitive 30) · ×1
  • dataGridColumnWidthState.saveDataGridColumnWidthState (cognitive 30) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:266 — dataGridColumnWidthState.saveDataGridColumnWidthState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 8). Of this number, 25 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cognitive 30) · ×1
  • codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cognitive 30) apps/desktop/src/lib/editor/codemirrorCurrentStatementFrameLayer.ts:70 — codemirrorCurrentStatementFrameLayer.currentStatementFrameRect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 4 (8 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletion.buildGraphCompletionItems (cognitive 30) · ×1
  • graphCompletion.buildGraphCompletionItems (cognitive 30) apps/desktop/src/lib/graph/graphCompletion.ts:142 — graphCompletion.buildGraphCompletionItems has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 3 (4 pts), loops 1 (3 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · neo4jNodeResult.projectNeo4jNodeResult (cognitive 30) · ×1
  • neo4jNodeResult.projectNeo4jNodeResult (cognitive 30) apps/desktop/src/lib/neo4j/neo4jNodeResult.ts:62 — neo4jNodeResult.projectNeo4jNodeResult has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (12 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editorSettingsDraft.normalizedDraftValue (cognitive 30) · ×1
  • editorSettingsDraft.normalizedDraftValue (cognitive 30) apps/desktop/src/lib/settings/editorSettingsDraft.ts:224 — editorSettingsDraft.normalizedDraftValue has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, ternaries 4 (8 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · completion.sqlCompletionContextFromSemantic (cognitive 30) · ×1
  • completion.sqlCompletionContextFromSemantic (cognitive 30) apps/desktop/src/lib/sql/semantic/completion.ts:338 — completion.sqlCompletionContextFromSemantic has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, ternaries 10 (11 pts), if/else 4 (nesting depth added 1). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · diagnostics.updateSqlServerBatchScanState (cognitive 30) · ×1
  • diagnostics.updateSqlServerBatchScanState (cognitive 30) apps/desktop/src/lib/sql/semantic/diagnostics.ts:206 — diagnostics.updateSqlServerBatchScanState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 2 (7 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.sqlSemanticTableNameSpans (cognitive 30) · ×1
  • model.sqlSemanticTableNameSpans (cognitive 30) apps/desktop/src/lib/sql/semantic/model.ts:155 — model.sqlSemanticTableNameSpans has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.formatLeadingCommas (cognitive 30) · ×1
  • sqlFormatter.formatLeadingCommas (cognitive 30) apps/desktop/src/lib/sql/sqlFormatter.ts:863 — sqlFormatter.formatLeadingCommas has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.resultRunSourceLabel (cognitive 30) · ×1
  • tabPresentation.resultRunSourceLabel (cognitive 30) apps/desktop/src/lib/tabs/tabPresentation.ts:675 — tabPresentation.resultRunSourceLabel has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 6 (9 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.closeOriginal (cognitive 30) · ×1
  • plDebugStore.usePlDebugStore.closeOriginal (cognitive 30) apps/desktop/src/stores/plDebugStore.ts:1810 — plDebugStore.usePlDebugStore.closeOriginal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, error handling 2 (3 pts) (nesting depth added 7). Of this number, 28 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.annotateQueryResultSources (cognitive 30) · ×1
  • queryStore.annotateQueryResultSources (cognitive 30) apps/desktop/src/stores/queryStore.ts:555 — queryStore.annotateQueryResultSources has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.rollbackTransaction (cognitive 30) · ×1
  • queryStore.useQueryStore.rollbackTransaction (cognitive 30) apps/desktop/src/stores/queryStore.ts:6494 — queryStore.useQueryStore.rollbackTransaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 6507). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentBundle.assembleCustomBundle (cognitive 30) · ×1
  • agentBundle.assembleCustomBundle (cognitive 30) docs/lib/agentBundle.ts:469 — agentBundle.assembleCustomBundle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 506, a function literal at line 535, reportDownload). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · JsonRpcServer.legacyJob (cognitive 29) · ×1
  • JsonRpcServer.legacyJob (cognitive 29) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:671 — JsonRpcServer.legacyJob has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.applySecurityProperties (cognitive 29) · ×1
  • KafkaAgent.applySecurityProperties (cognitive 29) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:527 — KafkaAgent.applySecurityProperties has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.evaluateBreakpointRules (cognitive 29) · ×1
  • PlDebugSession.evaluateBreakpointRules (cognitive 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1262 — PlDebugSession.evaluateBreakpointRules has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.decodeZoned (cognitive 29) · ×1
  • PlDebugTarget.decodeZoned (cognitive 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1211 — PlDebugTarget.decodeZoned has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (9 pts), boolean chains 7, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpannerAgent.completionAssistantSearch (cognitive 29) · ×1
  • SpannerAgent.completionAssistantSearch (cognitive 29) agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:345 — SpannerAgent.completionAssistantSearch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_tunnel.run_worker (cognitive 29) · ×1
  • dbx_tunnel.run_worker (cognitive 29) deploy/dbx_tunnel.php:168 — dbx_tunnel.run_worker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, error handling 1, loops 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.appendGraphValue (cognitive 29) · ×1
  • main.appendGraphValue (cognitive 29) agents/drivers/nebula-go/query.go:307 — main.appendGraphValue has cognitive complexity 29 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 7 (13 pts), match/switch 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · main.plDebugEvaluateCondition (cognitive 29) · ×1
  • main.plDebugEvaluateCondition (cognitive 29) agents/drivers/oracle-go/pldebug_condition.go:35 — main.plDebugEvaluateCondition has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · client.NewIoTDBRpcDataSet (cognitive 29) · ×1
  • client.NewIoTDBRpcDataSet (cognitive 29) agents/go-common/iotdb-client-go/client/rpcdataset.go:62 — client.NewIoTDBRpcDataSet has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType (cognitive 29) · ×1
  • IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType (cognitive 29) agents/go-common/iotdb-client-go/client/rpcdataset.go:633 — IoTDBRpcDataSet.getStringByTsBlockColumnIndexAndDataType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (28 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Tablet.SetValueAt (cognitive 29) · ×1
  • Tablet.SetValueAt (cognitive 29) agents/go-common/iotdb-client-go/client/tablet.go:124 — Tablet.SetValueAt has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 9 (17 pts), if/else 6 (10 pts), boolean chains 2 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · sqlStatementRanges.statementRangeAtCursor (cognitive 29) · ×1
  • sqlStatementRanges.statementRangeAtCursor (cognitive 29) apps/desktop/src/lib/sql/sqlStatementRanges.ts:775 — sqlStatementRanges.statementRangeAtCursor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 9, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter (cognitive 29) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter (cognitive 29) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:449 — useQueryEditorCompletion.useQueryEditorCompletion.completionItemsForBypassedFilter has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 3 (4 pts) (nesting depth added 6). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 452, 464). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferStrategy.createTransferSubmission.start (cognitive 29) · ×1
  • transferStrategy.createTransferSubmission.start (cognitive 29) apps/desktop/src/components/transfer/transferStrategy.ts:101 — transferStrategy.createTransferSubmission.start has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorUtils.normalizeBackendErrorAtDepth (cognitive 29) · ×1
  • errorUtils.normalizeBackendErrorAtDepth (cognitive 29) apps/desktop/src/lib/backend/errorUtils.ts:212 — errorUtils.normalizeBackendErrorAtDepth has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionParameterDocument.writeConnectionParameters (cognitive 29) · ×1
  • connectionParameterDocument.writeConnectionParameters (cognitive 29) apps/desktop/src/lib/connection/connectionParameterDocument.ts:139 — connectionParameterDocument.writeConnectionParameters has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, ternaries 5 (6 pts), loops 3, error handling 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 14 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCellCoercion.coerceDataGridCellValue (cognitive 29) · ×1
  • dataGridCellCoercion.coerceDataGridCellValue (cognitive 29) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:25 — dataGridCellCoercion.coerceDataGridCellValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSelectionPersistence.captureDataGridSelection (cognitive 29) · ×1
  • dataGridSelectionPersistence.captureDataGridSelection (cognitive 29) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:134 — dataGridSelectionPersistence.captureDataGridSelection has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 7 (9 pts), boolean chains 7 (nesting depth added 7). Of this number, 23 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cognitive 29) · ×1
  • databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cognitive 29) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:148 — databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 6, if/else 3 (6 pts), loops 3 (4 pts) (nesting depth added 11). Of this number, 22 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.nativeJobProgramArgumentLayout (cognitive 29) · ×1
  • nativeJobAdmin.nativeJobProgramArgumentLayout (cognitive 29) apps/desktop/src/lib/database/nativeJobAdmin.ts:269 — nativeJobAdmin.nativeJobProgramArgumentLayout has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (17 pts), boolean chains 8, if/else 4 (nesting depth added 7). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 281, 276). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · explainPlan.parseDamengPlanLine (cognitive 29) · ×1
  • explainPlan.parseDamengPlanLine (cognitive 29) apps/desktop/src/lib/diagram/explainPlan.ts:312 — explainPlan.parseDamengPlanLine has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.buildDamengTree (cognitive 29) · ×1
  • explainPlan.buildDamengTree (cognitive 29) apps/desktop/src/lib/diagram/explainPlan.ts:730 — explainPlan.buildDamengTree has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 9, ternaries 2 (4 pts), loops 3 (nesting depth added 8). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hoverTableSql.parseColumnLine (cognitive 29) · ×1
  • hoverTableSql.parseColumnLine (cognitive 29) apps/desktop/src/lib/editor/hoverTableSql.ts:549 — hoverTableSql.parseColumnLine has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.resolveNavigationTarget (cognitive 29) · ×1
  • sqlIntentionActions.resolveNavigationTarget (cognitive 29) apps/desktop/src/lib/editor/sqlIntentionActions.ts:749 — sqlIntentionActions.resolveNavigationTarget has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, error handling 1 (nesting depth added 14). Of this number, 18 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cognitive 29) · ×1
  • influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cognitive 29) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:84 — influxDbV1Delete.resolveInfluxDbV1DeleteTarget has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 5, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyFilter (cognitive 29) · ×1
  • mongoCompletion.classifyFilter (cognitive 29) REDACTED:1218 — mongoCompletion.classifyFilter has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.renderMongoShellLiteral (cognitive 29) · ×1
  • mongoDocumentValues.renderMongoShellLiteral (cognitive 29) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:688 — mongoDocumentValues.renderMongoShellLiteral has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mqConsoleDefaults.resolveAvailableMqTabs (cognitive 29) · ×1
  • mqConsoleDefaults.resolveAvailableMqTabs (cognitive 29) apps/desktop/src/lib/mq/mqConsoleDefaults.ts:184 — mqConsoleDefaults.resolveAvailableMqTabs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginShortcuts.collectPluginShortcuts (cognitive 29) · ×1
  • pluginShortcuts.collectPluginShortcuts (cognitive 29) apps/desktop/src/lib/plugins/pluginShortcuts.ts:64 — pluginShortcuts.collectPluginShortcuts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 8, loops 3, ternaries 2 (3 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.commandArguments (cognitive 29) · ×1
  • redisCommandDocs.commandArguments (cognitive 29) apps/desktop/src/lib/redis/redisCommandDocs.ts:97 — redisCommandDocs.commandArguments has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 4, if/else 1 (2 pts), loops 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildTableItems (cognitive 29) · ×1
  • sqlCompletion.buildTableItems (cognitive 29) apps/desktop/src/lib/sql/sqlCompletion.ts:5153 — sqlCompletion.buildTableItems has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 13 (nesting depth added 4). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 5173). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.objectMatchesCompletionContext (cognitive 29) · ×1
  • sqlCompletion.objectMatchesCompletionContext (cognitive 29) apps/desktop/src/lib/sql/sqlCompletion.ts:5506 — sqlCompletion.objectMatchesCompletionContext has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSourcePaste.readStringLiteral (cognitive 29) · ×1
  • sqlSourcePaste.readStringLiteral (cognitive 29) apps/desktop/src/lib/sql/sqlSourcePaste.ts:224 — sqlSourcePaste.readStringLiteral has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (8 pts), boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableSqlTemplates.columnPlaceholderValue (cognitive 29) · ×1
  • tableSqlTemplates.columnPlaceholderValue (cognitive 29) apps/desktop/src/lib/table/tableSqlTemplates.ts:202 — tableSqlTemplates.columnPlaceholderValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (13 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.isWrappedByOuterParens (cognitive 29) · ×1
  • tableStructureEditorState.isWrappedByOuterParens (cognitive 29) apps/desktop/src/lib/table/tableStructureEditorState.ts:1019 — tableStructureEditorState.isWrappedByOuterParens has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.mergeTableTreePageChildren (cognitive 29) · ×1
  • tableTree.mergeTableTreePageChildren (cognitive 29) apps/desktop/src/lib/table/tableTree.ts:503 — tableTree.mergeTableTreePageChildren has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 6, boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 5 function items inside it that branch (addNode, collect, addToParent, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tableTree.coalesceXuguPackageObjects (cognitive 29) · ×1
  • tableTree.coalesceXuguPackageObjects (cognitive 29) apps/desktop/src/lib/table/tableTree.ts:679 — tableTree.coalesceXuguPackageObjects has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.statementExecutionMarkers (cognitive 29) · ×1
  • tabPresentation.statementExecutionMarkers (cognitive 29) apps/desktop/src/lib/tabs/tabPresentation.ts:589 — tabPresentation.statementExecutionMarkers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 2 (3 pts), loops 1 (nesting depth added 8). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadDorisCatalogTables (cognitive 29) · ×1
  • connectionStore.useConnectionStore.loadDorisCatalogTables (cognitive 29) apps/desktop/src/stores/connectionStore.ts:7502 — connectionStore.useConnectionStore.loadDorisCatalogTables has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 9 (10 pts), boolean chains 4, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 7526). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · queryStore.appendQueryResultSegment (cognitive 29) · ×1
  • queryStore.appendQueryResultSegment (cognitive 29) apps/desktop/src/stores/queryStore.ts:434 — queryStore.appendQueryResultSegment has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 8, if/else 4, loops 2 (nesting depth added 2). Of this number, 23 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · requireAiRecommendationUpdate (cognitive 29) · ×1
  • requireAiRecommendationUpdate (cognitive 29) plugins/sdk/dev-host/server.mjs:47 — requireAiRecommendationUpdate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 13, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DegradationChain · ×1
  • DegradationChain::decide (cognitive 28) REDACTED:1708 — DegradationChain::decide has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpGlobalPolicy · ×1
  • McpGlobalPolicy::normalized (cognitive 28) REDACTED:906 — McpGlobalPolicy::normalized has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4, boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetainedResults · ×1
  • RetainedResults::manifest (cognitive 28) crates/dbx-core/src/query/pl_debug/results.rs:89 — RetainedResults::manifest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StandardJdbcMetadata.getColumns (cognitive 28) · ×1
  • StandardJdbcMetadata.getColumns (cognitive 28) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:247 — StandardJdbcMetadata.getColumns has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.parseDropIndexesValue (cognitive 28) · ×1
  • MongoAgent.parseDropIndexesValue (cognitive 28) REDACTED:1703 — MongoAgent.parseDropIndexesValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cassandraConfig.clusterConfig (cognitive 28) · ×1
  • cassandraConfig.clusterConfig (cognitive 28) agents/drivers/cassandra-go/config.go:364 — cassandraConfig.clusterConfig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.readableKeyRanges (cognitive 28) · ×1
  • etcdSession.readableKeyRanges (cognitive 28) agents/drivers/etcd-go/auth.go:39 — etcdSession.readableKeyRanges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listIndexes (cognitive 28) · ×1
  • server.listIndexes (cognitive 28) REDACTED:2126 — server.listIndexes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantTables (cognitive 28) · ×1
  • server.completionAssistantTables (cognitive 28) REDACTED:2452 — server.completionAssistantTables has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.queryRowsWithOracleValueRewriteIfNeeded (cognitive 28) · ×1
  • server.queryRowsWithOracleValueRewriteIfNeeded (cognitive 28) REDACTED:5217 — server.queryRowsWithOracleValueRewriteIfNeeded has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 6 (nesting depth added 9). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeRoutineScan.identify (cognitive 28) · ×1
  • plDebugNativeRoutineScan.identify (cognitive 28) agents/drivers/oracle-go/pldebug_routine.go:609 — plDebugNativeRoutineScan.identify has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativePlan.boundInputs (cognitive 28) · ×1
  • plDebugNativePlan.boundInputs (cognitive 28) agents/drivers/oracle-go/pldebug_target_invoke.go:73 — plDebugNativePlan.boundInputs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.applyMessageProperties (cognitive 28) · ×1
  • main.applyMessageProperties (cognitive 28) agents/drivers/rabbitmq/message_properties.go:12 — main.applyMessageProperties has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.viewMessage (cognitive 28) · ×1
  • rocketMQAgent.viewMessage (cognitive 28) REDACTED:149 — rocketMQAgent.viewMessage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.completionAssistantSearchTypeMembers (cognitive 28) · ×1
  • server.completionAssistantSearchTypeMembers (cognitive 28) agents/drivers/xugu/type_members.go:163 — server.completionAssistantSearchTypeMembers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.scanSqlServerControlFlow (cognitive 28) · ×1
  • sqlStatementRanges.scanSqlServerControlFlow (cognitive 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1019 — sqlStatementRanges.scanSqlServerControlFlow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cognitive 28) · ×1
  • sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cognitive 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2231 — sqlStatementRanges.advanceMysqlRoutineBlockCompleteness has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.compareParsedUpdateVersions (cognitive 28) · ×1
  • useAppUpdater.compareParsedUpdateVersions (cognitive 28) apps/desktop/src/composables/useAppUpdater.ts:51 — useAppUpdater.compareParsedUpdateVersions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (10 pts), boolean chains 3, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridCellDetail.useDataGridCellDetail (cognitive 28) · ×1
  • useDataGridCellDetail.useDataGridCellDetail (cognitive 28) apps/desktop/src/composables/useDataGridCellDetail.ts:9 — useDataGridCellDetail.useDataGridCellDetail has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 28 points belong to 5 function literals inside it that branch (lines 38, 67, 30, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportCsv (cognitive 28) · ×1
  • useDataGridExport.useDataGridExport.exportCsv (cognitive 28) apps/desktop/src/composables/useDataGridExport.ts:1560 — useDataGridExport.useDataGridExport.exportCsv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). None of this is in the body itself: all 28 points belong to 2 function literals inside it that branch (lines 1562, 1585). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cognitive 28) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cognitive 28) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:814 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 7 (11 pts), boolean chains 4, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 837, 845, 886, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · looseJsonFormat.formatLooseJsonText (cognitive 28) · ×1
  • looseJsonFormat.formatLooseJsonText (cognitive 28) apps/desktop/src/lib/common/looseJsonFormat.ts:20 — looseJsonFormat.formatLooseJsonText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSelectionPersistence.restoreDataGridSelection (cognitive 28) · ×1
  • dataGridSelectionPersistence.restoreDataGridSelection (cognitive 28) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:200 — dataGridSelectionPersistence.restoreDataGridSelection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 7 (10 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 24 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineEntryLine.routineBodyCandidateLine (cognitive 28) · ×1
  • oracleRoutineEntryLine.routineBodyCandidateLine (cognitive 28) apps/desktop/src/lib/debug/oracleRoutineEntryLine.ts:80 — oracleRoutineEntryLine.routineBodyCandidateLine has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cognitive 28) · ×1
  • codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cognitive 28) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:381 — codemirrorSqlDialect.createDbxCodeMirrorSqlDialect has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 13 (14 pts), boolean chains 13, if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · codemirrorSqlBlockFolding.computeBlockFoldRanges (cognitive 28) · ×1
  • codemirrorSqlBlockFolding.computeBlockFoldRanges (cognitive 28) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:193 — codemirrorSqlBlockFolding.computeBlockFoldRanges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridSnapshot.renderGridSnapshotHtml (cognitive 28) · ×1
  • gridSnapshot.renderGridSnapshotHtml (cognitive 28) apps/desktop/src/lib/gridSnapshot/gridSnapshot.ts:130 — gridSnapshot.renderGridSnapshotHtml has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 21 (23 pts), boolean chains 5 (nesting depth added 2). Of this number, 15 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisCommandTable.firstRedisArgvUpper (cognitive 28) · ×1
  • redisCommandTable.firstRedisArgvUpper (cognitive 28) apps/desktop/src/lib/redis/redisCommandTable.ts:463 — redisCommandTable.firstRedisArgvUpper has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.includeOraclePackageCompanion (cognitive 28) · ×1
  • oracleRoutineDeploy.includeOraclePackageCompanion (cognitive 28) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:130 — oracleRoutineDeploy.includeOraclePackageCompanion has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), ternaries 5 (6 pts), loops 1 (nesting depth added 2). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlParameters.findMatchingXmlTagClose (cognitive 28) · ×1
  • sqlParameters.findMatchingXmlTagClose (cognitive 28) apps/desktop/src/lib/sql/sqlParameters.ts:821 — sqlParameters.findMatchingXmlTagClose has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineDefinitionSave.routineDefinitionKind (cognitive 28) · ×1
  • routineDefinitionSave.routineDefinitionKind (cognitive 28) apps/desktop/src/lib/table/routineDefinitionSave.ts:13 — routineDefinitionSave.routineDefinitionKind has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 9, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cognitive 28) · ×1
  • connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cognitive 28) apps/desktop/src/stores/connectionStore.ts:3376 — connectionStore.useConnectionStore.loadPagedSimpleTableChildren has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (19 pts), boolean chains 5, if/else 3 (4 pts) (nesting depth added 8). Of this number, 21 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cognitive 28) · ×1
  • connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cognitive 28) apps/desktop/src/stores/connectionStore.ts:4236 — connectionStore.useConnectionStore.buildSidebarTableSearchIndex has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 7 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTableGroups (cognitive 28) · ×1
  • connectionStore.useConnectionStore.loadTableGroups (cognitive 28) apps/desktop/src/stores/connectionStore.ts:8514 — connectionStore.useConnectionStore.loadTableGroups has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.readDataGripImportFile (cognitive 28) · ×1
  • connectionStore.useConnectionStore.readDataGripImportFile (cognitive 28) apps/desktop/src/stores/connectionStore.ts:11617 — connectionStore.useConnectionStore.readDataGripImportFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.skipAccordingToRules (cognitive 28) · ×1
  • plDebugStore.usePlDebugStore.skipAccordingToRules (cognitive 28) apps/desktop/src/stores/plDebugStore.ts:1368 — plDebugStore.usePlDebugStore.skipAccordingToRules has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.normalizeGroups (cognitive 28) · ×1
  • queryStore.useQueryStore.normalizeGroups (cognitive 28) apps/desktop/src/stores/queryStore.ts:1352 — queryStore.useQueryStore.normalizeGroups has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.loadDdlViewerTab (cognitive 28) · ×1
  • queryStore.useQueryStore.loadDdlViewerTab (cognitive 28) apps/desktop/src/stores/queryStore.ts:3730 — queryStore.useQueryStore.loadDdlViewerTab has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 28) · ×1
  • start (cognitive 28) plugins/sdk/dev-host/sidecar.mjs:99 — start has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 3 (5 pts), boolean chains 3, ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 157, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PoolEntry.borrow (cognitive 27) · ×1
  • PoolEntry.borrow (cognitive 27) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:905 — PoolEntry.borrow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (6 pts), boolean chains 2, error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 2.read (cognitive 27) · ×1
  • 2.read (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:444 — 2.read has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.<init> (cognitive 27) · ×1
  • PlDebugCompositeOutput.<init> (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:27 — PlDebugCompositeOutput.<init> has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.mutate (cognitive 27) · ×1
  • PlDebugManager.mutate (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:227 — PlDebugManager.mutate has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (9 pts), boolean chains 6, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.constructorLobProfile (cognitive 27) · ×1
  • PlDebugTarget.constructorLobProfile (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:144 — PlDebugTarget.constructorLobProfile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listForeignKeysFromCatalog (cognitive 27) · ×1
  • server.listForeignKeysFromCatalog (cognitive 27) REDACTED:2420 — server.listForeignKeysFromCatalog has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleLegacyCharset.validateValue (cognitive 27) · ×1
  • oracleLegacyCharset.validateValue (cognitive 27) agents/drivers/oracle-go/legacy_charset.go:132 — oracleLegacyCharset.validateValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · runtimeServer.dispatch (cognitive 27) · ×1
  • runtimeServer.dispatch (cognitive 27) REDACTED:824 — runtimeServer.dispatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.pendingCleanupContinuation (cognitive 27) · ×1
  • plDebugNativeEntry.pendingCleanupContinuation (cognitive 27) agents/drivers/oracle-go/pldebug_drain.go:129 — plDebugNativeEntry.pendingCleanupContinuation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.listTopics (cognitive 27) · ×1
  • rocketMQAgent.listTopics (cognitive 27) REDACTED:32 — rocketMQAgent.listTopics has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseXuguObjectTypeMethod (cognitive 27) · ×1
  • main.parseXuguObjectTypeMethod (cognitive 27) agents/drivers/xugu/type_members.go:324 — main.parseXuguObjectTypeMethod has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.elasticsearchRequestLineCandidates (cognitive 27) · ×1
  • sqlStatementRanges.elasticsearchRequestLineCandidates (cognitive 27) apps/desktop/src/lib/sql/sqlStatementRanges.ts:132 — sqlStatementRanges.elasticsearchRequestLineCandidates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.renderNotice (cognitive 27) · ×1
  • index.html.renderNotice (cognitive 27) apps/desktop/index.html:409 — index.html.renderNotice has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (17 pts), if/else 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cognitive 27) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cognitive 27) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:552 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFilePreviewLabel.buildDisplayFileNames (cognitive 27) · ×1
  • sqlFilePreviewLabel.buildDisplayFileNames (cognitive 27) apps/desktop/src/components/sql-file/sqlFilePreviewLabel.ts:15 — sqlFilePreviewLabel.buildDisplayFileNames has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 16). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.initialize (cognitive 27) · ×1
  • useAppUpdater.useAppUpdater.initialize (cognitive 27) apps/desktop/src/composables/useAppUpdater.ts:578 — useAppUpdater.useAppUpdater.initialize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · largeValueSnapshot.readLargeValueSnapshot (cognitive 27) · ×1
  • largeValueSnapshot.readLargeValueSnapshot (cognitive 27) apps/desktop/src/lib/dataGrid/largeValueSnapshot.ts:31 — largeValueSnapshot.readLargeValueSnapshot has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cognitive 27) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cognitive 27) apps/desktop/src/lib/database/oracleForeignKeys.ts:515 — oracleForeignKeys.prepareOracleForeignKeyCreatePlan has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 3 (5 pts), loops 1 (nesting depth added 6). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.loadedColumnType (cognitive 27) · ×1
  • oracleIndexes.loadedColumnType (cognitive 27) apps/desktop/src/lib/database/oracleIndexes.ts:104 — oracleIndexes.loadedColumnType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · productionSafety.referencedDatabases (cognitive 27) · ×1
  • productionSafety.referencedDatabases (cognitive 27) apps/desktop/src/lib/database/productionSafety.ts:148 — productionSafety.referencedDatabases has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editorThemes.resolveEditorTheme (cognitive 27) · ×1
  • editorThemes.resolveEditorTheme (cognitive 27) apps/desktop/src/lib/editor/editorThemes.ts:738 — editorThemes.resolveEditorTheme has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (24 pts), match/switch 1 (2 pts), if/else 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExport.runDatabaseExportUntilTerminal (cognitive 27) · ×1
  • databaseExport.runDatabaseExportUntilTerminal (cognitive 27) apps/desktop/src/lib/export/databaseExport.ts:133 — databaseExport.runDatabaseExportUntilTerminal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cognitive 27) · ×1
  • redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cognitive 27) apps/desktop/src/lib/redis/redisSyntaxDiagnostics.ts:50 — redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (7 pts), ternaries 3, boolean chains 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleRoutineDeploy.synchronizeOracleRoutineSelection (cognitive 27) · ×1
  • oracleRoutineDeploy.synchronizeOracleRoutineSelection (cognitive 27) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:94 — oracleRoutineDeploy.synchronizeOracleRoutineSelection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 2 (5 pts), loops 3 (4 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarUserAdminVisibility.sidebarUserAdminVisibility · ×1
  • sidebarUserAdminVisibility.sidebarUserAdminVisibility::filterNodes (cognitive 27) apps/desktop/src/lib/sidebar/sidebarUserAdminVisibility.ts:24 — sidebarUserAdminVisibility.sidebarUserAdminVisibility::filterNodes has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 5, if/else 3 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.compressCypherText (cognitive 27) · ×1
  • cypherFormatter.compressCypherText (cognitive 27) apps/desktop/src/lib/sql/cypherFormatter.ts:524 — cypherFormatter.compressCypherText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · primitives.renderCompactCaseExpression (cognitive 27) · ×1
  • primitives.renderCompactCaseExpression (cognitive 27) apps/desktop/src/lib/sql/layout/primitives.ts:292 — primitives.renderCompactCaseExpression has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1, loops 1 (nesting depth added 13). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlRisk.classifySetTokens (cognitive 27) · ×1
  • sqlRisk.classifySetTokens (cognitive 27) apps/desktop/src/lib/sql/sqlRisk.ts:397 — sqlRisk.classifySetTokens has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.reorderTableVGroupEntry (cognitive 27) · ×1
  • tableVGroup.reorderTableVGroupEntry (cognitive 27) apps/desktop/src/lib/table/tableVGroup.ts:281 — tableVGroup.reorderTableVGroupEntry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 9). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (insertNear, removeEntry, entryId). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cognitive 27) · ×1
  • connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cognitive 27) apps/desktop/src/stores/connectionStore.ts:3193 — connectionStore.useConnectionStore.loadPagedObjectGroupChildren has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 6, if/else 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.start (cognitive 27) · ×1
  • plDebugStore.usePlDebugStore.start (cognitive 27) apps/desktop/src/stores/plDebugStore.ts:920 — plDebugStore.usePlDebugStore.start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 11, error handling 2 (nesting depth added 4). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 947). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SqlServerBatchSplitter · ×1
  • SqlServerBatchSplitter::push_line (cognitive 26) REDACTED:2211 — SqlServerBatchSplitter::push_line has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EwkbWktDecoder.geometryToWkt (cognitive 26) · ×1
  • EwkbWktDecoder.geometryToWkt (cognitive 26) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:489 — EwkbWktDecoder.geometryToWkt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NativeLegacyJobSession.prepare (cognitive 26) · ×1
  • NativeLegacyJobSession.prepare (cognitive 26) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78 — NativeLegacyJobSession.prepare has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.registerDrivers (cognitive 26) · ×1
  • DbxJdbcPlugin.registerDrivers (cognitive 26) REDACTED:1106 — DbxJdbcPlugin.registerDrivers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.queryConstrainedObjectsWithoutValidity (cognitive 26) · ×1
  • DamengAgent.queryConstrainedObjectsWithoutValidity (cognitive 26) REDACTED:1283 — DamengAgent.queryConstrainedObjectsWithoutValidity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectPeekedMessagesNewestFirst (cognitive 26) · ×1
  • KafkaAgent.collectPeekedMessagesNewestFirst (cognitive 26) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2038 — KafkaAgent.collectPeekedMessagesNewestFirst has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointRegistry.set (cognitive 26) · ×1
  • PlDebugBreakpointRegistry.set (cognitive 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:94 — PlDebugBreakpointRegistry.set has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 2, ternaries 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCondition.evaluate (cognitive 26) · ×1
  • PlDebugCondition.evaluate (cognitive 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCondition.java:33 — PlDebugCondition.evaluate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.withTerminalKeyword (cognitive 26) · ×1
  • main.withTerminalKeyword (cognitive 26) agents/drivers/kingbase-go/main.go:2032 — main.withTerminalKeyword has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.rewriteNestedOracleSelects (cognitive 26) · ×1
  • main.rewriteNestedOracleSelects (cognitive 26) REDACTED:5461 — main.rewriteNestedOracleSelects has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeInputTransport (cognitive 26) · ×1
  • main.plDebugNativeInputTransport (cognitive 26) agents/drivers/oracle-go/pldebug_transport_preflight.go:90 — main.plDebugNativeInputTransport has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugValidateTypedUnicode (cognitive 26) · ×1
  • main.plDebugValidateTypedUnicode (cognitive 26) agents/drivers/oracle-go/pldebug_unicode.go:9 — main.plDebugValidateTypedUnicode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, loops 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getTableDDLWithIdentity (cognitive 26) · ×1
  • server.getTableDDLWithIdentity (cognitive 26) REDACTED:3886 — server.getTableDDLWithIdentity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.paginateManagementArray (cognitive 26) · ×1
  • main.paginateManagementArray (cognitive 26) REDACTED:318 — main.paginateManagementArray has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 20 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proxyMessagingClient.Send (cognitive 26) · ×1
  • proxyMessagingClient.Send (cognitive 26) agents/drivers/rocketmq/proxy.go:229 — proxyMessagingClient.Send has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listObjects (cognitive 26) · ×1
  • server.listObjects (cognitive 26) agents/drivers/vastbase-go/vastbase_metadata.go:1029 — server.listObjects has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.sapHanaScriptBlockIsComplete (cognitive 26) · ×1
  • sqlStatementRanges.sapHanaScriptBlockIsComplete (cognitive 26) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2525 — sqlStatementRanges.sapHanaScriptBlockIsComplete has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataCompareSession.runDataCompareSession (cognitive 26) · ×1
  • useDataCompareSession.runDataCompareSession (cognitive 26) apps/desktop/src/composables/useDataCompareSession.ts:329 — useDataCompareSession.runDataCompareSession has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), error handling 2 (3 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai.formatSchema (cognitive 26) · ×1
  • ai.formatSchema (cognitive 26) apps/desktop/src/lib/ai/ai.ts:800 — ai.formatSchema has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 804). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentStoreProvider.translateFieldFilterToElasticsearchQuery (cognitive 26) · ×1
  • documentStoreProvider.translateFieldFilterToElasticsearchQuery (cognitive 26) apps/desktop/src/lib/app/documentStoreProvider.ts:1053 — documentStoreProvider.translateFieldFilterToElasticsearchQuery has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.buildNativeJobDefinitionCreate (cognitive 26) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionCreate (cognitive 26) apps/desktop/src/lib/database/nativeJobAdmin.ts:378 — nativeJobAdmin.buildNativeJobDefinitionCreate has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 6, if/else 6 (nesting depth added 3). Of this number, 14 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · nativeJobs.buildNativeJobEdit (cognitive 26) · ×1
  • nativeJobs.buildNativeJobEdit (cognitive 26) apps/desktop/src/lib/database/nativeJobs.ts:322 — nativeJobs.buildNativeJobEdit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.validateChange (cognitive 26) · ×1
  • oracleConstraints.validateChange (cognitive 26) apps/desktop/src/lib/database/oracleConstraints.ts:405 — oracleConstraints.validateChange has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 9 (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.prepareOracleIndexPlan (cognitive 26) · ×1
  • oracleIndexes.prepareOracleIndexPlan (cognitive 26) apps/desktop/src/lib/database/oracleIndexes.ts:333 — oracleIndexes.prepareOracleIndexPlan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elk-layout.extractHierarchicalLayoutResult (cognitive 26) · ×1
  • elk-layout.extractHierarchicalLayoutResult (cognitive 26) apps/desktop/src/lib/diagram/elk-layout.ts:321 — elk-layout.extractHierarchicalLayoutResult has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (9 pts), loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ltr-auto-layout.orderTablesByConnectivity (cognitive 26) · ×1
  • ltr-auto-layout.orderTablesByConnectivity (cognitive 26) apps/desktop/src/lib/diagram/ltr-auto-layout.ts:40 — ltr-auto-layout.orderTablesByConnectivity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (8 pts), boolean chains 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · soqlCompletion.fieldItems (cognitive 26) · ×1
  • soqlCompletion.fieldItems (cognitive 26) apps/desktop/src/lib/soql/soqlCompletion.ts:420 — soqlCompletion.fieldItems has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executableStatementRangeCache.executableStartAfterLeadingComments (cognitive 26) · ×1
  • executableStatementRangeCache.executableStartAfterLeadingComments (cognitive 26) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:98 — executableStatementRangeCache.executableStartAfterLeadingComments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.analyzeEditableQueryEditability (cognitive 26) · ×1
  • sqlAnalysis.analyzeEditableQueryEditability (cognitive 26) apps/desktop/src/lib/sql/sqlAnalysis.ts:249 — sqlAnalysis.analyzeEditableQueryEditability has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.findMatchingParen (cognitive 26) · ×1
  • sqlCompletion.findMatchingParen (cognitive 26) apps/desktop/src/lib/sql/sqlCompletion.ts:4527 — sqlCompletion.findMatchingParen has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildJoinConditionItemsForPair (cognitive 26) · ×1
  • sqlCompletion.buildJoinConditionItemsForPair (cognitive 26) apps/desktop/src/lib/sql/sqlCompletion.ts:6518 — sqlCompletion.buildJoinConditionItemsForPair has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 4, ternaries 3 (4 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.extractSqlParameterDescriptors (cognitive 26) · ×1
  • sqlParameters.extractSqlParameterDescriptors (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:223 — sqlParameters.extractSqlParameterDescriptors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). Of this number, 20 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.decodeMyBatisXmlComparisonEntities (cognitive 26) · ×1
  • sqlParameters.decodeMyBatisXmlComparisonEntities (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:369 — sqlParameters.decodeMyBatisXmlComparisonEntities has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectComplexTypeFieldSeparators (cognitive 26) · ×1
  • sqlParameters.collectComplexTypeFieldSeparators (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:1189 — sqlParameters.collectComplexTypeFieldSeparators has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFileTreeFilter.filterAndSortSqlFileEntries · ×1
  • sqlFileTreeFilter.filterAndSortSqlFileEntries::filterEntries (cognitive 26) apps/desktop/src/lib/sql/sqlFileTreeFilter.ts:114 — sqlFileTreeFilter.filterAndSortSqlFileEntries::filterEntries has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerHostPort.parseSqlServerHostPort (cognitive 26) · ×1
  • sqlServerHostPort.parseSqlServerHostPort (cognitive 26) apps/desktop/src/lib/sqlserver/sqlServerHostPort.ts:7 — sqlServerHostPort.parseSqlServerHostPort has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.verifyFinalSnapshots (cognitive 26) · ×1
  • oracleTableRename.verifyFinalSnapshots (cognitive 26) REDACTED:759 — oracleTableRename.verifyFinalSnapshots has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (9 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.stripXuguSqlComments (cognitive 26) · ×1
  • routineParameters.stripXuguSqlComments (cognitive 26) apps/desktop/src/lib/table/routineParameters.ts:429 — routineParameters.stripXuguSqlComments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.setChildren (cognitive 26) · ×1
  • connectionStore.useConnectionStore.setChildren (cognitive 26) apps/desktop/src/stores/connectionStore.ts:2186 — connectionStore.useConnectionStore.setChildren has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.setBreakpointEnabled (cognitive 26) · ×1
  • plDebugStore.usePlDebugStore.setBreakpointEnabled (cognitive 26) apps/desktop/src/stores/plDebugStore.ts:1195 — plDebugStore.usePlDebugStore.setBreakpointEnabled has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore (cognitive 26) · ×1
  • queryStore.useQueryStore (cognitive 26) apps/desktop/src/stores/queryStore.ts:1189 — queryStore.useQueryStore has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 6, boolean chains 4 (nesting depth added 6). None of this is in the body itself: all 26 points belong to 11 function literals inside it that branch (lines 4882, 1237, 1256, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask (cognitive 26) · ×1
  • tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask (cognitive 26) apps/desktop/src/stores/tableCopyTaskStore.ts:78 — tableCopyTaskStore.useTableCopyTaskStore.syncBackgroundTask has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (19 pts), boolean chains 4, if/else 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OraclePlSqlBlockWalk · ×1
  • OraclePlSqlBlockWalk::step (cognitive 25) REDACTED:4231 — OraclePlSqlBlockWalk::step has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JdbcExecutor.executePage (cognitive 25) · ×1
  • JdbcExecutor.executePage (cognitive 25) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:560 — JdbcExecutor.executePage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.executeQueryOnConnection (cognitive 25) · ×1
  • DbxJdbcPlugin.executeQueryOnConnection (cognitive 25) REDACTED:1573 — DbxJdbcPlugin.executeQueryOnConnection has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleForeignKeyDefinition.read (cognitive 25) · ×1
  • OracleForeignKeyDefinition.read (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OracleForeignKeyDefinition.java:21 — OracleForeignKeyDefinition.read has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCapabilities.probe (cognitive 25) · ×1
  • PlDebugCapabilities.probe (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:21 — PlDebugCapabilities.probe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (7 pts), error handling 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.objectValue (cognitive 25) · ×1
  • PlDebugCompositeInput.objectValue (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:180 — PlDebugCompositeInput.objectValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSource.reference (cognitive 25) · ×1
  • PlDebugSource.reference (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:20 — PlDebugSource.reference has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlServerLegacyAgent.shouldFallbackToJtds (cognitive 25) · ×1
  • SqlServerLegacyAgent.shouldFallbackToJtds (cognitive 25) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:326 — SqlServerLegacyAgent.shouldFallbackToJtds has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 10, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.runPagedOracleSelect (cognitive 25) · ×1
  • server.runPagedOracleSelect (cognitive 25) REDACTED:4740 — server.runPagedOracleSelect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1, loops 1 (nesting depth added 13). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.prepareLegacyJob (cognitive 25) · ×1
  • server.prepareLegacyJob (cognitive 25) agents/drivers/oracle-go/native_jobs.go:85 — server.prepareLegacyJob has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugNativeEntry.resolveNativeAnonymousSources (cognitive 25) · ×1
  • plDebugNativeEntry.resolveNativeAnonymousSources (cognitive 25) agents/drivers/oracle-go/pldebug_anonymous_source.go:85 — plDebugNativeEntry.resolveNativeAnonymousSources has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugResultCache.page (cognitive 25) · ×1
  • plDebugResultCache.page (cognitive 25) agents/drivers/oracle-go/pldebug_results.go:143 — plDebugResultCache.page has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getTopicConfig (cognitive 25) · ×1
  • server.getTopicConfig (cognitive 25) agents/drivers/rabbitmq/operations.go:207 — server.getTopicConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wkbGeometry.wkt (cognitive 25) · ×1
  • wkbGeometry.wkt (cognitive 25) agents/drivers/vastbase-go/spatial.go:218 — wkbGeometry.wkt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.classifyRPCError (cognitive 25) · ×1
  • main.classifyRPCError (cognitive 25) agents/drivers/xugu/protocol_error.go:48 — main.classifyRPCError has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cognitive 25) · ×1
  • useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cognitive 25) apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts:532 — useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 7). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.transactionalMysqlTableDdl (cognitive 25) · ×1
  • queryResultTransferDdl.transactionalMysqlTableDdl (cognitive 25) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:34 — queryResultTransferDdl.transactionalMysqlTableDdl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.columnDefinitions (cognitive 25) · ×1
  • queryResultTransferDdl.columnDefinitions (cognitive 25) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:56 — queryResultTransferDdl.columnDefinitions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cognitive 25) · ×1
  • useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cognitive 25) apps/desktop/src/composables/useDataGridColumnFormatter.ts:288 — useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cognitive 25) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cognitive 25) REDACTED:492 — useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cognitive 25) · ×1
  • useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cognitive 25) apps/desktop/src/composables/useDataGridExport.ts:2231 — useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, ternaries 2, error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 2235, 2257, 2275, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cognitive 25) · ×1
  • useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cognitive 25) apps/desktop/src/composables/useDataGridExtractor.ts:549 — useDataGridExtractor.useDataGridExtractor.copyWithExtractor has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 7, error handling 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useExportTracker.useExportTracker.updateDataTransferTask (cognitive 25) · ×1
  • useExportTracker.useExportTracker.updateDataTransferTask (cognitive 25) apps/desktop/src/composables/useExportTracker.ts:931 — useExportTracker.useExportTracker.updateDataTransferTask has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 11. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.continueExecute (cognitive 25) · ×1
  • useSqlExecution.useSqlExecution.continueExecute (cognitive 25) apps/desktop/src/composables/useSqlExecution.ts:374 — useSqlExecution.useSqlExecution.continueExecute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backend-errors.translateKnownMessage (cognitive 25) · ×1
  • backend-errors.translateKnownMessage (cognitive 25) apps/desktop/src/i18n/backend-errors.ts:250 — backend-errors.translateKnownMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 2 (7 pts), loops 1 (nesting depth added 15). Of this number, 21 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCopyExtractor.validateDataGridExtractorOptions (cognitive 25) · ×1
  • dataGridCopyExtractor.validateDataGridExtractorOptions (cognitive 25) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:316 — dataGridCopyExtractor.validateDataGridExtractorOptions has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 9, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · xuguUserPermissions.parseXuguAclRows (cognitive 25) · ×1
  • xuguUserPermissions.parseXuguAclRows (cognitive 25) apps/desktop/src/lib/database/xuguUserPermissions.ts:422 — xuguUserPermissions.parseXuguAclRows has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12 (22 pts), boolean chains 3 (nesting depth added 10). None of this is in the body itself: all 25 points belong to 2 function items inside it that branch (a function literal at line 426, field). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · queryEditorTableDrop.parseTableReferencePayload (cognitive 25) · ×1
  • queryEditorTableDrop.parseTableReferencePayload (cognitive 25) apps/desktop/src/lib/editor/queryEditorTableDrop.ts:196 — queryEditorTableDrop.parseTableReferencePayload has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · diagramSvgExport.buildTableDiagramSvg (cognitive 25) · ×1
  • diagramSvgExport.buildTableDiagramSvg (cognitive 25) apps/desktop/src/lib/export/diagramSvgExport.ts:218 — diagramSvgExport.buildTableDiagramSvg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.parseDbForestGroupPaths (cognitive 25) · ×1
  • datagripImport.parseDbForestGroupPaths (cognitive 25) REDACTED:455 — datagripImport.parseDbForestGroupPaths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 7). Of this number, 20 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableMetadataCache.loadTableColumns (cognitive 25) · ×1
  • tableMetadataCache.loadTableColumns (cognitive 25) apps/desktop/src/lib/metadata/tableMetadataCache.ts:218 — tableMetadataCache.loadTableColumns has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 4 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeNodeClick.treeNodeRowAction (cognitive 25) · ×1
  • treeNodeClick.treeNodeRowAction (cognitive 25) apps/desktop/src/lib/sidebar/treeNodeClick.ts:169 — treeNodeClick.treeNodeRowAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, ternaries 3 (7 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · printer.printStatement (cognitive 25) · ×1
  • printer.printStatement (cognitive 25) apps/desktop/src/lib/sql/layout/printer.ts:642 — printer.printStatement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cteNavigation.findCteColumnResolution (cognitive 25) · ×1
  • cteNavigation.findCteColumnResolution (cognitive 25) apps/desktop/src/lib/sql/semantic/cteNavigation.ts:118 — cteNavigation.findCteColumnResolution has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.hasTopLevelSemicolon (cognitive 25) · ×1
  • sqlAnalysis.hasTopLevelSemicolon (cognitive 25) apps/desktop/src/lib/sql/sqlAnalysis.ts:938 — sqlAnalysis.hasTopLevelSemicolon has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildKeywordItems (cognitive 25) · ×1
  • sqlCompletion.buildKeywordItems (cognitive 25) apps/desktop/src/lib/sql/sqlCompletion.ts:7018 — sqlCompletion.buildKeywordItems has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 6, ternaries 6. Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7033, 7042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax (cognitive 25) · ×1
  • sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax (cognitive 25) apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts:150 — sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectDeclareStatementVariables (cognitive 25) · ×1
  • sqlParameters.collectDeclareStatementVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1458 — sqlParameters.collectDeclareStatementVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectSetStatementVariables (cognitive 25) · ×1
  • sqlParameters.collectSetStatementVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1498 — sqlParameters.collectSetStatementVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sqlParameters.collectExecNamedArgumentStarts) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sqlParameters.collectRoutineDefinitionVariables (cognitive 25) · ×1
  • sqlParameters.collectRoutineDefinitionVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1612 — sqlParameters.collectRoutineDefinitionVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectExecNamedArgumentStarts (cognitive 25) · ×1
  • sqlParameters.collectExecNamedArgumentStarts (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1652 — sqlParameters.collectExecNamedArgumentStarts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sqlParameters.collectSetStatementVariables) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cognitive 25) · ×1
  • sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cognitive 25) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:192 — sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTypeManagement.assertNoUnapprovedChange (cognitive 25) · ×1
  • oracleTypeManagement.assertNoUnapprovedChange (cognitive 25) apps/desktop/src/lib/table/oracleTypeManagement.ts:491 — oracleTypeManagement.assertNoUnapprovedChange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadSchemas (cognitive 25) · ×1
  • connectionStore.useConnectionStore.loadSchemas (cognitive 25) apps/desktop/src/stores/connectionStore.ts:7179 — connectionStore.useConnectionStore.loadSchemas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 7194, 7237). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTriggers (cognitive 25) · ×1
  • connectionStore.useConnectionStore.loadTriggers (cognitive 25) apps/desktop/src/stores/connectionStore.ts:8815 — connectionStore.useConnectionStore.loadTriggers has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13 (16 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 8838). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DriversClient.DriversClient · ×1
  • DriversClient.DriversClient::fetchBundlePackage (cognitive 25) docs/app/[lang]/drivers/DriversClient.tsx:343 — DriversClient.DriversClient::fetchBundlePackage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (8 pts), loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (DriversClient.DriversClient) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ContributorsExperience.ContributorsExperience (cognitive 25) · ×1
  • ContributorsExperience.ContributorsExperience (cognitive 25) docs/components/contributors/ContributorsExperience.tsx:190 — ContributorsExperience.ContributorsExperience has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 5). Of this number, 17 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.enrich (cognitive 24) · ×1
  • OracleTriggerMetadataReader.enrich (cognitive 24) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:105 — OracleTriggerMetadataReader.enrich has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (8 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.applyAggregateOptions (cognitive 24) · ×1
  • MongoAgent.applyAggregateOptions (cognitive 24) REDACTED:878 — MongoAgent.applyAggregateOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseLobValues.read (cognitive 24) · ×1
  • OceanBaseLobValues.read (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:170 — OceanBaseLobValues.read has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7 (8 pts), boolean chains 6, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Writer.child (cognitive 24) · ×1
  • Writer.child (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:392 — Writer.child has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.start (cognitive 24) · ×1
  • PlDebugManager.start (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:104 — PlDebugManager.start has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.recoverOutput (cognitive 24) · ×1
  • PlDebugSession.recoverOutput (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1925 — PlDebugSession.recoverOutput has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 6 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranswarpAgent.getColumns (cognitive 24) · ×1
  • TranswarpAgent.getColumns (cognitive 24) REDACTED:200 — TranswarpAgent.getColumns has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 5, error handling 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ci-install-system-deps.install (cognitive 24) · ×1
  • ci-install-system-deps.install (cognitive 24) .github/scripts/ci-install-system-deps.py:162 — ci-install-system-deps.install has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.materializedViewDDLFromCatalog (cognitive 24) · ×1
  • main.materializedViewDDLFromCatalog (cognitive 24) agents/drivers/cassandra-go/materialized_view.go:253 — main.materializedViewDDLFromCatalog has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · server.getTableDialectDDL (cognitive 24) · ×1
  • server.getTableDialectDDL (cognitive 24) agents/drivers/iotdb/metadata.go:438 — server.getTableDialectDDL has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseHostEndpoint (cognitive 24) · ×1
  • main.parseHostEndpoint (cognitive 24) agents/drivers/kingbase-go/main.go:619 — main.parseHostEndpoint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · server.getTablePartitioning (cognitive 24) · ×1
  • server.getTablePartitioning (cognitive 24) REDACTED:1204 — server.getTablePartitioning has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getExactTriggerSource (cognitive 24) · ×1
  • server.getExactTriggerSource (cognitive 24) agents/drivers/oracle-go/trigger_metadata.go:322 — server.getExactTriggerSource has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugSession.resumeUntilException (cognitive 24) · ×1
  • plDebugSession.resumeUntilException (cognitive 24) REDACTED:2478 — plDebugSession.resumeUntilException has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugLobOutput.freezeNationalSource (cognitive 24) · ×1
  • plDebugLobOutput.freezeNationalSource (cognitive 24) agents/drivers/oracle-go/pldebug_lob_output.go:49 — plDebugLobOutput.freezeNationalSource has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.xuguParenthesizedGroups (cognitive 24) · ×1
  • main.xuguParenthesizedGroups (cognitive 24) REDACTED:5730 — main.xuguParenthesizedGroups has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.oracleStorageClauseEnd (cognitive 24) · ×1
  • ddlStorage.oracleStorageClauseEnd (cognitive 24) apps/desktop/src/lib/sql/ddlStorage.ts:173 — ddlStorage.oracleStorageClauseEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, ternaries 4 (8 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cognitive 24) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cognitive 24) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:821 — useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionUrl.urlParamsRequireTls (cognitive 24) · ×1
  • connectionUrl.urlParamsRequireTls (cognitive 24) REDACTED:387 — connectionUrl.urlParamsRequireTls has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (12 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · dataGenerate.isWrappedByOuterParens (cognitive 24) · ×1
  • dataGenerate.isWrappedByOuterParens (cognitive 24) apps/desktop/src/lib/dataGrid/dataGenerate.ts:257 — dataGenerate.isWrappedByOuterParens has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSort.compareDataGridValues (cognitive 24) · ×1
  • dataGridSort.compareDataGridValues (cognitive 24) apps/desktop/src/lib/dataGrid/dataGridSort.ts:109 — dataGridSort.compareDataGridValues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseStructureSearch.runDocumentStructureSearch (cognitive 24) · ×1
  • databaseStructureSearch.runDocumentStructureSearch (cognitive 24) apps/desktop/src/lib/database/databaseStructureSearch.ts:143 — databaseStructureSearch.runDocumentStructureSearch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.oracleConstraintDefinitionFromInfo (cognitive 24) · ×1
  • oracleConstraints.oracleConstraintDefinitionFromInfo (cognitive 24) apps/desktop/src/lib/database/oracleConstraints.ts:116 — oracleConstraints.oracleConstraintDefinitionFromInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.validateOracleForeignKeyReference (cognitive 24) · ×1
  • oracleForeignKeys.validateOracleForeignKeyReference (cognitive 24) apps/desktop/src/lib/database/oracleForeignKeys.ts:427 — oracleForeignKeys.validateOracleForeignKeyReference has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, loops 1 (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elasticsearchRequestRisk.uncommentedLines (cognitive 24) · ×1
  • elasticsearchRequestRisk.uncommentedLines (cognitive 24) apps/desktop/src/lib/elasticsearch/elasticsearchRequestRisk.ts:82 — elasticsearchRequestRisk.uncommentedLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyUpdate (cognitive 24) · ×1
  • mongoCompletion.classifyUpdate (cognitive 24) REDACTED:1315 — mongoCompletion.classifyUpdate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.cursorMethodItems (cognitive 24) · ×1
  • mongoCompletion.cursorMethodItems (cognitive 24) REDACTED:1880 — mongoCompletion.cursorMethodItems has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (24 pts) (nesting depth added 16). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1885). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoFindCommand (cognitive 24) · ×1
  • mongoShellCommand.parseMongoFindCommand (cognitive 24) REDACTED:378 — mongoShellCommand.parseMongoFindCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoShellCommand.mongoCommentAwareBodyEnd (cognitive 24) · ×1
  • mongoShellCommand.mongoCommentAwareBodyEnd (cognitive 24) REDACTED:1675 — mongoShellCommand.mongoCommentAwareBodyEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 7, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSql.comparisonToFilter (cognitive 24) · ×1
  • mongoSql.comparisonToFilter (cognitive 24) apps/desktop/src/lib/mongo/mongoSql.ts:1023 — mongoSql.comparisonToFilter has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 4, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thriftBinary.readValue (cognitive 24) · ×1
  • thriftBinary.readValue (cognitive 24) apps/desktop/src/lib/mq/thriftBinary.ts:163 — thriftBinary.readValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginFloatingWindow.parseFloatingWindowRequest (cognitive 24) · ×1
  • pluginFloatingWindow.parseFloatingWindowRequest (cognitive 24) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:267 — pluginFloatingWindow.parseFloatingWindowRequest has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10, boolean chains 8, if/else 6. Of this number, 17 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · pluginMarketplace.comparePrerelease (cognitive 24) · ×1
  • pluginMarketplace.comparePrerelease (cognitive 24) apps/desktop/src/lib/plugins/pluginMarketplace.ts:364 — pluginMarketplace.comparePrerelease has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cognitive 24) · ×1
  • schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cognitive 24) apps/desktop/src/lib/schema/schemaDiffTableMapping.ts:47 — schemaDiffTableMapping.reconcileSchemaDiffTableMappings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 3 (4 pts), ternaries 2 (nesting depth added 8). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solrRequestRisk.uncommentedLines (cognitive 24) · ×1
  • solrRequestRisk.uncommentedLines (cognitive 24) apps/desktop/src/lib/solr/solrRequestRisk.ts:145 — solrRequestRisk.uncommentedLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.splitTopLevel (cognitive 24) · ×1
  • sqlCompletion.splitTopLevel (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:4802 — sqlCompletion.splitTopLevel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.splitRoutineSignatureParameters (cognitive 24) · ×1
  • sqlCompletion.splitRoutineSignatureParameters (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:5379 — sqlCompletion.splitRoutineSignatureParameters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.completionColumnPrefixCandidates (cognitive 24) · ×1
  • sqlCompletion.completionColumnPrefixCandidates (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:6077 — sqlCompletion.completionColumnPrefixCandidates has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.isMysqlRoutineHeader (cognitive 24) · ×1
  • sqlParameters.isMysqlRoutineHeader (cognitive 24) apps/desktop/src/lib/sql/sqlParameters.ts:713 — sqlParameters.isMysqlRoutineHeader has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 8, loops 1. Of this number, 19 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · batchTableDrop.runBatchTableDrop (cognitive 24) · ×1
  • batchTableDrop.runBatchTableDrop (cognitive 24) apps/desktop/src/lib/table/batchTableDrop.ts:36 — batchTableDrop.runBatchTableDrop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupContainerNode (cognitive 24) · ×1
  • tableVGroup.findTableVGroupContainerNode (cognitive 24) apps/desktop/src/lib/table/tableVGroup.ts:629 — tableVGroup.findTableVGroupContainerNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, ternaries 4 (5 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (walk, a function literal at line 663, matchesOptional, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.disconnect (cognitive 24) · ×1
  • connectionStore.useConnectionStore.disconnect (cognitive 24) apps/desktop/src/stores/connectionStore.ts:5809 — connectionStore.useConnectionStore.disconnect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.applyRestoredOpenTabs (cognitive 24) · ×1
  • queryStore.useQueryStore.applyRestoredOpenTabs (cognitive 24) apps/desktop/src/stores/queryStore.ts:2806 — queryStore.useQueryStore.applyRestoredOpenTabs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.openObjectBrowser (cognitive 24) · ×1
  • queryStore.useQueryStore.openObjectBrowser (cognitive 24) apps/desktop/src/stores/queryStore.ts:3913 — queryStore.useQueryStore.openObjectBrowser has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, ternaries 8 (9 pts), if/else 4 (6 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cognitive 24) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cognitive 24) apps/desktop/src/stores/queryStore.ts:10893 — queryStore.useQueryStore.captureResultLegacyValuesForExport.read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 4 (6 pts), error handling 2, loops 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.isMongoRegexValuePosition (cognitive 24) · ×1
  • json.isMongoRegexValuePosition (cognitive 24) packages/mongo-shell/src/json.ts:136 — json.isMongoRegexValuePosition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TupleScanner · ×1
  • TupleScanner::next (cognitive 23) REDACTED:225 — TupleScanner::next has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackedPhysicalConnection.<init> (cognitive 23) · ×1
  • TrackedPhysicalConnection.<init> (cognitive 23) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1917 — TrackedPhysicalConnection.<init> has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 9, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cognitive 23) · ×1
  • DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cognitive 23) REDACTED:3372 — DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.listObjects (cognitive 23) · ×1
  • OracleTriggerMetadataReader.listObjects (cognitive 23) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:57 — OracleTriggerMetadataReader.listObjects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.isDamengMetadataUnavailableError (cognitive 23) · ×1
  • DamengAgent.isDamengMetadataUnavailableError (cognitive 23) REDACTED:770 — DamengAgent.isDamengMetadataUnavailableError has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.listConstraints (cognitive 23) · ×1
  • OceanBaseOracleAgent.listConstraints (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2198 — OceanBaseOracleAgent.listConstraints has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.run (cognitive 23) · ×1
  • Execution.run (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:144 — Execution.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 4 (6 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Entry.snapshot (cognitive 23) · ×1
  • Entry.snapshot (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:650 — Entry.snapshot has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 6, if/else 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.entries (cognitive 23) · ×1
  • PlDebugTemporalJson.entries (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:108 — PlDebugTemporalJson.entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.listReadableRanges (cognitive 23) · ×1
  • etcdSession.listReadableRanges (cognitive 23) agents/drivers/etcd-go/kv.go:118 — etcdSession.listReadableRanges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcd2Session.put (cognitive 23) · ×1
  • etcd2Session.put (cognitive 23) agents/drivers/etcd2-go/kv.go:178 — etcd2Session.put has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · main.oracleLegacyOptions (cognitive 23) · ×1
  • main.oracleLegacyOptions (cognitive 23) agents/drivers/oracle-go/legacy_charset.go:31 — main.oracleLegacyOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 36). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.oracleColumnTypeDDL (cognitive 23) · ×1
  • main.oracleColumnTypeDDL (cognitive 23) REDACTED:4352 — main.oracleColumnTypeDDL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.oracleRequestedMetadataListQuery (cognitive 23) · ×1
  • main.oracleRequestedMetadataListQuery (cognitive 23) agents/drivers/oracle-go/metadata_queries.go:11 — main.oracleRequestedMetadataListQuery has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugTargetRoutine (cognitive 23) · ×1
  • main.plDebugTargetRoutine (cognitive 23) REDACTED:5356 — main.plDebugTargetRoutine has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugDecodeBinaryOrLobInput (cognitive 23) · ×1
  • main.plDebugDecodeBinaryOrLobInput (cognitive 23) agents/drivers/oracle-go/pldebug_lob_input.go:28 — main.plDebugDecodeBinaryOrLobInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.plDebugNativeTimezoneResult (cognitive 23) · ×1
  • main.plDebugNativeTimezoneResult (cognitive 23) agents/drivers/oracle-go/pldebug_timezone.go:291 — main.plDebugNativeTimezoneResult has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, loops 1 (nesting depth added 3). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · server.listSchemas (cognitive 23) · ×1
  • server.listSchemas (cognitive 23) REDACTED:1943 — server.listSchemas has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.queryRowsWithTimeout (cognitive 23) · ×1
  • server.queryRowsWithTimeout (cognitive 23) REDACTED:6326 — server.queryRowsWithTimeout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (23 pts) (nesting depth added 6). Of this number, 14 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugSession.stepIntoRoutine (cognitive 23) · ×1
  • plDebugSession.stepIntoRoutine (cognitive 23) REDACTED:1781 — plDebugSession.stepIntoRoutine has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugCollectionInitializer.object (cognitive 23) · ×1
  • plDebugCollectionInitializer.object (cognitive 23) agents/drivers/oracle-go/pldebug_object_initialize.go:5 — plDebugCollectionInitializer.object has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugResultCache.retainWithState (cognitive 23) · ×1
  • plDebugResultCache.retainWithState (cognitive 23) agents/drivers/oracle-go/pldebug_results.go:67 — plDebugResultCache.retainWithState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · server.peekMessages (cognitive 23) · ×1
  • server.peekMessages (cognitive 23) agents/drivers/rabbitmq/operations.go:1162 — server.peekMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseConnection (cognitive 23) · ×1
  • main.parseConnection (cognitive 23) agents/drivers/rocketmq/connection.go:41 — main.parseConnection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proxyMessagingClient.register (cognitive 23) · ×1
  • proxyMessagingClient.register (cognitive 23) agents/drivers/rocketmq/proxy.go:146 — proxyMessagingClient.register has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 160). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.skipXuguTypeQuotedOrComment (cognitive 23) · ×1
  • main.skipXuguTypeQuotedOrComment (cognitive 23) agents/drivers/xugu/type_members.go:524 — main.skipXuguTypeQuotedOrComment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listTablespaces (cognitive 23) · ×1
  • server.listTablespaces (cognitive 23) REDACTED:1760 — server.listTablespaces has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listTablesByAvailableSources (cognitive 23) · ×1
  • server.listTablesByAvailableSources (cognitive 23) REDACTED:2157 — server.listTablesByAvailableSources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getTableDDL (cognitive 23) · ×1
  • server.getTableDDL (cognitive 23) REDACTED:3750 — server.getTableDDL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Int32ArrayColumnDecoder.ReadColumn (cognitive 23) · ×1
  • Int32ArrayColumnDecoder.ReadColumn (cognitive 23) agents/go-common/iotdb-client-go/client/column_decoder.go:91 — Int32ArrayColumnDecoder.ReadColumn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Int64ArrayColumnDecoder.ReadColumn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Int64ArrayColumnDecoder.ReadColumn (cognitive 23) · ×1
  • Int64ArrayColumnDecoder.ReadColumn (cognitive 23) agents/go-common/iotdb-client-go/client/column_decoder.go:147 — Int64ArrayColumnDecoder.ReadColumn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Int32ArrayColumnDecoder.ReadColumn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Server.Serve (cognitive 23) · ×1
  • Server.Serve (cognitive 23) plugins/sdk/go/dbx-plugin-sdk/sdk.go:190 — Server.Serve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.nextSqlWordToken (cognitive 23) · ×1
  • sqlStatementRanges.nextSqlWordToken (cognitive 23) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1654 — sqlStatementRanges.nextSqlWordToken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffHunkBuilder.buildHunks (cognitive 23) · ×1
  • DiffHunkBuilder.buildHunks (cognitive 23) apps/desktop/src/components/diff/DiffHunkBuilder.ts:390 — DiffHunkBuilder.buildHunks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cognitive 23) · ×1
  • useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cognitive 23) apps/desktop/src/components/editor/useQueryEditorCompletionKeys.ts:177 — useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.performInstall (cognitive 23) · ×1
  • useAppUpdater.useAppUpdater.performInstall (cognitive 23) apps/desktop/src/composables/useAppUpdater.ts:518 — useAppUpdater.useAppUpdater.performInstall has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cognitive 23) · ×1
  • useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cognitive 23) apps/desktop/src/composables/useDataGridEditor.ts:2361 — useDataGridEditor.useDataGridEditor.executeConditionalUpdate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JsonSourceScanner.readNumberToken (cognitive 23) · ×1
  • JsonSourceScanner.readNumberToken (cognitive 23) REDACTED:536 — JsonSourceScanner.readNumberToken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · columnFormatter.formatTemporalValueForExport (cognitive 23) · ×1
  • columnFormatter.formatTemporalValueForExport (cognitive 23) apps/desktop/src/lib/dataGrid/columnFormatter.ts:464 — columnFormatter.formatTemporalValueForExport has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · dataGenerate.generateTableRowsChunk (cognitive 23) · ×1
  • dataGenerate.generateTableRowsChunk (cognitive 23) apps/desktop/src/lib/dataGrid/dataGenerate.ts:2071 — dataGenerate.generateTableRowsChunk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 2077). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · regexGenerate.gen (cognitive 23) · ×1
  • regexGenerate.gen (cognitive 23) REDACTED:361 — regexGenerate.gen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · nativeJobs.damengChildChanges (cognitive 23) · ×1
  • nativeJobs.damengChildChanges (cognitive 23) apps/desktop/src/lib/database/nativeJobs.ts:365 — nativeJobs.damengChildChanges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 2 (3 pts), loops 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleInvalidObjects.readAllOracleInvalidObjects (cognitive 23) · ×1
  • oracleInvalidObjects.readAllOracleInvalidObjects (cognitive 23) apps/desktop/src/lib/database/oracleInvalidObjects.ts:86 — oracleInvalidObjects.readAllOracleInvalidObjects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlAliasHighlights.createSqlAliasHighlights (cognitive 23) · ×1
  • codemirrorSqlAliasHighlights.createSqlAliasHighlights (cognitive 23) apps/desktop/src/lib/editor/codemirrorSqlAliasHighlights.ts:22 — codemirrorSqlAliasHighlights.createSqlAliasHighlights has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7 (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · hoverTableSql.reformatHoverDdl (cognitive 23) · ×1
  • hoverTableSql.reformatHoverDdl (cognitive 23) apps/desktop/src/lib/editor/hoverTableSql.ts:767 — hoverTableSql.reformatHoverDdl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · historyRestoreTarget.resolveHistorySqlRestoreTarget (cognitive 23) · ×1
  • historyRestoreTarget.resolveHistorySqlRestoreTarget (cognitive 23) apps/desktop/src/lib/history/historyRestoreTarget.ts:12 — historyRestoreTarget.resolveHistorySqlRestoreTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisDesktopManagerImport.connection (cognitive 23) · ×1
  • redisDesktopManagerImport.connection (cognitive 23) apps/desktop/src/lib/imports/redisDesktopManagerImport.ts:42 — redisDesktopManagerImport.connection has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.parseMongoDocumentInputValue (cognitive 23) · ×1
  • mongoDocumentValues.parseMongoDocumentInputValue (cognitive 23) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:151 — mongoDocumentValues.parseMongoDocumentInputValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Parser.parsePredicate (cognitive 23) · ×1
  • Parser.parsePredicate (cognitive 23) apps/desktop/src/lib/mongo/mongoSql.ts:350 — Parser.parsePredicate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendPluginRegistry.listPaletteMenuCommands (cognitive 23) · ×1
  • FrontendPluginRegistry.listPaletteMenuCommands (cognitive 23) apps/desktop/src/lib/plugins/frontendPlugin.ts:125 — FrontendPluginRegistry.listPaletteMenuCommands has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · javaSerialized.normalizeJavaSerializedValue (cognitive 23) · ×1
  • javaSerialized.normalizeJavaSerializedValue (cognitive 23) apps/desktop/src/lib/redis/codec/javaSerialized.ts:392 — javaSerialized.normalizeJavaSerializedValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisKeyPattern.createRedisKeyPatternMatcher.<returned closure> (cognitive 23) · ×1
  • redisKeyPattern.createRedisKeyPatternMatcher.<returned closure> (cognitive 23) apps/desktop/src/lib/redis/redisKeyPattern.ts:88 — redisKeyPattern.createRedisKeyPatternMatcher.<returned closure> has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (7 pts), error handling 1 (2 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.executeOracleRoutineDeployment (cognitive 23) · ×1
  • oracleRoutineDeploy.executeOracleRoutineDeployment (cognitive 23) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:670 — oracleRoutineDeploy.executeOracleRoutineDeployment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 679). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarSearchTree.isUnloadedTypeFilterContainer (cognitive 23) · ×1
  • sidebarSearchTree.isUnloadedTypeFilterContainer (cognitive 23) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:458 — sidebarSearchTree.isUnloadedTypeFilterContainer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarTreeArrowNavigation.sidebarTreeArrowAction (cognitive 23) · ×1
  • sidebarTreeArrowNavigation.sidebarTreeArrowAction (cognitive 23) apps/desktop/src/lib/sidebar/sidebarTreeArrowNavigation.ts:16 — sidebarTreeArrowNavigation.sidebarTreeArrowAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguTypeMembers.buildXuguTypeMemberNodes (cognitive 23) · ×1
  • xuguTypeMembers.buildXuguTypeMemberNodes (cognitive 23) apps/desktop/src/lib/sidebar/xuguTypeMembers.ts:12 — xuguTypeMembers.buildXuguTypeMemberNodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (8 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlDisplay.applyDdlDatabaseQualifier (cognitive 23) · ×1
  • ddlDisplay.applyDdlDatabaseQualifier (cognitive 23) apps/desktop/src/lib/sql/ddlDisplay.ts:348 — ddlDisplay.applyDdlDatabaseQualifier has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorPosition.resolveSqlErrorOffset (cognitive 23) · ×1
  • errorPosition.resolveSqlErrorOffset (cognitive 23) apps/desktop/src/lib/sql/errorPosition.ts:156 — errorPosition.resolveSqlErrorOffset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 5, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.findEnclosingDollarQuoteStartInText (cognitive 23) · ×1
  • insertValueHints.findEnclosingDollarQuoteStartInText (cognitive 23) apps/desktop/src/lib/sql/insertValueHints.ts:642 — insertValueHints.findEnclosingDollarQuoteStartInText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.analyzeSelectStructureForDisplay (cognitive 23) · ×1
  • sqlAnalysis.analyzeSelectStructureForDisplay (cognitive 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:333 — sqlAnalysis.analyzeSelectStructureForDisplay has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 8, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlAnalysis.parseFromSources (cognitive 23) · ×1
  • sqlAnalysis.parseFromSources (cognitive 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:661 — sqlAnalysis.parseFromSources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.parseXmlAttributes (cognitive 23) · ×1
  • sqlParameters.parseXmlAttributes (cognitive 23) apps/desktop/src/lib/sql/sqlParameters.ts:791 — sqlParameters.parseXmlAttributes has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts), boolean chains 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · routineParameters.parseXuguRoutineParameter (cognitive 23) · ×1
  • routineParameters.parseXuguRoutineParameter (cognitive 23) apps/desktop/src/lib/table/routineParameters.ts:353 — routineParameters.parseXuguRoutineParameter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · tableDataExport.fetchTableDataForExport (cognitive 23) · ×1
  • tableDataExport.fetchTableDataForExport (cognitive 23) apps/desktop/src/lib/table/tableDataExport.ts:28 — tableDataExport.fetchTableDataForExport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cognitive 23) · ×1
  • connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cognitive 23) apps/desktop/src/stores/connectionStore.ts:3861 — connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 10, boolean chains 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (findPath, a function literal at line 3886). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cognitive 23) · ×1
  • connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cognitive 23) apps/desktop/src/stores/connectionStore.ts:5065 — connectionStore.useConnectionStore.updateConnectionDatabaseInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cognitive 23) · ×1
  • queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cognitive 23) apps/desktop/src/stores/queryStore.ts:7695 — queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 9, if/else 4 (nesting depth added 3). Of this number, 19 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cognitive 23) · ×1
  • savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cognitive 23) apps/desktop/src/stores/savedSqlStore.ts:744 — savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferTaskStore.normalizeTask (cognitive 23) · ×1
  • transferTaskStore.normalizeTask (cognitive 23) apps/desktop/src/stores/transferTaskStore.ts:98 — transferTaskStore.normalizeTask has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (7 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · seedApi (cognitive 23) · ×1
  • seedApi (cognitive 23) .github/ui-preview/seed.mjs:130 — seedApi has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), loops 4 (5 pts), if/else 1 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 22 points are the body's own statements and 1 belongs to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScalarType · ×1
  • ScalarType::read (cognitive 22) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:254 — ScalarType::read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HanaScriptBlock · ×1
  • HanaScriptBlock::is_complete (cognitive 22) REDACTED:4052 — HanaScriptBlock::is_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OraclePlSqlBlock · ×1
  • OraclePlSqlBlock::with_function_is_complete (cognitive 22) REDACTED:4479 — OraclePlSqlBlock::with_function_is_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsSafeCell · ×1
  • JsSafeCell::serialize (cognitive 22) crates/dbx-types/src/types.rs:796 — JsSafeCell::serialize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AgentRpcError.classify (cognitive 22) · ×1
  • AgentRpcError.classify (cognitive 22) agents/common/src/main/java/com/dbx/agent/AgentRpcError.java:108 — AgentRpcError.classify has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (9 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JdbcConnectionAffinity.sanitizeSql (cognitive 22) · ×1
  • JdbcConnectionAffinity.sanitizeSql (cognitive 22) agents/common/src/main/java/com/dbx/agent/JdbcConnectionAffinity.java:41 — JdbcConnectionAffinity.sanitizeSql has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JdbcExecutor.withStatementMessages (cognitive 22) · ×1
  • JdbcExecutor.withStatementMessages (cognitive 22) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1146 — JdbcExecutor.withStatementMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts), error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryResult.normalizeRowsWithSpatial (cognitive 22) · ×1
  • QueryResult.normalizeRowsWithSpatial (cognitive 22) agents/common/src/main/java/com/dbx/agent/QueryResult.java:164 — QueryResult.normalizeRowsWithSpatial has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (7 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.completionAssistantRoutines (cognitive 22) · ×1
  • OceanBaseOracleAgent.completionAssistantRoutines (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:827 — OceanBaseOracleAgent.completionAssistantRoutines has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.typedLobUrl (cognitive 22) · ×1
  • OceanBaseOracleAgent.typedLobUrl (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:381 — OceanBaseOracleAgent.typedLobUrl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointInventory.confirmSet (cognitive 22) · ×1
  • PlDebugBreakpointInventory.confirmSet (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointInventory.java:41 — PlDebugBreakpointInventory.confirmSet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompile.readback (cognitive 22) · ×1
  • PlDebugCompile.readback (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:195 — PlDebugCompile.readback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.changeBreakpoints (cognitive 22) · ×1
  • PlDebugManager.changeBreakpoints (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:287 — PlDebugManager.changeBreakpoints has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (12 pts), loops 2 (4 pts), if/else 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.legacyMaterializedViewOptions (cognitive 22) · ×1
  • main.legacyMaterializedViewOptions (cognitive 22) agents/drivers/cassandra-go/materialized_view.go:183 — main.legacyMaterializedViewOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.errorResponse (cognitive 22) · ×1
  • main.errorResponse (cognitive 22) agents/drivers/oracle-go/rpc_errors.go:71 — main.errorResponse has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), match/switch 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.oracleUniqueIndexMetadata (cognitive 22) · ×1
  • server.oracleUniqueIndexMetadata (cognitive 22) REDACTED:3515 — server.oracleUniqueIndexMetadata has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.recoverOutput (cognitive 22) · ×1
  • plDebugNativeEntry.recoverOutput (cognitive 22) agents/drivers/oracle-go/pldebug_manager.go:1134 — plDebugNativeEntry.recoverOutput has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugNativeEntry.nativeExternalPackageVariableNames (cognitive 22) · ×1
  • plDebugNativeEntry.nativeExternalPackageVariableNames (cognitive 22) agents/drivers/oracle-go/pldebug_variables.go:132 — plDebugNativeEntry.nativeExternalPackageVariableNames has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, loops 3 (nesting depth added 1). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · plDebugNativeRoutineScan.ownerAtLine (cognitive 22) · ×1
  • plDebugNativeRoutineScan.ownerAtLine (cognitive 22) agents/drivers/oracle-go/pldebug_routine.go:567 — plDebugNativeRoutineScan.ownerAtLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getObjectSource (cognitive 22) · ×1
  • server.getObjectSource (cognitive 22) REDACTED:3193 — server.getObjectSource has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.mergeSqlServerControlFlowBatches (cognitive 22) · ×1
  • sqlStatementRanges.mergeSqlServerControlFlowBatches (cognitive 22) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1133 — sqlStatementRanges.mergeSqlServerControlFlowBatches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.binaryLiteral (cognitive 22) · ×1
  • queryResultTransferValues.binaryLiteral (cognitive 22) apps/desktop/src/components/transfer/queryResultTransferValues.ts:330 — queryResultTransferValues.binaryLiteral has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridCanvasRuntime.useDataGridCanvasRuntime (cognitive 22) · ×1
  • useDataGridCanvasRuntime.useDataGridCanvasRuntime (cognitive 22) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:55 — useDataGridCanvasRuntime.useDataGridCanvasRuntime has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 8, error handling 1 (2 pts) (nesting depth added 1). Of this number, 20 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cognitive 22) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cognitive 22) apps/desktop/src/composables/useDataGridLargeValues.ts:768 — useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, loops 3 (nesting depth added 3). Of this number, 19 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridScrollbars.useDataGridScrollbars (cognitive 22) · ×1
  • useDataGridScrollbars.useDataGridScrollbars (cognitive 22) apps/desktop/src/composables/useDataGridScrollbars.ts:32 — useDataGridScrollbars.useDataGridScrollbars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 9, loops 1 (2 pts) (nesting depth added 1). Of this number, 21 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridSearch.useDataGridSearch (cognitive 22) · ×1
  • useDataGridSearch.useDataGridSearch (cognitive 22) apps/desktop/src/composables/useDataGridSearch.ts:41 — useDataGridSearch.useDataGridSearch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cognitive 22) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cognitive 22) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:205 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aiIntentRouter.routeByRulesUnchecked (cognitive 22) · ×1
  • aiIntentRouter.routeByRulesUnchecked (cognitive 22) apps/desktop/src/lib/ai/aiIntentRouter.ts:220 — aiIntentRouter.routeByRulesUnchecked has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 10. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · aiMessageRender.parseAiMessage (cognitive 22) · ×1
  • aiMessageRender.parseAiMessage (cognitive 22) apps/desktop/src/lib/ai/aiMessageRender.ts:330 — aiMessageRender.parseAiMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightweightJsonScanner.readStringValue (cognitive 22) · ×1
  • LightweightJsonScanner.readStringValue (cognitive 22) apps/desktop/src/lib/app/documentJsonValues.ts:332 — LightweightJsonScanner.readStringValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · floatingViewportPosition.visibleTriggerRect (cognitive 22) · ×1
  • floatingViewportPosition.visibleTriggerRect (cognitive 22) apps/desktop/src/lib/common/floatingViewportPosition.ts:57 — floatingViewportPosition.visibleTriggerRect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.parseConnectionDeepLink (cognitive 22) · ×1
  • connectionDeepLink.parseConnectionDeepLink (cognitive 22) REDACTED:375 — connectionDeepLink.parseConnectionDeepLink has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 4, error handling 2 (3 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionUrlBuilder.standardUrlScheme (cognitive 22) · ×1
  • connectionUrlBuilder.standardUrlScheme (cognitive 22) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:246 — connectionUrlBuilder.standardUrlScheme has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · connectionUrlBuilder.connectionUrlCopyFormats (cognitive 22) · ×1
  • connectionUrlBuilder.connectionUrlCopyFormats (cognitive 22) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:564 — connectionUrlBuilder.connectionUrlCopyFormats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dataGridContextMenu.createDataGridCellContextMenuItems (cognitive 22) · ×1
  • dataGridContextMenu.createDataGridCellContextMenuItems (cognitive 22) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:256 — dataGridContextMenu.createDataGridCellContextMenuItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridNewRowPlacement.buildOrderedGridRows (cognitive 22) · ×1
  • gridNewRowPlacement.buildOrderedGridRows (cognitive 22) apps/desktop/src/lib/dataGrid/gridNewRowPlacement.ts:56 — gridNewRowPlacement.buildOrderedGridRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cognitive 22) · ×1
  • oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cognitive 22) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:125 — oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draft-table.validateDraftTable (cognitive 22) · ×1
  • draft-table.validateDraftTable (cognitive 22) apps/desktop/src/lib/diagram/draft-table.ts:110 — draft-table.validateDraftTable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlBlockFolding.gapIsWhitespaceOrComment (cognitive 22) · ×1
  • codemirrorSqlBlockFolding.gapIsWhitespaceOrComment (cognitive 22) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:44 — codemirrorSqlBlockFolding.gapIsWhitespaceOrComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plainTextSelectionRanges.scanBracketRanges (cognitive 22) · ×1
  • plainTextSelectionRanges.scanBracketRanges (cognitive 22) apps/desktop/src/lib/editor/plainTextSelectionRanges.ts:40 — plainTextSelectionRanges.scanBracketRanges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shortcutRegistry.computeNormalizedShortcutSettings (cognitive 22) · ×1
  • shortcutRegistry.computeNormalizedShortcutSettings (cognitive 22) apps/desktop/src/lib/editor/shortcutRegistry.ts:1018 — shortcutRegistry.computeNormalizedShortcutSettings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 2, ternaries 2 (nesting depth added 5). Of this number, 14 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlHoverSearch.applyHoverSearchHighlights (cognitive 22) · ×1
  • sqlHoverSearch.applyHoverSearchHighlights (cognitive 22) apps/desktop/src/lib/editor/sqlHoverSearch.ts:60 — sqlHoverSearch.applyHoverSearchHighlights has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.buildBatchQualifyActions (cognitive 22) · ×1
  • sqlIntentionActions.buildBatchQualifyActions (cognitive 22) apps/desktop/src/lib/editor/sqlIntentionActions.ts:199 — sqlIntentionActions.buildBatchQualifyActions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExport.runWithDatabaseBackupSnapshot (cognitive 22) · ×1
  • databaseExport.runWithDatabaseBackupSnapshot (cognitive 22) apps/desktop/src/lib/export/databaseExport.ts:179 — databaseExport.runWithDatabaseBackupSnapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (6 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableMetadataCache.loadTableMetadata (cognitive 22) · ×1
  • tableMetadataCache.loadTableMetadata (cognitive 22) apps/desktop/src/lib/metadata/tableMetadataCache.ts:361 — tableMetadataCache.loadTableMetadata has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (9 pts), if/else 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyJsonSchema (cognitive 22) · ×1
  • mongoCompletion.classifyJsonSchema (cognitive 22) REDACTED:1285 — mongoCompletion.classifyJsonSchema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCompletion.matchCursorMethodDot (cognitive 22) · ×1
  • mongoCompletion.matchCursorMethodDot (cognitive 22) REDACTED:2199 — mongoCompletion.matchCursorMethodDot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.skipMongoStringOrComment (cognitive 22) · ×1
  • mongoCompletion.skipMongoStringOrComment (cognitive 22) REDACTED:2298 — mongoCompletion.skipMongoStringOrComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.isInsideMongoComment (cognitive 22) · ×1
  • mongoCompletion.isInsideMongoComment (cognitive 22) REDACTED:2460 — mongoCompletion.isInsideMongoComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.buildMongoCopyDocumentFromOriginal (cognitive 22) · ×1
  • mongoDocumentValues.buildMongoCopyDocumentFromOriginal (cognitive 22) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:655 — mongoDocumentValues.buildMongoCopyDocumentFromOriginal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoCommand (cognitive 22) · ×1
  • mongoShellCommand.parseMongoCommand (cognitive 22) REDACTED:1041 — mongoShellCommand.parseMongoCommand has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 14, if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1053, 1057, 1061, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · pluginFloatingWindow.startFloatingWindowReaper (cognitive 22) · ×1
  • pluginFloatingWindow.startFloatingWindowReaper (cognitive 22) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:768 — pluginFloatingWindow.startFloatingWindowReaper has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4, boolean chains 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 787, 803, 774, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · batchQueryPagination.prepareBatchQueryPagination (cognitive 22) · ×1
  • batchQueryPagination.prepareBatchQueryPagination (cognitive 22) apps/desktop/src/lib/query/batchQueryPagination.ts:11 — batchQueryPagination.prepareBatchQueryPagination has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 58). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarLayoutMonitor.detectLayoutAnomalies (cognitive 22) · ×1
  • sidebarLayoutMonitor.detectLayoutAnomalies (cognitive 22) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:443 — sidebarLayoutMonitor.detectLayoutAnomalies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9 (nesting depth added 5). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.formatCypherText (cognitive 22) · ×1
  • cypherFormatter.formatCypherText (cognitive 22) apps/desktop/src/lib/sql/cypherFormatter.ts:504 — cypherFormatter.formatCypherText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (8 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.clauseSpans (cognitive 22) · ×1
  • model.clauseSpans (cognitive 22) apps/desktop/src/lib/sql/semantic/model.ts:830 — model.clauseSpans has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.parseSelectColumns (cognitive 22) · ×1
  • sqlAnalysis.parseSelectColumns (cognitive 22) apps/desktop/src/lib/sql/sqlAnalysis.ts:431 — sqlAnalysis.parseSelectColumns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.parseTableSourceAt (cognitive 22) · ×1
  • sqlAnalysis.parseTableSourceAt (cognitive 22) apps/desktop/src/lib/sql/sqlAnalysis.ts:694 — sqlAnalysis.parseTableSourceAt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5, boolean chains 3 (nesting depth added 4). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.maskSqlLiteralsAndComments (cognitive 22) · ×1
  • sqlCompletion.maskSqlLiteralsAndComments (cognitive 22) apps/desktop/src/lib/sql/sqlCompletion.ts:4149 — sqlCompletion.maskSqlLiteralsAndComments has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (6 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlCompletion.splitQualifiedNameRawParts (cognitive 22) · ×1
  • sqlCompletion.splitQualifiedNameRawParts (cognitive 22) apps/desktop/src/lib/sql/sqlCompletion.ts:4858 — sqlCompletion.splitQualifiedNameRawParts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableDependencySort.sortTablesByFkDependency (cognitive 22) · ×1
  • tableDependencySort.sortTablesByFkDependency (cognitive 22) apps/desktop/src/lib/table/tableDependencySort.ts:17 — tableDependencySort.sortTablesByFkDependency has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabModeLabel (cognitive 22) · ×1
  • tabPresentation.tabModeLabel (cognitive 22) apps/desktop/src/lib/tabs/tabPresentation.ts:820 — tabPresentation.tabModeLabel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.parseConnectionsImport (cognitive 22) · ×1
  • connectionStore.useConnectionStore.parseConnectionsImport (cognitive 22) apps/desktop/src/stores/connectionStore.ts:11750 — connectionStore.useConnectionStore.parseConnectionsImport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.runOracleTriggerSourceAction (cognitive 22) · ×1
  • queryStore.useQueryStore.runOracleTriggerSourceAction (cognitive 22) apps/desktop/src/stores/queryStore.ts:3547 — queryStore.useQueryStore.runOracleTriggerSourceAction has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 9, error handling 1, ternaries 1. Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.openPluginWorkbench (cognitive 22) · ×1
  • queryStore.useQueryStore.openPluginWorkbench (cognitive 22) apps/desktop/src/stores/queryStore.ts:4561 — queryStore.useQueryStore.openPluginWorkbench has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 7, ternaries 3 (nesting depth added 7). Of this number, 20 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worker.handleInstallBeacon (cognitive 22) · ×1
  • worker.handleInstallBeacon (cognitive 22) REDACTED:446 — worker.handleInstallBeacon has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InstallTabs.InstallTabs (cognitive 22) · ×1
  • InstallTabs.InstallTabs (cognitive 22) docs/components/landing/InstallTabs.tsx:232 — InstallTabs.InstallTabs has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 5, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 325, 242, 251, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentBundle.parseTarEntries (cognitive 22) · ×1
  • agentBundle.parseTarEntries (cognitive 22) docs/lib/agentBundle.ts:201 — agentBundle.parseTarEntries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.findMatchingParen (cognitive 22) · ×1
  • json.findMatchingParen (cognitive 22) packages/mongo-shell/src/json.ts:267 — json.findMatchingParen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · i18n.localizeManifest (cognitive 22) · ×1
  • i18n.localizeManifest (cognitive 22) plugins/sdk/dev-host/ui/i18n.js:98 — i18n.localizeManifest has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MySqlSqlFileExecutor · ×1
  • MySqlSqlFileExecutor::execute_statement_inner (cognitive 21) REDACTED:346 — MySqlSqlFileExecutor::execute_statement_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupConfig · ×1
  • BackupConfig::validate (cognitive 21) crates/dbx-core/src/scheduled_backup/models.rs:146 — BackupConfig::validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentManager · ×1
  • AgentManager::collect_driver_store_usage (cognitive 21) crates/dbx-driver-agent/src/agent_manager.rs:1306 — AgentManager::collect_driver_store_usage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WkbGeometry · ×1
  • WkbGeometry::to_wkt (cognitive 21) crates/dbx-driver-support/src/wkb.rs:47 — WkbGeometry::to_wkt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DdlBuilder.buildOracleObjectGrantSql (cognitive 21) · ×1
  • DdlBuilder.buildOracleObjectGrantSql (cognitive 21) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:298 — DdlBuilder.buildOracleObjectGrantSql has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionFactoryDataSource.getConnection (cognitive 21) · ×1
  • ConnectionFactoryDataSource.getConnection (cognitive 21) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1115 — ConnectionFactoryDataSource.getConnection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 4, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeLegacyJobSession.<init> (cognitive 21) · ×1
  • NativeLegacyJobSession.<init> (cognitive 21) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:50 — NativeLegacyJobSession.<init> has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Gbase8sAgent.overrideLocaleParams (cognitive 21) · ×1
  • Gbase8sAgent.overrideLocaleParams (cognitive 21) REDACTED:992 — Gbase8sAgent.overrideLocaleParams has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseLobValues.preview (cognitive 21) · ×1
  • OceanBaseLobValues.preview (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:65 — OceanBaseLobValues.preview has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 7, boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Entry.closeUninitialized (cognitive 21) · ×1
  • Entry.closeUninitialized (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:551 — Entry.closeUninitialized has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.callables (cognitive 21) · ×1
  • PlDebugObjectConstructors.callables (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:27 — PlDebugObjectConstructors.callables has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.start (cognitive 21) · ×1
  • PlDebugSession.start (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:279 — PlDebugSession.start has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 5, error handling 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Source.read (cognitive 21) · ×1
  • Source.read (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:182 — Source.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.loadJKSTruststore (cognitive 21) · ×1
  • main.loadJKSTruststore (cognitive 21) REDACTED:97 — main.loadJKSTruststore has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.consumeWatchChannel (cognitive 21) · ×1
  • main.consumeWatchChannel (cognitive 21) agents/drivers/etcd-go/watch.go:271 — main.consumeWatchChannel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcd2Session.rename (cognitive 21) · ×1
  • etcd2Session.rename (cognitive 21) agents/drivers/etcd2-go/kv.go:286 — etcd2Session.rename has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.listTriggerDefinitionsFor (cognitive 21) · ×1
  • server.listTriggerDefinitionsFor (cognitive 21) REDACTED:3027 — server.listTriggerDefinitionsFor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 2 (nesting depth added 5). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agentSession.getTableDDL (cognitive 21) · ×1
  • agentSession.getTableDDL (cognitive 21) agents/drivers/nebula-go/metadata.go:168 — agentSession.getTableDDL has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.dispatch (cognitive 21) · ×1
  • runtimeServer.dispatch (cognitive 21) agents/drivers/nebula-go/main.go:121 — runtimeServer.dispatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.oracleExplainPlanBindParams (cognitive 21) · ×1
  • main.oracleExplainPlanBindParams (cognitive 21) REDACTED:4556 — main.oracleExplainPlanBindParams has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseSingleOracleTableRef (cognitive 21) · ×1
  • main.parseSingleOracleTableRef (cognitive 21) REDACTED:5565 — main.parseSingleOracleTableRef has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugRevalidateNativeTypedSignature (cognitive 21) · ×1
  • main.plDebugRevalidateNativeTypedSignature (cognitive 21) agents/drivers/oracle-go/pldebug_typed_signature.go:50 — main.plDebugRevalidateNativeTypedSignature has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listIndexesWithIdentity (cognitive 21) · ×1
  • server.listIndexesWithIdentity (cognitive 21) REDACTED:3212 — server.listIndexesWithIdentity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativePlan.timezoneTypes (cognitive 21) · ×1
  • plDebugNativePlan.timezoneTypes (cognitive 21) agents/drivers/oracle-go/pldebug_timezone.go:241 — plDebugNativePlan.timezoneTypes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeTypeLoader.containerVersion (cognitive 21) · ×1
  • plDebugNativeTypeLoader.containerVersion (cognitive 21) agents/drivers/oracle-go/pldebug_type_graph.go:263 — plDebugNativeTypeLoader.containerVersion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.createACLs (cognitive 21) · ×1
  • rocketMQAgent.createACLs (cognitive 21) agents/drivers/rocketmq/acl.go:93 — rocketMQAgent.createACLs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.deleteACLs (cognitive 21) · ×1
  • rocketMQAgent.deleteACLs (cognitive 21) agents/drivers/rocketmq/acl.go:146 — rocketMQAgent.deleteACLs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.rewriteNativeConnectionStringSSLMode (cognitive 21) · ×1
  • main.rewriteNativeConnectionStringSSLMode (cognitive 21) agents/drivers/vastbase-go/main.go:1204 — main.rewriteNativeConnectionStringSSLMode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.xuguListObjectsQuery (cognitive 21) · ×1
  • main.xuguListObjectsQuery (cognitive 21) REDACTED:2515 — main.xuguListObjectsQuery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.splitXuguTopLevel (cognitive 21) · ×1
  • main.splitXuguTopLevel (cognitive 21) REDACTED:5767 — main.splitXuguTopLevel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.put (cognitive 21) · ×1
  • server.put (cognitive 21) agents/drivers/zookeeper/operations.go:89 — server.put has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Session.ExecuteQueryStatement (cognitive 21) · ×1
  • Session.ExecuteQueryStatement (cognitive 21) agents/go-common/iotdb-client-go/client/session.go:756 — Session.ExecuteQueryStatement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (Session.ExecuteAggregationQuery, Session.ExecuteAggregationQueryWithLegalNodes, Session.ExecuteFastLastDataQueryForOnePrefixPath) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Session.ExecuteAggregationQuery (cognitive 21) · ×1
  • Session.ExecuteAggregationQuery (cognitive 21) agents/go-common/iotdb-client-go/client/session.go:787 — Session.ExecuteAggregationQuery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (Session.ExecuteQueryStatement, Session.ExecuteAggregationQueryWithLegalNodes, Session.ExecuteFastLastDataQueryForOnePrefixPath) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Session.ExecuteAggregationQueryWithLegalNodes (cognitive 21) · ×1
  • Session.ExecuteAggregationQueryWithLegalNodes (cognitive 21) agents/go-common/iotdb-client-go/client/session.go:820 — Session.ExecuteAggregationQueryWithLegalNodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (Session.ExecuteQueryStatement, Session.ExecuteAggregationQuery, Session.ExecuteFastLastDataQueryForOnePrefixPath) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Session.ExecuteFastLastDataQueryForOnePrefixPath (cognitive 21) · ×1
  • Session.ExecuteFastLastDataQueryForOnePrefixPath (cognitive 21) agents/go-common/iotdb-client-go/client/session.go:854 — Session.ExecuteFastLastDataQueryForOnePrefixPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (Session.ExecuteQueryStatement, Session.ExecuteAggregationQuery, Session.ExecuteAggregationQueryWithLegalNodes) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Server.serveFramed (cognitive 21) · ×1
  • Server.serveFramed (cognitive 21) plugins/sdk/go/dbx-plugin-sdk/sdk.go:249 — Server.serveFramed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.firebirdRoutineBlockIsComplete (cognitive 21) · ×1
  • sqlStatementRanges.firebirdRoutineBlockIsComplete (cognitive 21) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2598 — sqlStatementRanges.firebirdRoutineBlockIsComplete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-partition-ddl.main (cognitive 21) · ×1
  • verify-partition-ddl.main (cognitive 21) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:10 — verify-partition-ddl.main has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 3 (4 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DiffHunkBuilder.alignWithinWindow (cognitive 21) · ×1
  • DiffHunkBuilder.alignWithinWindow (cognitive 21) apps/desktop/src/components/diff/DiffHunkBuilder.ts:223 — DiffHunkBuilder.alignWithinWindow has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · queryResultTransferDdl.sqlServerDescriptionParameters (cognitive 21) · ×1
  • queryResultTransferDdl.sqlServerDescriptionParameters (cognitive 21) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:203 — queryResultTransferDdl.sqlServerDescriptionParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferSelections.matchBulkObjectNames (cognitive 21) · ×1
  • transferSelections.matchBulkObjectNames (cognitive 21) apps/desktop/src/components/transfer/transferSelections.ts:153 — transferSelections.matchBulkObjectNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cognitive 21) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cognitive 21) REDACTED:666 — useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyDeleteRows (cognitive 21) · ×1
  • useDataGridEditor.useDataGridEditor.applyDeleteRows (cognitive 21) apps/desktop/src/composables/useDataGridEditor.ts:1750 — useDataGridEditor.useDataGridEditor.applyDeleteRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportSql (cognitive 21) · ×1
  • useDataGridExport.useDataGridExport.exportSql (cognitive 21) apps/desktop/src/composables/useDataGridExport.ts:2849 — useDataGridExport.useDataGridExport.exportSql has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 5, error handling 1. Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 2853, 2856). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useExportTracker.useExportTracker.cancelTask (cognitive 21) · ×1
  • useExportTracker.useExportTracker.cancelTask (cognitive 21) apps/desktop/src/composables/useExportTracker.ts:1063 — useExportTracker.useExportTracker.cancelTask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, error handling 2 (3 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · agentDriverInstallHint.agentDriverInstallKey (cognitive 21) · ×1
  • agentDriverInstallHint.agentDriverInstallKey (cognitive 21) apps/desktop/src/lib/connection/agentDriverInstallHint.ts:35 — agentDriverInstallHint.agentDriverInstallKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · nativeJobs.rebaseNativeJobDamengDraft (cognitive 21) · ×1
  • nativeJobs.rebaseNativeJobDamengDraft (cognitive 21) apps/desktop/src/lib/database/nativeJobs.ts:458 — nativeJobs.rebaseNativeJobDamengDraft has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (5 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · codemirrorBookmarks.createQueryEditorBookmarks (cognitive 21) · ×1
  • codemirrorBookmarks.createQueryEditorBookmarks (cognitive 21) apps/desktop/src/lib/editor/codemirrorBookmarks.ts:46 — codemirrorBookmarks.createQueryEditorBookmarks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorInsertValueHints.parseClausesNearView (cognitive 21) · ×1
  • codemirrorInsertValueHints.parseClausesNearView (cognitive 21) apps/desktop/src/lib/editor/codemirrorInsertValueHints.ts:98 — codemirrorInsertValueHints.parseClausesNearView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keyboardShortcuts.eventToShortcut (cognitive 21) · ×1
  • keyboardShortcuts.eventToShortcut (cognitive 21) apps/desktop/src/lib/editor/keyboardShortcuts.ts:174 — keyboardShortcuts.eventToShortcut has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plainTextSelectionRanges.scanQuotedRanges (cognitive 21) · ×1
  • plainTextSelectionRanges.scanQuotedRanges (cognitive 21) apps/desktop/src/lib/editor/plainTextSelectionRanges.ts:18 — plainTextSelectionRanges.scanQuotedRanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exportDiagnostics.summarizeExportRows (cognitive 21) · ×1
  • exportDiagnostics.summarizeExportRows (cognitive 21) apps/desktop/src/lib/export/exportDiagnostics.ts:40 — exportDiagnostics.summarizeExportRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectMetadataCache.loadObjectMetadataFacetInternal (cognitive 21) · ×1
  • objectMetadataCache.loadObjectMetadataFacetInternal (cognitive 21) apps/desktop/src/lib/metadata/objectMetadataCache.ts:140 — objectMetadataCache.loadObjectMetadataFacetInternal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3 (nesting depth added 7). Of this number, 20 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.findOpenMongoQuoteStart (cognitive 21) · ×1
  • mongoCompletion.findOpenMongoQuoteStart (cognitive 21) REDACTED:2083 — mongoCompletion.findOpenMongoQuoteStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoQueryInputBrackets.handleMongoQueryInputBrackets (cognitive 21) · ×1
  • mongoQueryInputBrackets.handleMongoQueryInputBrackets (cognitive 21) apps/desktop/src/lib/mongo/mongoQueryInputBrackets.ts:22 — mongoQueryInputBrackets.handleMongoQueryInputBrackets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · pluginHostBridge.requirePluginDataQueryRequest (cognitive 21) · ×1
  • pluginHostBridge.requirePluginDataQueryRequest (cognitive 21) REDACTED:1813 — pluginHostBridge.requirePluginDataQueryRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeNodeClick.copyDisplayPathForTreeNode (cognitive 21) · ×1
  • treeNodeClick.copyDisplayPathForTreeNode (cognitive 21) apps/desktop/src/lib/sidebar/treeNodeClick.ts:249 — treeNodeClick.copyDisplayPathForTreeNode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlSearchMarks.applyDdlSearchMarks (cognitive 21) · ×1
  • ddlSearchMarks.applyDdlSearchMarks (cognitive 21) apps/desktop/src/lib/sql/ddlSearchMarks.ts:32 — ddlSearchMarks.applyDdlSearchMarks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editableQueryHiddenKeys.appendSelectProjections (cognitive 21) · ×1
  • editableQueryHiddenKeys.appendSelectProjections (cognitive 21) apps/desktop/src/lib/sql/editableQueryHiddenKeys.ts:47 — editableQueryHiddenKeys.appendSelectProjections has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations (cognitive 21) · ×1
  • mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations (cognitive 21) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:75 — mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectSqlServerModuleBatchRanges (cognitive 21) · ×1
  • sqlParameters.collectSqlServerModuleBatchRanges (cognitive 21) apps/desktop/src/lib/sql/sqlParameters.ts:667 — sqlParameters.collectSqlServerModuleBatchRanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlInListPaste.hasSingleWrappingParentheses (cognitive 21) · ×1
  • sqlInListPaste.hasSingleWrappingParentheses (cognitive 21) apps/desktop/src/lib/sql/sqlInListPaste.ts:167 — sqlInListPaste.hasSingleWrappingParentheses has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectBrowserRows.groupObjectBrowserRows (cognitive 21) · ×1
  • objectBrowserRows.groupObjectBrowserRows (cognitive 21) apps/desktop/src/lib/table/objectBrowserRows.ts:309 — objectBrowserRows.groupObjectBrowserRows has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 6 (7 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectSourceLoad.loadObjectSourceWithRoutineFallback (cognitive 21) · ×1
  • objectSourceLoad.loadObjectSourceWithRoutineFallback (cognitive 21) apps/desktop/src/lib/table/objectSourceLoad.ts:66 — objectSourceLoad.loadObjectSourceWithRoutineFallback has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.prepareOracleRoutineRename · ×1
  • oracleRoutineRename.prepareOracleRoutineRename::walk (cognitive 21) apps/desktop/src/lib/table/oracleRoutineRename.ts:292 — oracleRoutineRename.prepareOracleRoutineRename::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTypeManagement.sourceOrder (cognitive 21) · ×1
  • oracleTypeManagement.sourceOrder (cognitive 21) apps/desktop/src/lib/table/oracleTypeManagement.ts:151 — oracleTypeManagement.sourceOrder has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · tabUiState.sanitizeValue (cognitive 21) · ×1
  • tabUiState.sanitizeValue (cognitive 21) apps/desktop/src/lib/tabs/tabUiState.ts:72 — tabUiState.sanitizeValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.removeConnectionGroups (cognitive 21) · ×1
  • connectionStore.useConnectionStore.removeConnectionGroups (cognitive 21) apps/desktop/src/stores/connectionStore.ts:11380 — connectionStore.useConnectionStore.removeConnectionGroups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 2, ternaries 2 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.decodeVariable (cognitive 21) · ×1
  • plDebugStore.decodeVariable (cognitive 21) apps/desktop/src/stores/plDebugStore.ts:2153 — plDebugStore.decodeVariable has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.setAutoCommit (cognitive 21) · ×1
  • queryStore.useQueryStore.setAutoCommit (cognitive 21) apps/desktop/src/stores/queryStore.ts:6320 — queryStore.useQueryStore.setAutoCommit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3 (nesting depth added 10). Of this number, 13 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> (cognitive 21) · ×1
  • queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> (cognitive 21) apps/desktop/src/stores/queryStore.ts:11860 — queryStore.useQueryStore.captureQueryResultExportRequest.<returned closure> has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 6, if/else 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LandingSelect.LandingSelect (cognitive 21) · ×1
  • LandingSelect.LandingSelect (cognitive 21) docs/components/landing/LandingSelect.tsx:18 — LandingSelect.LandingSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 7, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (toggle, onListKeyDown, onButtonKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · json.readMongoRegexLiteral (cognitive 21) · ×1
  • json.readMongoRegexLiteral (cognitive 21) packages/mongo-shell/src/json.ts:47 — json.readMongoRegexLiteral has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.splitTopLevel (cognitive 21) · ×1
  • json.splitTopLevel (cognitive 21) packages/mongo-shell/src/json.ts:226 — json.splitTopLevel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Expansion · ×1
  • Expansion::file (cognitive 20) crates/dbx-core/src/data/sql_file_import/includes.rs:141 — Expansion::file has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InsertSqlTemplate · ×1
  • InsertSqlTemplate::build (cognitive 20) crates/dbx-core/src/data/transfer.rs:5543 — InsertSqlTemplate::build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugRegistry · ×1
  • PlDebugRegistry::register (cognitive 20) crates/dbx-core/src/query/pl_debug.rs:594 — PlDebugRegistry::register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DamengNamedProjection · ×1
  • DamengNamedProjection::bind (cognitive 20) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition/dameng.rs:8 — DamengNamedProjection::bind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionFactoryDataSource.classifyCheckoutFailure (cognitive 20) · ×1
  • ConnectionFactoryDataSource.classifyCheckoutFailure (cognitive 20) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1271 — ConnectionFactoryDataSource.classifyCheckoutFailure has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonRpcServer.executeBlobBoundStatements (cognitive 20) · ×1
  • JsonRpcServer.executeBlobBoundStatements (cognitive 20) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:744 — JsonRpcServer.executeBlobBoundStatements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerReader.summary (cognitive 20) · ×1
  • OracleTriggerReader.summary (cognitive 20) REDACTED:167 — OracleTriggerReader.summary has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10, boolean chains 7, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DbxJdbcPlugin.handleLogicalSession (cognitive 20) · ×1
  • DbxJdbcPlugin.handleLogicalSession (cognitive 20) REDACTED:641 — DbxJdbcPlugin.handleLogicalSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.hive2ShowCreateObjectSource (cognitive 20) · ×1
  • DbxJdbcPlugin.hive2ShowCreateObjectSource (cognitive 20) REDACTED:6063 — DbxJdbcPlugin.hive2ShowCreateObjectSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.nativeLegacyJob (cognitive 20) · ×1
  • DbxJdbcPlugin.nativeLegacyJob (cognitive 20) REDACTED:1703 — DbxJdbcPlugin.nativeLegacyJob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenericJdbcDdlBuilder.buildTableDdl (cognitive 20) · ×1
  • GenericJdbcDdlBuilder.buildTableDdl (cognitive 20) plugins/jdbc/src/main/java/app/dbx/jdbc/GenericJdbcDdlBuilder.java:23 — GenericJdbcDdlBuilder.buildTableDdl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4, ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Db2Agent.deferredLobResult (cognitive 20) · ×1
  • Db2Agent.deferredLobResult (cognitive 20) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:538 — Db2Agent.deferredLobResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (7 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.resetConsumerGroupOffsets (cognitive 20) · ×1
  • KafkaAgent.resetConsumerGroupOffsets (cognitive 20) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1578 — KafkaAgent.resetConsumerGroupOffsets has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MongoAgent.collationOrNull (cognitive 20) · ×1
  • MongoAgent.collationOrNull (cognitive 20) REDACTED:1119 — MongoAgent.collationOrNull has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugTarget.rawInput (cognitive 20) · ×1
  • PlDebugTarget.rawInput (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1055 — PlDebugTarget.rawInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugTarget.readLob (cognitive 20) · ×1
  • PlDebugTarget.readLob (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1478 — PlDebugTarget.readLob has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 6 (7 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.typedSignature (cognitive 20) · ×1
  • PlDebugTarget.typedSignature (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:690 — PlDebugTarget.typedSignature has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.zonedInput (cognitive 20) · ×1
  • PlDebugTarget.zonedInput (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1115 — PlDebugTarget.zonedInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SapHanaAgent.getObjectSource (cognitive 20) · ×1
  • SapHanaAgent.getObjectSource (cognitive 20) agents/drivers/saphana/src/main/java/com/dbx/agent/saphana/SapHanaAgent.java:33 — SapHanaAgent.getObjectSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlServerLegacyAgent.connectionPropertyParts (cognitive 20) · ×1
  • SqlServerLegacyAgent.connectionPropertyParts (cognitive 20) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:897 — SqlServerLegacyAgent.connectionPropertyParts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_driver_zips.build_driver_zips (cognitive 20) · ×1
  • build_driver_zips.build_driver_zips (cognitive 20) agents/scripts/build_driver_zips.py:189 — build_driver_zips.build_driver_zips has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate_agents.validate_jdbc_architecture (cognitive 20) · ×1
  • validate_agents.validate_jdbc_architecture (cognitive 20) agents/scripts/validate_agents.py:191 — validate_agents.validate_jdbc_architecture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.scanCQLRow (cognitive 20) · ×1
  • main.scanCQLRow (cognitive 20) agents/drivers/cassandra-go/query.go:234 — main.scanCQLRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (8 pts) (nesting depth added 11). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 245, 264). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentSession.listTables (cognitive 20) · ×1
  • agentSession.listTables (cognitive 20) agents/drivers/nebula-go/metadata.go:71 — agentSession.listTables has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.appendGraphDisplay (cognitive 20) · ×1
  • main.appendGraphDisplay (cognitive 20) agents/drivers/neo4j-go/graph.go:85 — main.appendGraphDisplay has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.plDebugDeclaredNames (cognitive 20) · ×1
  • main.plDebugDeclaredNames (cognitive 20) REDACTED:2791 — main.plDebugDeclaredNames has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugLegacyDerivedType (cognitive 20) · ×1
  • main.plDebugLegacyDerivedType (cognitive 20) agents/drivers/oracle-go/pldebug_legacy_type_graph.go:136 — main.plDebugLegacyDerivedType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · main.plDebugLoadNativeSourceBounded (cognitive 20) · ×1
  • main.plDebugLoadNativeSourceBounded (cognitive 20) agents/drivers/oracle-go/pldebug_source.go:59 — main.plDebugLoadNativeSourceBounded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6 (nesting depth added 2). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 69). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.plDebugNativeResultField (cognitive 20) · ×1
  • main.plDebugNativeResultField (cognitive 20) agents/drivers/oracle-go/pldebug_target_invoke.go:702 — main.plDebugNativeResultField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.compileNativeTarget (cognitive 20) · ×1
  • runtimeServer.compileNativeTarget (cognitive 20) agents/drivers/oracle-go/pldebug_compile.go:69 — runtimeServer.compileNativeTarget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · plDebugNativeEntry.control (cognitive 20) · ×1
  • plDebugNativeEntry.control (cognitive 20) agents/drivers/oracle-go/pldebug_manager.go:739 — plDebugNativeEntry.control has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.queryMessagesByKey (cognitive 20) · ×1
  • main.queryMessagesByKey (cognitive 20) REDACTED:216 — main.queryMessagesByKey has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.peekMessages (cognitive 20) · ×1
  • rocketMQAgent.peekMessages (cognitive 20) REDACTED:103 — rocketMQAgent.peekMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.loadIndexPartitionMetadata (cognitive 20) · ×1
  • server.loadIndexPartitionMetadata (cognitive 20) REDACTED:2984 — server.loadIndexPartitionMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (nesting depth added 6). Of this number, 10 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.buildTableDDL (cognitive 20) · ×1
  • server.buildTableDDL (cognitive 20) REDACTED:4493 — server.buildTableDDL has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (20 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listPrefix (cognitive 20) · ×1
  • server.listPrefix (cognitive 20) agents/drivers/zookeeper/operations.go:268 — server.listPrefix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · server.rowsWithMetadata (cognitive 20) · ×1
  • server.rowsWithMetadata (cognitive 20) agents/drivers/zookeeper/operations.go:377 — server.rowsWithMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 389). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cognitive 20) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cognitive 20) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:706 — useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 8, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cognitive 20) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cognitive 20) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1240 — useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorLayout.useQueryEditorLayout (cognitive 20) · ×1
  • useQueryEditorLayout.useQueryEditorLayout (cognitive 20) apps/desktop/src/components/editor/useQueryEditorLayout.ts:5 — useQueryEditorLayout.useQueryEditorLayout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3 (nesting depth added 3). None of this is in the body itself: all 20 points belong to 6 function items inside it that branch (a function literal at line 72, editorBoxTrackStep, editorAvailableSize, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition (cognitive 20) · ×1
  • useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition (cognitive 20) apps/desktop/src/components/editor/useQueryEditorTextActions.ts:234 — useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6, boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGenerateSession.runDataGenerateSession (cognitive 20) · ×1
  • useDataGenerateSession.runDataGenerateSession (cognitive 20) apps/desktop/src/composables/useDataGenerateSession.ts:265 — useDataGenerateSession.runDataGenerateSession has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult (cognitive 20) · ×1
  • useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult (cognitive 20) apps/desktop/src/composables/useDataGridExport.ts:2313 — useDataGridExport.useDataGridExport.exportAllResultsMergedXlsxResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 3 (4 pts), ternaries 3, error handling 1 (nesting depth added 4). None of this is in the body itself: all 20 points belong to 4 function literals inside it that branch (lines 2314, 2335, 2347, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.extractorCellValue (cognitive 20) · ×1
  • useDataGridExtractor.useDataGridExtractor.extractorCellValue (cognitive 20) apps/desktop/src/composables/useDataGridExtractor.ts:147 — useDataGridExtractor.useDataGridExtractor.extractorCellValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (8 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.applyDraggedRowRange (cognitive 20) · ×1
  • useDataGridSelection.useDataGridSelection.applyDraggedRowRange (cognitive 20) apps/desktop/src/composables/useDataGridSelection.ts:402 — useDataGridSelection.useDataGridSelection.applyDraggedRowRange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cognitive 20) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cognitive 20) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:945 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cognitive 20) · ×1
  • useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cognitive 20) apps/desktop/src/composables/useSidebarTreeToolRuntime.ts:191 — useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cognitive 20) · ×1
  • useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cognitive 20) apps/desktop/src/composables/useSnippetAutoUpload.ts:40 — useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · appBackgroundImage.surfaceColorWithAlpha (cognitive 20) · ×1
  • appBackgroundImage.surfaceColorWithAlpha (cognitive 20) apps/desktop/src/lib/app/appBackgroundImage.ts:167 — appBackgroundImage.surfaceColorWithAlpha has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightweightJsonScanner.readNumberToken (cognitive 20) · ×1
  • LightweightJsonScanner.readNumberToken (cognitive 20) apps/desktop/src/lib/app/documentJsonValues.ts:391 — LightweightJsonScanner.readNumberToken has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridClientFilter.matchesResultClientFilter (cognitive 20) · ×1
  • gridClientFilter.matchesResultClientFilter (cognitive 20) apps/desktop/src/lib/dataGrid/gridClientFilter.ts:72 — gridClientFilter.matchesResultClientFilter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 2 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · databaseStructureSearch.mapStructureSearchRows (cognitive 20) · ×1
  • databaseStructureSearch.mapStructureSearchRows (cognitive 20) apps/desktop/src/lib/database/databaseStructureSearch.ts:70 — databaseStructureSearch.mapStructureSearchRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyMetadata (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeyMetadata (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:172 — oracleForeignKeys.readOracleForeignKeyMetadata has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeySourceSnapshot (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeySourceSnapshot (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:231 — oracleForeignKeys.readOracleForeignKeySourceSnapshot has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 12 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyCreateResult (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeyCreateResult (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:604 — oracleForeignKeys.readOracleForeignKeyCreateResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleInvalidObjects.buildOracleCompileSql (cognitive 20) · ×1
  • oracleInvalidObjects.buildOracleCompileSql (cognitive 20) apps/desktop/src/lib/database/oracleInvalidObjects.ts:136 — oracleInvalidObjects.buildOracleCompileSql has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 7, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draft-table.validateLivePendingColumns (cognitive 20) · ×1
  • draft-table.validateLivePendingColumns (cognitive 20) apps/desktop/src/lib/diagram/draft-table.ts:137 — draft-table.validateLivePendingColumns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletionScope.projections (cognitive 20) · ×1
  • graphCompletionScope.projections (cognitive 20) apps/desktop/src/lib/graph/graphCompletionScope.ts:17 — graphCompletionScope.projections has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 4 (5 pts), loops 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (add, a function literal at line 24). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · datagripImport.mergeFragments (cognitive 20) · ×1
  • datagripImport.mergeFragments (cognitive 20) REDACTED:508 — datagripImport.mergeFragments has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, loops 3, if/else 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · dbeaverImport.buildConnection (cognitive 20) · ×1
  • dbeaverImport.buildConnection (cognitive 20) REDACTED:242 — dbeaverImport.buildConnection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, ternaries 4, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · redisValuePresentation.toYamlLines (cognitive 20) · ×1
  • redisValuePresentation.toYamlLines (cognitive 20) apps/desktop/src/lib/redis/redisValuePresentation.ts:461 — redisValuePresentation.toYamlLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 476, 465). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · redisCommandDocs.mapEntries (cognitive 20) · ×1
  • redisCommandDocs.mapEntries (cognitive 20) apps/desktop/src/lib/redis/redisCommandDocs.ts:37 — redisCommandDocs.mapEntries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlTreeRows.compareSiblingItems (cognitive 20) · ×1
  • savedSqlTreeRows.compareSiblingItems (cognitive 20) apps/desktop/src/lib/savedSql/savedSqlTreeRows.ts:32 — savedSqlTreeRows.compareSiblingItems has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 6 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · schemaDiffTableFilter.compileExcludePatterns (cognitive 20) · ×1
  • schemaDiffTableFilter.compileExcludePatterns (cognitive 20) REDACTED:27 — schemaDiffTableFilter.compileExcludePatterns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsTransfer.isSqlShortcutActionItem (cognitive 20) · ×1
  • settingsTransfer.isSqlShortcutActionItem (cognitive 20) apps/desktop/src/lib/settings/settingsTransfer.ts:523 — settingsTransfer.isSqlShortcutActionItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCollectionMutation.buildMongoCreateIndexRequest (cognitive 20) · ×1
  • mongoCollectionMutation.buildMongoCreateIndexRequest (cognitive 20) apps/desktop/src/lib/sidebar/mongoCollectionMutation.ts:160 — mongoCollectionMutation.buildMongoCreateIndexRequest has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarLayout.reorderEntry (cognitive 20) · ×1
  • sidebarLayout.reorderEntry (cognitive 20) apps/desktop/src/lib/sidebar/sidebarLayout.ts:476 — sidebarLayout.reorderEntry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (insertNear). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cognitive 20) · ×1
  • sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cognitive 20) apps/desktop/src/lib/sidebar/sidebarNodeOrdering.ts:80 — sidebarNodeOrdering.orderSidebarTreeChildrenForParent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executableStatementRangeCache.executableStatementRangeAtCursor (cognitive 20) · ×1
  • executableStatementRangeCache.executableStatementRangeAtCursor (cognitive 20) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:140 — executableStatementRangeCache.executableStatementRangeAtCursor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax (cognitive 20) · ×1
  • mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax (cognitive 20) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:36 — mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlRisk.highestRiskInSetTokens (cognitive 20) · ×1
  • sqlRisk.highestRiskInSetTokens (cognitive 20) apps/desktop/src/lib/sql/sqlRisk.ts:430 — sqlRisk.highestRiskInSetTokens has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · statementDelimiter.trailingGapIsWhitespaceOrComment (cognitive 20) · ×1
  • statementDelimiter.trailingGapIsWhitespaceOrComment (cognitive 20) apps/desktop/src/lib/sql/statementDelimiter.ts:37 — statementDelimiter.trailingGapIsWhitespaceOrComment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pgPartitionPresentation.splitPgPartitionBoundValues (cognitive 20) · ×1
  • pgPartitionPresentation.splitPgPartitionBoundValues (cognitive 20) apps/desktop/src/lib/table/pgPartitionPresentation.ts:89 — pgPartitionPresentation.splitPgPartitionBoundValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.isDataTypeLengthDisabled (cognitive 20) · ×1
  • tableStructureEditorState.isDataTypeLengthDisabled (cognitive 20) apps/desktop/src/lib/table/tableStructureEditorState.ts:1896 — tableStructureEditorState.isDataTypeLengthDisabled has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · tableTree.mergeTableInfosIntoObjects (cognitive 20) · ×1
  • tableTree.mergeTableInfosIntoObjects (cognitive 20) apps/desktop/src/lib/table/tableTree.ts:244 — tableTree.mergeTableInfosIntoObjects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.applyTableVGroupsToChildren (cognitive 20) · ×1
  • tableVGroup.applyTableVGroupsToChildren (cognitive 20) apps/desktop/src/lib/table/tableVGroup.ts:556 — tableVGroup.applyTableVGroupsToChildren has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.migrateTimeoutInheritance (cognitive 20) · ×1
  • connectionStore.useConnectionStore.migrateTimeoutInheritance (cognitive 20) apps/desktop/src/stores/connectionStore.ts:11008 — connectionStore.useConnectionStore.migrateTimeoutInheritance has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 6. Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (resolveInheritance). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · queryStore.useQueryStore.cancelTabExecution (cognitive 20) · ×1
  • queryStore.useQueryStore.cancelTabExecution (cognitive 20) apps/desktop/src/stores/queryStore.ts:10770 — queryStore.useQueryStore.cancelTabExecution has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.replaceMongoRegexLiterals (cognitive 20) · ×1
  • json.replaceMongoRegexLiterals (cognitive 20) packages/mongo-shell/src/json.ts:92 — json.replaceMongoRegexLiterals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.replaceMongoEjsonDeserialize (cognitive 20) · ×1
  • json.replaceMongoEjsonDeserialize (cognitive 20) packages/mongo-shell/src/json.ts:503 — json.replaceMongoEjsonDeserialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.convertSingleQuotedStrings (cognitive 20) · ×1
  • json.convertSingleQuotedStrings (cognitive 20) packages/mongo-shell/src/json.ts:731 — json.convertSingleQuotedStrings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 20) · ×1
  • main (cognitive 20) deploy/plugin-stats-worker/migrate-archive.mjs:230 — main has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 5 (6 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1, other 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · push (cognitive 20) · ×1
  • push (cognitive 20) plugins/sdk/dev-host/sidecar.mjs:32 — push has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConsulClient · ×1
  • ConsulClient::new_with_proxy (cognitive 19) crates/dbx-core/src/admin/consul/client.rs:26 — ConsulClient::new_with_proxy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RuntimeConfig · ×1
  • RuntimeConfig::from_environment_and_args (cognitive 19) crates/dbx-mcp/src/runtime.rs:43 — RuntimeConfig::from_environment_and_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FirebirdRoutineBlock · ×1
  • FirebirdRoutineBlock::is_complete (cognitive 19) REDACTED:4147 — FirebirdRoutineBlock::is_complete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DialectPluginLoader · ×1
  • DialectPluginLoader::scan_and_load (cognitive 19) crates/dbx-sql-dialect/src/sql_dialect/dialect_loader.rs:187 — DialectPluginLoader::scan_and_load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateDownloadSource · ×1
  • UpdateDownloadSource::installer_asset_candidates (cognitive 19) src-tauri/src/commands/update.rs:424 — UpdateDownloadSource::installer_asset_candidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, match/switch 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EwkbWktDecoder.tryParseHex (cognitive 19) · ×1
  • EwkbWktDecoder.tryParseHex (cognitive 19) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:238 — EwkbWktDecoder.tryParseHex has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts), loops 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MultiSessionJsonRpcServer.handleRequest (cognitive 19) · ×1
  • MultiSessionJsonRpcServer.handleRequest (cognitive 19) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198 — MultiSessionJsonRpcServer.handleRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4 (7 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OracleTriggerReader.source (cognitive 19) · ×1
  • OracleTriggerReader.source (cognitive 19) REDACTED:202 — OracleTriggerReader.source has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (5 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostgresLikeAgent.listForeignKeysFromCatalogArrays (cognitive 19) · ×1
  • PostgresLikeAgent.listForeignKeysFromCatalogArrays (cognitive 19) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:774 — PostgresLikeAgent.listForeignKeysFromCatalogArrays has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleColumnDataType (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleColumnDataType (cognitive 19) REDACTED:6202 — DbxJdbcPlugin.oracleColumnDataType has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleListObjects (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleListObjects (cognitive 19) REDACTED:5402 — DbxJdbcPlugin.oracleListObjects has cognitive complexity 19 (threshold 15). Drivers by points: error handling 8 (11 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleTypeSource (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleTypeSource (cognitive 19) REDACTED:5771 — DbxJdbcPlugin.oracleTypeSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.source (cognitive 19) · ×1
  • OracleTriggerMetadataReader.source (cognitive 19) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:207 — OracleTriggerMetadataReader.source has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.identityColumnsFromDdlText (cognitive 19) · ×1
  • DamengAgent.identityColumnsFromDdlText (cognitive 19) REDACTED:2315 — DamengAgent.identityColumnsFromDdlText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebirdObjectSource.triggerSource (cognitive 19) · ×1
  • FirebirdObjectSource.triggerSource (cognitive 19) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:57 — FirebirdObjectSource.triggerSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OceanBaseOracleAgent.formatDataType (cognitive 19) · ×1
  • OceanBaseOracleAgent.formatDataType (cognitive 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751 — OceanBaseOracleAgent.formatDataType has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · etcdSession.defrag (cognitive 19) · ×1
  • etcdSession.defrag (cognitive 19) agents/drivers/etcd-go/maintenance.go:55 — etcdSession.defrag has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listObjects (cognitive 19) · ×1
  • server.listObjects (cognitive 19) REDACTED:1670 — server.listObjects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.neo4jTLSConfigurer (cognitive 19) · ×1
  • main.neo4jTLSConfigurer (cognitive 19) agents/drivers/neo4j-go/driver.go:99 — main.neo4jTLSConfigurer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNestedSubprogramRanges (cognitive 19) · ×1
  • main.plDebugNestedSubprogramRanges (cognitive 19) REDACTED:4782 — main.plDebugNestedSubprogramRanges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeCaptureRender (cognitive 19) · ×1
  • main.plDebugNativeCaptureRender (cognitive 19) agents/drivers/oracle-go/pldebug_output.go:44 — main.plDebugNativeCaptureRender has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugNativeEntry.publishNativeStackLocked (cognitive 19) · ×1
  • plDebugNativeEntry.publishNativeStackLocked (cognitive 19) agents/drivers/oracle-go/pldebug_stack.go:266 — plDebugNativeEntry.publishNativeStackLocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugCompositeEncoder.lobDeclarations (cognitive 19) · ×1
  • plDebugCompositeEncoder.lobDeclarations (cognitive 19) agents/drivers/oracle-go/pldebug_record_output.go:207 — plDebugCompositeEncoder.lobDeclarations has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.readConsumerStatusFromBrokers (cognitive 19) · ×1
  • main.readConsumerStatusFromBrokers (cognitive 19) REDACTED:313 — main.readConsumerStatusFromBrokers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listTables (cognitive 19) · ×1
  • server.listTables (cognitive 19) REDACTED:2082 — server.listTables has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Krb5Mech.continueInitiator (cognitive 19) · ×1
  • Krb5Mech.continueInitiator (cognitive 19) agents/go-common/go-gssapi/krb5/krb5.go:335 — Krb5Mech.continueInitiator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · client.newTransportWithContext (cognitive 19) · ×1
  • client.newTransportWithContext (cognitive 19) REDACTED:75 — client.newTransportWithContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tablet.Swap (cognitive 19) · ×1
  • Tablet.Swap (cognitive 19) agents/go-common/iotdb-client-go/client/tablet.go:59 — Tablet.Swap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.isSourceAdjacentGap (cognitive 19) · ×1
  • sqlStatementRanges.isSourceAdjacentGap (cognitive 19) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2837 — sqlStatementRanges.isSourceAdjacentGap has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (7 pts), boolean chains 6, if/else 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify_offline_jdbc_release.main (cognitive 19) · ×1
  • verify_offline_jdbc_release.main (cognitive 19) agents/scripts/verify_offline_jdbc_release.mjs:64 — verify_offline_jdbc_release.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.downloadUpdateInBackground · ×1
  • useAppUpdater.useAppUpdater.downloadUpdateInBackground::run (cognitive 19) apps/desktop/src/composables/useAppUpdater.ts:391 — useAppUpdater.useAppUpdater.downloadUpdateInBackground::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useDataGridConditionEditor.activeQuoteAt (cognitive 19) · ×1
  • useDataGridConditionEditor.activeQuoteAt (cognitive 19) REDACTED:193 — useDataGridConditionEditor.activeQuoteAt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.insideInValueList (cognitive 19) · ×1
  • useDataGridConditionEditor.insideInValueList (cognitive 19) REDACTED:285 — useDataGridConditionEditor.insideInValueList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cognitive 19) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cognitive 19) REDACTED:558 — useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 4, error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.captureSqlInsertExportData (cognitive 19) · ×1
  • useDataGridExport.useDataGridExport.captureSqlInsertExportData (cognitive 19) apps/desktop/src/composables/useDataGridExport.ts:3031 — useDataGridExport.useDataGridExport.captureSqlInsertExportData has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 6 (nesting depth added 2). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cognitive 19) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cognitive 19) apps/desktop/src/composables/useDataGridLargeValues.ts:726 — useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 5). Of this number, 16 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.selectedCellCount (cognitive 19) · ×1
  • useDataGridSelection.useDataGridSelection.selectedCellCount (cognitive 19) apps/desktop/src/composables/useDataGridSelection.ts:164 — useDataGridSelection.useDataGridSelection.selectedCellCount has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cognitive 19) · ×1
  • useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cognitive 19) apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:654 — useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 689). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aiProposalDetect.lastLineMentionsWriteSql (cognitive 19) · ×1
  • aiProposalDetect.lastLineMentionsWriteSql (cognitive 19) apps/desktop/src/lib/ai/aiProposalDetect.ts:274 — aiProposalDetect.lastLineMentionsWriteSql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorUtils.isBackendError (cognitive 19) · ×1
  • errorUtils.isBackendError (cognitive 19) apps/desktop/src/lib/backend/errorUtils.ts:129 — errorUtils.isBackendError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · errorUtils.boundedFallbackTextAtDepth (cognitive 19) · ×1
  • errorUtils.boundedFallbackTextAtDepth (cognitive 19) apps/desktop/src/lib/backend/errorUtils.ts:292 — errorUtils.boundedFallbackTextAtDepth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSourceScanner.readStringToken (cognitive 19) · ×1
  • JsonSourceScanner.readStringToken (cognitive 19) REDACTED:492 — JsonSourceScanner.readStringToken has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agentTarget.consulAgentWriteBlockedReason (cognitive 19) · ×1
  • agentTarget.consulAgentWriteBlockedReason (cognitive 19) apps/desktop/src/lib/consul/agentTarget.ts:39 — agentTarget.consulAgentWriteBlockedReason has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · cellValueGeneration.generateCellValues (cognitive 19) · ×1
  • cellValueGeneration.generateCellValues (cognitive 19) apps/desktop/src/lib/dataGrid/cellValueGeneration.ts:51 — cellValueGeneration.generateCellValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4 (8 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dataGenerate.generateSkuFromPattern (cognitive 19) · ×1
  • dataGenerate.generateSkuFromPattern (cognitive 19) apps/desktop/src/lib/dataGrid/dataGenerate.ts:646 — dataGenerate.generateSkuFromPattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnLayoutStorage.queryLayoutSql (cognitive 19) · ×1
  • dataGridColumnLayoutStorage.queryLayoutSql (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnLayoutStorage.ts:78 — dataGridColumnLayoutStorage.queryLayoutSql has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 1. Of this number, 10 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · dataGridColumnVisibility.areCellValuesEqual (cognitive 19) · ×1
  • dataGridColumnVisibility.areCellValuesEqual (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnVisibility.ts:154 — dataGridColumnVisibility.areCellValuesEqual has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cognitive 19) · ×1
  • dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:123 — dataGridColumnWidthState.loadPersistentDataGridColumnWidthState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnWidthState.loadDataGridColumnWidthState (cognitive 19) · ×1
  • dataGridColumnWidthState.loadDataGridColumnWidthState (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:207 — dataGridColumnWidthState.loadDataGridColumnWidthState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.parseSingleInsertStatement (cognitive 19) · ×1
  • dataGridInsertPaste.parseSingleInsertStatement (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:270 — dataGridInsertPaste.parseSingleInsertStatement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.nativeJobDefinitionForEdit (cognitive 19) · ×1
  • nativeJobAdmin.nativeJobDefinitionForEdit (cognitive 19) apps/desktop/src/lib/database/nativeJobAdmin.ts:324 — nativeJobAdmin.nativeJobDefinitionForEdit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.executeOracleForeignKeyCreatePlan (cognitive 19) · ×1
  • oracleForeignKeys.executeOracleForeignKeyCreatePlan (cognitive 19) apps/desktop/src/lib/database/oracleForeignKeys.ts:572 — oracleForeignKeys.executeOracleForeignKeyCreatePlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleUserAdmin.oraclePrivilegeSql (cognitive 19) · ×1
  • oracleUserAdmin.oraclePrivilegeSql (cognitive 19) apps/desktop/src/lib/database/oracleUserAdmin.ts:92 — oracleUserAdmin.oraclePrivilegeSql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 6 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · erDiagram.buildDiagramJoinSql (cognitive 19) · ×1
  • erDiagram.buildDiagramJoinSql (cognitive 19) apps/desktop/src/lib/diagram/erDiagram.ts:371 — erDiagram.buildDiagramJoinSql has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · diagramFormats.buildDiagramDbml (cognitive 19) · ×1
  • diagramFormats.buildDiagramDbml (cognitive 19) apps/desktop/src/lib/export/diagramFormats.ts:112 — diagramFormats.buildDiagramDbml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navicatImport.readNode (cognitive 19) · ×1
  • navicatImport.readNode (cognitive 19) REDACTED:171 — navicatImport.readNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kvKeyTree.buildKvKeyTree (cognitive 19) · ×1
  • kvKeyTree.buildKvKeyTree (cognitive 19) apps/desktop/src/lib/kv/kvKeyTree.ts:79 — kvKeyTree.buildKvKeyTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modelTemplates.renderModelTemplate (cognitive 19) · ×1
  • modelTemplates.renderModelTemplate (cognitive 19) apps/desktop/src/lib/model/modelTemplates.ts:23 — modelTemplates.renderModelTemplate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 19 points belong to 2 function items inside it that branch (parse, a function literal at line 50). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · mongoCompletion.classifyCursorInCall (cognitive 19) · ×1
  • mongoCompletion.classifyCursorInCall (cognitive 19) REDACTED:1145 — mongoCompletion.classifyCursorInCall has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyFindProjection (cognitive 19) · ×1
  • mongoCompletion.classifyFindProjection (cognitive 19) REDACTED:1370 — mongoCompletion.classifyFindProjection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoConnectionOptions.mongodbAuthFailureHint (cognitive 19) · ×1
  • mongoConnectionOptions.mongodbAuthFailureHint (cognitive 19) apps/desktop/src/lib/mongo/mongoConnectionOptions.ts:85 — mongoConnectionOptions.mongodbAuthFailureHint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoUserInfoCommand (cognitive 19) · ×1
  • mongoShellCommand.parseMongoUserInfoCommand (cognitive 19) REDACTED:834 — mongoShellCommand.parseMongoUserInfoCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginClipboardImage.requirePluginClipboardImage (cognitive 19) · ×1
  • pluginClipboardImage.requirePluginClipboardImage (cognitive 19) apps/desktop/src/lib/plugins/pluginClipboardImage.ts:7 — pluginClipboardImage.requirePluginClipboardImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · batchTableEmpty.runBatchTableEmptyLayers (cognitive 19) · ×1
  • batchTableEmpty.runBatchTableEmptyLayers (cognitive 19) apps/desktop/src/lib/sidebar/batchTableEmpty.ts:63 — batchTableEmpty.runBatchTableEmptyLayers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 81). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes · ×1
  • sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit (cognitive 19) apps/desktop/src/lib/sidebar/sidebarGlobalSearchIndex.ts:41 — sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cognitive 19) · ×1
  • sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cognitive 19) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:742 — sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarTreeLabel.sidebarTreeDisplayLabel (cognitive 19) · ×1
  • sidebarTreeLabel.sidebarTreeDisplayLabel (cognitive 19) apps/desktop/src/lib/sidebar/sidebarTreeLabel.ts:8 — sidebarTreeLabel.sidebarTreeDisplayLabel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ddlDisplay.findCreateTableBody (cognitive 19) · ×1
  • ddlDisplay.findCreateTableBody (cognitive 19) apps/desktop/src/lib/sql/ddlDisplay.ts:394 — ddlDisplay.findCreateTableBody has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, loops 2 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.buildInsertValueHints (cognitive 19) · ×1
  • insertValueHints.buildInsertValueHints (cognitive 19) apps/desktop/src/lib/sql/insertValueHints.ts:805 — insertValueHints.buildInsertValueHints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.isTableListContinuation (cognitive 19) · ×1
  • model.isTableListContinuation (cognitive 19) apps/desktop/src/lib/sql/semantic/model.ts:934 — model.isTableListContinuation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildCompositeHeuristicJoinConditionItems (cognitive 19) · ×1
  • sqlCompletion.buildCompositeHeuristicJoinConditionItems (cognitive 19) apps/desktop/src/lib/sql/sqlCompletion.ts:6611 — sqlCompletion.buildCompositeHeuristicJoinConditionItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sqlCompletion.buildFunctionSnippetItems (cognitive 19) · ×1
  • sqlCompletion.buildFunctionSnippetItems (cognitive 19) apps/desktop/src/lib/sql/sqlCompletion.ts:6841 — sqlCompletion.buildFunctionSnippetItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (7 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.tryReadQuotedSubstitutionPlaceholder (cognitive 19) · ×1
  • sqlParameters.tryReadQuotedSubstitutionPlaceholder (cognitive 19) apps/desktop/src/lib/sql/sqlParameters.ts:1819 — sqlParameters.tryReadQuotedSubstitutionPlaceholder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlInListPaste.splitPasteTokens (cognitive 19) · ×1
  • sqlInListPaste.splitPasteTokens (cognitive 19) apps/desktop/src/lib/sql/sqlInListPaste.ts:83 — sqlInListPaste.splitPasteTokens has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlNavigation.resolveSqlObjectNavigationIdentity (cognitive 19) · ×1
  • sqlNavigation.resolveSqlObjectNavigationIdentity (cognitive 19) apps/desktop/src/lib/sql/sqlNavigation.ts:501 — sqlNavigation.resolveSqlObjectNavigationIdentity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlNavigation.sqlObjectNavigationTargetFromIdentity (cognitive 19) · ×1
  • sqlNavigation.sqlObjectNavigationTargetFromIdentity (cognitive 19) apps/desktop/src/lib/sql/sqlNavigation.ts:560 — sqlNavigation.sqlObjectNavigationTargetFromIdentity has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnDefaultPresets.starRocksDefaultPresets (cognitive 19) · ×1
  • columnDefaultPresets.starRocksDefaultPresets (cognitive 19) apps/desktop/src/lib/table/columnDefaultPresets.ts:29 — columnDefaultPresets.starRocksDefaultPresets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave (cognitive 19) · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave (cognitive 19) apps/desktop/src/lib/table/oracleRoutineWrite.ts:49 — oracleRoutineWrite.prepareOracleRoutineSourceSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (34 pts), error handling 6 (13 pts), boolean chains 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineWrite.prepareOracleRoutineSourceSave::execute) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTableRename.readOnlyReconcile (cognitive 19) · ×1
  • oracleTableRename.readOnlyReconcile (cognitive 19) REDACTED:794 — oracleTableRename.readOnlyReconcile has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.sqlServerParameterDeclarationType (cognitive 19) · ×1
  • routineParameters.sqlServerParameterDeclarationType (cognitive 19) apps/desktop/src/lib/table/routineParameters.ts:512 — routineParameters.sqlServerParameterDeclarationType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · tableVGroup.normalizeTableVGroupLayout · ×1
  • tableVGroup.normalizeTableVGroupLayout::normalizeEntries (cognitive 19) apps/desktop/src/lib/table/tableVGroup.ts:704 — tableVGroup.normalizeTableVGroupLayout::normalizeEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabDatabaseIconType (cognitive 19) · ×1
  • tabPresentation.tabDatabaseIconType (cognitive 19) apps/desktop/src/lib/tabs/tabPresentation.ts:845 — tabPresentation.tabDatabaseIconType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabSwitcherKeyboard.tabSwitcherReleaseKeys (cognitive 19) · ×1
  • tabSwitcherKeyboard.tabSwitcherReleaseKeys (cognitive 19) apps/desktop/src/lib/tabs/tabSwitcherKeyboard.ts:22 — tabSwitcherKeyboard.tabSwitcherReleaseKeys has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.startDisconnectRequest (cognitive 19) · ×1
  • connectionStore.useConnectionStore.startDisconnectRequest (cognitive 19) apps/desktop/src/stores/connectionStore.ts:1267 — connectionStore.useConnectionStore.startDisconnectRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1279, disconnectIfCurrent, a function literal at line 1296). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.refreshWatches (cognitive 19) · ×1
  • plDebugStore.usePlDebugStore.refreshWatches (cognitive 19) apps/desktop/src/stores/plDebugStore.ts:1550 — plDebugStore.usePlDebugStore.refreshWatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.revalidateObjectSourceTab (cognitive 19) · ×1
  • queryStore.useQueryStore.revalidateObjectSourceTab (cognitive 19) apps/desktop/src/stores/queryStore.ts:3464 — queryStore.useQueryStore.revalidateObjectSourceTab has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.releasePluginConnectionsAfterClose (cognitive 19) · ×1
  • queryStore.useQueryStore.releasePluginConnectionsAfterClose (cognitive 19) apps/desktop/src/stores/queryStore.ts:5271 — queryStore.useQueryStore.releasePluginConnectionsAfterClose has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 7). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agentBundle.extractDriverPackage (cognitive 19) · ×1
  • agentBundle.extractDriverPackage (cognitive 19) docs/lib/agentBundle.ts:239 — agentBundle.extractDriverPackage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.removeTrailingCommas (cognitive 19) · ×1
  • json.removeTrailingCommas (cognitive 19) packages/mongo-shell/src/json.ts:424 — json.removeTrailingCommas has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · outline · ×1
  • outline::walk (cognitive 19) REDACTED:66 — outline::walk has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 4, if/else 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stopProcessTree (cognitive 19) · ×1
  • stopProcessTree (cognitive 19) plugins/sdk/dev-host/process-tree.mjs:5 — stopProcessTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (signal, a function literal at line 18, a function literal at line 10, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PoolRoutingControl · ×1
  • PoolRoutingControl::detach_agent_pool_if_current (cognitive 18) REDACTED:1099 — PoolRoutingControl::detach_agent_pool_if_current has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrictTranscodingReader · ×1
  • StrictTranscodingReader::read (cognitive 18) REDACTED:1018 — StrictTranscodingReader::read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleSchedulerProjection · ×1
  • OracleSchedulerProjection::bind (cognitive 18) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition/projection.rs:106 — OracleSchedulerProjection::bind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserInputSpec · ×1
  • UserInputSpec::parse (cognitive 18) crates/dbx-plugin-runtime/src/plugins/runtime.rs:1000 — UserInputSpec::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DedicatedAttempt.completeOpen (cognitive 18) · ×1
  • DedicatedAttempt.completeOpen (cognitive 18) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:527 — DedicatedAttempt.completeOpen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerReader.enrichObjects (cognitive 18) · ×1
  • OracleTriggerReader.enrichObjects (cognitive 18) REDACTED:46 — OracleTriggerReader.enrichObjects has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 2 (6 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DbxJdbcPlugin.openConnection (cognitive 18) · ×1
  • DbxJdbcPlugin.openConnection (cognitive 18) REDACTED:1176 — DbxJdbcPlugin.openConnection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, error handling 2 (5 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleExplainBindMarkerCount (cognitive 18) · ×1
  • DbxJdbcPlugin.oracleExplainBindMarkerCount (cognitive 18) REDACTED:2585 — DbxJdbcPlugin.oracleExplainBindMarkerCount has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.tableColumnComments (cognitive 18) · ×1
  • DamengAgent.tableColumnComments (cognitive 18) REDACTED:3338 — DamengAgent.tableColumnComments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebirdAgent.listObjects (cognitive 18) · ×1
  • FirebirdAgent.listObjects (cognitive 18) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java:173 — FirebirdAgent.listObjects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectPeekedMessages (cognitive 18) · ×1
  • KafkaAgent.collectPeekedMessages (cognitive 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1961 — KafkaAgent.collectPeekedMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.validate (cognitive 18) · ×1
  • PlDebugCompositeOutput.validate (cognitive 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:95 — PlDebugCompositeOutput.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ci-install-system-deps.rewrite_ubuntu_uris (cognitive 18) · ×1
  • ci-install-system-deps.rewrite_ubuntu_uris (cognitive 18) .github/scripts/ci-install-system-deps.py:37 — ci-install-system-deps.rewrite_ubuntu_uris has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · configure-docker-mirror.configure (cognitive 18) · ×1
  • configure-docker-mirror.configure (cognitive 18) .github/scripts/configure-docker-mirror.py:16 — configure-docker-mirror.configure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.queryInformationSchemaColumns (cognitive 18) · ×1
  • server.queryInformationSchemaColumns (cognitive 18) REDACTED:2038 — server.queryInformationSchemaColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getViewSource (cognitive 18) · ×1
  • server.getViewSource (cognitive 18) REDACTED:2820 — server.getViewSource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.routineQueryContext (cognitive 18) · ×1
  • server.routineQueryContext (cognitive 18) agents/drivers/kingbase-go/routine_metadata.go:38 — server.routineQueryContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.drainDBMSOutput (cognitive 18) · ×1
  • main.drainDBMSOutput (cognitive 18) agents/drivers/oracle-go/dbms_output.go:347 — main.drainDBMSOutput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.splitTopLevelSQLList (cognitive 18) · ×1
  • main.splitTopLevelSQLList (cognitive 18) REDACTED:6006 — main.splitTopLevelSQLList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.findTopLevelSQLKeyword (cognitive 18) · ×1
  • main.findTopLevelSQLKeyword (cognitive 18) REDACTED:6044 — main.findTopLevelSQLKeyword has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getExplainInfo (cognitive 18) · ×1
  • server.getExplainInfo (cognitive 18) REDACTED:4419 — server.getExplainInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.listConsumerGroups (cognitive 18) · ×1
  • rocketMQAgent.listConsumerGroups (cognitive 18) REDACTED:35 — rocketMQAgent.listConsumerGroups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.readQuerySessionPage (cognitive 18) · ×1
  • main.readQuerySessionPage (cognitive 18) agents/drivers/vastbase-go/main.go:875 — main.readQuerySessionPage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.negotiateSASLDigest (cognitive 18) · ×1
  • main.negotiateSASLDigest (cognitive 18) agents/drivers/zookeeper/sasl.go:81 — main.negotiateSASLDigest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · client.newClusterSessionWithSqlDialect (cognitive 18) · ×1
  • client.newClusterSessionWithSqlDialect (cognitive 18) agents/go-common/iotdb-client-go/client/session.go:1540 — client.newClusterSessionWithSqlDialect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.spliceTightRemovals (cognitive 18) · ×1
  • ddlStorage.spliceTightRemovals (cognitive 18) apps/desktop/src/lib/sql/ddlStorage.ts:56 — ddlStorage.spliceTightRemovals has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 2, loops 2 (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.skipSqlTrivia (cognitive 18) · ×1
  • sqlStatementRanges.skipSqlTrivia (cognitive 18) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1193 — sqlStatementRanges.skipSqlTrivia has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cognitive 18) · ×1
  • queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cognitive 18) apps/desktop/src/components/editor/queryEditorHoverContent.ts:20 — queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cognitive 18) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cognitive 18) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:67 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryResultTransferValues.timestampTargetType (cognitive 18) · ×1
  • queryResultTransferValues.timestampTargetType (cognitive 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:114 — queryResultTransferValues.timestampTargetType has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 6, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.bitStringLiteral (cognitive 18) · ×1
  • queryResultTransferValues.bitStringLiteral (cognitive 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:394 — queryResultTransferValues.bitStringLiteral has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.settlePendingSave (cognitive 18) · ×1
  • useDataGridEditor.useDataGridEditor.settlePendingSave (cognitive 18) apps/desktop/src/composables/useDataGridEditor.ts:2097 — useDataGridEditor.useDataGridEditor.settlePendingSave has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useExportTracker.findActiveOverlappingTransfer (cognitive 18) · ×1
  • useExportTracker.findActiveOverlappingTransfer (cognitive 18) apps/desktop/src/composables/useExportTracker.ts:461 — useExportTracker.findActiveOverlappingTransfer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useFlatTree.createFlatTreeIndex (cognitive 18) · ×1
  • useFlatTree.createFlatTreeIndex (cognitive 18) apps/desktop/src/composables/useFlatTree.ts:140 — useFlatTree.createFlatTreeIndex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useNativeJobExecution.useNativeJobExecution.acceptStatus (cognitive 18) · ×1
  • useNativeJobExecution.useNativeJobExecution.acceptStatus (cognitive 18) apps/desktop/src/composables/useNativeJobExecution.ts:108 — useNativeJobExecution.useNativeJobExecution.acceptStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQuickOpen.matchWordPrefixes (cognitive 18) · ×1
  • useQuickOpen.matchWordPrefixes (cognitive 18) apps/desktop/src/composables/useQuickOpen.ts:155 — useQuickOpen.matchWordPrefixes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQuickOpen.useQuickOpen.runRemoteSearch (cognitive 18) · ×1
  • useQuickOpen.useQuickOpen.runRemoteSearch (cognitive 18) apps/desktop/src/composables/useQuickOpen.ts:911 — useQuickOpen.useQuickOpen.runRemoteSearch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2, ternaries 1 (2 pts), loops 1 (nesting depth added 3). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 931, 915, 935). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentStoreProvider.parseDocumentFilterValueList (cognitive 18) · ×1
  • documentStoreProvider.parseDocumentFilterValueList (cognitive 18) apps/desktop/src/lib/app/documentStoreProvider.ts:646 — documentStoreProvider.parseDocumentFilterValueList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cognitive 18) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cognitive 18) REDACTED:291 — scheduledDatabaseBackup.normalizeDatabaseBackupSchedule has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 3, error handling 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · decodeText.decodeImportFileText (cognitive 18) · ×1
  • decodeText.decodeImportFileText (cognitive 18) apps/desktop/src/lib/common/decodeText.ts:11 — decodeText.decodeImportFileText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionLevelDatabaseBootstrap.stripLeadingSqlComments (cognitive 18) · ×1
  • connectionLevelDatabaseBootstrap.stripLeadingSqlComments (cognitive 18) apps/desktop/src/lib/connection/connectionLevelDatabaseBootstrap.ts:77 — connectionLevelDatabaseBootstrap.stripLeadingSqlComments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnFormatter.parseIoTDBTimestampEditorValue (cognitive 18) · ×1
  • columnFormatter.parseIoTDBTimestampEditorValue (cognitive 18) apps/desktop/src/lib/dataGrid/columnFormatter.ts:392 — columnFormatter.parseIoTDBTimestampEditorValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2 (3 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · columnFormatter.formatJsonPath (cognitive 18) · ×1
  • columnFormatter.formatJsonPath (cognitive 18) apps/desktop/src/lib/dataGrid/columnFormatter.ts:720 — columnFormatter.formatJsonPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.formatGeneratedValue (cognitive 18) · ×1
  • dataGenerate.formatGeneratedValue (cognitive 18) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1903 — dataGenerate.formatGeneratedValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnFilter.splitFilterValues (cognitive 18) · ×1
  • dataGridColumnFilter.splitFilterValues (cognitive 18) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:259 — dataGridColumnFilter.splitFilterValues has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnIndexIcon.buildColumnIndexMap (cognitive 18) · ×1
  • dataGridColumnIndexIcon.buildColumnIndexMap (cognitive 18) apps/desktop/src/lib/dataGrid/dataGridColumnIndexIcon.ts:11 — dataGridColumnIndexIcon.buildColumnIndexMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryPreview.tokenize (cognitive 18) · ×1
  • geometryPreview.tokenize (cognitive 18) apps/desktop/src/lib/dataGrid/geometryPreview.ts:14 — geometryPreview.tokenize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridSelection.summarizeSelection (cognitive 18) · ×1
  • gridSelection.summarizeSelection (cognitive 18) apps/desktop/src/lib/dataGrid/gridSelection.ts:230 — gridSelection.summarizeSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cognitive 18) · ×1
  • oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cognitive 18) REDACTED:100 — oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleConstraints.constraintRecoveryCandidate (cognitive 18) · ×1
  • oracleConstraints.constraintRecoveryCandidate (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:427 — oracleConstraints.constraintRecoveryCandidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.readbackMatches (cognitive 18) · ×1
  • oracleConstraints.readbackMatches (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:629 — oracleConstraints.readbackMatches has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · oracleConstraints.prepareOracleConstraintPlan (cognitive 18) · ×1
  • oracleConstraints.prepareOracleConstraintPlan (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:692 — oracleConstraints.prepareOracleConstraintPlan has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleUserAdmin.buildOracleObjectAuthorizationPlan (cognitive 18) · ×1
  • oracleUserAdmin.buildOracleObjectAuthorizationPlan (cognitive 18) apps/desktop/src/lib/database/oracleUserAdmin.ts:31 — oracleUserAdmin.buildOracleObjectAuthorizationPlan has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleUserAdmin.createOracleUserAdminActions (cognitive 18) · ×1
  • oracleUserAdmin.createOracleUserAdminActions (cognitive 18) apps/desktop/src/lib/database/oracleUserAdmin.ts:110 — oracleUserAdmin.createOracleUserAdminActions has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, if/else 2 (nesting depth added 7). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataDictionaryPdf.flowObjects (cognitive 18) · ×1
  • dataDictionaryPdf.flowObjects (cognitive 18) apps/desktop/src/lib/docs/dataDictionaryPdf.ts:247 — dataDictionaryPdf.flowObjects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorShellLineCommentHighlight.createShellLineCommentHighlight · ×1
  • codemirrorShellLineCommentHighlight.createShellLineCommentHighlight::buildDecorations (cognitive 18) apps/desktop/src/lib/editor/codemirrorShellLineCommentHighlight.ts:28 — codemirrorShellLineCommentHighlight.createShellLineCommentHighlight::buildDecorations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorParenthesisMouseSelection.sqlParenthesisContentRangeAt (cognitive 18) · ×1
  • queryEditorParenthesisMouseSelection.sqlParenthesisContentRangeAt (cognitive 18) apps/desktop/src/lib/editor/queryEditorParenthesisMouseSelection.ts:22 — queryEditorParenthesisMouseSelection.sqlParenthesisContentRangeAt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.validateTokens (cognitive 18) · ×1
  • sqlSemanticSelectionRanges.validateTokens (cognitive 18) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:108 — sqlSemanticSelectionRanges.validateTokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExportOptions.loadSavedDatabaseExportOptions (cognitive 18) · ×1
  • databaseExportOptions.loadSavedDatabaseExportOptions (cognitive 18) apps/desktop/src/lib/export/databaseExportOptions.ts:38 — databaseExportOptions.loadSavedDatabaseExportOptions has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12, if/else 3, boolean chains 2, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · diagramFormats.diagramExportFileName (cognitive 18) · ×1
  • diagramFormats.diagramExportFileName (cognitive 18) apps/desktop/src/lib/export/diagramFormats.ts:100 — diagramFormats.diagramExportFileName has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (17 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · xlsxExport.cellXml (cognitive 18) · ×1
  • xlsxExport.cellXml (cognitive 18) apps/desktop/src/lib/export/xlsxExport.ts:163 — xlsxExport.cellXml has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 5 (6 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · neo4jGraph.applyNeo4jGraphPropertyToResult (cognitive 18) · ×1
  • neo4jGraph.applyNeo4jGraphPropertyToResult (cognitive 18) apps/desktop/src/lib/graph/neo4jGraph.ts:65 — neo4jGraph.applyNeo4jGraphPropertyToResult has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 76, propertiesDisplay, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · dbeaverImport.parseJdbcUrl (cognitive 18) · ×1
  • dbeaverImport.parseJdbcUrl (cognitive 18) REDACTED:148 — dbeaverImport.parseJdbcUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · navicatImport.inferProfile (cognitive 18) · ×1
  • navicatImport.inferProfile (cognitive 18) REDACTED:153 — navicatImport.inferProfile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.buildMongoCopyUpdateDocument (cognitive 18) · ×1
  • mongoDocumentValues.buildMongoCopyUpdateDocument (cognitive 18) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:540 — mongoDocumentValues.buildMongoCopyUpdateDocument has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.findUnsupportedValueConstructor (cognitive 18) · ×1
  • mongoShellCommand.findUnsupportedValueConstructor (cognitive 18) REDACTED:212 — mongoShellCommand.findUnsupportedValueConstructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSql.exprToFilter (cognitive 18) · ×1
  • mongoSql.exprToFilter (cognitive 18) apps/desktop/src/lib/mongo/mongoSql.ts:996 — mongoSql.exprToFilter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSyntaxDiagnostics.describeMongoWriteRisk (cognitive 18) · ×1
  • mongoSyntaxDiagnostics.describeMongoWriteRisk (cognitive 18) apps/desktop/src/lib/mongo/mongoSyntaxDiagnostics.ts:81 — mongoSyntaxDiagnostics.describeMongoWriteRisk has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · nacosAdmin.pairChangedLines (cognitive 18) · ×1
  • nacosAdmin.pairChangedLines (cognitive 18) apps/desktop/src/lib/nacos/nacosAdmin.ts:622 — nacosAdmin.pairChangedLines has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlSearch.findSavedSqlSearchMatches (cognitive 18) · ×1
  • savedSqlSearch.findSavedSqlSearchMatches (cognitive 18) apps/desktop/src/lib/savedSql/savedSqlSearch.ts:85 — savedSqlSearch.findSavedSqlSearchMatches has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packageMembers.buildPackageMemberNodes (cognitive 18) · ×1
  • packageMembers.buildPackageMemberNodes (cognitive 18) apps/desktop/src/lib/sidebar/packageMembers.ts:55 — packageMembers.buildPackageMemberNodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.filterLocallySearchedTableNodes (cognitive 18) · ×1
  • sidebarSearchTree.filterLocallySearchedTableNodes (cognitive 18) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:113 — sidebarSearchTree.filterLocallySearchedTableNodes has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (7 pts), if/else 2 (nesting depth added 2). None of this is in the body itself: all 18 points belong to 5 function literals inside it that branch (lines 114, 135, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarTableVGroupDrag.resolveTableVGroupDropTarget (cognitive 18) · ×1
  • sidebarTableVGroupDrag.resolveTableVGroupDropTarget (cognitive 18) apps/desktop/src/lib/sidebar/sidebarTableVGroupDrag.ts:29 — sidebarTableVGroupDrag.resolveTableVGroupDropTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printElement (cognitive 18) · ×1
  • printer.printElement (cognitive 18) apps/desktop/src/lib/sql/layout/printer.ts:540 — printer.printElement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · completion.sqlSemanticSelectStarIsOnlyProjection (cognitive 18) · ×1
  • completion.sqlSemanticSelectStarIsOnlyProjection (cognitive 18) apps/desktop/src/lib/sql/semantic/completion.ts:77 — completion.sqlSemanticSelectStarIsOnlyProjection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · model.trailingIdentifier (cognitive 18) · ×1
  • model.trailingIdentifier (cognitive 18) apps/desktop/src/lib/sql/semantic/model.ts:851 — model.trailingIdentifier has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildAliasItems (cognitive 18) · ×1
  • sqlCompletion.buildAliasItems (cognitive 18) apps/desktop/src/lib/sql/sqlCompletion.ts:5895 — sqlCompletion.buildAliasItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDiagnostics.sqlErrorDecorationRange (cognitive 18) · ×1
  • sqlDiagnostics.sqlErrorDecorationRange (cognitive 18) apps/desktop/src/lib/sql/sqlDiagnostics.ts:166 — sqlDiagnostics.sqlErrorDecorationRange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSelectionCase.convertSqlSelectionCase (cognitive 18) · ×1
  • sqlSelectionCase.convertSqlSelectionCase (cognitive 18) apps/desktop/src/lib/sql/sqlSelectionCase.ts:14 — sqlSelectionCase.convertSqlSelectionCase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 2 (nesting depth added 2). Of this number, 11 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlSourcePaste.parseSourceSqlLiterals (cognitive 18) · ×1
  • sqlSourcePaste.parseSourceSqlLiterals (cognitive 18) apps/desktop/src/lib/sql/sqlSourcePaste.ts:286 — sqlSourcePaste.parseSourceSqlLiterals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariableSyntax.updateSqlVariableSyntaxToggle (cognitive 18) · ×1
  • sqlVariableSyntax.updateSqlVariableSyntaxToggle (cognitive 18) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:151 — sqlVariableSyntax.updateSqlVariableSyntaxToggle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectBrowserRowAction.doubleClickRowAction (cognitive 18) · ×1
  • objectBrowserRowAction.doubleClickRowAction (cognitive 18) apps/desktop/src/lib/table/objectBrowserRowAction.ts:37 — objectBrowserRowAction.doubleClickRowAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.validateDraftRelations (cognitive 18) · ×1
  • oracleTableRename.validateDraftRelations (cognitive 18) REDACTED:344 — oracleTableRename.validateDraftRelations has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7, if/else 1, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (normalize, a function literal at line 415, a function literal at line 354, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · oracleTypeDataMapping.executeOracleTypeDataInsert (cognitive 18) · ×1
  • oracleTypeDataMapping.executeOracleTypeDataInsert (cognitive 18) apps/desktop/src/lib/table/oracleTypeDataMapping.ts:82 — oracleTypeDataMapping.executeOracleTypeDataInsert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 3. Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.jdbcRoutineParameterType (cognitive 18) · ×1
  • routineParameters.jdbcRoutineParameterType (cognitive 18) apps/desktop/src/lib/table/routineParameters.ts:185 — routineParameters.jdbcRoutineParameterType has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.xuguFunctionReturnType (cognitive 18) · ×1
  • routineParameters.xuguFunctionReturnType (cognitive 18) apps/desktop/src/lib/table/routineParameters.ts:401 — routineParameters.xuguFunctionReturnType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.specialIndexColumnIssue (cognitive 18) · ×1
  • tableStructureEditorState.specialIndexColumnIssue (cognitive 18) apps/desktop/src/lib/table/tableStructureEditorState.ts:1413 — tableStructureEditorState.specialIndexColumnIssue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.resolveTableVGroupScopeFromNode (cognitive 18) · ×1
  • tableVGroup.resolveTableVGroupScopeFromNode (cognitive 18) apps/desktop/src/lib/table/tableVGroup.ts:803 — tableVGroup.resolveTableVGroupScopeFromNode has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.clearLoadedChildrenCache (cognitive 18) · ×1
  • connectionStore.useConnectionStore.clearLoadedChildrenCache (cognitive 18) apps/desktop/src/stores/connectionStore.ts:4559 — connectionStore.useConnectionStore.clearLoadedChildrenCache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.readImportFile (cognitive 18) · ×1
  • connectionStore.useConnectionStore.readImportFile (cognitive 18) apps/desktop/src/stores/connectionStore.ts:11700 — connectionStore.useConnectionStore.readImportFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.readPublic (cognitive 18) · ×1
  • plDebugStore.usePlDebugStore.readPublic (cognitive 18) apps/desktop/src/stores/plDebugStore.ts:555 — plDebugStore.usePlDebugStore.readPublic has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 2. Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeResultSession (cognitive 18) · ×1
  • queryStore.useQueryStore.closeResultSession (cognitive 18) apps/desktop/src/stores/queryStore.ts:1894 — queryStore.useQueryStore.closeResultSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · queryStore.useQueryStore.loadObjectSourceIntoTab (cognitive 18) · ×1
  • queryStore.useQueryStore.loadObjectSourceIntoTab (cognitive 18) apps/desktop/src/stores/queryStore.ts:3600 — queryStore.useQueryStore.loadObjectSourceIntoTab has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 4, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveQueryDisplayMetadata (cognitive 18) · ×1
  • queryStore.useQueryStore.resolveQueryDisplayMetadata (cognitive 18) apps/desktop/src/stores/queryStore.ts:7867 — queryStore.useQueryStore.resolveQueryDisplayMetadata has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, error handling 1, ternaries 1. Of this number, 12 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.moveFolderToFolder (cognitive 18) · ×1
  • savedSqlStore.useSavedSqlStore.moveFolderToFolder (cognitive 18) apps/desktop/src/stores/savedSqlStore.ts:1045 — savedSqlStore.useSavedSqlStore.moveFolderToFolder has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 3. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1060, 1054, 1055). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.moveFolderToFolder (cognitive 18) · ×1
  • transferTaskStore.useTransferTaskStore.moveFolderToFolder (cognitive 18) apps/desktop/src/stores/transferTaskStore.ts:400 — transferTaskStore.useTransferTaskStore.moveFolderToFolder has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 3. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 418, 409, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · json.quoteUnquotedObjectKeys (cognitive 18) · ×1
  • json.quoteUnquotedObjectKeys (cognitive 18) packages/mongo-shell/src/json.ts:457 — json.quoteUnquotedObjectKeys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NacosAdminConfig · ×1
  • NacosAdminConfig::validate (cognitive 17) crates/dbx-core/src/admin/nacos/config.rs:220 — NacosAdminConfig::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BackupSchedule · ×1
  • BackupSchedule::next_after (cognitive 17) crates/dbx-core/src/scheduled_backup/models.rs:207 — BackupSchedule::next_after has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractJdbcAgent.finishPooledRequest (cognitive 17) · ×1
  • AbstractJdbcAgent.finishPooledRequest (cognitive 17) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:421 — AbstractJdbcAgent.finishPooledRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JsonRpcServer.validateTypedDebugWire (cognitive 17) · ×1
  • JsonRpcServer.validateTypedDebugWire (cognitive 17) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:101 — JsonRpcServer.validateTypedDebugWire has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.filterMetadataNodes (cognitive 17) · ×1
  • DbxJdbcPlugin.filterMetadataNodes (cognitive 17) REDACTED:3889 — DbxJdbcPlugin.filterMetadataNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getDictionaryFirstObjectSource (cognitive 17) · ×1
  • OceanBaseOracleAgent.getDictionaryFirstObjectSource (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1450 — OceanBaseOracleAgent.getDictionaryFirstObjectSource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugResultCache.text (cognitive 17) · ×1
  • PlDebugResultCache.text (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugResultCache.java:39 — PlDebugResultCache.text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.runToTermination (cognitive 17) · ×1
  • PlDebugSession.runToTermination (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1476 — PlDebugSession.runToTermination has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpannerAgent.spannerIndexes (cognitive 17) · ×1
  • SpannerAgent.spannerIndexes (cognitive 17) agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:543 — SpannerAgent.spannerIndexes has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 2 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate_agents.validate_manifest_fields (cognitive 17) · ×1
  • validate_agents.validate_manifest_fields (cognitive 17) agents/scripts/validate_agents.py:150 — validate_agents.validate_manifest_fields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.renderCQLValue (cognitive 17) · ×1
  • main.renderCQLValue (cognitive 17) agents/drivers/cassandra-go/values.go:39 — main.renderCQLValue has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 4 (6 pts), match/switch 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · etcdSession.listPrefix (cognitive 17) · ×1
  • etcdSession.listPrefix (cognitive 17) agents/drivers/etcd-go/kv.go:27 — etcdSession.listPrefix has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · etcd2Session.authRolePermission (cognitive 17) · ×1
  • etcd2Session.authRolePermission (cognitive 17) agents/drivers/etcd2-go/auth.go:322 — etcd2Session.authRolePermission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.queryTimestampPrecision (cognitive 17) · ×1
  • main.queryTimestampPrecision (cognitive 17) agents/drivers/iotdb/driver.go:292 — main.queryTimestampPrecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.newAgentSession (cognitive 17) · ×1
  • main.newAgentSession (cognitive 17) agents/drivers/nebula-go/main.go:219 — main.newAgentSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.plDebugEnsureHelperPackage (cognitive 17) · ×1
  • main.plDebugEnsureHelperPackage (cognitive 17) REDACTED:1257 — main.plDebugEnsureHelperPackage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugAnonymousCallLine (cognitive 17) · ×1
  • main.plDebugAnonymousCallLine (cognitive 17) REDACTED:5218 — main.plDebugAnonymousCallLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugExecuteNativeStatement (cognitive 17) · ×1
  • main.plDebugExecuteNativeStatement (cognitive 17) REDACTED:86 — main.plDebugExecuteNativeStatement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · main.plDebugLegacyIndexType (cognitive 17) · ×1
  • main.plDebugLegacyIndexType (cognitive 17) agents/drivers/oracle-go/pldebug_legacy_declarations.go:94 — main.plDebugLegacyIndexType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.plDebugConstructorSplit (cognitive 17) · ×1
  • main.plDebugConstructorSplit (cognitive 17) agents/drivers/oracle-go/pldebug_object_constructors.go:240 — main.plDebugConstructorSplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeObjectHierarchyKnown (cognitive 17) · ×1
  • main.plDebugNativeObjectHierarchyKnown (cognitive 17) agents/drivers/oracle-go/pldebug_transport_preflight.go:10 — main.plDebugNativeObjectHierarchyKnown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.connectionInfo (cognitive 17) · ×1
  • server.connectionInfo (cognitive 17) agents/drivers/oracle-go/connection_info.go:12 — server.connectionInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listObjects (cognitive 17) · ×1
  • server.listObjects (cognitive 17) REDACTED:2349 — server.listObjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.oracleCompletionValidSynonymTargets (cognitive 17) · ×1
  • server.oracleCompletionValidSynonymTargets (cognitive 17) REDACTED:2536 — server.oracleCompletionValidSynonymTargets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.listTriggersWithIdentity (cognitive 17) · ×1
  • server.listTriggersWithIdentity (cognitive 17) REDACTED:3585 — server.listTriggersWithIdentity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.enrichObjectComments (cognitive 17) · ×1
  • server.enrichObjectComments (cognitive 17) agents/drivers/oracle-go/object_comments.go:11 — server.enrichObjectComments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.nativeTargetMetadata (cognitive 17) · ×1
  • runtimeServer.nativeTargetMetadata (cognitive 17) agents/drivers/oracle-go/pldebug_target.go:197 — runtimeServer.nativeTargetMetadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugSession.resumeIgnoreBreakpoints (cognitive 17) · ×1
  • plDebugSession.resumeIgnoreBreakpoints (cognitive 17) REDACTED:2579 — plDebugSession.resumeIgnoreBreakpoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugNativeEntry.listNativeBreakpoints (cognitive 17) · ×1
  • plDebugNativeEntry.listNativeBreakpoints (cognitive 17) agents/drivers/oracle-go/pldebug_breakpoint.go:132 — plDebugNativeEntry.listNativeBreakpoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, loops 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 146). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plDebugNativeEntry.valueOperationStatus (cognitive 17) · ×1
  • plDebugNativeEntry.valueOperationStatus (cognitive 17) REDACTED:31 — plDebugNativeEntry.valueOperationStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.managementGetAll (cognitive 17) · ×1
  • main.managementGetAll (cognitive 17) REDACTED:163 — main.managementGetAll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.managementGetPage (cognitive 17) · ×1
  • main.managementGetPage (cognitive 17) REDACTED:201 — main.managementGetPage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.newProxyMessagingClient (cognitive 17) · ×1
  • main.newProxyMessagingClient (cognitive 17) agents/drivers/rocketmq/proxy.go:57 — main.newProxyMessagingClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.matchingBrace (cognitive 17) · ×1
  • main.matchingBrace (cognitive 17) REDACTED:404 — main.matchingBrace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rocketMQAgent.sendMessage (cognitive 17) · ×1
  • rocketMQAgent.sendMessage (cognitive 17) REDACTED:331 — rocketMQAgent.sendMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.appendTableIndexDDL (cognitive 17) · ×1
  • server.appendTableIndexDDL (cognitive 17) REDACTED:5189 — server.appendTableIndexDDL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.requireReachableServer (cognitive 17) · ×1
  • main.requireReachableServer (cognitive 17) agents/drivers/zookeeper/connection.go:401 — main.requireReachableServer has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 2 (6 pts), loops 3 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 410, 428). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · semver.recursivePreReleaseCompare (cognitive 17) · ×1
  • semver.recursivePreReleaseCompare (cognitive 17) agents/go-common/go-semver/semver.go:207 — semver.recursivePreReleaseCompare has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GSSAPIMechanism.negotiateSecurityLayer (cognitive 17) · ×1
  • GSSAPIMechanism.negotiateSecurityLayer (cognitive 17) agents/go-common/gosasl/gssapi.go:132 — GSSAPIMechanism.negotiateSecurityLayer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · IoTDBRpcDataSet.getObjectByTsBlockIndex (cognitive 17) · ×1
  • IoTDBRpcDataSet.getObjectByTsBlockIndex (cognitive 17) agents/go-common/iotdb-client-go/client/rpcdataset.go:549 — IoTDBRpcDataSet.getObjectByTsBlockIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useCellDetailEditor.useCellDetailEditor (cognitive 17) · ×1
  • useCellDetailEditor.useCellDetailEditor (cognitive 17) apps/desktop/src/composables/useCellDetailEditor.ts:83 — useCellDetailEditor.useCellDetailEditor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 194, 212, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataCompareConfig.sanitizeConfig (cognitive 17) · ×1
  • useDataCompareConfig.sanitizeConfig (cognitive 17) apps/desktop/src/composables/useDataCompareConfig.ts:67 — useDataCompareConfig.sanitizeConfig has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 12, boolean chains 3, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGenerateSession.cloneColumn (cognitive 17) · ×1
  • useDataGenerateSession.cloneColumn (cognitive 17) apps/desktop/src/composables/useDataGenerateSession.ts:99 — useDataGenerateSession.cloneColumn has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions (cognitive 17) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions (cognitive 17) REDACTED:524 — useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cognitive 17) · ×1
  • useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cognitive 17) apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:140 — useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.restoreCellValue (cognitive 17) · ×1
  • useDataGridEditor.useDataGridEditor.restoreCellValue (cognitive 17) apps/desktop/src/composables/useDataGridEditor.ts:1375 — useDataGridEditor.useDataGridEditor.restoreCellValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cognitive 17) · ×1
  • useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cognitive 17) apps/desktop/src/composables/useDataGridSelection.ts:264 — useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useOceanbaseCloneDialog.useOceanbaseCloneDialog.request (cognitive 17) · ×1
  • useOceanbaseCloneDialog.useOceanbaseCloneDialog.request (cognitive 17) apps/desktop/src/composables/useOceanbaseCloneDialog.ts:46 — useOceanbaseCloneDialog.useOceanbaseCloneDialog.request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeSnapshot.applySnapshotSqlTableColors (cognitive 17) · ×1
  • codeSnapshot.applySnapshotSqlTableColors (cognitive 17) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:238 — codeSnapshot.applySnapshotSqlTableColors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (wrapRanges, a function literal at line 285). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · clipboard.preserveLegacyClipboardFocus.<returned closure> (cognitive 17) · ×1
  • clipboard.preserveLegacyClipboardFocus.<returned closure> (cognitive 17) apps/desktop/src/lib/common/clipboard.ts:125 — clipboard.preserveLegacyClipboardFocus.<returned closure> has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), error handling 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.serviceEndpoint (cognitive 17) · ×1
  • connectionDeepLink.serviceEndpoint (cognitive 17) REDACTED:233 — connectionDeepLink.serviceEndpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrl.databendUrlOptions (cognitive 17) · ×1
  • connectionUrl.databendUrlOptions (cognitive 17) REDACTED:418 — connectionUrl.databendUrlOptions has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionUrl.parseJdbcOracleUrl (cognitive 17) · ×1
  • connectionUrl.parseJdbcOracleUrl (cognitive 17) REDACTED:547 — connectionUrl.parseJdbcOracleUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.buildStandardUrl (cognitive 17) · ×1
  • connectionUrlBuilder.buildStandardUrl (cognitive 17) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:289 — connectionUrlBuilder.buildStandardUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 3, if/else 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · elasticsearchKibanaProxy.buildElasticsearchExternalConfig (cognitive 17) · ×1
  • elasticsearchKibanaProxy.buildElasticsearchExternalConfig (cognitive 17) apps/desktop/src/lib/connection/elasticsearchKibanaProxy.ts:72 — elasticsearchKibanaProxy.buildElasticsearchExternalConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessionModel.normalizeConsulSession (cognitive 17) · ×1
  • sessionModel.normalizeConsulSession (cognitive 17) apps/desktop/src/lib/consul/sessionModel.ts:5 — sessionModel.normalizeConsulSession has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 4 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · chartData.buildQueryChartOption (cognitive 17) · ×1
  • chartData.buildQueryChartOption (cognitive 17) apps/desktop/src/lib/dataGrid/chartData.ts:38 — chartData.buildQueryChartOption has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnLookup.filterDataGridColumnLookupItems (cognitive 17) · ×1
  • dataGridColumnLookup.filterDataGridColumnLookupItems (cognitive 17) apps/desktop/src/lib/dataGrid/dataGridColumnLookup.ts:66 — dataGridColumnLookup.filterDataGridColumnLookupItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridReplace.prepareDataGridCellReplacements (cognitive 17) · ×1
  • dataGridReplace.prepareDataGridCellReplacements (cognitive 17) apps/desktop/src/lib/dataGrid/dataGridReplace.ts:53 — dataGridReplace.prepareDataGridCellReplacements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata (cognitive 17) · ×1
  • createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata (cognitive 17) apps/desktop/src/lib/database/createDatabaseCharsetOptions.ts:68 — createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.parseOracleCanonicalType (cognitive 17) · ×1
  • oracleForeignKeys.parseOracleCanonicalType (cognitive 17) apps/desktop/src/lib/database/oracleForeignKeys.ts:392 — oracleForeignKeys.parseOracleCanonicalType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleTriggerPlan.candidateBinding (cognitive 17) · ×1
  • oracleTriggerPlan.candidateBinding (cognitive 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:611 — oracleTriggerPlan.candidateBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.verifyBinding (cognitive 17) · ×1
  • oracleTriggerPlan.verifyBinding (cognitive 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:642 — oracleTriggerPlan.verifyBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities (cognitive 17) · ×1
  • sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities (cognitive 17) apps/desktop/src/lib/database/sqlExecutionTargetCapabilities.ts:43 — sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.oraclePredicateDetails (cognitive 17) · ×1
  • explainPlan.oraclePredicateDetails (cognitive 17) apps/desktop/src/lib/diagram/explainPlan.ts:266 — explainPlan.oraclePredicateDetails has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorPlDebugEditor.createPlDebugEditorExtension (cognitive 17) · ×1
  • codemirrorPlDebugEditor.createPlDebugEditorExtension (cognitive 17) apps/desktop/src/lib/editor/codemirrorPlDebugEditor.ts:140 — codemirrorPlDebugEditor.createPlDebugEditorExtension has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 143). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.normalizeTokens (cognitive 17) · ×1
  • sqlSemanticSelectionRanges.normalizeTokens (cognitive 17) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:82 — sqlSemanticSelectionRanges.normalizeTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.mongoTypedNumberInputValue (cognitive 17) · ×1
  • mongoDocumentValues.mongoTypedNumberInputValue (cognitive 17) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:422 — mongoDocumentValues.mongoTypedNumberInputValue has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nacosConfigValidation.closeImplicitHtmlTags (cognitive 17) · ×1
  • nacosConfigValidation.closeImplicitHtmlTags (cognitive 17) REDACTED:95 — nacosConfigValidation.closeImplicitHtmlTags has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PluginHostBridge.requestInit (cognitive 17) · ×1
  • PluginHostBridge.requestInit (cognitive 17) REDACTED:421 — PluginHostBridge.requestInit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHostBridge.publishAiRecommendations (cognitive 17) · ×1
  • PluginHostBridge.publishAiRecommendations (cognitive 17) REDACTED:569 — PluginHostBridge.publishAiRecommendations has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 1, if/else 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · multiSourceResult.summarizeNumericColumns (cognitive 17) · ×1
  • multiSourceResult.summarizeNumericColumns (cognitive 17) apps/desktop/src/lib/query/multiSourceResult.ts:105 — multiSourceResult.summarizeNumericColumns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · msgpack.toJsonable (cognitive 17) · ×1
  • msgpack.toJsonable (cognitive 17) apps/desktop/src/lib/redis/codec/msgpack.ts:21 — msgpack.toJsonable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisCompletion.argumentGrammar (cognitive 17) · ×1
  • redisCompletion.argumentGrammar (cognitive 17) apps/desktop/src/lib/redis/redisCompletion.ts:323 — redisCompletion.argumentGrammar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function items inside it that branch (compileContent, compileArgument, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · savedSqlExecutionTarget.resolveSavedSqlExecutionTarget (cognitive 17) · ×1
  • savedSqlExecutionTarget.resolveSavedSqlExecutionTarget (cognitive 17) apps/desktop/src/lib/savedSql/savedSqlExecutionTarget.ts:35 — savedSqlExecutionTarget.resolveSavedSqlExecutionTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.normalizeSchemaDiffDependencyGraph (cognitive 17) · ×1
  • schemaDiff.normalizeSchemaDiffDependencyGraph (cognitive 17) apps/desktop/src/lib/schema/schemaDiff.ts:321 — schemaDiff.normalizeSchemaDiffDependencyGraph has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 2, if/else 2 (nesting depth added 4). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 326). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · customTypeTree.buildCustomTypeTreeChildren (cognitive 17) · ×1
  • customTypeTree.buildCustomTypeTreeChildren (cognitive 17) apps/desktop/src/lib/sidebar/customTypeTree.ts:21 — customTypeTree.buildCustomTypeTreeChildren has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 6). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 24, 46). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · soqlCompletion.valueItems (cognitive 17) · ×1
  • soqlCompletion.valueItems (cognitive 17) apps/desktop/src/lib/soql/soqlCompletion.ts:456 — soqlCompletion.valueItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (addValues). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · insertValueHints.parseValuesRows (cognitive 17) · ×1
  • insertValueHints.parseValuesRows (cognitive 17) apps/desktop/src/lib/sql/insertValueHints.ts:158 — insertValueHints.parseValuesRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · references.mergeSqlSemanticReferenceAnalysis (cognitive 17) · ×1
  • references.mergeSqlSemanticReferenceAnalysis (cognitive 17) apps/desktop/src/lib/sql/semantic/references.ts:92 — references.mergeSqlSemanticReferenceAnalysis has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 102). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.shouldAutoOpenSqlCompletion (cognitive 17) · ×1
  • sqlCompletion.shouldAutoOpenSqlCompletion (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:2294 — sqlCompletion.shouldAutoOpenSqlCompletion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.detectCompletionContextKind (cognitive 17) · ×1
  • sqlCompletion.detectCompletionContextKind (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:3430 — sqlCompletion.detectCompletionContextKind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.buildAliasCandidates (cognitive 17) · ×1
  • sqlCompletion.buildAliasCandidates (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:5973 — sqlCompletion.buildAliasCandidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3 (nesting depth added 6). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.findActiveFunctionOpenParen (cognitive 17) · ×1
  • sqlCompletion.findActiveFunctionOpenParen (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:7334 — sqlCompletion.findActiveFunctionOpenParen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.splitCommaSeparatedValues (cognitive 17) · ×1
  • sqlParameters.splitCommaSeparatedValues (cognitive 17) apps/desktop/src/lib/sql/sqlParameters.ts:332 — sqlParameters.splitCommaSeparatedValues has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.readSubstitutionParameterOccurrence (cognitive 17) · ×1
  • sqlParameters.readSubstitutionParameterOccurrence (cognitive 17) apps/desktop/src/lib/sql/sqlParameters.ts:1861 — sqlParameters.readSubstitutionParameterOccurrence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlFormatter.keepFromClauseAndFirstSourceOnSameLine (cognitive 17) · ×1
  • sqlFormatter.keepFromClauseAndFirstSourceOnSameLine (cognitive 17) apps/desktop/src/lib/sql/sqlFormatter.ts:831 — sqlFormatter.keepFromClauseAndFirstSourceOnSameLine has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlNavigation.matchSqlObject (cognitive 17) · ×1
  • sqlNavigation.matchSqlObject (cognitive 17) apps/desktop/src/lib/sql/sqlNavigation.ts:717 — sqlNavigation.matchSqlObject has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts) (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · objectBrowserRows.buildObjectBrowserRows.rows (cognitive 17) · ×1
  • objectBrowserRows.buildObjectBrowserRows.rows (cognitive 17) apps/desktop/src/lib/table/objectBrowserRows.ts:185 — objectBrowserRows.buildObjectBrowserRows.rows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (10 pts), boolean chains 5, if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · objectRenameSql.supportsObjectRename (cognitive 17) · ×1
  • objectRenameSql.supportsObjectRename (cognitive 17) apps/desktop/src/lib/table/objectRenameSql.ts:19 — objectRenameSql.supportsObjectRename has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · postgresDataTypeHelp.gaussdbMTypeDisplayName (cognitive 17) · ×1
  • postgresDataTypeHelp.gaussdbMTypeDisplayName (cognitive 17) apps/desktop/src/lib/table/postgresDataTypeHelp.ts:164 — postgresDataTypeHelp.gaussdbMTypeDisplayName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · starrocksPhysicalOptions.buildStarRocksDialectOptions (cognitive 17) · ×1
  • starrocksPhysicalOptions.buildStarRocksDialectOptions (cognitive 17) apps/desktop/src/lib/table/starrocksPhysicalOptions.ts:78 — starrocksPhysicalOptions.buildStarRocksDialectOptions has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 3, if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.buildPrefixSortIndex (cognitive 17) · ×1
  • tableTree.buildPrefixSortIndex (cognitive 17) apps/desktop/src/lib/table/tableTree.ts:156 — tableTree.buildPrefixSortIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (resolve). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupHostContainer · ×1
  • tableVGroup.findTableVGroupHostContainer::walk (cognitive 17) apps/desktop/src/lib/table/tableVGroup.ts:749 — tableVGroup.findTableVGroupHostContainer::walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabColorStyle (cognitive 17) · ×1
  • tabPresentation.tabColorStyle (cognitive 17) apps/desktop/src/lib/tabs/tabPresentation.ts:915 — tabPresentation.tabColorStyle has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cognitive 17) · ×1
  • connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cognitive 17) apps/desktop/src/stores/connectionStore.ts:5417 — connectionStore.useConnectionStore.reloadConnectionDatabaseChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.invalidateCompletionTableCache (cognitive 17) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionTableCache (cognitive 17) apps/desktop/src/stores/connectionStore.ts:9358 — connectionStore.useConnectionStore.invalidateCompletionTableCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.textMatchScore (cognitive 17) · ×1
  • connectionStore.useConnectionStore.textMatchScore (cognitive 17) apps/desktop/src/stores/connectionStore.ts:9812 — connectionStore.useConnectionStore.textMatchScore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.refreshStack (cognitive 17) · ×1
  • plDebugStore.usePlDebugStore.refreshStack (cognitive 17) apps/desktop/src/stores/plDebugStore.ts:1599 — plDebugStore.usePlDebugStore.refreshStack has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.reorderFolders (cognitive 17) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFolders (cognitive 17) apps/desktop/src/stores/savedSqlStore.ts:999 — savedSqlStore.useSavedSqlStore.reorderFolders has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1026, 1022, 1008). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settingsStore.useSettingsStore.deleteCustomColumnFormatter (cognitive 17) · ×1
  • settingsStore.useSettingsStore.deleteCustomColumnFormatter (cognitive 17) apps/desktop/src/stores/settingsStore.ts:3574 — settingsStore.useSettingsStore.deleteCustomColumnFormatter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 3575, 3586, 3591). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.normalizePackageDrafts (cognitive 17) · ×1
  • transferTaskStore.normalizePackageDrafts (cognitive 17) apps/desktop/src/stores/transferTaskStore.ts:79 — transferTaskStore.normalizePackageDrafts has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 4, if/else 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.reorderFolders (cognitive 17) · ×1
  • transferTaskStore.useTransferTaskStore.reorderFolders (cognitive 17) apps/desktop/src/stores/transferTaskStore.ts:422 — transferTaskStore.useTransferTaskStore.reorderFolders has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 445, 441, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Starfield.Starfield (cognitive 17) · ×1
  • Starfield.Starfield (cognitive 17) docs/components/landing/Starfield.tsx:108 — Starfield.Starfield has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 17 points belong to 6 function literals inside it that branch (lines 127, 169, 111, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Diagnostics.query (cognitive 17) · ×1
  • Diagnostics.query (cognitive 17) plugins/sdk/dev-host/diagnostics.mjs:70 — Diagnostics.query has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · pushMedia (cognitive 17) · ×1
  • pushMedia (cognitive 17) .github/ui-preview/publish.mjs:93 — pushMedia has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), loops 3 (5 pts), if/else 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redact · ×1
  • redact::visit (cognitive 17) plugins/sdk/dev-host/diagnostics.mjs:9 — redact::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · StreamingToolCallAccumulator · ×1
  • StreamingToolCallAccumulator::process (cognitive 16) crates/dbx-ai-provider/src/ai.rs:4363 — StreamingToolCallAccumulator::process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Nb3ExportWriter · ×1
  • Nb3ExportWriter::handle_statement (cognitive 16) REDACTED:1396 — Nb3ExportWriter::handle_statement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHost · ×1
  • PluginHost::watch_session (cognitive 16) crates/dbx-plugin-runtime/src/plugins/host.rs:262 — PluginHost::watch_session has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PluginServer · ×1
  • PluginServer::serve_framed (cognitive 16) plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:503 — PluginServer::serve_framed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundExecutor.executeAll (cognitive 16) · ×1
  • BlobBoundExecutor.executeAll (cognitive 16) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:131 — BlobBoundExecutor.executeAll has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), loops 3 (5 pts), if/else 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DedicatedOwner.closeUnreturnedConnectionsUntil (cognitive 16) · ×1
  • DedicatedOwner.closeUnreturnedConnectionsUntil (cognitive 16) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:389 — DedicatedOwner.closeUnreturnedConnectionsUntil has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.getColumns (cognitive 16) · ×1
  • DbxJdbcPlugin.getColumns (cognitive 16) REDACTED:3690 — DbxJdbcPlugin.getColumns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DbxJdbcPlugin.postgresDatabaseUrl (cognitive 16) · ×1
  • DbxJdbcPlugin.postgresDatabaseUrl (cognitive 16) REDACTED:5065 — DbxJdbcPlugin.postgresDatabaseUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DbxJdbcPlugin.serve (cognitive 16) · ×1
  • DbxJdbcPlugin.serve (cognitive 16) REDACTED:369 — DbxJdbcPlugin.serve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Gbase8sAgent.loadColumnDefaultsFromSource (cognitive 16) · ×1
  • Gbase8sAgent.loadColumnDefaultsFromSource (cognitive 16) REDACTED:702 — Gbase8sAgent.loadColumnDefaultsFromSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · H2Agent.getTableDdl (cognitive 16) · ×1
  • H2Agent.getTableDdl (cognitive 16) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:358 — H2Agent.getTableDdl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectLatestPeekRange (cognitive 16) · ×1
  • KafkaAgent.collectLatestPeekRange (cognitive 16) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2215 — KafkaAgent.collectLatestPeekRange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectLatestPeekedMessages (cognitive 16) · ×1
  • KafkaAgent.collectLatestPeekedMessages (cognitive 16) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2139 — KafkaAgent.collectLatestPeekedMessages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuntimeServer.handleRuntimeRequest (cognitive 16) · ×1
  • RuntimeServer.handleRuntimeRequest (cognitive 16) REDACTED:2777 — RuntimeServer.handleRuntimeRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getTableDdl (cognitive 16) · ×1
  • OceanBaseOracleAgent.getTableDdl (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1796 — OceanBaseOracleAgent.getTableDdl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 3, error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.listForeignKeys (cognitive 16) · ×1
  • OceanBaseOracleAgent.listForeignKeys (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2135 — OceanBaseOracleAgent.listForeignKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointRegistry.mutate (cognitive 16) · ×1
  • PlDebugBreakpointRegistry.mutate (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:168 — PlDebugBreakpointRegistry.mutate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugCompositeInput.nationalChunks (cognitive 16) · ×1
  • PlDebugCompositeInput.nationalChunks (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:456 — PlDebugCompositeInput.nationalChunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scope.cleanup (cognitive 16) · ×1
  • Scope.cleanup (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugMetadataInspection.java:89 — Scope.cleanup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugResultCache.page (cognitive 16) · ×1
  • PlDebugResultCache.page (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugResultCache.java:129 — PlDebugResultCache.page has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.stack (cognitive 16) · ×1
  • PlDebugSession.stack (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1837 — PlDebugSession.stack has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.slots (cognitive 16) · ×1
  • Plan.slots (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:240 — Plan.slots has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseCassandraConfig (cognitive 16) · ×1
  • main.parseCassandraConfig (cognitive 16) agents/drivers/cassandra-go/config.go:54 — main.parseCassandraConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.applyNativeHOCON (cognitive 16) · ×1
  • main.applyNativeHOCON (cognitive 16) agents/drivers/cassandra-go/config_file.go:288 — main.applyNativeHOCON has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · main.tableDDLFromMetadata (cognitive 16) · ×1
  • main.tableDDLFromMetadata (cognitive 16) agents/drivers/cassandra-go/metadata.go:492 — main.tableDDLFromMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.executeQuery (cognitive 16) · ×1
  • server.executeQuery (cognitive 16) agents/drivers/cassandra-go/query.go:13 — server.executeQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · etcdSession.authRolePermission (cognitive 16) · ×1
  • etcdSession.authRolePermission (cognitive 16) agents/drivers/etcd-go/auth.go:396 — etcdSession.authRolePermission has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.datasetRow (cognitive 16) · ×1
  • main.datasetRow (cognitive 16) agents/drivers/iotdb/query.go:414 — main.datasetRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.getTreeDialectDDL (cognitive 16) · ×1
  • server.getTreeDialectDDL (cognitive 16) agents/drivers/iotdb/metadata.go:388 — server.getTreeDialectDDL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.takeParenGroup (cognitive 16) · ×1
  • main.takeParenGroup (cognitive 16) REDACTED:1593 — main.takeParenGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.dispatch (cognitive 16) · ×1
  • server.dispatch (cognitive 16) agents/drivers/kingbase-go/main.go:372 — server.dispatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · server.getLegacyRoutineSource (cognitive 16) · ×1
  • server.getLegacyRoutineSource (cognitive 16) agents/drivers/kingbase-go/routine_metadata.go:160 — server.getLegacyRoutineSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 2). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.appendGraphValue (cognitive 16) · ×1
  • main.appendGraphValue (cognitive 16) agents/drivers/neo4j-go/graph.go:168 — main.appendGraphValue has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.normalizeNestedValue (cognitive 16) · ×1
  • main.normalizeNestedValue (cognitive 16) agents/drivers/neo4j-go/query.go:332 — main.normalizeNestedValue has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · main.normalizeNonFiniteQueryRows (cognitive 16) · ×1
  • main.normalizeNonFiniteQueryRows (cognitive 16) REDACTED:435 — main.normalizeNonFiniteQueryRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.oracleCompletionArgumentDataType (cognitive 16) · ×1
  • main.oracleCompletionArgumentDataType (cognitive 16) REDACTED:2764 — main.oracleCompletionArgumentDataType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.oracleTriggerBody (cognitive 16) · ×1
  • main.oracleTriggerBody (cognitive 16) REDACTED:3669 — main.oracleTriggerBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.terminateOracleViewDDL (cognitive 16) · ×1
  • main.terminateOracleViewDDL (cognitive 16) REDACTED:4238 — main.terminateOracleViewDDL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugMergeStructuredBacktrace (cognitive 16) · ×1
  • main.plDebugMergeStructuredBacktrace (cognitive 16) REDACTED:3501 — main.plDebugMergeStructuredBacktrace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeFrameSourceMatches (cognitive 16) · ×1
  • main.plDebugNativeFrameSourceMatches (cognitive 16) agents/drivers/oracle-go/pldebug_anonymous_source.go:58 — main.plDebugNativeFrameSourceMatches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugPreviewNativeTarget (cognitive 16) · ×1
  • main.plDebugPreviewNativeTarget (cognitive 16) agents/drivers/oracle-go/pldebug_target.go:265 — main.plDebugPreviewNativeTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.plDebugNativeDecimal (cognitive 16) · ×1
  • main.plDebugNativeDecimal (cognitive 16) agents/drivers/oracle-go/pldebug_target.go:998 — main.plDebugNativeDecimal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.plDebugNativeArgumentDetailsMatch (cognitive 16) · ×1
  • main.plDebugNativeArgumentDetailsMatch (cognitive 16) agents/drivers/oracle-go/pldebug_typed_signature.go:105 — main.plDebugNativeArgumentDetailsMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtimeServer.startNativeDebug (cognitive 16) · ×1
  • runtimeServer.startNativeDebug (cognitive 16) agents/drivers/oracle-go/pldebug_manager.go:201 — runtimeServer.startNativeDebug has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugSession.frameScalarValues (cognitive 16) · ×1
  • plDebugSession.frameScalarValues (cognitive 16) REDACTED:3054 — plDebugSession.frameScalarValues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugSession.snapshot (cognitive 16) · ×1
  • plDebugSession.snapshot (cognitive 16) REDACTED:5419 — plDebugSession.snapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.classifyRPCError (cognitive 16) · ×1
  • main.classifyRPCError (cognitive 16) agents/drivers/vastbase-go/protocol_error.go:33 — main.classifyRPCError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.applyPostgresIdentityMetadata (cognitive 16) · ×1
  • server.applyPostgresIdentityMetadata (cognitive 16) agents/drivers/vastbase-go/vastbase_metadata.go:2194 — server.applyPostgresIdentityMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.parseXuguPackageMembers (cognitive 16) · ×1
  • main.parseXuguPackageMembers (cognitive 16) agents/drivers/xugu/package_members.go:177 — main.parseXuguPackageMembers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.detectServerVersion (cognitive 16) · ×1
  • main.detectServerVersion (cognitive 16) agents/drivers/zookeeper/connection.go:323 — main.detectServerVersion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gosasl.negotiateToken (cognitive 16) · ×1
  • gosasl.negotiateToken (cognitive 16) agents/go-common/gosasl/http_spnego.go:223 — gosasl.negotiateToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_offline_jdbc_payload.validateAndCopyBundle (cognitive 16) · ×1
  • build_offline_jdbc_payload.validateAndCopyBundle (cognitive 16) agents/scripts/build_offline_jdbc_payload.mjs:75 — build_offline_jdbc_payload.validateAndCopyBundle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · verify_offline_jdbc_release.validatePayload (cognitive 16) · ×1
  • verify_offline_jdbc_release.validatePayload (cognitive 16) agents/scripts/verify_offline_jdbc_release.mjs:41 — verify_offline_jdbc_release.validatePayload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables (cognitive 16) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables (cognitive 16) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:295 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics (cognitive 16) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics (cognitive 16) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:320 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.normalizeSourceType (cognitive 16) · ×1
  • queryResultTransferValues.normalizeSourceType (cognitive 16) apps/desktop/src/components/transfer/queryResultTransferValues.ts:21 — queryResultTransferValues.normalizeSourceType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useBackgroundImage.useBackgroundImage (cognitive 16) · ×1
  • useBackgroundImage.useBackgroundImage (cognitive 16) apps/desktop/src/composables/useBackgroundImage.ts:30 — useBackgroundImage.useBackgroundImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, error handling 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 102, 45, 98). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridColumnFormatter.useDataGridColumnFormatter.currentFormatterDraft (cognitive 16) · ×1
  • useDataGridColumnFormatter.useDataGridColumnFormatter.currentFormatterDraft (cognitive 16) apps/desktop/src/composables/useDataGridColumnFormatter.ts:193 — useDataGridColumnFormatter.useDataGridColumnFormatter.currentFormatterDraft has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove (cognitive 16) · ×1
  • useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove (cognitive 16) apps/desktop/src/composables/useDataGridColumnLayout.ts:882 — useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:1051 — useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.prepareAddedRows (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.prepareAddedRows (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:1496 — useDataGridEditor.useDataGridEditor.prepareAddedRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:2063 — useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell (cognitive 16) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell (cognitive 16) apps/desktop/src/composables/useDataGridLargeValues.ts:682 — useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 690). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridSearch.useDataGridSearch.matchState (cognitive 16) · ×1
  • useDataGridSearch.useDataGridSearch.matchState (cognitive 16) apps/desktop/src/composables/useDataGridSearch.ts:55 — useDataGridSearch.useDataGridSearch.matchState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 80, includes, a function literal at line 75). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useNativeJobExecution.useNativeJobExecution.prepare (cognitive 16) · ×1
  • useNativeJobExecution.useNativeJobExecution.prepare (cognitive 16) apps/desktop/src/composables/useNativeJobExecution.ts:78 — useNativeJobExecution.useNativeJobExecution.prepare has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cognitive 16) · ×1
  • useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cognitive 16) apps/desktop/src/composables/useSidebarTableMutationRuntime.ts:463 — useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSqlExecution.isDangerousSql (cognitive 16) · ×1
  • useSqlExecution.isDangerousSql (cognitive 16) apps/desktop/src/composables/useSqlExecution.ts:131 — useSqlExecution.isDangerousSql has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 137). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.tryExecute (cognitive 16) · ×1
  • useSqlExecution.useSqlExecution.tryExecute (cognitive 16) apps/desktop/src/composables/useSqlExecution.ts:320 — useSqlExecution.useSqlExecution.tryExecute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · aiSqlTargetTab.resolveAiSqlTargetTabId (cognitive 16) · ×1
  • aiSqlTargetTab.resolveAiSqlTargetTabId (cognitive 16) apps/desktop/src/lib/ai/aiSqlTargetTab.ts:31 — aiSqlTargetTab.resolveAiSqlTargetTabId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pinnedItems.migrateLegacyPinnedTreeNodeOrder (cognitive 16) · ×1
  • pinnedItems.migrateLegacyPinnedTreeNodeOrder (cognitive 16) apps/desktop/src/lib/app/pinnedItems.ts:151 — pinnedItems.migrateLegacyPinnedTreeNodeOrder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 159). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · errorUtils.jsonObjectEnd (cognitive 16) · ×1
  • errorUtils.jsonObjectEnd (cognitive 16) apps/desktop/src/lib/backend/errorUtils.ts:66 — errorUtils.jsonObjectEnd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupRun (cognitive 16) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupRun (cognitive 16) REDACTED:380 — scheduledDatabaseBackup.normalizeDatabaseBackupRun has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 6, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · safeJsonFormat.diffText (cognitive 16) · ×1
  • safeJsonFormat.diffText (cognitive 16) REDACTED:247 — safeJsonFormat.diffText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionParameterCatalog.connectionParameterCatalog (cognitive 16) · ×1
  • connectionParameterCatalog.connectionParameterCatalog (cognitive 16) apps/desktop/src/lib/connection/connectionParameterCatalog.ts:83 — connectionParameterCatalog.connectionParameterCatalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 92). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connectionUrl.parseZooKeeperUrl (cognitive 16) · ×1
  • connectionUrl.parseZooKeeperUrl (cognitive 16) REDACTED:243 — connectionUrl.parseZooKeeperUrl has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 4, if/else 3, error handling 1. Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionUrl.parseJdbcDremioUrl (cognitive 16) · ×1
  • connectionUrl.parseJdbcDremioUrl (cognitive 16) REDACTED:683 — connectionUrl.parseJdbcDremioUrl has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.jdbcQuery (cognitive 16) · ×1
  • connectionUrlBuilder.jdbcQuery (cognitive 16) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:462 — connectionUrlBuilder.jdbcQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · columnFormatter.formatNumber (cognitive 16) · ×1
  • columnFormatter.formatNumber (cognitive 16) apps/desktop/src/lib/dataGrid/columnFormatter.ts:501 — columnFormatter.formatNumber has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · dataGridColumnFilter.parseFilterValue (cognitive 16) · ×1
  • dataGridColumnFilter.parseFilterValue (cognitive 16) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:200 — dataGridColumnFilter.parseFilterValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridReplace.findDataGridReplacementMatches (cognitive 16) · ×1
  • dataGridReplace.findDataGridReplacementMatches (cognitive 16) apps/desktop/src/lib/dataGrid/dataGridReplace.ts:36 — dataGridReplace.findDataGridReplacementMatches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · databaseObjectCapabilities.normalizeSidebarObjectKind (cognitive 16) · ×1
  • databaseObjectCapabilities.normalizeSidebarObjectKind (cognitive 16) apps/desktop/src/lib/database/databaseObjectCapabilities.ts:262 — databaseObjectCapabilities.normalizeSidebarObjectKind has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · databaseUserAdmin.splitMySqlIdentifierPath (cognitive 16) · ×1
  • databaseUserAdmin.splitMySqlIdentifierPath (cognitive 16) apps/desktop/src/lib/database/databaseUserAdmin.ts:779 — databaseUserAdmin.splitMySqlIdentifierPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jdbcDialect.connectionObjectTreeNodeSchema (cognitive 16) · ×1
  • jdbcDialect.connectionObjectTreeNodeSchema (cognitive 16) apps/desktop/src/lib/database/jdbcDialect.ts:394 — jdbcDialect.connectionObjectTreeNodeSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleSecurity.readDictionary (cognitive 16) · ×1
  • oracleSecurity.readDictionary (cognitive 16) apps/desktop/src/lib/database/oracleSecurity.ts:107 — oracleSecurity.readDictionary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (5 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.captureOracleDiagnosticTarget (cognitive 16) · ×1
  • oracleSessionDiagnostics.captureOracleDiagnosticTarget (cognitive 16) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:93 — oracleSessionDiagnostics.captureOracleDiagnosticTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · draft-storage.saveFocusedDiagramState (cognitive 16) · ×1
  • draft-storage.saveFocusedDiagramState (cognitive 16) apps/desktop/src/lib/diagram/draft-storage.ts:164 — draft-storage.saveFocusedDiagramState has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (5 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 2). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elk-layout.computeLayoutWithLayers (cognitive 16) · ×1
  • elk-layout.computeLayoutWithLayers (cognitive 16) apps/desktop/src/lib/diagram/elk-layout.ts:71 — elk-layout.computeLayoutWithLayers has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · elk-layout.extractLayoutResult (cognitive 16) · ×1
  • elk-layout.extractLayoutResult (cognitive 16) apps/desktop/src/lib/diagram/elk-layout.ts:265 — elk-layout.extractLayoutResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorTableDrop.quoteColumnReferenceName (cognitive 16) · ×1
  • queryEditorTableDrop.quoteColumnReferenceName (cognitive 16) apps/desktop/src/lib/editor/queryEditorTableDrop.ts:20 — queryEditorTableDrop.quoteColumnReferenceName has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 4, boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorTextEdits.blankLineDeletionChanges (cognitive 16) · ×1
  • queryEditorTextEdits.blankLineDeletionChanges (cognitive 16) apps/desktop/src/lib/editor/queryEditorTextEdits.ts:22 — queryEditorTextEdits.blankLineDeletionChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectExpressionRanges (cognitive 16) · ×1
  • sqlSemanticSelectionRanges.collectExpressionRanges (cognitive 16) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:305 — sqlSemanticSelectionRanges.collectExpressionRanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.inferProfile (cognitive 16) · ×1
  • datagripImport.inferProfile (cognitive 16) REDACTED:302 — datagripImport.inferProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · datagripImport.parseDataSourcesXml (cognitive 16) · ×1
  • datagripImport.parseDataSourcesXml (cognitive 16) REDACTED:386 — datagripImport.parseDataSourcesXml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kvValueFormat.detectKvValueFormat (cognitive 16) · ×1
  • kvValueFormat.detectKvValueFormat (cognitive 16) apps/desktop/src/lib/kv/kvValueFormat.ts:17 — kvValueFormat.detectKvValueFormat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoCompletion.classifyGroup (cognitive 16) · ×1
  • mongoCompletion.classifyGroup (cognitive 16) REDACTED:1610 — mongoCompletion.classifyGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.mongoFilterContainsOpaqueLogic (cognitive 16) · ×1
  • mongoShellCommand.mongoFilterContainsOpaqueLogic (cognitive 16) REDACTED:2006 — mongoShellCommand.mongoFilterContainsOpaqueLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 2007). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mongoSql.groupStage (cognitive 16) · ×1
  • mongoSql.groupStage (cognitive 16) apps/desktop/src/lib/mongo/mongoSql.ts:762 — mongoSql.groupStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendPluginRegistry.listToolbarMenuCommands (cognitive 16) · ×1
  • FrontendPluginRegistry.listToolbarMenuCommands (cognitive 16) apps/desktop/src/lib/plugins/frontendPlugin.ts:104 — FrontendPluginRegistry.listToolbarMenuCommands has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginFloatingWindow.endFloatingWindowDrag (cognitive 16) · ×1
  • pluginFloatingWindow.endFloatingWindowDrag (cognitive 16) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:589 — pluginFloatingWindow.endFloatingWindowDrag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisValuePresentation.parseRedisJsonDetail (cognitive 16) · ×1
  • redisValuePresentation.parseRedisJsonDetail (cognitive 16) apps/desktop/src/lib/redis/redisValuePresentation.ts:365 — redisValuePresentation.parseRedisJsonDetail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (3 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.parseRedisCommandCatalog · ×1
  • redisCommandDocs.parseRedisCommandCatalog::collect (cognitive 16) apps/desktop/src/lib/redis/redisCommandDocs.ts:209 — redisCommandDocs.parseRedisCommandCatalog::collect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandSafety.firstRedisCommandToken (cognitive 16) · ×1
  • redisCommandSafety.firstRedisCommandToken (cognitive 16) apps/desktop/src/lib/redis/redisCommandSafety.ts:251 — redisCommandSafety.firstRedisCommandToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.flattenVisibleRedisKeyTreeCooperatively (cognitive 16) · ×1
  • redisKeyTree.flattenVisibleRedisKeyTreeCooperatively (cognitive 16) apps/desktop/src/lib/redis/redisKeyTree.ts:300 — redisKeyTree.flattenVisibleRedisKeyTreeCooperatively has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cognitive 16) · ×1
  • oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cognitive 16) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:253 — oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.buildDeploySqlForObjects (cognitive 16) · ×1
  • schemaDiff.buildDeploySqlForObjects (cognitive 16) apps/desktop/src/lib/schema/schemaDiff.ts:1001 — schemaDiff.buildDeploySqlForObjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarDatabaseStorage.applySidebarTableStorage (cognitive 16) · ×1
  • sidebarDatabaseStorage.applySidebarTableStorage (cognitive 16) apps/desktop/src/lib/sidebar/sidebarDatabaseStorage.ts:53 — sidebarDatabaseStorage.applySidebarTableStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 55). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sidebarLayoutMonitor.captureRows (cognitive 16) · ×1
  • sidebarLayoutMonitor.captureRows (cognitive 16) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:272 — sidebarLayoutMonitor.captureRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarLayoutMonitor.buildAnomalyDigest (cognitive 16) · ×1
  • sidebarLayoutMonitor.buildAnomalyDigest (cognitive 16) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:576 — sidebarLayoutMonitor.buildAnomalyDigest has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarRemoteSearch.collectSidebarRemoteSearchResults · ×1
  • sidebarRemoteSearch.collectSidebarRemoteSearchResults::visit (cognitive 16) apps/desktop/src/lib/sidebar/sidebarRemoteSearch.ts:36 — sidebarRemoteSearch.collectSidebarRemoteSearchResults::visit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarSearch.matchesWordPrefixConcatenation (cognitive 16) · ×1
  • sidebarSearch.matchesWordPrefixConcatenation (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearch.ts:137 — sidebarSearch.matchesWordPrefixConcatenation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.filterSidebarTreeToConnectedConnections (cognitive 16) · ×1
  • sidebarSearchTree.filterSidebarTreeToConnectedConnections (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:587 — sidebarSearchTree.filterSidebarTreeToConnectedConnections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarVisibleFilterSummary.sidebarVisibleFilterSummary (cognitive 16) · ×1
  • sidebarVisibleFilterSummary.sidebarVisibleFilterSummary (cognitive 16) apps/desktop/src/lib/sidebar/sidebarVisibleFilterSummary.ts:21 — sidebarVisibleFilterSummary.sidebarVisibleFilterSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 6, boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ddlDisplay.findColumnAttributePositions (cognitive 16) · ×1
  • ddlDisplay.findColumnAttributePositions (cognitive 16) apps/desktop/src/lib/sql/ddlDisplay.ts:428 — ddlDisplay.findColumnAttributePositions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 2. Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · completion.mutationTargetIntroducer (cognitive 16) · ×1
  • completion.mutationTargetIntroducer (cognitive 16) apps/desktop/src/lib/sql/semantic/completion.ts:298 — completion.mutationTargetIntroducer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.lastTopLevelWhitespaceStart (cognitive 16) · ×1
  • sqlAnalysis.lastTopLevelWhitespaceStart (cognitive 16) apps/desktop/src/lib/sql/sqlAnalysis.ts:550 — sqlAnalysis.lastTopLevelWhitespaceStart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSubqueryReferences (cognitive 16) · ×1
  • sqlCompletion.extractSubqueryReferences (cognitive 16) apps/desktop/src/lib/sql/sqlCompletion.ts:4769 — sqlCompletion.extractSubqueryReferences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.findMatchingOpenParen (cognitive 16) · ×1
  • sqlCompletion.findMatchingOpenParen (cognitive 16) apps/desktop/src/lib/sql/sqlCompletion.ts:7303 — sqlCompletion.findMatchingOpenParen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens (cognitive 16) · ×1
  • sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens (cognitive 16) apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts:57 — sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.readSource (cognitive 16) · ×1
  • oracleRoutineRename.readSource (cognitive 16) apps/desktop/src/lib/table/oracleRoutineRename.ts:110 — oracleRoutineRename.readSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave::execute (cognitive 16) apps/desktop/src/lib/table/oracleRoutineWrite.ts:106 — oracleRoutineWrite.prepareOracleRoutineSourceSave::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineWrite.prepareOracleRoutineSourceSave) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTableRename.readSource (cognitive 16) · ×1
  • oracleTableRename.readSource (cognitive 16) REDACTED:124 — oracleTableRename.readSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.orderDependents (cognitive 16) · ×1
  • oracleTableRename.orderDependents (cognitive 16) REDACTED:468 — oracleTableRename.orderDependents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleViewRename.prepareOracleViewRename.walk (cognitive 16) · ×1
  • oracleViewRename.prepareOracleViewRename.walk (cognitive 16) apps/desktop/src/lib/table/oracleViewRename.ts:148 — oracleViewRename.prepareOracleViewRename.walk has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnTemplates.mergeTableColumnTemplateFields (cognitive 16) · ×1
  • tableColumnTemplates.mergeTableColumnTemplateFields (cognitive 16) apps/desktop/src/lib/table/tableColumnTemplates.ts:76 — tableColumnTemplates.mergeTableColumnTemplateFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupHolderContainer · ×1
  • tableVGroup.findTableVGroupHolderContainer::walk (cognitive 16) apps/desktop/src/lib/table/tableVGroup.ts:770 — tableVGroup.findTableVGroupHolderContainer::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabConnectionGeneratedColor (cognitive 16) · ×1
  • tabPresentation.tabConnectionGeneratedColor (cognitive 16) apps/desktop/src/lib/tabs/tabPresentation.ts:48 — tabPresentation.tabConnectionGeneratedColor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · tabPresentation.connectionNameSuffixTabIds (cognitive 16) · ×1
  • tabPresentation.connectionNameSuffixTabIds (cognitive 16) apps/desktop/src/lib/tabs/tabPresentation.ts:190 — tabPresentation.connectionNameSuffixTabIds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabResultCache.selectResultCachePruneKeys (cognitive 16) · ×1
  • tabResultCache.selectResultCachePruneKeys (cognitive 16) apps/desktop/src/lib/tabs/tabResultCache.ts:302 — tabResultCache.selectResultCachePruneKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabUiState.sanitizeTabUiState (cognitive 16) · ×1
  • tabUiState.sanitizeTabUiState (cognitive 16) apps/desktop/src/lib/tabs/tabUiState.ts:103 — tabUiState.sanitizeTabUiState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadCachedMetadataListPage (cognitive 16) · ×1
  • connectionStore.useConnectionStore.loadCachedMetadataListPage (cognitive 16) apps/desktop/src/stores/connectionStore.ts:821 — connectionStore.useConnectionStore.loadCachedMetadataListPage has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadPagedTableGroupChildren (cognitive 16) · ×1
  • connectionStore.useConnectionStore.loadPagedTableGroupChildren (cognitive 16) apps/desktop/src/stores/connectionStore.ts:3116 — connectionStore.useConnectionStore.loadPagedTableGroupChildren has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 4, if/else 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadXuguTypeMembers (cognitive 16) · ×1
  • connectionStore.useConnectionStore.loadXuguTypeMembers (cognitive 16) apps/desktop/src/stores/connectionStore.ts:9502 — connectionStore.useConnectionStore.loadXuguTypeMembers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.toSqlCompletionObject (cognitive 16) · ×1
  • connectionStore.useConnectionStore.toSqlCompletionObject (cognitive 16) apps/desktop/src/stores/connectionStore.ts:10617 — connectionStore.useConnectionStore.toSqlCompletionObject has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.removeMultiDbExecutionWorker (cognitive 16) · ×1
  • queryStore.useQueryStore.removeMultiDbExecutionWorker (cognitive 16) apps/desktop/src/stores/queryStore.ts:1848 — queryStore.useQueryStore.removeMultiDbExecutionWorker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.localizePluginTabTitles (cognitive 16) · ×1
  • queryStore.useQueryStore.localizePluginTabTitles (cognitive 16) apps/desktop/src/stores/queryStore.ts:4639 — queryStore.useQueryStore.localizePluginTabTitles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.openPluginConnection (cognitive 16) · ×1
  • queryStore.useQueryStore.openPluginConnection (cognitive 16) apps/desktop/src/stores/queryStore.ts:4712 — queryStore.useQueryStore.openPluginConnection has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5, boolean chains 4 (nesting depth added 3). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.openTableStructure (cognitive 16) · ×1
  • queryStore.useQueryStore.openTableStructure (cognitive 16) apps/desktop/src/stores/queryStore.ts:4800 — queryStore.useQueryStore.openTableStructure has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 4, if/else 2 (3 pts) (nesting depth added 1). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeTabsWhere (cognitive 16) · ×1
  • queryStore.useQueryStore.closeTabsWhere (cognitive 16) apps/desktop/src/stores/queryStore.ts:5805 — queryStore.useQueryStore.closeTabsWhere has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 1. Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.detachConnectionTabsForDelete (cognitive 16) · ×1
  • queryStore.useQueryStore.detachConnectionTabsForDelete (cognitive 16) apps/desktop/src/stores/queryStore.ts:6131 — queryStore.useQueryStore.detachConnectionTabsForDelete has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeCurrentSql (cognitive 16) · ×1
  • queryStore.useQueryStore.executeCurrentSql (cognitive 16) apps/desktop/src/stores/queryStore.ts:7175 — queryStore.useQueryStore.executeCurrentSql has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport (cognitive 16) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport (cognitive 16) apps/desktop/src/stores/queryStore.ts:10858 — queryStore.useQueryStore.captureResultLegacyValuesForExport has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.reorderFiles (cognitive 16) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFiles (cognitive 16) apps/desktop/src/stores/savedSqlStore.ts:1130 — savedSqlStore.useSavedSqlStore.reorderFiles has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 2, if/else 1. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1155, 1153, 1136). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settingsStore.inferAiProviderFromConfig (cognitive 16) · ×1
  • settingsStore.inferAiProviderFromConfig (cognitive 16) apps/desktop/src/stores/settingsStore.ts:760 — settingsStore.inferAiProviderFromConfig has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.moveTaskToFolder (cognitive 16) · ×1
  • transferTaskStore.useTransferTaskStore.moveTaskToFolder (cognitive 16) apps/desktop/src/stores/transferTaskStore.ts:383 — transferTaskStore.useTransferTaskStore.moveTaskToFolder has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 390, 391). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.reorderTasks (cognitive 16) · ×1
  • transferTaskStore.useTransferTaskStore.reorderTasks (cognitive 16) apps/desktop/src/stores/transferTaskStore.ts:449 — transferTaskStore.useTransferTaskStore.reorderTasks has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 2, if/else 1. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 467, 465, 455). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · meilisearchManagement.formatMeilisearchTaskDuration (cognitive 16) · ×1
  • meilisearchManagement.formatMeilisearchTaskDuration (cognitive 16) apps/desktop/src/types/meilisearchManagement.ts:169 — meilisearchManagement.formatMeilisearchTaskDuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · migrate-archive.buildArchive (cognitive 16) · ×1
  • migrate-archive.buildArchive (cognitive 16) deploy/plugin-stats-worker/migrate-archive.mjs:68 — migrate-archive.buildArchive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · platformDetection.detectPlatformId (cognitive 16) · ×1
  • platformDetection.detectPlatformId (cognitive 16) docs/lib/platformDetection.ts:22 — platformDetection.detectPlatformId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verifyArchive (cognitive 16) · ×1
  • verifyArchive (cognitive 16) deploy/plugin-stats-worker/migrate-archive.mjs:100 — verifyArchive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), boolean chains 1, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (7 members, 33 shared lines) · ×1
  • Near-duplicate member family (7 members, 33 shared lines) agents/drivers/argo-go/main.go:175 — agents/drivers/argo-go/main.go:175-237 | agents/drivers/cassandra-go/main.go:173-240 | agents/drivers/hive-go/main.go:175-237 | agents/drivers/iotdb/main.go:179-241 | agents/drivers/kingbase-go/main.go:237-300 | agents/drivers/neo4j-go/main.go:207-268 | agents/drivers/vastbase-go/main.go:233-306 — These 7 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 64 shared lines) · ×1
  • Near-duplicate member family (5 members, 64 shared lines) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:786 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:786-869 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:871-950 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1036-1119 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1214-1293 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1360-1440 — These 5 members are variants of one another: a block of 64 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 37 shared lines) · ×1
  • Near-duplicate member family (5 members, 37 shared lines) agents/drivers/argo-go/main.go:390 — agents/drivers/argo-go/main.go:390-475 | agents/drivers/hive-go/main.go:390-475 | agents/drivers/iotdb/main.go:326-396 | agents/drivers/kingbase-go/main.go:372-499 | agents/drivers/vastbase-go/main.go:386-489 — These 5 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 27 shared lines) · ×1
  • Near-duplicate member family (5 members, 27 shared lines) agents/drivers/argo-go/main.go:390 — agents/drivers/argo-go/main.go:390-475 | agents/drivers/cassandra-go/main.go:324-405 | agents/drivers/hive-go/main.go:390-475 | agents/drivers/iotdb/main.go:326-396 | agents/drivers/vastbase-go/main.go:386-489 — These 5 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 25 shared lines) · ×1
  • Near-duplicate member family (5 members, 25 shared lines) agents/drivers/argo-go/main.go:390 — agents/drivers/argo-go/main.go:390-475 | agents/drivers/hive-go/main.go:390-475 | agents/drivers/iotdb/main.go:326-396 | agents/drivers/neo4j-go/main.go:428-499 | agents/drivers/vastbase-go/main.go:386-489 — These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 111 shared lines) · ×1
  • Near-duplicate member family (3 members, 111 shared lines) REDACTED:3534 — REDACTED:3534-4305 | src-tauri/src/commands/connection.rs:1639-2245 | src-tauri/src/commands/connection.rs:2316-2804 — These 3 members are variants of one another: a block of 111 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 35 shared lines) · ×1
  • Near-duplicate member family (3 members, 35 shared lines) crates/dbx-driver-mysql/src/mysql.rs:6074 — crates/dbx-driver-mysql/src/mysql.rs:6074-6278 | crates/dbx-driver-mysql/src/mysql.rs:6291-6530 | crates/dbx-driver-mysql/src/mysql.rs:6555-6688 — These 3 members are variants of one another: a block of 35 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 17 shared lines) · ×1
  • Near-duplicate member family (3 members, 17 shared lines) crates/dbx-web/src/routes/database_export.rs:176 — crates/dbx-web/src/routes/database_export.rs:176-203 | crates/dbx-web/src/routes/query_result_export.rs:156-181 | crates/dbx-web/src/routes/table_export.rs:141-169 — These 3 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 9 shared lines) · ×1
  • Near-duplicate member family (3 members, 9 shared lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:493 — crates/dbx-driver-mongodb/src/mongo_shell.rs:493-506 | crates/dbx-web/src/routes/mcp_policy.rs:175-188 | src-tauri/src/commands/mcp_bridge.rs:1683-1696 — These 3 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 7 shared lines) · ×1
  • Near-duplicate member family (3 members, 7 shared lines) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:560 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:560-639 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:668-720 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:734-772 — These 3 members are variants of one another: a block of 7 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (88 shared lines) · ×1
  • Near-duplicate member pair (88 shared lines) REDACTED:1093 — REDACTED:1093-1202 | agents/drivers/vastbase-go/vastbase_metadata.go:918-1027 — These two members are variants of one another: 88 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (63 shared lines) · ×1
  • Near-duplicate member pair (63 shared lines) REDACTED:3635 — REDACTED:3635-3893 | REDACTED:4362-4541 — These two members are variants of one another: 63 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (58 shared lines) · ×1
  • Near-duplicate member pair (58 shared lines) REDACTED:670 — REDACTED:670-763 | agents/drivers/vastbase-go/vastbase_metadata.go:495-588 — These two members are variants of one another: 58 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) crates/dbx-web/src/routes/mongodb_import_export.rs:115 — crates/dbx-web/src/routes/mongodb_import_export.rs:115-208 | crates/dbx-web/src/routes/table_import.rs:117-222 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (48 shared lines) · ×1
  • Near-duplicate member pair (48 shared lines) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:238 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:238-326 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:331-490 — These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (44 shared lines) · ×1
  • Near-duplicate member pair (44 shared lines) REDACTED:8495 — REDACTED:8495-8552 | REDACTED:8590-8647 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (37 shared lines) · ×1
  • Near-duplicate member pair (37 shared lines) crates/dbx-core/src/admin/mqtt/client.rs:437 — crates/dbx-core/src/admin/mqtt/client.rs:437-548 | crates/dbx-core/src/admin/mqtt/client.rs:555-690 — These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (36 shared lines) · ×1
  • Near-duplicate member pair (36 shared lines) crates/dbx-ai-provider/src/ai.rs:4132 — crates/dbx-ai-provider/src/ai.rs:4132-4218 | crates/dbx-ai-provider/src/ai.rs:4226-4312 — These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (28 shared lines) · ×1
  • Near-duplicate member pair (28 shared lines) agents/go-common/iotdb-client-go/client/session.go:618 — agents/go-common/iotdb-client-go/client/session.go:618-655 | agents/go-common/iotdb-client-go/client/session.go:665-704 — These two members are variants of one another: 28 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (23 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (23 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs:221 — crates/dbx-core/src/query/redis_ops.rs:221-242 | crates/dbx-core/src/query/redis_ops.rs:251-272 | crates/dbx-core/src/query/redis_ops.rs:280-301 | crates/dbx-core/src/query/redis_ops.rs:308-329 | crates/dbx-core/src/query/redis_ops.rs:411-432 | crates/dbx-core/src/query/redis_ops.rs:443-464 | crates/dbx-core/src/query/redis_ops.rs:516-537 | crates/dbx-core/src/query/redis_ops.rs:549-570 | crates/dbx-core/src/query/redis_ops.rs:586-607 | crates/dbx-core/src/query/redis_ops.rs:616-637 | crates/dbx-core/src/query/redis_ops.rs:646-667 | crates/dbx-core/src/query/redis_ops.rs:688-709 | crates/dbx-core/src/query/redis_ops.rs:718-739 | crates/dbx-core/src/query/redis_ops.rs:756-777 | crates/dbx-core/src/query/redis_ops.rs:796-817 | crates/dbx-core/src/query/redis_ops.rs:834-855 | crates/dbx-core/src/query/redis_ops.rs:865-886 | crates/dbx-core/src/query/redis_ops.rs:894-915 | crates/dbx-core/src/query/redis_ops.rs:926-947 | crates/dbx-core/src/query/redis_ops.rs:957-978 | crates/dbx-core/src/query/redis_ops.rs:987-1008 | crates/dbx-core/src/query/redis_ops.rs:1040-1061 | crates/dbx-core/src/query/redis_ops.rs:1069-1090 — These 23 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 23 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 23 times.
D4 · Code Duplication · Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (13 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs:2534 — src-tauri/src/commands/mcp_bridge.rs:2534-2551 | src-tauri/src/commands/mcp_bridge.rs:2553-2583 | src-tauri/src/commands/mcp_bridge.rs:2585-2611 | src-tauri/src/commands/mcp_bridge.rs:2613-2630 | src-tauri/src/commands/mcp_bridge.rs:2632-2651 | src-tauri/src/commands/mcp_bridge.rs:2653-2685 | src-tauri/src/commands/mcp_bridge.rs:2687-2713 | src-tauri/src/commands/mcp_bridge.rs:2715-2745 | src-tauri/src/commands/mcp_bridge.rs:2747-2777 | src-tauri/src/commands/mcp_bridge.rs:2779-2801 | src-tauri/src/commands/mcp_bridge.rs:2803-2832 | src-tauri/src/commands/mcp_bridge.rs:2834-2871 | src-tauri/src/commands/mcp_bridge.rs:2873-2908 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) crates/dbx-driver-elasticsearch/src/lib.rs:749 — crates/dbx-driver-elasticsearch/src/lib.rs:749-763 | crates/dbx-driver-elasticsearch/src/lib.rs:1002-1016 | crates/dbx-driver-elasticsearch/src/lib.rs:1018-1031 | crates/dbx-driver-elasticsearch/src/lib.rs:1520-1538 | crates/dbx-driver-elasticsearch/src/lib.rs:1558-1566 | crates/dbx-driver-elasticsearch/src/lib.rs:1605-1623 | crates/dbx-driver-elasticsearch/src/lib.rs:1905-1919 | crates/dbx-driver-elasticsearch/src/lib.rs:1927-1939 | crates/dbx-driver-elasticsearch/src/lib.rs:1991-2001 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Edited copy of a member (121 corresponding lines) · ×1
  • Edited copy of a member (121 corresponding lines) REDACTED:2524 — REDACTED:2524-2645 | agents/drivers/vastbase-go/vastbase_metadata.go:1525-1645 — These two members are one piece of code written twice and then edited apart: 121 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (109 corresponding lines) · ×1
  • Edited copy of a member (109 corresponding lines) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78 — agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78-186 | plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:139-254 — These two members are one piece of code written twice and then edited apart: 109 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (124 corresponding lines) · ×1
  • Edited copy of a member (124 corresponding lines) agents/drivers/argo-go/config.go:142 — agents/drivers/argo-go/config.go:142-265 | agents/drivers/hive-go/config.go:145-271 — These two members are one piece of code written twice and then edited apart: 124 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (80 corresponding lines) · ×1
  • Edited copy of a member (80 corresponding lines) agents/drivers/argo-go/metadata.go:296 — agents/drivers/argo-go/metadata.go:296-375 | agents/drivers/hive-go/metadata.go:302-381 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152 — plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152-220 | plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:222-276 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) REDACTED:5479 — REDACTED:5479-5521 | REDACTED:10320-10365 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (73 corresponding lines) · ×1
  • Edited copy of a member (73 corresponding lines) agents/drivers/argo-go/connector.go:27 — agents/drivers/argo-go/connector.go:27-99 | agents/drivers/hive-go/connector.go:27-100 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (161 corresponding lines) · ×1
  • Edited copy of a member (161 corresponding lines) agents/drivers/kingbase-go/main.go:22 — agents/drivers/kingbase-go/main.go:22-183 | agents/drivers/vastbase-go/main.go:19-179 — These two members are one piece of code written twice and then edited apart: 161 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) crates/dbx-driver-sqlserver/src/sqlserver.rs:1820 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1820-1885 | crates/dbx-sql-data/src/query_result_sql.rs:3064-3148 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) crates/dbx-driver-mysql/src/mysql.rs:8094 — crates/dbx-driver-mysql/src/mysql.rs:8094-8149 | crates/dbx-driver-mysql/src/mysql.rs:8157-8207 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) agents/drivers/argo-go/query.go:297 — agents/drivers/argo-go/query.go:297-353 | agents/drivers/hive-go/query.go:297-356 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 42+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 42+ corresponding lines) crates/dbx-core/src/query/document_ops.rs:726 — crates/dbx-core/src/query/document_ops.rs:726-770 | crates/dbx-core/src/query/document_ops.rs:798-845 | crates/dbx-core/src/query/document_ops.rs:866-907 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) REDACTED:1670 — REDACTED:1670-1725 | agents/drivers/vastbase-go/vastbase_metadata.go:1029-1089 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) agents/drivers/etcd-go/main.go:358 — agents/drivers/etcd-go/main.go:358-435 | agents/drivers/etcd2-go/main.go:325-392 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 40+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 40+ corresponding lines) crates/dbx-web/src/routes/schema.rs:606 — crates/dbx-web/src/routes/schema.rs:606-661 | crates/dbx-web/src/routes/schema.rs:688-727 | crates/dbx-web/src/routes/schema.rs:772-812 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) agents/drivers/argo-go/metadata.go:516 — agents/drivers/argo-go/metadata.go:516-563 | agents/drivers/hive-go/metadata.go:527-574 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) crates/dbx-core/src/admin/nacos/search.rs:241 — crates/dbx-core/src/admin/nacos/search.rs:241-294 | crates/dbx-core/src/admin/nacos/search.rs:311-369 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 35+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 35+ corresponding lines) agents/drivers/duckdb/src/sql.rs:384 — agents/drivers/duckdb/src/sql.rs:384-418 | REDACTED:2251-2288 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4607-4647 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) crates/dbx-core/src/query/redis_ops.rs:102 — crates/dbx-core/src/query/redis_ops.rs:102-130 | crates/dbx-core/src/query/redis_ops.rs:1119-1151 | crates/dbx-core/src/query/redis_ops.rs:1158-1185 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 23+ corresponding lines) crates/dbx-core/src/query/redis_ops.rs:189 — crates/dbx-core/src/query/redis_ops.rs:189-214 | crates/dbx-core/src/query/redis_ops.rs:337-359 | crates/dbx-core/src/query/redis_ops.rs:369-392 | crates/dbx-core/src/query/redis_ops.rs:1329-1371 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 52+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 52+ corresponding lines) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:428 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:428-479 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:481-543 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:545-597 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:599-650 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:652-704 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:706-759 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:761-819 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 52 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) agents/drivers/kingbase-go/main.go:2088 — agents/drivers/kingbase-go/main.go:2088-2142 | agents/drivers/kingbase-go/main.go:2182-2233 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 29+ corresponding lines) crates/dbx-core/src/schema/mod.rs:11044 — crates/dbx-core/src/schema/mod.rs:11044-11072 | crates/dbx-core/src/schema/mod.rs:11097-11126 | crates/dbx-core/src/schema/mod.rs:11132-11161 | crates/dbx-core/src/schema/mod.rs:11167-11197 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 21+ corresponding lines) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:146 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:146-166 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:213-235 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:253-275 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:458-480 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 22+ corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:704 — crates/dbx-core/src/query/mongo_ops.rs:704-735 | crates/dbx-core/src/query/mongo_ops.rs:743-766 | crates/dbx-core/src/query/mongo_ops.rs:966-990 | crates/dbx-core/src/query/mongo_ops.rs:1101-1122 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 20+ corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:124 — crates/dbx-core/src/query/mongo_ops.rs:124-143 | crates/dbx-core/src/query/mongo_ops.rs:177-201 | crates/dbx-core/src/query/mongo_ops.rs:209-235 | crates/dbx-core/src/query/mongo_ops.rs:1000-1029 | crates/dbx-core/src/query/mongo_ops.rs:1038-1064 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 12+ corresponding lines) crates/dbx-core/src/connection/connection_secrets.rs:529 — crates/dbx-core/src/connection/connection_secrets.rs:529-540 | crates/dbx-core/src/connection/connection_secrets.rs:761-774 | crates/dbx-core/src/connection/connection_secrets.rs:876-887 | REDACTED:10238-10249 | REDACTED:10402-10414 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 21+ corresponding lines) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:199 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:199-219 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:279-299 | crates/dbx-ai-provider/src/ai_codex_cli.rs:456-476 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:171-191 | crates/dbx-ai-provider/src/ai_grok_cli.rs:249-269 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:242-262 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:127-147 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 19+ corresponding lines) REDACTED:2770 — REDACTED:2770-2788 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:382-401 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:386-411 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:558-591 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2386-2409 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 13+ corresponding lines) crates/dbx-core/src/connection/jdbc.rs:1231 — crates/dbx-core/src/connection/jdbc.rs:1231-1244 | crates/dbx-driver-agent/src/agent_offline_export.rs:1003-1015 | crates/dbx-driver-agent/src/agent_service.rs:2610-2622 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1262-1274 | plugins/sdk/packager/src/main.rs:623-635 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) agents/drivers/kingbase-go/main.go:937 — agents/drivers/kingbase-go/main.go:937-958 | REDACTED:4841-4858 | REDACTED:4890-4907 | agents/drivers/vastbase-go/main.go:831-851 | REDACTED:4048-4064 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 8+ corresponding lines) crates/dbx-web/src/routes/schema.rs:179 — crates/dbx-web/src/routes/schema.rs:179-196 | crates/dbx-web/src/routes/schema.rs:403-410 | crates/dbx-web/src/routes/schema.rs:415-422 | crates/dbx-web/src/routes/schema.rs:666-673 | crates/dbx-web/src/routes/schema.rs:1032-1039 | crates/dbx-web/src/routes/schema.rs:1212-1225 | crates/dbx-web/src/routes/schema.rs:1230-1237 | crates/dbx-web/src/routes/schema.rs:1242-1249 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) agents/drivers/rabbitmq/operations.go:357 — agents/drivers/rabbitmq/operations.go:357-376 | agents/drivers/rabbitmq/operations.go:968-991 | agents/drivers/rabbitmq/operations.go:993-1011 | agents/drivers/rabbitmq/operations.go:1134-1152 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 9+ corresponding lines) crates/dbx-web/src/routes/consul.rs:1150 — crates/dbx-web/src/routes/consul.rs:1150-1158 | crates/dbx-web/src/routes/consul.rs:1174-1182 | crates/dbx-web/src/routes/consul.rs:1186-1195 | crates/dbx-web/src/routes/consul.rs:1220-1228 | crates/dbx-web/src/routes/consul.rs:1249-1257 | crates/dbx-web/src/routes/consul.rs:1261-1270 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 11+ corresponding lines) agents/drivers/argo-go/main.go:144 — agents/drivers/argo-go/main.go:144-154 | agents/drivers/etcd-go/main.go:167-178 | agents/drivers/etcd2-go/main.go:137-148 | agents/drivers/hive-go/main.go:144-154 | agents/drivers/iotdb/main.go:148-158 | agents/drivers/neo4j-go/main.go:172-183 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 11+ corresponding lines) crates/dbx-core/src/query/document_ops.rs:994 — crates/dbx-core/src/query/document_ops.rs:994-1004 | crates/dbx-core/src/query/document_ops.rs:1044-1054 | crates/dbx-core/src/query/document_ops.rs:1060-1070 | crates/dbx-core/src/query/document_ops.rs:1081-1091 | crates/dbx-core/src/query/document_ops.rs:1097-1107 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 15+ corresponding lines) src-tauri/src/commands/mongo_cmd.rs:570 — src-tauri/src/commands/mongo_cmd.rs:570-593 | src-tauri/src/commands/mongo_cmd.rs:605-627 | src-tauri/src/commands/mongo_cmd.rs:690-704 | src-tauri/src/commands/mongo_cmd.rs:716-738 | src-tauri/src/commands/mongo_cmd.rs:750-772 | src-tauri/src/commands/mongo_cmd.rs:783-804 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 15+ corresponding lines) crates/dbx-mcp/src/server.rs:1722 — crates/dbx-mcp/src/server.rs:1722-1736 | crates/dbx-mcp/src/server.rs:1743-1757 | crates/dbx-mcp/src/server.rs:1764-1781 | crates/dbx-mcp/src/server.rs:1816-1830 | crates/dbx-mcp/src/server.rs:1837-1851 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 7+ corresponding lines) crates/dbx-web/src/routes/mq.rs:672 — crates/dbx-web/src/routes/mq.rs:672-678 | crates/dbx-web/src/routes/mq.rs:684-690 | crates/dbx-web/src/routes/mq.rs:794-800 | crates/dbx-web/src/routes/mq.rs:806-812 | crates/dbx-web/src/routes/mq.rs:963-969 | crates/dbx-web/src/routes/mq.rs:1390-1396 | crates/dbx-web/src/routes/mq.rs:1423-1431 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 13+ corresponding lines) crates/dbx-web/src/routes/redis.rs:543 — crates/dbx-web/src/routes/redis.rs:543-556 | crates/dbx-web/src/routes/redis.rs:589-604 | crates/dbx-web/src/routes/redis.rs:639-652 | crates/dbx-web/src/routes/redis.rs:721-734 | crates/dbx-web/src/routes/redis.rs:747-761 | crates/dbx-web/src/routes/redis.rs:786-800 | crates/dbx-web/src/routes/redis.rs:805-818 | crates/dbx-web/src/routes/redis.rs:872-884 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:534 — agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:534-543 | agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:538-545 | agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:547-554 | agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:556-563 | agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:579-586 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 11+ corresponding lines) agents/go-common/iotdb-client-go/client/column.go:718 — agents/go-common/iotdb-client-go/client/column.go:718-728 | agents/go-common/iotdb-client-go/client/column.go:730-740 | agents/go-common/iotdb-client-go/client/column.go:742-752 | agents/go-common/iotdb-client-go/client/column.go:754-764 | agents/go-common/iotdb-client-go/client/column.go:766-776 | agents/go-common/iotdb-client-go/client/column.go:778-788 | agents/go-common/iotdb-client-go/client/column.go:790-800 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 5+ corresponding lines) agents/drivers/duckdb/src/runtime.rs:78 — agents/drivers/duckdb/src/runtime.rs:78-82 | agents/drivers/duckdb/src/runtime.rs:84-93 | agents/drivers/duckdb/src/runtime.rs:95-105 | agents/drivers/duckdb/src/runtime.rs:107-117 | agents/drivers/duckdb/src/runtime.rs:122-126 | agents/drivers/duckdb/src/runtime.rs:128-139 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 4+ corresponding lines) crates/dbx-web/src/routes/redis.rs:361 — crates/dbx-web/src/routes/redis.rs:361-365 | crates/dbx-web/src/routes/redis.rs:1026-1031 | crates/dbx-web/src/routes/schema.rs:72-75 | crates/dbx-web/src/routes/schema.rs:80-84 | crates/dbx-web/src/routes/schema.rs:125-129 | crates/dbx-web/src/routes/schema.rs:145-150 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 3+ corresponding lines) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:201 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:201-203 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:645-647 | REDACTED:1379-1384 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:479-481 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:628-630 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:515-517 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:329-331 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:285-287 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:69 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:69-69 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:23-25 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (82 lines × 2) · ×1
  • Duplicated block (82 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6160 — crates/dbx-driver-mysql/src/mysql.rs:6160-6241 | crates/dbx-driver-mysql/src/mysql.rs:6570-6651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:6160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×1
  • Duplicated block (63 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:534 — crates/dbx-drivers/src/db/couchdb_driver.rs:534-596 | crates/dbx-drivers/src/db/solr_driver.rs:911-973 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (48 lines × 5) · ×1
  • Duplicated block (48 lines × 5) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:820 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:820-867 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:900-947 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1070-1117 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1244-1291 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1391-1438 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:820` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (49 lines × 3) · ×1
  • Duplicated block (49 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:440 — crates/dbx-driver-mongodb/src/mongo_shell.rs:440-488 | crates/dbx-web/src/routes/mcp_policy.rs:122-170 | src-tauri/src/commands/mcp_bridge.rs:1630-1678 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (44–45 lines × 6) · ×1
  • Duplicated block (44–45 lines × 6) REDACTED:1946 — REDACTED:1946-1990 | REDACTED:2050-2093 | REDACTED:2166-2210 | REDACTED:2266-2309 | REDACTED:2354-2397 | REDACTED:2442-2485 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1946` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (64–66 lines × 2) · ×1
  • Duplicated block (64–66 lines × 2) agents/drivers/duckdb/src/sql.rs:2 — agents/drivers/duckdb/src/sql.rs:2-65 | crates/dbx-drivers/src/db/duckdb_sql.rs:12-77 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (39–41 lines × 2) · ×1
  • Duplicated block (39–41 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:1406 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1406-1446 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1644-1682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_driver.rs:1406` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (30–37 lines × 2) · ×1
  • Duplicated block (30–37 lines × 2) crates/dbx-core/src/data/transfer.rs:6992 — crates/dbx-core/src/data/transfer.rs:6992-7028 | crates/dbx-core/src/data/transfer.rs:7194-7223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:6992` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (34–36 lines × 2) · ×1
  • Duplicated block (34–36 lines × 2) src-tauri/src/commands/connection.rs:2056 — src-tauri/src/commands/connection.rs:2056-2091 | src-tauri/src/commands/connection.rs:2633-2666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/connection.rs:2056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (32 lines × 4) · ×1
  • Duplicated block (32 lines × 4) REDACTED:1758 — REDACTED:1758-1789 | REDACTED:2023-2054 | REDACTED:2260-2291 | REDACTED:2460-2491 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1758` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) REDACTED:3731 — REDACTED:3731-3765 | REDACTED:4475-4509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3731` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (30–32 lines × 2) · ×1
  • Duplicated block (30–32 lines × 2) crates/dbx-mcp/src/server.rs:4548 — crates/dbx-mcp/src/server.rs:4548-4577 | crates/dbx-mcp/src/server.rs:4675-4706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-mcp/src/server.rs:4548` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (29–30 lines × 3) · ×1
  • Duplicated block (29–30 lines × 3) REDACTED:8182 — REDACTED:8182-8210 | REDACTED:8681-8709 | REDACTED:9088-9117 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:8712` calls `store` and `REDACTED:8213` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) REDACTED:6826 — REDACTED:6826-6852 | REDACTED:6893-6921 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:6826` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:676 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:676-701 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:731-756 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:791-816 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:236 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:236-280 | crates/dbx-drivers/src/salesforce_oauth.rs:313-357 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mongodb/src/mongo_oidc.rs:236` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:709 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:709-729 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:764-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:1667 — crates/dbx-driver-agent/src/agent_service.rs:1667-1689 | crates/dbx-driver-agent/src/agent_service.rs:1796-1820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-driver-agent/src/agent_service.rs:1823` calls `retain_driver_delta_base`, `stop_driver_processes_before_replacement` and `crates/dbx-driver-agent/src/agent_service.rs:1690` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19–25 lines × 2) · ×1
  • Duplicated block (19–25 lines × 2) REDACTED:7019 — REDACTED:7019-7043 | REDACTED:7088-7106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7019` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:486 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:486-510 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:657-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–24 lines × 6) · ×1
  • Duplicated block (22–24 lines × 6) REDACTED:2019 — REDACTED:2019-2042 | REDACTED:2121-2143 | REDACTED:2220-2243 | REDACTED:2324-2345 | REDACTED:2413-2434 | REDACTED:2517-2538 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2019` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2436` calls `write_all`, `map_err` and `REDACTED:2043` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (43–44 lines × 3) · ×1
  • Duplicated block (43–44 lines × 3) REDACTED:8250 — REDACTED:8250-8292 | REDACTED:8775-8817 | REDACTED:9153-9196 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:8818` calls `store` and `REDACTED:8293` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) crates/dbx-core/src/admin/consul/archive.rs:481 — crates/dbx-core/src/admin/consul/archive.rs:481-501 | crates/dbx-core/src/admin/consul/kv.rs:486-507 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/consul/archive.rs:481` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) REDACTED:823 — REDACTED:823-843 | REDACTED:1331-1349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:96 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:96-115 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:173-192 | crates/dbx-ai-provider/src/ai_codex_cli.rs:343-362 | crates/dbx-ai-provider/src/ai_grok_cli.rs:143-162 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-ai-provider/src/ai_grok_cli.rs:163` calls `Some`, `var_os`, `push` and `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:116` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×1
  • Duplicated block (36 lines × 3) REDACTED:1808 — REDACTED:1808-1843 | REDACTED:2107-2142 | REDACTED:2316-2351 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1808` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:516 — crates/dbx-driver-mongodb/src/mongo_shell.rs:516-535 | crates/dbx-web/src/routes/mcp_policy.rs:198-217 | src-tauri/src/commands/mcp_bridge.rs:1706-1725 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:1366 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1366-1383 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1513-1531 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1567-1584 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:252 — crates/dbx-web/src/routes/mongodb_import_export.rs:252-271 | crates/dbx-web/src/routes/table_import.rs:274-294 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/mongodb_import_export.rs:252` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) REDACTED:3940 — REDACTED:3940-3956 | src-tauri/src/commands/connection.rs:2022-2040 | src-tauri/src/commands/connection.rs:2601-2617 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3940` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–18 lines × 3) · ×1
  • Duplicated block (15–18 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:499 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:499-516 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:667-681 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:782-796 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) crates/dbx-core/src/data/transfer.rs:11430 — crates/dbx-core/src/data/transfer.rs:11430-11445 | crates/dbx-core/src/data/transfer.rs:12724-12741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/data/transfer.rs:11430` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/data/transfer.rs:12724` calls `as_deref` and `crates/dbx-core/src/data/transfer.rs:11430` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:142 — crates/dbx-core/src/admin/consul/blocking.rs:142-167 | crates/dbx-core/src/admin/consul/blocking.rs:196-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/consul/blocking.rs:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `ConsulBlockingRequest` in one and `ConsulDomainWatchRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) crates/dbx-drivers/src/db/sqlite.rs:2760 — crates/dbx-drivers/src/db/sqlite.rs:2760-2776 | crates/dbx-sqlite-worker/src/runtime.rs:100-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/sqlite.rs:2760` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) REDACTED:1232 — REDACTED:1232-1247 | REDACTED:1283-1298 | REDACTED:1335-1350 | REDACTED:1390-1405 | REDACTED:1441-1456 | REDACTED:1516-1531 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1232` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:1406` calls `write_all`, `map_err` and `REDACTED:1248` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:792 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:792-807 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:878-893 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1041-1056 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1219-1234 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1364-1379 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:790` calls `as_bytes` and `crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:876` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–16 lines × 3) · ×1
  • Duplicated block (13–16 lines × 3) crates/dbx-core/src/query/document_ops.rs:560 — crates/dbx-core/src/query/document_ops.rs:560-572 | crates/dbx-core/src/query/mongo_ops.rs:370-385 | crates/dbx-core/src/query/mongo_ops.rs:547-562 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/document_ops.rs:560` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/query/document_ops.rs:573` calls `Some` and `crates/dbx-core/src/query/mongo_ops.rs:563` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–16 lines × 2) · ×1
  • Duplicated block (12–16 lines × 2) REDACTED:1351 — REDACTED:1351-1362 | REDACTED:2246-2261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1351` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/dbx-ai-provider/src/ai_opencode_cli.rs:380 — crates/dbx-ai-provider/src/ai_opencode_cli.rs:380-394 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:401-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_opencode_cli.rs:380` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) crates/dbx-driver-agent/src/agent_driver.rs:2717 — crates/dbx-driver-agent/src/agent_driver.rs:2717-2733 | crates/dbx-driver-agent/src/agent_driver.rs:2780-2793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-driver-agent/src/agent_driver.rs:2794` calls `apply_to` and `crates/dbx-driver-agent/src/agent_driver.rs:2734` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) agents/drivers/duckdb/src/sql.rs:390 — agents/drivers/duckdb/src/sql.rs:390-401 | REDACTED:3692-3705 | REDACTED:3743-3756 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:390` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5938 — crates/dbx-driver-mysql/src/mysql.rs:5938-5948 | crates/dbx-driver-mysql/src/mysql.rs:5974-5987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:5938` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:6811 — crates/dbx-sql-schema/src/schema_diff.rs:6811-6823 | crates/dbx-sql-schema/src/schema_diff.rs:6862-6873 | crates/dbx-sql-schema/src/schema_diff.rs:6889-6900 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/schema_diff.rs:6811` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) crates/dbx-ai-provider/src/ai.rs:3627 — crates/dbx-ai-provider/src/ai.rs:3627-3639 | crates/dbx-ai-provider/src/ai.rs:3697-3705 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai.rs:3627` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (2–13 lines × 3) · ×1
  • Duplicated block (2–13 lines × 3) REDACTED:3816 — REDACTED:3816-3828 | src-tauri/src/commands/connection.rs:1893-1894 | src-tauri/src/commands/connection.rs:2476-2488 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3816` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src-tauri/src/commands/connection.rs:2490` calls `is_some` and `REDACTED:3830` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–13 lines × 2) · ×1
  • Duplicated block (8–13 lines × 2) REDACTED:4555 — REDACTED:4555-4567 | REDACTED:5186-5193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) agents/drivers/duckdb/src/sql.rs:403 — agents/drivers/duckdb/src/sql.rs:403-413 | REDACTED:2271-2280 | REDACTED:3775-3786 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/duckdb/src/sql.rs:403` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) REDACTED:1686 — REDACTED:1686-1709 | REDACTED:1893-1916 | REDACTED:2188-2211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (25–30 lines × 2) · ×1
  • Duplicated block (25–30 lines × 2) REDACTED:3839 — REDACTED:3839-3868 | REDACTED:4033-4057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:1858 — crates/dbx-drivers/src/db/ssh_tunnel.rs:1858-1866 | crates/dbx-drivers/src/db/ssh_tunnel.rs:1918-1929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-drivers/src/db/ssh_tunnel.rs:1858` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 13) · ×1
  • Duplicated block (11 lines × 13) src-tauri/src/commands/mcp_bridge.rs:2536 — src-tauri/src/commands/mcp_bridge.rs:2536-2546 | src-tauri/src/commands/mcp_bridge.rs:2555-2565 | src-tauri/src/commands/mcp_bridge.rs:2587-2597 | src-tauri/src/commands/mcp_bridge.rs:2615-2625 | src-tauri/src/commands/mcp_bridge.rs:2634-2644 | src-tauri/src/commands/mcp_bridge.rs:2655-2665 | src-tauri/src/commands/mcp_bridge.rs:2689-2699 | src-tauri/src/commands/mcp_bridge.rs:2717-2727 | src-tauri/src/commands/mcp_bridge.rs:2749-2759 | src-tauri/src/commands/mcp_bridge.rs:2781-2791 | src-tauri/src/commands/mcp_bridge.rs:2805-2815 | src-tauri/src/commands/mcp_bridge.rs:2836-2846 | src-tauri/src/commands/mcp_bridge.rs:2875-2885 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/commands/mcp_bridge.rs:2536` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) crates/dbx-ai-provider/src/ai_codex_cli.rs:404 — crates/dbx-ai-provider/src/ai_codex_cli.rs:404-414 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:386-396 | src-tauri/src/commands/mcp.rs:1605-1614 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_codex_cli.rs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `script` to `&str` in one and `&str) -> (String` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) crates/dbx-web/src/routes/database_export.rs:43 — crates/dbx-web/src/routes/database_export.rs:43-53 | crates/dbx-web/src/routes/table_export.rs:40-46 — before extracting anything, compare `crates/dbx-web/src/routes/database_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-web/src/routes/database_export.rs:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) REDACTED:4711 — REDACTED:4711-4720 | REDACTED:4778-4787 | REDACTED:5003-5011 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 17) · ×1
  • Duplicated block (8 lines × 17) crates/dbx-core/src/query/redis_ops.rs:517 — crates/dbx-core/src/query/redis_ops.rs:517-524 | crates/dbx-core/src/query/redis_ops.rs:550-557 | crates/dbx-core/src/query/redis_ops.rs:587-594 | crates/dbx-core/src/query/redis_ops.rs:617-624 | crates/dbx-core/src/query/redis_ops.rs:647-654 | crates/dbx-core/src/query/redis_ops.rs:689-696 | crates/dbx-core/src/query/redis_ops.rs:719-726 | crates/dbx-core/src/query/redis_ops.rs:757-764 | crates/dbx-core/src/query/redis_ops.rs:797-804 | crates/dbx-core/src/query/redis_ops.rs:835-842 | crates/dbx-core/src/query/redis_ops.rs:866-873 | crates/dbx-core/src/query/redis_ops.rs:895-902 | crates/dbx-core/src/query/redis_ops.rs:927-934 | crates/dbx-core/src/query/redis_ops.rs:958-965 | crates/dbx-core/src/query/redis_ops.rs:988-995 | crates/dbx-core/src/query/redis_ops.rs:1041-1048 | crates/dbx-core/src/query/redis_ops.rs:1070-1077 — all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:517` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:527 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:527-534 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:547-554 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:580-587 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:605-612 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:674-681 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:694-701 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:711-718 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/admin/mq/adapters/pulsar.rs:527` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 23) · ×1
  • Duplicated block (7 lines × 23) crates/dbx-core/src/query/redis_ops.rs:224 — crates/dbx-core/src/query/redis_ops.rs:224-230 | crates/dbx-core/src/query/redis_ops.rs:254-260 | crates/dbx-core/src/query/redis_ops.rs:283-289 | crates/dbx-core/src/query/redis_ops.rs:311-317 | crates/dbx-core/src/query/redis_ops.rs:414-420 | crates/dbx-core/src/query/redis_ops.rs:446-452 | crates/dbx-core/src/query/redis_ops.rs:519-525 | crates/dbx-core/src/query/redis_ops.rs:552-558 | crates/dbx-core/src/query/redis_ops.rs:589-595 | crates/dbx-core/src/query/redis_ops.rs:619-625 | crates/dbx-core/src/query/redis_ops.rs:649-655 | crates/dbx-core/src/query/redis_ops.rs:691-697 | crates/dbx-core/src/query/redis_ops.rs:721-727 | crates/dbx-core/src/query/redis_ops.rs:759-765 | crates/dbx-core/src/query/redis_ops.rs:799-805 | crates/dbx-core/src/query/redis_ops.rs:837-843 | crates/dbx-core/src/query/redis_ops.rs:868-874 | crates/dbx-core/src/query/redis_ops.rs:897-903 | crates/dbx-core/src/query/redis_ops.rs:929-935 | crates/dbx-core/src/query/redis_ops.rs:960-966 | crates/dbx-core/src/query/redis_ops.rs:990-996 | crates/dbx-core/src/query/redis_ops.rs:1043-1049 | crates/dbx-core/src/query/redis_ops.rs:1072-1078 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-core/src/query/redis_ops.rs:224` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–12 lines × 3) · ×1
  • Duplicated block (8–12 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:456 — crates/dbx-ai-provider/src/ai_cli_agent.rs:456-467 | crates/dbx-ai-provider/src/ai_cli_agent.rs:634-645 | crates/dbx-ai-provider/src/ai_cli_agent.rs:981-988 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_cli_agent.rs:456` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (2–7 lines × 9) · ×1
  • Duplicated block (2–7 lines × 9) crates/dbx-driver-elasticsearch/src/lib.rs:752 — crates/dbx-driver-elasticsearch/src/lib.rs:752-753 | crates/dbx-driver-elasticsearch/src/lib.rs:1008-1009 | crates/dbx-driver-elasticsearch/src/lib.rs:1022-1023 | crates/dbx-driver-elasticsearch/src/lib.rs:1525-1526 | crates/dbx-driver-elasticsearch/src/lib.rs:1561-1562 | crates/dbx-driver-elasticsearch/src/lib.rs:1609-1610 | crates/dbx-driver-elasticsearch/src/lib.rs:1912-1913 | crates/dbx-driver-elasticsearch/src/lib.rs:1933-1939 | crates/dbx-driver-elasticsearch/src/lib.rs:1995-2001 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-elasticsearch/src/lib.rs:752` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5–7 lines × 4) · ×1
  • Duplicated block (5–7 lines × 4) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:696 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:696-700 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:798-804 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:970-976 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1184-1188 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:696` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–6 lines × 4) · ×1
  • Duplicated block (4–6 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:85 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:85-90 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:162-167 | crates/dbx-ai-provider/src/ai_codex_cli.rs:381-384 | crates/dbx-ai-provider/src/ai_grok_cli.rs:132-137 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:331 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:331-336 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:410-415 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:610-613 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:331` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-ai-provider/src/ai_claude_code_cli.rs:329` calls `args`, `iter`, `envs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:610` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (1–6 lines × 12) · ×1
  • Duplicated block (1–6 lines × 12) crates/dbx-driver-mysql/src/manticoresearch.rs:181 — crates/dbx-driver-mysql/src/manticoresearch.rs:181-182 | crates/dbx-driver-mysql/src/mysql.rs:4204-4206 | crates/dbx-driver-mysql/src/mysql.rs:8220-8223 | crates/dbx-driver-mysql/src/mysql_compatible.rs:133-134 | crates/dbx-driver-mysql/src/ob_oracle.rs:58-58 | crates/dbx-driver-mysql/src/ob_oracle.rs:80-83 | crates/dbx-driver-mysql/src/ob_oracle.rs:127-128 | crates/dbx-driver-mysql/src/ob_oracle.rs:177-182 | crates/dbx-driver-mysql/src/ob_oracle.rs:242-243 | crates/dbx-driver-mysql/src/ob_oracle.rs:297-300 | crates/dbx-driver-mysql/src/ob_oracle.rs:345-350 | crates/dbx-driver-mysql/src/starrocks.rs:75-76 — there are 12 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:4204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-driver-mysql/src/ob_oracle.rs:177` calls `collect_and_drop`, `map_err`, `to_string` and `crates/dbx-driver-mysql/src/manticoresearch.rs:181` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) crates/dbx-core/src/schema/mod.rs:449 — crates/dbx-core/src/schema/mod.rs:449-453 | crates/dbx-core/src/schema/mod.rs:519-523 | crates/dbx-core/src/schema/mod.rs:554-558 | crates/dbx-core/src/schema/mod.rs:588-590 | crates/dbx-core/src/schema/mod.rs:623-627 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/dbx-core/src/schema/mod.rs:590` calls `clone_metadata_pool`, `ok_or`, `Mysql` and `crates/dbx-core/src/schema/mod.rs:627` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2126 — crates/dbx-driver-elasticsearch/src/lib.rs:2126-2141 | crates/dbx-drivers/src/db/couchdb_driver.rs:509-523 | crates/dbx-drivers/src/db/solr_driver.rs:873-887 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:450 — crates/dbx-ai-provider/src/ai_cli_agent.rs:450-454 | crates/dbx-ai-provider/src/ai_cli_agent.rs:628-632 | crates/dbx-ai-provider/src/ai_cli_agent.rs:1048-1050 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-ai-provider/src/ai_cli_agent.rs:450` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/dbx-ai-provider/src/ai_cli_agent.rs:446` calls `default`, `parse_codex_turn_completed` and `crates/dbx-ai-provider/src/ai_cli_agent.rs:626` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (2–5 lines × 8) · ×1
  • Duplicated block (2–5 lines × 8) crates/dbx-driver-mysql/src/mysql.rs:4203 — crates/dbx-driver-mysql/src/mysql.rs:4203-4204 | crates/dbx-driver-mysql/src/mysql.rs:8085-8086 | crates/dbx-driver-mysql/src/mysql.rs:8102-8106 | crates/dbx-driver-mysql/src/mysql.rs:8164-8167 | crates/dbx-driver-mysql/src/mysql.rs:8215-8219 | crates/dbx-driver-mysql/src/mysql_compatible.rs:144-145 | crates/dbx-driver-mysql/src/mysql_compatible.rs:243-244 | crates/dbx-driver-mysql/src/starrocks.rs:74-75 — there are 8 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:8102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (2–5 lines × 4) · ×1
  • Duplicated block (2–5 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:8085 — crates/dbx-driver-mysql/src/mysql.rs:8085-8086 | crates/dbx-driver-mysql/src/mysql.rs:8122-8126 | crates/dbx-driver-mysql/src/mysql.rs:8180-8184 | crates/dbx-driver-mysql/src/mysql_compatible.rs:243-244 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/mysql.rs:8122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:187 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:187-193 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:267-273 | crates/dbx-ai-provider/src/ai_codex_cli.rs:488-494 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:158-164 | crates/dbx-ai-provider/src/ai_grok_cli.rs:237-243 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:229-235 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:430-436 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:119-125 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) crates/dbx-driver-mysql/src/manticoresearch.rs:79 — crates/dbx-driver-mysql/src/manticoresearch.rs:79-82 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:22-29 | crates/dbx-driver-mysql/src/starrocks.rs:77-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/dbx-driver-mysql/src/manticoresearch.rs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (2–7 lines × 3) · ×1
  • Duplicated block (2–7 lines × 3) REDACTED:2189 — REDACTED:2189-2195 | REDACTED:2827-2828 | REDACTED:4143-4149 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2827` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (2–5 lines × 15) · ×1
  • Duplicated block (2–5 lines × 15) REDACTED:2867 — REDACTED:2867-2868 | REDACTED:3027-3028 | REDACTED:3038-3042 | REDACTED:3048-3052 | REDACTED:3488-3489 | REDACTED:3510-3512 | REDACTED:4796-4798 | REDACTED:5061-5062 | REDACTED:5344-5345 | REDACTED:7377-7378 | REDACTED:8104-8105 | REDACTED:8135-8136 | REDACTED:9020-9021 | REDACTED:9839-9840 | REDACTED:9931-9932 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3038` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–44 lines × 2) · ×1
  • Duplicated block (17–44 lines × 2) REDACTED:2624 — REDACTED:2624-2667 | REDACTED:2680-2696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2624` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–42 lines × 13) · ×1
  • Duplicated block (10–42 lines × 13) REDACTED:2158 — REDACTED:2158-2167 | REDACTED:2187-2210 | REDACTED:2269-2280 | REDACTED:2498-2533 | REDACTED:2559-2578 | REDACTED:2625-2666 | REDACTED:2681-2695 | REDACTED:2743-2752 | REDACTED:2772-2782 | REDACTED:3177-3188 | REDACTED:3340-3350 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:270-279 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:286-296 — there are 13 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2534` calls `equals`, `getString` and `REDACTED:2579` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:92 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:92-120 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:106-134 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:71-99 — before extracting anything, compare `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java` and `agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (20–27 lines × 4) · ×1
  • Duplicated block (20–27 lines × 4) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30-52 | agents/common/src/main/java/com/dbx/agent/ConfiguredJdbcAgent.java:133-155 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:130-149 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:199-225 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:198` calls `resolveSchema` and `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–22 lines × 3) · ×1
  • Duplicated block (15–22 lines × 3) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:411 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:411-425 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:485-506 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:562-580 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:411` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196 — agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196-215 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:176-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–17 lines × 2) · ×1
  • Duplicated block (10–17 lines × 2) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302-2318 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2359-2368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–15 lines × 5) · ×1
  • Duplicated block (12–15 lines × 5) REDACTED:821 — REDACTED:821-835 | REDACTED:1090-1101 | REDACTED:1133-1144 | REDACTED:1263-1274 | REDACTED:1298-1311 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:838` calls `loadColumnNamesByNumber` and `REDACTED:1145` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655-669 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:119-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–14 lines × 4) · ×1
  • Duplicated block (10–14 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111-124 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:237-246 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:118-131 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:122-135 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247-259 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:157-170 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:228-240 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–14 lines × 2) · ×1
  • Duplicated block (9–14 lines × 2) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:320 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:320-328 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:200-213 — before extracting anything, compare `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:320` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–13 lines × 4) · ×1
  • Duplicated block (9–13 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097-1109 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:399-411 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:579-591 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2401-2409 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390-401 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:473-480 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–11 lines × 5) · ×1
  • Duplicated block (7–11 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097-1107 | REDACTED:2781-2788 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:399-409 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:579-589 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2401-2407 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:654 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:654-664 | REDACTED:227-237 | REDACTED:1359-1369 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:493-503 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:574-584 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:213 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:213-222 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:655-664 | REDACTED:228-237 | REDACTED:1360-1369 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:494-503 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:575-584 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:345-354 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:297-306 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:210` calls `tableTypeAllowed`, `add` and `REDACTED:227` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200 — agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200-207 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:125-133 | REDACTED:2652-2661 | REDACTED:2780-2787 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:123` calls `parseString`, `getAsJsonObject` and `agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217-225 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:659-667 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:498-506 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:517-525 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:652-660 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:671-679 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:349-357 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:301-309 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 9) · ×1
  • Duplicated block (7–8 lines × 9) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330-336 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:453-460 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:498-505 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:591-597 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:679-685 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:753-760 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:789-796 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:863-870 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1092-1098 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:496` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:329` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (1–7 lines × 6) · ×1
  • Duplicated block (1–7 lines × 6) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:936 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:936-942 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:969-970 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:989-995 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1001-1007 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1056-1062 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1067-1067 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:969` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 10) · ×1
  • Duplicated block (6 lines × 10) REDACTED:3480 — REDACTED:3480-3485 | REDACTED:4554-4559 | REDACTED:4610-4615 | REDACTED:5407-5412 | REDACTED:5430-5435 | REDACTED:5461-5466 | REDACTED:5476-5481 | REDACTED:5491-5496 | REDACTED:5516-5521 | REDACTED:5537-5542 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3480` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 8) · ×1
  • Duplicated block (4–5 lines × 8) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12-16 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:89-93 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:207-210 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:171-174 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:128-131 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:252-255 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:280-283 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:136-139 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:251` calls `resolveSchema` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:206` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (95 lines × 2) · ×1
  • Duplicated block (95 lines × 2) agents/drivers/argo-go/query.go:84 — agents/drivers/argo-go/query.go:84-178 | agents/drivers/hive-go/query.go:84-178 — `agents/drivers/argo-go/query.go` and `agents/drivers/hive-go/query.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 20 separate duplicated blocks between them, totalling at least 444 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (92 lines × 2) · ×1
  • Duplicated block (92 lines × 2) agents/drivers/argo-go/config.go:174 — agents/drivers/argo-go/config.go:174-265 | agents/drivers/hive-go/config.go:180-271 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/config.go:174` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (79 lines × 2) · ×1
  • Duplicated block (79 lines × 2) REDACTED:573 — REDACTED:573-651 | agents/drivers/vastbase-go/vastbase_metadata.go:402-480 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) agents/drivers/argo-go/config.go:1042 — agents/drivers/argo-go/config.go:1042-1117 | agents/drivers/hive-go/config.go:1082-1157 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (156 lines × 2) · ×1
  • Duplicated block (156 lines × 2) agents/drivers/argo-go/config.go:528 — agents/drivers/argo-go/config.go:528-683 | agents/drivers/hive-go/config.go:535-690 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) REDACTED:96 — REDACTED:96-163 | REDACTED:96-163 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 17 separate duplicated blocks between them, totalling at least 340 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (67 lines × 2) · ×1
  • Duplicated block (67 lines × 2) agents/drivers/argo-go/main.go:391 — agents/drivers/argo-go/main.go:391-457 | agents/drivers/hive-go/main.go:391-457 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:391` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) agents/drivers/argo-go/zookeeper_tls.go:61 — agents/drivers/argo-go/zookeeper_tls.go:61-117 | agents/drivers/hive-go/zookeeper_tls.go:61-117 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) agents/drivers/argo-go/config.go:296 — agents/drivers/argo-go/config.go:296-372 | agents/drivers/hive-go/config.go:302-378 — `agents/drivers/argo-go/config.go` and `agents/drivers/hive-go/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 44 separate duplicated blocks between them, totalling at least 1103 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) agents/drivers/argo-go/metadata.go:378 — agents/drivers/argo-go/metadata.go:378-433 | agents/drivers/hive-go/metadata.go:384-439 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×1
  • Duplicated block (54 lines × 2) agents/drivers/argo-go/zookeeper_tls.go:120 — agents/drivers/argo-go/zookeeper_tls.go:120-173 | agents/drivers/hive-go/zookeeper_tls.go:120-173 — `agents/drivers/argo-go/zookeeper_tls.go` and `agents/drivers/hive-go/zookeeper_tls.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 223 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) REDACTED:987 — REDACTED:987-1035 | agents/drivers/vastbase-go/vastbase_metadata.go:812-860 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) agents/drivers/kingbase-go/main.go:1543 — agents/drivers/kingbase-go/main.go:1543-1588 | agents/drivers/vastbase-go/main.go:1243-1288 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) REDACTED:1788 — REDACTED:1788-1831 | agents/drivers/vastbase-go/vastbase_metadata.go:1108-1151 — `REDACTED` and `agents/drivers/vastbase-go/vastbase_metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 67 separate duplicated blocks between them, totalling at least 1316 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1788` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 7) · ×1
  • Duplicated block (30 lines × 7) agents/drivers/argo-go/metadata.go:107 — agents/drivers/argo-go/metadata.go:107-136 | agents/drivers/cassandra-go/metadata.go:101-130 | agents/drivers/hive-go/metadata.go:107-136 | agents/drivers/iotdb/metadata.go:86-115 | agents/drivers/kingbase-go/main.go:72-101 | agents/drivers/neo4j-go/metadata.go:69-98 | agents/drivers/vastbase-go/main.go:65-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
D4 · Code Duplication · Duplicated block (28 lines × 5) · ×1
  • Duplicated block (28 lines × 5) agents/drivers/argo-go/main.go:42 — agents/drivers/argo-go/main.go:42-69 | agents/drivers/cassandra-go/main.go:56-83 | agents/drivers/hive-go/main.go:42-69 | agents/drivers/iotdb/main.go:57-84 | agents/drivers/neo4j-go/main.go:55-82 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (23 lines × 8) · ×1
  • Duplicated block (23 lines × 8) agents/drivers/argo-go/metadata.go:107 — agents/drivers/argo-go/metadata.go:107-129 | agents/drivers/cassandra-go/metadata.go:101-123 | agents/drivers/hive-go/metadata.go:107-129 | agents/drivers/iotdb/metadata.go:86-108 | agents/drivers/kingbase-go/main.go:72-94 | agents/drivers/neo4j-go/metadata.go:69-91 | REDACTED:318-340 | agents/drivers/vastbase-go/main.go:65-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) REDACTED:3866 — REDACTED:3866-3883 | REDACTED:3904-3925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3866` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (21 lines × 7) · ×1
  • Duplicated block (21 lines × 7) agents/drivers/argo-go/main.go:122 — agents/drivers/argo-go/main.go:122-142 | agents/drivers/cassandra-go/main.go:129-149 | agents/drivers/hive-go/main.go:122-142 | agents/drivers/iotdb/main.go:126-146 | agents/drivers/kingbase-go/main.go:200-220 | agents/drivers/neo4j-go/main.go:150-170 | agents/drivers/vastbase-go/main.go:196-216 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:122` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) agents/drivers/argo-go/metadata.go:51 — agents/drivers/argo-go/metadata.go:51-70 | agents/drivers/cassandra-go/metadata.go:36-55 | agents/drivers/hive-go/metadata.go:51-70 | agents/drivers/iotdb/metadata.go:43-62 | agents/drivers/neo4j-go/metadata.go:38-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 7) · ×1
  • Duplicated block (19 lines × 7) agents/drivers/argo-go/metadata.go:54 — agents/drivers/argo-go/metadata.go:54-72 | agents/drivers/cassandra-go/metadata.go:39-57 | agents/drivers/hive-go/metadata.go:54-72 | agents/drivers/iotdb/metadata.go:46-64 | REDACTED:151-169 | agents/drivers/neo4j-go/metadata.go:41-59 | agents/drivers/vastbase-go/vastbase_metadata.go:71-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:54` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14–15 lines × 11) · ×1
  • Duplicated block (14–15 lines × 11) agents/drivers/argo-go/main.go:109 — agents/drivers/argo-go/main.go:109-123 | agents/drivers/cassandra-go/main.go:116-130 | agents/drivers/etcd-go/main.go:130-144 | agents/drivers/etcd2-go/main.go:100-114 | agents/drivers/hive-go/main.go:109-123 | agents/drivers/iotdb/main.go:113-127 | agents/drivers/kingbase-go/main.go:187-201 | agents/drivers/nebula-go/main.go:68-81 | agents/drivers/neo4j-go/main.go:137-151 | agents/drivers/vastbase-go/main.go:183-197 | REDACTED:710-724 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/argo-go/main.go:107` calls `configureRuntimeParallelism` and `agents/drivers/cassandra-go/main.go:114` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–15 lines × 6) · ×1
  • Duplicated block (9–15 lines × 6) agents/drivers/argo-go/protocol_error.go:105 — agents/drivers/argo-go/protocol_error.go:105-113 | agents/drivers/cassandra-go/protocol_error.go:121-135 | agents/drivers/etcd-go/protocol_error.go:74-83 | agents/drivers/etcd2-go/protocol_error.go:66-74 | agents/drivers/hive-go/protocol_error.go:105-113 | agents/drivers/neo4j-go/protocol_error.go:122-130 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/cassandra-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/protocol_error.go:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) agents/drivers/cassandra-go/main.go:218 — agents/drivers/cassandra-go/main.go:218-232 | agents/drivers/iotdb/main.go:224-238 | agents/drivers/kingbase-go/main.go:283-297 | agents/drivers/neo4j-go/main.go:251-265 | agents/drivers/vastbase-go/main.go:284-298 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:218` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (14 lines × 9) · ×1
  • Duplicated block (14 lines × 9) agents/drivers/argo-go/main.go:128 — agents/drivers/argo-go/main.go:128-141 | agents/drivers/cassandra-go/main.go:135-148 | agents/drivers/etcd-go/main.go:150-163 | agents/drivers/etcd2-go/main.go:120-133 | agents/drivers/hive-go/main.go:128-141 | agents/drivers/iotdb/main.go:132-145 | agents/drivers/kingbase-go/main.go:206-219 | agents/drivers/neo4j-go/main.go:156-169 | agents/drivers/vastbase-go/main.go:202-215 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/etcd-go/main.go:149` calls `closeAll` and `agents/drivers/cassandra-go/main.go:134` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–14 lines × 3) · ×1
  • Duplicated block (8–14 lines × 3) agents/drivers/kingbase-go/main.go:1151 — agents/drivers/kingbase-go/main.go:1151-1158 | agents/drivers/vastbase-go/main.go:1014-1021 | REDACTED:3966-3979 — `agents/drivers/kingbase-go/main.go` and `agents/drivers/vastbase-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 48 separate duplicated blocks between them, totalling at least 645 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:1151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 10) · ×1
  • Duplicated block (12 lines × 10) agents/drivers/argo-go/main.go:162 — agents/drivers/argo-go/main.go:162-173 | agents/drivers/cassandra-go/main.go:160-171 | agents/drivers/etcd-go/main.go:186-197 | agents/drivers/etcd2-go/main.go:156-167 | agents/drivers/hive-go/main.go:162-173 | agents/drivers/iotdb/main.go:166-177 | agents/drivers/neo4j-go/main.go:194-205 | agents/drivers/vastbase-go/main.go:220-231 | REDACTED:762-773 | REDACTED:1038-1049 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) agents/go-common/iotdb-client-go/client/column.go:228 — agents/go-common/iotdb-client-go/client/column.go:228-239 | agents/go-common/iotdb-client-go/client/column.go:300-311 | agents/go-common/iotdb-client-go/client/column.go:372-383 | agents/go-common/iotdb-client-go/client/column.go:444-455 | agents/go-common/iotdb-client-go/client/column.go:516-527 | agents/go-common/iotdb-client-go/client/column.go:588-599 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×1
  • Duplicated block (11 lines × 8) agents/drivers/argo-go/main.go:179 — agents/drivers/argo-go/main.go:179-189 | agents/drivers/cassandra-go/main.go:177-187 | agents/drivers/hive-go/main.go:179-189 | agents/drivers/iotdb/main.go:183-193 | agents/drivers/kingbase-go/main.go:247-257 | agents/drivers/neo4j-go/main.go:211-221 | agents/drivers/vastbase-go/main.go:243-253 | REDACTED:783-793 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) agents/drivers/argo-go/main.go:402 — agents/drivers/argo-go/main.go:402-410 | agents/drivers/hive-go/main.go:402-410 | agents/drivers/iotdb/main.go:340-347 | agents/drivers/kingbase-go/main.go:402-409 | agents/drivers/vastbase-go/main.go:417-424 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) agents/drivers/argo-go/main.go:443 — agents/drivers/argo-go/main.go:443-451 | agents/drivers/hive-go/main.go:443-451 | agents/drivers/kingbase-go/main.go:453-460 | agents/drivers/vastbase-go/main.go:456-463 — `agents/drivers/argo-go/main.go` and `agents/drivers/hive-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 43 separate duplicated blocks between them, totalling at least 695 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/main.go:443` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `server *server) dispatch(method` in one and `s *server) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7–8 lines × 5) · ×1
  • Duplicated block (7–8 lines × 5) agents/drivers/argo-go/metadata.go:249 — agents/drivers/argo-go/metadata.go:249-255 | agents/drivers/argo-go/metadata.go:264-271 | agents/drivers/hive-go/metadata.go:255-261 | agents/drivers/hive-go/metadata.go:270-277 | agents/drivers/iotdb/metadata.go:174-180 — `agents/drivers/argo-go/metadata.go` and `agents/drivers/hive-go/metadata.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 47 separate duplicated blocks between them, totalling at least 950 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 9) · ×1
  • Duplicated block (7 lines × 9) agents/drivers/argo-go/main.go:185 — agents/drivers/argo-go/main.go:185-191 | agents/drivers/cassandra-go/main.go:183-189 | agents/drivers/hive-go/main.go:185-191 | agents/drivers/iotdb/main.go:189-195 | agents/drivers/kingbase-go/main.go:253-259 | agents/drivers/neo4j-go/main.go:217-223 | REDACTED:850-856 | agents/drivers/vastbase-go/main.go:249-255 | REDACTED:789-795 — `agents/drivers/argo-go/main.go` and `agents/drivers/cassandra-go/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 271 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `runtimeServer *runtimeServer) dispatch(method` in one and `r *runtimeServer) dispatch(method` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:858` calls `New` and `REDACTED:796` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) agents/drivers/cassandra-go/main.go:243 — agents/drivers/cassandra-go/main.go:243-249 | agents/drivers/iotdb/main.go:244-250 | agents/drivers/kingbase-go/main.go:303-309 | agents/drivers/neo4j-go/main.go:271-277 | REDACTED:926-932 | agents/drivers/vastbase-go/main.go:309-315 | REDACTED:848-854 — `agents/drivers/cassandra-go/main.go` and `agents/drivers/iotdb/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 30 separate duplicated blocks between them, totalling at least 384 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cassandra-go/main.go:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–7 lines × 4) · ×1
  • Duplicated block (4–7 lines × 4) agents/drivers/kingbase-go/main.go:841 — agents/drivers/kingbase-go/main.go:841-847 | REDACTED:5067-5070 | agents/drivers/vastbase-go/main.go:704-710 | REDACTED:4159-4162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kingbase-go/main.go:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 7) · ×1
  • Duplicated block (18 lines × 7) agents/drivers/argo-go/protocol_error.go:72 — agents/drivers/argo-go/protocol_error.go:72-89 | agents/drivers/cassandra-go/protocol_error.go:86-103 | agents/drivers/hive-go/protocol_error.go:72-89 | agents/drivers/iotdb/protocol_error.go:72-89 | agents/drivers/neo4j-go/protocol_error.go:87-104 | agents/drivers/vastbase-go/protocol_error.go:84-101 | agents/drivers/xugu/protocol_error.go:131-148 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/cassandra-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (12 lines × 9) · ×1
  • Duplicated block (12 lines × 9) agents/drivers/argo-go/protocol_error.go:134 — agents/drivers/argo-go/protocol_error.go:134-145 | agents/drivers/cassandra-go/protocol_error.go:145-156 | agents/drivers/etcd-go/protocol_error.go:132-143 | agents/drivers/etcd2-go/protocol_error.go:124-135 | agents/drivers/hive-go/protocol_error.go:134-145 | agents/drivers/iotdb/protocol_error.go:127-138 | agents/drivers/neo4j-go/protocol_error.go:140-151 | agents/drivers/vastbase-go/protocol_error.go:143-154 | agents/drivers/xugu/protocol_error.go:222-233 — `agents/drivers/argo-go/protocol_error.go` and `agents/drivers/cassandra-go/protocol_error.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (17 lines × 8) · ×1
  • Duplicated block (17 lines × 8) agents/drivers/argo-go/metadata.go:56 — agents/drivers/argo-go/metadata.go:56-72 | agents/drivers/cassandra-go/metadata.go:41-57 | agents/drivers/hive-go/metadata.go:56-72 | agents/drivers/iotdb/metadata.go:48-64 | REDACTED:153-169 | agents/drivers/neo4j-go/metadata.go:43-59 | agents/drivers/vastbase-go/vastbase_metadata.go:73-89 | REDACTED:476-492 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/argo-go/metadata.go:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) agents/drivers/kingbase-go/bench/agent_compare.go:183 — agents/drivers/kingbase-go/bench/agent_compare.go:183-211 | REDACTED:299-331 | agents/drivers/vastbase-go/bench/agent_compare.go:546-576 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 2+ corresponding lines) REDACTED:151 — REDACTED:151-152 | agents/drivers/cassandra-go/bench/agent_compare.py:123-124 | REDACTED:151-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) REDACTED:645 — REDACTED:645-648 | agents/drivers/cassandra-go/bench/agent_compare.py:318-321 | REDACTED:645-648 | agents/drivers/iotdb/bench/run.py:239-242 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) REDACTED:185 — REDACTED:185-278 | REDACTED:185-278 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) REDACTED:485 — REDACTED:485-531 | REDACTED:485-531 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 400 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D5 · Coupling · Unstable project dbx-drivers · ×1
  • Unstable project dbx-drivers — dbx-drivers has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project dbx-sql · ×1
  • Unstable project dbx-sql — dbx-sql has instability 0.83 with 1 dependents.
R10 · Code Duplication · Duplication concentrated across 46 sibling directories (357 clone groups) · ×1
  • Duplication concentrated across 46 sibling directories (357 clone groups) apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422 — 357 duplicated blocks under apps/desktop/src/components/ have copies in at least two of the sibling directories admin, ai, auth, backup, chart, codeSnapshot (+40 more sibling(s) not listed) — 205 of them are reported below, and 152 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 357 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 357 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 357 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (221 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (221 clone groups) apps/desktop/src/components/sidebar/TreeItem.vue:319 — 221 duplicated blocks under apps/desktop/src/ have copies in at least two of the sibling directories components, composables, lib, stores, types — 135 of them are reported below, and 86 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 221 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 221 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 221 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 46 sibling directories (149 clone groups) · ×1
  • Duplication concentrated across 46 sibling directories (149 clone groups) apps/desktop/src/lib/app/documentJsonValues.ts:306 — 149 duplicated blocks under apps/desktop/src/lib/ have copies in at least two of the sibling directories ai, app, backend, backup, cloudSync, codeSnapshot (+40 more sibling(s) not listed) — 95 of them are reported below, and 54 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 149 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 149 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 149 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (217 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (217 matched lines × 2 locations) apps/desktop/src/lib/backend/http.ts:1670 — apps/desktop/src/lib/backend/http.ts:1670 · apps/desktop/src/lib/backend/tauri.ts:2110 — the two spans are one implementation copied and then locally edited — 1200 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (192 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (192 matched lines × 2 locations) apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 — apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 · apps/desktop/src/components/admin/DamengUserAdmin.vue:81 — the two spans are one implementation copied and then locally edited — 1634 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (178 lines × 2 locations) · ×1
  • Duplicated block (178 lines × 2 locations) apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422 — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1422 · apps/desktop/src/components/transfer/TransferTaskTree.vue:333 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (163 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (163 matched lines × 2 locations) apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 — apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 · apps/desktop/src/components/grid/DataGridSortBuilder.vue:49 — the two spans are one implementation copied and then locally edited — 1169 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (110 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (110 matched lines × 2 locations) apps/desktop/src/lib/metadata/objectDdlCache.ts:44 — apps/desktop/src/lib/metadata/objectDdlCache.ts:44 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:25 — the two spans are one implementation copied and then locally edited — 1086 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (102 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (102 matched lines × 2 locations) apps/desktop/src/components/admin/MySqlDashboard.vue:32 — apps/desktop/src/components/admin/MySqlDashboard.vue:32 · apps/desktop/src/components/admin/PostgresDashboard.vue:29 — the two spans are one implementation copied and then locally edited — 1103 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (101 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (101 matched lines × 2 locations) apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 — apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 · apps/desktop/src/components/mq/rabbitmq/RabbitMqPoliciesPanel.vue:58 — the two spans are one implementation copied and then locally edited — 589 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (90 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (90 matched lines × 2 locations) apps/desktop/src/components/sidebar/TreeItem.vue:319 — apps/desktop/src/components/sidebar/TreeItem.vue:319 · apps/desktop/src/lib/sidebar/treeNodeIcon.ts:54 — the two spans are one implementation copied and then locally edited — 587 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 — apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 · apps/desktop/src/components/grid/DataGridTextSortWorkbench.vue:28 — the two spans are one implementation copied and then locally edited — 610 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (72 lines × 2 locations) · ×1
  • Duplicated block (72 lines × 2 locations) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1253 — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1253 · apps/desktop/src/lib/sql/sqlStatementRanges.ts:1487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (66 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (66 matched lines × 2 locations) apps/desktop/src/components/ui/LightDropdown.vue:107 — apps/desktop/src/components/ui/LightDropdown.vue:107 · apps/desktop/src/components/ui/LightDropdownMenu.vue:128 — the two spans are one implementation copied and then locally edited — 471 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (65 matched lines × 2 locations) apps/desktop/src/components/connection/ConnectionTreeSelect.vue:96 — apps/desktop/src/components/connection/ConnectionTreeSelect.vue:96 · apps/desktop/src/components/ui/searchable-select/SearchableSelect.vue:176 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (64 lines × 2 locations) · ×1
  • Duplicated block (64 lines × 2 locations) apps/desktop/src/lib/backend/http.ts:4391 — apps/desktop/src/lib/backend/http.ts:4391 · apps/desktop/src/lib/backend/tauri.ts:4528 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (62 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (62 matched lines × 2 locations) apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 — apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 · apps/desktop/src/components/mq/SendMessagePanel.vue:12 — the two spans are one implementation copied and then locally edited — 401 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (61 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (61 matched lines × 2 locations) apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 · apps/desktop/src/components/grid/GridSnapshotDialog.vue:29 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (61 lines × 2 locations) · ×1
  • Duplicated block (61 lines × 2 locations) apps/desktop/src/components/sidebar/ConnectionTree.vue:1447 — apps/desktop/src/components/sidebar/ConnectionTree.vue:1447 · apps/desktop/src/components/sidebar/ConnectionTree.vue:1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 — apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 · apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:27 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) apps/desktop/src/lib/sql/sqlFormatter.ts:633 — apps/desktop/src/lib/sql/sqlFormatter.ts:633 · apps/desktop/src/lib/sql/sqlFormatter.ts:1004 — the two spans are one implementation copied and then locally edited — 473 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (55 matched lines × 2 locations) apps/desktop/src/lib/sql/identifierSearch.ts:8 — apps/desktop/src/lib/sql/identifierSearch.ts:8 · apps/desktop/src/lib/sql/sqlCompletion.ts:7095 — the two spans are one implementation copied and then locally edited — 454 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 — apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 · apps/desktop/src/composables/useDataGridScrollbars.ts:44 — the two spans are one implementation copied and then locally edited — 260 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (52 lines × 2 locations) · ×1
  • Duplicated block (52 lines × 2 locations) apps/desktop/src/lib/backend/tauri.ts:393 — apps/desktop/src/lib/backend/tauri.ts:393 · apps/desktop/src/stores/settingsStore.ts:92 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) apps/desktop/src/components/generate/params/IdNumberParams.vue:37 — apps/desktop/src/components/generate/params/IdNumberParams.vue:37 · apps/desktop/src/lib/dataGrid/dataGenerate.ts:708 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×1
  • Duplicated block (48 lines × 2 locations) apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 · apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:43 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (47 matched lines × 2 locations) apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 — apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 · apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:370 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (47 lines × 2 locations) · ×1
  • Duplicated block (47 lines × 2 locations) apps/desktop/src/lib/backend/tauri.ts:6903 — apps/desktop/src/lib/backend/tauri.ts:6903 · apps/desktop/src/lib/backend/tauri.ts:6955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) apps/desktop/src/components/connection/ConnectionDialog.vue:7214 — apps/desktop/src/components/connection/ConnectionDialog.vue:7214 · apps/desktop/src/components/connection/TunnelProfileManager.vue:84 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) apps/desktop/src/lib/backend/http.ts:2944 — apps/desktop/src/lib/backend/http.ts:2944 · apps/desktop/src/lib/backend/tauri.ts:542 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R2 · Cyclomatic Complexity · Complex function executeTabSql (cyclomatic 661, cognitive 870) · ×1
  • Complex function executeTabSql (cyclomatic 661, cognitive 870) apps/desktop/src/stores/queryStore.ts:8415 — executeTabSql has cyclomatic complexity 661 and cognitive complexity 870; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyEditorSettingsPatch (cyclomatic 308, cognitive 329) · ×1
  • Complex function applyEditorSettingsPatch (cyclomatic 308, cognitive 329) apps/desktop/src/stores/settingsStore.ts:3117 — applyEditorSettingsPatch has cyclomatic complexity 308 and cognitive complexity 329; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function connectionConfigForSubmit (cyclomatic 289, cognitive 366) · ×1
  • Complex function connectionConfigForSubmit (cyclomatic 289, cognitive 366) apps/desktop/src/components/connection/ConnectionDialog.vue:5087 — connectionConfigForSubmit has cyclomatic complexity 289 and cognitive complexity 366; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function send (cyclomatic 241, cognitive 350) · ×1
  • Complex function send (cyclomatic 241, cognitive 350) apps/desktop/src/components/editor/AiAssistant.vue:4100 — send has cyclomatic complexity 241 and cognitive complexity 350; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toggle (cyclomatic 221, cognitive 241) · ×1
  • Complex function toggle (cyclomatic 221, cognitive 241) apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:1004 — toggle has cyclomatic complexity 221 and cognitive complexity 241; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function dispatch (cyclomatic 184, cognitive 287) · ×1
  • Complex function dispatch (cyclomatic 184, cognitive 287) REDACTED:664 — dispatch has cyclomatic complexity 184 and cognitive complexity 287; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeEditorSettings (cyclomatic 181, cognitive 171) · ×1
  • Complex function normalizeEditorSettings (cyclomatic 181, cognitive 171) apps/desktop/src/stores/settingsStore.ts:2081 — normalizeEditorSettings has cyclomatic complexity 181 and cognitive complexity 171; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetchCapturedTabResultForExport (cyclomatic 171, cognitive 242) · ×1
  • Complex function fetchCapturedTabResultForExport (cyclomatic 171, cognitive 242) apps/desktop/src/stores/queryStore.ts:11358 — fetchCapturedTabResultForExport has cyclomatic complexity 171 and cognitive complexity 242; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildObjectSidebarMenu (cyclomatic 149, cognitive 227) · ×1
  • Complex function buildObjectSidebarMenu (cyclomatic 149, cognitive 227) apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:8334 — buildObjectSidebarMenu has cyclomatic complexity 149 and cognitive complexity 227; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleKeydown (cyclomatic 136, cognitive 157) · ×1
  • Complex function handleKeydown (cyclomatic 136, cognitive 157) apps/desktop/src/App.vue:4831 — handleKeydown has cyclomatic complexity 136 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onGridKeydown (cyclomatic 129, cognitive 133) · ×1
  • Complex function onGridKeydown (cyclomatic 129, cognitive 133) apps/desktop/src/components/grid/DataGrid.vue:12005 — onGridKeydown has cyclomatic complexity 129 and cognitive complexity 133; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function refreshSqlPreview (cyclomatic 126, cognitive 182) · ×1
  • Complex function refreshSqlPreview (cyclomatic 126, cognitive 182) apps/desktop/src/components/structure/TableStructureEditor.vue:3511 — refreshSqlPreview has cyclomatic complexity 126 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function saveChanges (cyclomatic 126, cognitive 150) · ×1
  • Complex function saveChanges (cyclomatic 126, cognitive 150) apps/desktop/src/composables/useDataGridEditor.ts:2464 — saveChanges has cyclomatic complexity 126 and cognitive complexity 150; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function performAsyncCompletionWithResult (cyclomatic 123, cognitive 152) · ×1
  • Complex function performAsyncCompletionWithResult (cyclomatic 123, cognitive 152) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1700 — performAsyncCompletionWithResult has cyclomatic complexity 123 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function prepareOracleTypeManagement (cyclomatic 122, cognitive 203) · ×1
  • Complex function prepareOracleTypeManagement (cyclomatic 122, cognitive 203) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — prepareOracleTypeManagement has cyclomatic complexity 122 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function openData (cyclomatic 116, cognitive 114) · ×1
  • Complex function openData (cyclomatic 116, cognitive 114) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — openData has cyclomatic complexity 116 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildDefaultGeneratorParams (cyclomatic 109, cognitive 123) · ×1
  • Complex function buildDefaultGeneratorParams (cyclomatic 109, cognitive 123) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1343 — buildDefaultGeneratorParams has cyclomatic complexity 109 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ensureTreeLoadedForTarget (cyclomatic 109, cognitive 116) · ×1
  • Complex function ensureTreeLoadedForTarget (cyclomatic 109, cognitive 116) apps/desktop/src/components/sidebar/ConnectionTree.vue:1977 — ensureTreeLoadedForTarget has cyclomatic complexity 109 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getIconInfo (cyclomatic 109, cognitive 26) · ×1
  • Complex function getIconInfo (cyclomatic 109, cognitive 26) apps/desktop/src/components/sidebar/TreeItem.vue:278 — getIconInfo has cyclomatic complexity 109 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 107, cognitive 150) · ×1
  • Complex function (anonymous) (cyclomatic 107, cognitive 150) apps/desktop/src/components/connection/ConnectionDialog.vue:3320 — (anonymous) has cyclomatic complexity 107 and cognitive complexity 150; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadTreeNodeChildren (cyclomatic 107, cognitive 83) · ×1
  • Complex function loadTreeNodeChildren (cyclomatic 107, cognitive 83) apps/desktop/src/stores/connectionStore.ts:8971 — loadTreeNodeChildren has cyclomatic complexity 107 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function indentRoutineBlocks (cyclomatic 105, cognitive 104) · ×1
  • Complex function indentRoutineBlocks (cyclomatic 105, cognitive 104) apps/desktop/src/lib/sql/routineBlockLayout.ts:90 — indentRoutineBlocks has cyclomatic complexity 105 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function build (cyclomatic 101, cognitive 97) · ×1
  • Complex function build (cyclomatic 101, cognitive 97) apps/desktop/src/lib/sql/sqlCompletion.ts:2097 — build has cyclomatic complexity 101 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getSqlCompletionContext (cyclomatic 101, cognitive 71) · ×1
  • Complex function getSqlCompletionContext (cyclomatic 101, cognitive 71) apps/desktop/src/lib/sql/sqlCompletion.ts:3053 — getSqlCompletionContext has cyclomatic complexity 101 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadStructure (cyclomatic 98, cognitive 116) · ×1
  • Complex function loadStructure (cyclomatic 98, cognitive 116) apps/desktop/src/components/structure/TableStructureEditor.vue:4249 — loadStructure has cyclomatic complexity 98 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function splitSqlStatementRanges (cyclomatic 97, cognitive 196) · ×1
  • Complex function splitSqlStatementRanges (cyclomatic 97, cognitive 196) apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — splitSqlStatementRanges has cyclomatic complexity 97 and cognitive complexity 196; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function provideSqlCompletions (cyclomatic 96, cognitive 118) · ×1
  • Complex function provideSqlCompletions (cyclomatic 96, cognitive 118) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:871 — provideSqlCompletions has cyclomatic complexity 96 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function explainTabSql (cyclomatic 95, cognitive 188) · ×1
  • Complex function explainTabSql (cyclomatic 95, cognitive 188) apps/desktop/src/stores/queryStore.ts:10386 — explainTabSql has cyclomatic complexity 95 and cognitive complexity 188; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function queryResultTransferTargetType (cyclomatic 95, cognitive 164) · ×1
  • Complex function queryResultTransferTargetType (cyclomatic 95, cognitive 164) apps/desktop/src/components/transfer/queryResultTransferValues.ts:158 — queryResultTransferTargetType has cyclomatic complexity 95 and cognitive complexity 164; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function readOceanbasePrimaryKeySnapshot (cyclomatic 95, cognitive 94) · ×1
  • Complex function readOceanbasePrimaryKeySnapshot (cyclomatic 95, cognitive 94) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111 — readOceanbasePrimaryKeySnapshot has cyclomatic complexity 95 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getTreeNodeIconInfo (cyclomatic 95, cognitive 11) · ×1
  • Complex function getTreeNodeIconInfo (cyclomatic 95, cognitive 11) apps/desktop/src/lib/sidebar/treeNodeIcon.ts:10 — getTreeNodeIconInfo has cyclomatic complexity 95 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleQuickOpenSelect (cyclomatic 92, cognitive 100) · ×1
  • Complex function handleQuickOpenSelect (cyclomatic 92, cognitive 100) apps/desktop/src/App.vue:4194 — handleQuickOpenSelect has cyclomatic complexity 92 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onReloadData (cyclomatic 90, cognitive 130) · ×1
  • Complex function onReloadData (cyclomatic 90, cognitive 130) apps/desktop/src/composables/useDataGridActions.ts:319 — onReloadData has cyclomatic complexity 90 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseColumn (cyclomatic 89, cognitive 171) · ×1
  • Complex function parseColumn (cyclomatic 89, cognitive 171) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156 — parseColumn has cyclomatic complexity 89 and cognitive complexity 171; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function executeOracleConstraintPlan (cyclomatic 88, cognitive 117) · ×1
  • Complex function executeOracleConstraintPlan (cyclomatic 88, cognitive 117) apps/desktop/src/lib/database/oracleConstraints.ts:720 — executeOracleConstraintPlan has cyclomatic complexity 88 and cognitive complexity 117; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function drawCanvasDataGrid (cyclomatic 88, cognitive 115) · ×1
  • Complex function drawCanvasDataGrid (cyclomatic 88, cognitive 115) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:442 — drawCanvasDataGrid has cyclomatic complexity 88 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 86, cognitive 158) · ×1
  • Complex function (anonymous) (cyclomatic 86, cognitive 158) apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:136 — (anonymous) has cyclomatic complexity 86 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function transfer (cyclomatic 86, cognitive 112) · ×1
  • Complex function transfer (cyclomatic 86, cognitive 112) apps/desktop/src/components/transfer/QueryResultTransferDialog.vue:284 — transfer has cyclomatic complexity 86 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runSchemaDiffSession (cyclomatic 86, cognitive 107) · ×1
  • Complex function runSchemaDiffSession (cyclomatic 86, cognitive 107) apps/desktop/src/composables/useSchemaDiffSession.ts:164 — runSchemaDiffSession has cyclomatic complexity 86 and cognitive complexity 107; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function findSqlParameterOccurrences (cyclomatic 85, cognitive 127) · ×1
  • Complex function findSqlParameterOccurrences (cyclomatic 85, cognitive 127) apps/desktop/src/lib/sql/sqlParameters.ts:429 — findSqlParameterOccurrences has cyclomatic complexity 85 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · apps/desktop/src/components/grid/DataGrid.vue · ×1
  • apps/desktop/src/components/grid/DataGrid.vue: 17707 lines of code apps/desktop/src/components/grid/DataGrid.vue:1 — apps/desktop/src/components/grid/DataGrid.vue has 17707 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 14410 lines of code REDACTED:1 — REDACTED has 14410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 14403 lines of code REDACTED:1 — REDACTED has 14403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 14370 lines of code REDACTED:1 — REDACTED has 14370 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/EditorSettingsDialog.vue · ×1
  • apps/desktop/src/components/editor/EditorSettingsDialog.vue: 14187 lines of code apps/desktop/src/components/editor/EditorSettingsDialog.vue:1 — apps/desktop/src/components/editor/EditorSettingsDialog.vue has 14187 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13747 lines of code REDACTED:1 — REDACTED has 13747 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13728 lines of code REDACTED:1 — REDACTED has 13728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13712 lines of code REDACTED:1 — REDACTED has 13712 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13662 lines of code REDACTED:1 — REDACTED has 13662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/i18n/locales/ko.ts · ×1
  • apps/desktop/src/i18n/locales/ko.ts: 13204 lines of code apps/desktop/src/i18n/locales/ko.ts:1 — apps/desktop/src/i18n/locales/ko.ts has 13204 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12545 lines of code REDACTED:1 — REDACTED has 12545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12495 lines of code REDACTED:1 — REDACTED has 12495 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/connectionStore.ts · ×1
  • apps/desktop/src/stores/connectionStore.ts: 11609 lines of code apps/desktop/src/stores/connectionStore.ts:1 — apps/desktop/src/stores/connectionStore.ts has 11609 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/i18n/locales/az.ts · ×1
  • apps/desktop/src/i18n/locales/az.ts: 11601 lines of code apps/desktop/src/i18n/locales/az.ts:1 — apps/desktop/src/i18n/locales/az.ts has 11601 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/queryStore.ts · ×1
  • apps/desktop/src/stores/queryStore.ts: 11592 lines of code apps/desktop/src/stores/queryStore.ts:1 — apps/desktop/src/stores/queryStore.ts has 11592 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 11500 lines of code REDACTED:1 — REDACTED has 11500 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/connection/ConnectionDialog.vue · ×1
  • apps/desktop/src/components/connection/ConnectionDialog.vue: 11374 lines of code apps/desktop/src/components/connection/ConnectionDialog.vue:1 — apps/desktop/src/components/connection/ConnectionDialog.vue has 11374 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/structure/TableStructureEditor.vue · ×1
  • apps/desktop/src/components/structure/TableStructureEditor.vue: 10287 lines of code apps/desktop/src/components/structure/TableStructureEditor.vue:1 — apps/desktop/src/components/structure/TableStructureEditor.vue has 10287 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue · ×1
  • apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue: 8909 lines of code apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue:1 — apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue has 8909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/AiAssistant.vue · ×1
  • apps/desktop/src/components/editor/AiAssistant.vue: 7898 lines of code apps/desktop/src/components/editor/AiAssistant.vue:1 — apps/desktop/src/components/editor/AiAssistant.vue has 7898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/objects/ObjectBrowser.vue · ×1
  • apps/desktop/src/components/objects/ObjectBrowser.vue: 7679 lines of code apps/desktop/src/components/objects/ObjectBrowser.vue:1 — apps/desktop/src/components/objects/ObjectBrowser.vue has 7679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/sql/sqlCompletion.ts · ×1
  • apps/desktop/src/lib/sql/sqlCompletion.ts: 6829 lines of code apps/desktop/src/lib/sql/sqlCompletion.ts:1 — apps/desktop/src/lib/sql/sqlCompletion.ts has 6829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/backend/tauri.ts · ×1
  • apps/desktop/src/lib/backend/tauri.ts: 6239 lines of code apps/desktop/src/lib/backend/tauri.ts:1 — apps/desktop/src/lib/backend/tauri.ts has 6239 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/App.vue · ×1
  • apps/desktop/src/App.vue: 5940 lines of code apps/desktop/src/App.vue:1 — apps/desktop/src/App.vue has 5940 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/backend/http.ts · ×1
  • apps/desktop/src/lib/backend/http.ts: 5226 lines of code apps/desktop/src/lib/backend/http.ts:1 — apps/desktop/src/lib/backend/http.ts has 5226 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/redis/RedisKeyBrowser.vue · ×1
  • apps/desktop/src/components/redis/RedisKeyBrowser.vue: 4522 lines of code apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — apps/desktop/src/components/redis/RedisKeyBrowser.vue has 4522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/layout/ContentArea.vue · ×1
  • apps/desktop/src/components/layout/ContentArea.vue: 4012 lines of code apps/desktop/src/components/layout/ContentArea.vue:1 — apps/desktop/src/components/layout/ContentArea.vue has 4012 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/redis/RedisValueViewer.vue · ×1
  • apps/desktop/src/components/redis/RedisValueViewer.vue: 3997 lines of code apps/desktop/src/components/redis/RedisValueViewer.vue:1 — apps/desktop/src/components/redis/RedisValueViewer.vue has 3997 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/nacos/NacosAdminConsole.vue · ×1
  • apps/desktop/src/components/nacos/NacosAdminConsole.vue: 3788 lines of code apps/desktop/src/components/nacos/NacosAdminConsole.vue:1 — apps/desktop/src/components/nacos/NacosAdminConsole.vue has 3788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/settingsStore.ts · ×1
  • apps/desktop/src/stores/settingsStore.ts: 3491 lines of code apps/desktop/src/stores/settingsStore.ts:1 — apps/desktop/src/stores/settingsStore.ts has 3491 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/QueryEditor.vue · ×1
  • apps/desktop/src/components/editor/QueryEditor.vue: 3372 lines of code apps/desktop/src/components/editor/QueryEditor.vue:1 — apps/desktop/src/components/editor/QueryEditor.vue has 3372 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/document/DocumentBrowser.vue · ×1
  • apps/desktop/src/components/document/DocumentBrowser.vue: 3333 lines of code apps/desktop/src/components/document/DocumentBrowser.vue:1 — apps/desktop/src/components/document/DocumentBrowser.vue has 3333 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/sidebar/ConnectionTree.vue · ×1
  • apps/desktop/src/components/sidebar/ConnectionTree.vue: 3285 lines of code apps/desktop/src/components/sidebar/ConnectionTree.vue:1 — apps/desktop/src/components/sidebar/ConnectionTree.vue has 3285 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/composables/useDataGridExport.ts · ×1
  • apps/desktop/src/composables/useDataGridExport.ts: 3062 lines of code apps/desktop/src/composables/useDataGridExport.ts:1 — apps/desktop/src/composables/useDataGridExport.ts has 3062 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/types/database.ts · ×1
  • apps/desktop/src/types/database.ts: 2954 lines of code apps/desktop/src/types/database.ts:1 — apps/desktop/src/types/database.ts has 2954 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/composables/useDataGridEditor.ts · ×1
  • apps/desktop/src/composables/useDataGridEditor.ts: 2873 lines of code apps/desktop/src/composables/useDataGridEditor.ts:1 — apps/desktop/src/composables/useDataGridEditor.ts has 2873 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/sql/sqlStatementRanges.ts · ×1
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts: 2809 lines of code apps/desktop/src/lib/sql/sqlStatementRanges.ts:1 — apps/desktop/src/lib/sql/sqlStatementRanges.ts has 2809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/import/TableImportDialog.vue · ×1
  • apps/desktop/src/components/import/TableImportDialog.vue: 2693 lines of code apps/desktop/src/components/import/TableImportDialog.vue:1 — apps/desktop/src/components/import/TableImportDialog.vue has 2693 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/layout/EditorGroupTabBar.vue · ×1
  • apps/desktop/src/components/layout/EditorGroupTabBar.vue: 2497 lines of code apps/desktop/src/components/layout/EditorGroupTabBar.vue:1 — apps/desktop/src/components/layout/EditorGroupTabBar.vue has 2497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2409 lines of code REDACTED:1 — REDACTED has 2409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~502 LoC) · ×1
  • Dead file (~502 LoC) REDACTED — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~208 LoC) · ×1
  • Dead file (~208 LoC) REDACTED — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~161 LoC) · ×1
  • Dead file (~161 LoC) REDACTED — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~146 LoC) · ×1
  • Dead file (~146 LoC) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~130 LoC) · ×1
  • Dead file (~130 LoC) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~95 LoC) · ×1
  • Dead file (~95 LoC) scripts/check-mq-integration.mjs — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~44 LoC) · ×1
  • Dead file (~44 LoC) apps/desktop/src/lib/debug/plDebugWatch.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~16 LoC) · ×1
  • Dead file (~16 LoC) apps/desktop/src/lib/diagram/diagramZoom.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) apps/desktop/src/lib/app/pinnedTreeNodeIds.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~9 LoC) · ×1
  • Dead file (~9 LoC) scripts/release-node-packages.mjs — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~7 LoC) · ×1
  • Dead file (~7 LoC) apps/desktop/src/lib/history/historyActions.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~2 LoC) · ×1
  • Dead file (~2 LoC) apps/desktop/src/components/ui/date-time-picker/index.ts — no import path from any entry point (97 application, 21 tooling, 2353 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@oxfmt/binding-darwin-arm64' · ×1
  • Unused dependency '@oxfmt/binding-darwin-arm64' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@oxlint/binding-darwin-arm64' · ×1
  • Unused dependency '@oxlint/binding-darwin-arm64' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'daisyui' · ×1
  • Unused dependency 'daisyui' — Declared in plugins/sdk/dev-host/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity docs/app/[lang]/layout.tsx:66 — `https://analytics.unihub.top/script.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
X1 · Async correctness · Blocking `thread · ×1
  • Blocking `thread::sleep` inside an `async` body REDACTED:1847 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
X28 · Index access outside its own emptiness guard · Index access outside its own emptiness guard · ×1
  • Index access outside its own emptiness guard agents/drivers/oracle-go/pldebug_legacy_declarations.go:102 — This condition tests `tokens` for emptiness and then indexes it on a branch that test does not reach. `tokens[0].Quoted` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `tokens` being empty — so an empty `tokens` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `tokens[1].word(" ")` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `tokens` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `tokens`.
Minor — 368 finding(s)
D10 · Test Quality · Mock-dominated test · ×108
  • Mock-dominated test: skips the substring lookup when the prefix search fills the result budget or the filter is short apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:494 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: normalizes unquoted Oracle aliases while preserving quoted case before catalog lookup apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:1098 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: prefers an explicit SQL Server routine schema over the current default schema apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:1962 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the bounded fuzzy-search budget for external catalog tables apps/desktop/src/stores/__tests__/connectionStore.dorisCatalog.spec.ts:130 — This test sets up 7 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not fetch object DDL or column metadata during a connection refresh apps/desktop/src/stores/__tests__/connectionStore.refresh.spec.ts:518 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: immediate %s waits beyond the pool timeout for retirement and prompts even with stale status apps/desktop/src/stores/__tests__/connectionStore.savePassword.spec.ts:315 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: migrates historical disabled-encryption configs and installs the legacy component apps/desktop/src/stores/__tests__/connectionStore.sqlserverLegacy.spec.ts:44 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reconnects persisted legacy profiles without reinstalling an installed component apps/desktop/src/stores/__tests__/connectionStore.sqlserverLegacy.spec.ts:72 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: covers functions with the same flow apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:98 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: leaves a plain query tab alone, so CREATE keeps its normal semantics there apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:110 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: leaves scripts with other statements and other routines to run exactly as written apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:122 — This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not apply to non-routine source tabs or other databases apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:136 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: still runs the statement when the backend cannot build the replace sequence apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:162 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: continues from update all into the prepared app install apps/desktop/src/lib/updates/__tests__/componentUpdateOrchestration.spec.ts:190 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: falls back to component updates without restarting when the restart plan cannot be persisted apps/desktop/src/lib/updates/__tests__/componentUpdateOrchestration.spec.ts:226 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: allows only a metadata DDL export to carry its same-target state appendix apps/desktop/src/lib/table/__tests__/objectSourceLoad.spec.ts:141 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reports a missing workbench explicitly without falling back to the backend apps/desktop/src/lib/plugins/pluginContext.spec.ts:142 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: cancels unfinished native downloads when the workbench is disposed apps/desktop/src/lib/plugins/pluginHostBridge.spec.ts:167 — This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: cancels active streams when the workbench is disposed apps/desktop/src/lib/plugins/pluginHostBridge.spec.ts:2386 — This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: dispatches query and special-page entries to their handlers apps/desktop/src/lib/navigation/__tests__/globalNavigationExecutor.spec.ts:5 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: writes only the path the save dialog just returned, after stamping the suggested name apps/desktop/src/lib/docs/__tests__/saveDataDictionaryFile.spec.ts:20 — This test sets up 3 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the document body when no dialog is active apps/desktop/src/lib/common/__tests__/clipboard.spec.ts:44 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: passes the %s-second override through both adapters, including unlimited apps/desktop/src/lib/backend/__tests__/getExplainInfo.spec.ts:75 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: filters query messages by execution and returns listener cleanup apps/desktop/src/lib/backend/__tests__/queryMessagesStreaming.spec.ts:7 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: serializes zoom IPC and only publishes the newest completed target apps/desktop/src/lib/app/__tests__/uiScaleApplyQueue.spec.ts:15 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 7 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • + 83 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate agents/drivers/argo-go/metadata.go:436 — `!acceptsHiveTable(constraints.ObjectTypes) && !(server.supportsRoutines() && acceptsHiveRoutine(constraints.ObjectTypes))` appears character-identically in 2 files — agents/drivers/argo-go/metadata.go, agents/drivers/hive-go/metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_breakpoint.go:160 — `!e.closeRequested && (unknown || e.targetReturned)` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_breakpoint.go, agents/drivers/oracle-go/pldebug_frame_value.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:950 — `!kerberos.UseTicketCache && !kerberos.UseKeytab && (kerberos.ClientPrincipal == "" || kerberos.Password == "")` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:925 — `!kerberos.UseTicketCache && kerberos.CCachePath == ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1457 — `!ok || !strings.EqualFold(strings.TrimSpace(key), "sslmode")` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2826 — `!source.Valid || strings.TrimSpace(source.String) == ""` appears character-identically in 2 files — REDACTED, agents/drivers/kingbase-go/routine_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/query.go:287 — `!state.lastAccessed.IsZero() && now.Sub(state.lastAccessed) >= querySessionIdleTime` appears character-identically in 2 files — agents/drivers/argo-go/query.go, agents/drivers/hive-go/query.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_frame_value.go:96 — `!stop.StackDepth.Valid || stop.StackDepth.Int64 <= 0 || int64(request.Frame) >= stop.StackDepth.Int64` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_frame_value.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:736 — `!strings.EqualFold(config.Auth, "DELEGATIONTOKEN") && !strings.EqualFold(config.Auth, "DELEGATION_TOKEN")` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:866 — `!strings.HasPrefix(trimmed, "-D") || !found` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1066 — `!typdefaultbin.Valid || typdefaultbin.String == ""` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2549 — `!validatedUnsupported && isUndefinedColumn(err, "convalidated")` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/kv.go:249 — `(hasLease && hasTtl) || (preserveLease && (hasLease || hasTtl))` appears character-identically in 2 files — agents/drivers/etcd-go/kv.go, agents/drivers/etcd2-go/kv.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_target.go:832 — `a.Type == "DATE" || a.Type == "TIMESTAMP"` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_target.go, agents/drivers/oracle-go/pldebug_target_invoke.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/connector.go:154 — `attempt+1 < connector.retries && connector.retryInterval > 0` appears character-identically in 2 files — agents/drivers/argo-go/connector.go, agents/drivers/hive-go/connector.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/main.go:70 — `bytes < 0 || s.watchBufferedBytes+bytes > maxSessionWatchBufferBytes` appears character-identically in 2 files — agents/drivers/etcd-go/main.go, agents/drivers/etcd2-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/auth.go:161 — `candidate.end == "" || rangeStartAtOrAfterEnd(candidate.start, candidate.end)` appears character-identically in 2 files — agents/drivers/etcd-go/auth.go, agents/drivers/etcd-go/kv.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_anonymous_source.go:100 — `capture != nil && capture.ReferencesPending` appears character-identically in 4 files — agents/drivers/oracle-go/pldebug_anonymous_source.go, agents/drivers/oracle-go/pldebug_entry.go, REDACTED, agents/drivers/oracle-go/pldebug_stack.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1703 — `char == '_' || char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char >= '0' && char <= '9'` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1956 — `char == 0 || char < 0x09 || char > 0x0d && char < 0x20` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2962 — `column.Comment == nil || strings.TrimSpace(*column.Comment) == ""` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:3016 — `comment.Valid && strings.TrimSpace(comment.String) != ""` appears character-identically in 3 files — REDACTED, REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:186 — `config.Database == "" && parsed.database != ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:192 — `config.Password == "" && parsed.password != ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:989 — `config.UseKeytab || parseJAASBool(value)` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel REDACTED:98 — `REDACTED` reports through `console.*` at line 98 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:125 — `REDACTED` reports through `console.*` at line 125 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:384 — `REDACTED` reports through `console.*` at line 384 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:460 — `REDACTED` reports through `console.*` at line 460 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:498 — `REDACTED` reports through `console.*` at line 498 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:799 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 799 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:879 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 879 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:991 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 991 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts:67 — `apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:216 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 216 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:598 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 598 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:667 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 667 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:742 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 742 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:754 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 754 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:909 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 909 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/errorPosition.ts:51 — `apps/desktop/src/lib/sql/errorPosition.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlHighlighter.ts:33 — `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlHighlighter.ts:48 — `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlRichText.ts:62 — `apps/desktop/src/lib/sql/sqlRichText.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:735 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:738 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 738 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:783 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 783 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:789 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 789 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:793 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 793 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:804 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 804 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×25
  • Orphaned file apps/desktop/src/lib/diagram/edge-obstacle-router.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/dbx-core/src/data/sqlite_backup.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/mq/rocketmqTraceUtils.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/document/gridFsBrowser.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/editor/semanticSelectionRanges.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/editor/plainTextSelectionRanges.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/diagram/layer-store.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/mqtt/mqttPayloadCodec.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/mq/rocketmqMessageUtils.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/query/queryResultArchive.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/diagram/match-engine.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/diagram/size-layer.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/diagram/graph-store.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/savedSql/savedSqlHistory.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file agents/common/src/main/java/com/dbx/agent/JdbcDatabaseInfo.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/diagram/diagram-dialect-adapter.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/editor/queryEditorExtendSelection.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/stores/productionSafetyStore.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/types/diagram.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/dbx-drivers/src/db/cloudflare_d1/trigger.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/mq/rocketmqTopicTypes.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X7 · Silent fallback defaults · Silent fallback default in catch · ×12
  • Silent fallback default in catch agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:595 — `connectionUrl` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:548 — `resolveIdentifierQuote` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:6560 — `bitColumnPrecision` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:6525 — `columnTypeName` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:2855 — `statementPrintMessages` swallows every exception into `return List.of()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:2794 — `triggerColumnText` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:1415 — `currentCatalog` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:1042 — `queryDatabaseNamesFromSysmaster` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:614 — `authorizedDatabaseNames` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:301 — `listForeignKeys` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:734 — `configuredDatabaseName` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:639 — `spannerIndexTypes` swallows every exception into `return Collections.emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default on error · ×11
  • Silent fallback default on error REDACTED:380 — `endpointHost` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:444 — `endpointHost` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error agents/drivers/kingbase-go/bench/agent_compare.go:333 — `readRSSKB` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error agents/drivers/kingbase-go/main.go:1107 — `columnTypeNames` turns a non-nil `err` into `return []string{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:4514 — `oracleExplainPlanTableName` turns a non-nil `err` into `return "PLAN_TABLE"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:5197 — `columnTypeNames` turns a non-nil `err` into `return []string{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:477 — `readRSSKB` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error agents/drivers/vastbase-go/bench/agent_compare.go:728 — `readRSSKB` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error agents/drivers/vastbase-go/bench/agent_compare.go:746 — `fileSize` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error agents/drivers/vastbase-go/main.go:979 — `columnTypeNames` turns a non-nil `err` into `return []string{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:4214 — `columnTypeNames` turns a non-nil `err` into `return []string{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×11
  • Subsumed condition operand src-tauri/src/commands/keychain.rs:38 — `stderr.contains("The specified item could not be found")` can never decide this `||` — every value satisfying `stderr.contains("The specified item could not be found")` also satisfies `stderr.contains("could not be found")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:6515 — `normalized.startsWith("bit varying")` can never decide this `||` — every value satisfying `normalized.startsWith("bit varying")` also satisfies `normalized.startsWith("bit ")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-sql-schema/src/table_structure_sql/validation.rs:213 — `lower.starts_with("character varying")` can never decide this `||` — every value satisfying `lower.starts_with("character varying")` also satisfies `lower.starts_with("character")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-driver-mysql/src/mysql.rs:3015 — `lower.contains("this command is not supported in the prepared statement protocol yet")` can never decide this `||` — every value satisfying `lower.contains("this command is not supported in the prepared statement protocol yet")` also satisfies `lower.contains("prepared statement protocol")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-core/tests/live_mongodb_legacy_agent_commands.rs:266 — `missing.contains("ns not found")` can never decide this `||` — every value satisfying `missing.contains("ns not found")` also satisfies `missing.contains("not found")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-core/src/persistence/cloud_sync.rs:2513 — `normalized.contains("clientsecret")` can never decide this `||` — every value satisfying `normalized.contains("clientsecret")` also satisfies `normalized.contains("secret")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-ai-provider/src/ai_codex_cli.rs:1018 — `lower.contains("the filename or extension is too long")` can never decide this `||` — every value satisfying `lower.contains("the filename or extension is too long")` also satisfies `lower.contains("filename or extension is too long")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-ai-provider/src/ai_codex_cli.rs:1023 — `lower.contains("not authenticated")` can never decide this `||` — every value satisfying `lower.contains("not authenticated")` also satisfies `lower.contains("auth")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:519 — `strings.HasPrefix(topic, "%RETRY%")` can never decide this `||` — every value satisfying `strings.HasPrefix(topic, "%RETRY%")` also satisfies `strings.HasPrefix(topic, "%R")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:522 — `strings.HasPrefix(topic, "%DLQ%")` can never decide this `||` — every value satisfying `strings.HasPrefix(topic, "%DLQ%")` also satisfies `strings.HasPrefix(topic, "%D")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand .github/scripts/label-pull-request.mjs:126 — `file.startsWith("packages/mcp-server/")` can never decide this `||` — every value satisfying `file.startsWith("packages/mcp-server/")` also satisfies `file.startsWith("packages/mcp-")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D16 · Bus Factor · Off-boarding risk · ×9
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 35 significant file(s) lose their only recent owner: agents/drivers/duckdb/src/schema.rs, REDACTED, src-tauri/src/commands/mcp_native_installation.rs, crates/dbx-core/src/host/update.rs, crates/dbx-plugin-runtime/src/plugins/filesystem.rs, apps/desktop/src/lib/sql/cypherFormatter.ts, src-tauri/src/plugin_ui_protocol.rs, REDACTED (+27 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 16 significant file(s) lose their only recent owner: crates/dbx-sql-data/src/data_grid_iotdb_sql.rs, apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts, apps/desktop/src/lib/dataGrid/dataGridForeignKeyDisplay.ts, apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts, apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts, apps/desktop/src/lib/database/damengJobAdmin.ts, apps/desktop/src/lib/updates/componentUpdateOrchestration.ts, apps/desktop/src/composables/useMqTopicColumnResize.ts (+8 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 10 significant file(s) lose their only recent owner: crates/dbx-core/src/admin/nacos/namespace_access.rs, crates/dbx-core/src/admin/nacos/search.rs, src-tauri/src/commands/mcp_http_server.rs, apps/desktop/src/composables/useDatabaseTableEmpty.ts, src-tauri/src/commands/nacos_cmd.rs, apps/desktop/src/lib/backend/nacos-tauri.ts, apps/desktop/src/types/meilisearchManagement.ts, crates/dbx-core/src/admin/nacos/port.rs (+2 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 6 significant file(s) lose their only recent owner: apps/desktop/src/lib/database/xuguServerStatus.ts, agents/drivers/xugu/protocol_error.go, apps/desktop/src/lib/sidebar/xuguTablespaces.ts, apps/desktop/src/lib/database/xuguProcessList.ts, apps/desktop/src/lib/sidebar/xuguTypeMembers.ts, apps/desktop/src/lib/sidebar/xuguPublicSynonyms.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 6 significant file(s) lose their only recent owner: apps/desktop/src/lib/ai/aiConversationBinding.ts, apps/desktop/src/lib/ai/aiConversationPicker.ts, apps/desktop/src/lib/ai/aiConversationPickerState.ts, apps/desktop/src/lib/ai/richContent/aiRichContent.ts, apps/desktop/src/lib/ai/userSkillSelection.ts, apps/desktop/src/stores/userSkillStore.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: apps/desktop/src/lib/sql/functionSignatures/oracle.ts, apps/desktop/src/lib/sql/functionSignatures/postgres.ts, apps/desktop/src/lib/sql/functionSignatures/hiveSpark.ts, apps/desktop/src/lib/sql/functionSignatures/trino.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/desktop/src/lib/database/oracleConstraints.ts, crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs, apps/desktop/src/lib/dataGrid/largeValueSnapshot.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/desktop/src/lib/graph/graphResult.ts, apps/desktop/src/lib/neo4j/neo4jNodeResult.ts, agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2FileConnections.java. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/desktop/src/lib/plugins/pluginFieldConditions.ts, apps/desktop/src/lib/plugins/pluginBottomDock.ts, apps/desktop/src/lib/plugins/pluginAppearance.ts. Pair on, review, or document these before any departure.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Pending state with no failure state · ×8
  • Pending state with no failure state apps/desktop/src/components/settings/SettingsTransferPanel.vue:265 — The view draws `<Loader2 v-if="exporting" class="mr-1 h-3.5 w-3.5 animate-spin" />` under `exporting`, but `exporting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/settings/SettingsTransferPanel.vue:270 — The view draws `<Loader2 v-if="importing" class="mr-1 h-3.5 w-3.5 animate-spin" />` under `importing`, but `importing` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/redis/RedisSlowlogPanel.vue:160 — The view draws `<Loader2 v-if="loading" class="size-3.5 animate-spin" />` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/redis/RedisSlowlogPanel.vue:211 — The view draws `<div v-if="loading" class="absolute inset-0 flex items-center justify-center bg-background/60 z-10">` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/layout/SqlLibraryPanel.vue:1927 — The view draws `<Loader2 v-if="changingTarget" class="mr-1.5 h-3.5 w-3.5 animate-spin" />` under `changingTarget`, but `changingTarget` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:2306 — The view draws `{{ loadingText }}` under `loadingDiagram && tables.length === 0`, but `loadingDiagram` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/debug/PlDebugSourceEditor.vue:288 — The view draws `{{ t("plDebug.source.loading") }}` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/desktop/src/components/common/ToastHost.vue:14 — The view draws `{{ entry.message }} {{ entry.action.label }}` under `persistentMessages.length`, but `persistentMessages` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
X7 · Silent fallback defaults · Silent fallback default on Err · ×8
  • Silent fallback default on Err agents/drivers/duckdb/src/query.rs:704 — `duckdb_execute_with_max_rows` turns every `Err` into `"?".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err agents/drivers/duckdb/src/schema.rs:405 — `duckdb_column_comments` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai.rs:3587 — `parse_retry_after_secs` turns every `Err` into `Some(0)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:58 — `toml_string` turns every `Err` into `"\"\"".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:373 — `parse_codex_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:531 — `parse_claude_compatible_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:668 — `parse_open_code_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:759 — `parse_cursor_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
ED3 · Event naming · Event not named in past tense · ×7
  • Event not named in past tense: benchmarkMetadata REDACTED:59 — `benchmarkMetadata` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: rpcError REDACTED:51 — `rpcError` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: AgentEvent crates/dbx-ai-provider/src/agent_events.rs:8 — `AgentEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: ReloadEvent crates/dbx-sql-dialect/src/sql_dialect/hot_reload.rs:28 — `ReloadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: DownloadEvent vendor/tauri-plugin-updater/src/commands.rs:16 — `DownloadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: PageLoadEvent vendor/wry/src/lib.rs:2562 — `PageLoadEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
  • Event not named in past tense: SidebarLayoutMonitorEvent apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:128 — `SidebarLayoutMonitorEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
X4 · Structured logging · Interpolated log message defeats structured logging · ×7
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1655 — `info!` at line 1655 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1657 — `info!` at line 1657 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1665 — `info!` at line 1665 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1685 — `error!` at line 1685 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1692 — `error!` at line 1692 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1712 — `error!` at line 1712 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1733 — `error!` at line 1733 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
D19 · Documentation Quality · Documentation · ×6
  • Documentation: no build, run or usage example packages/mcp-darwin-arm64/README.md:1 — `mcp-darwin-arm64` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-darwin-arm64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/mcp-darwin-x64/README.md:1 — `mcp-darwin-x64` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-darwin-x64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/mcp-linux-arm64-gnu/README.md:1 — `mcp-linux-arm64-gnu` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-linux-arm64-gnu/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/mcp-linux-x64-gnu/README.md:1 — `mcp-linux-x64-gnu` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-linux-x64-gnu/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/mcp-win32-arm64/README.md:1 — `mcp-win32-arm64` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-win32-arm64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/mcp-win32-x64/README.md:1 — `mcp-win32-x64` is a command-line package (`bin` in `package.json`) and neither `packages/mcp-win32-x64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D24 · Comment Value · redundant comment · ×5
  • redundant comment apps/desktop/src/composables/useQuickOpen.ts:688 — "Materialized view nodes" repeats the code it sits on: 3 of its 3 words (materialized, view, nodes) are already in `if (node.type === "materialized_view" && node.database && node.label)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment apps/desktop/src/composables/useQuickOpen.ts:768 — "Package-body nodes" repeats the code it sits on: 3 of its 3 words (package, body, nodes) are already in `if (node.type === "package-body" && node.database && node.label)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment apps/desktop/src/lib/backend/api.ts:623 — "Table File Import" repeats the code it sits on: 3 of its 3 words (table, file, import) are already in `export const previewTableImportFile = forward("previewTableImportFile");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment apps/desktop/src/lib/dataGrid/geometryPreview.ts:119 — "group.children contains ring groups" repeats the code it sits on: 4 of its 5 words (group, children, ring, groups) are already in `const rings = group.children.length > 0 ? group.children : [group];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment apps/desktop/src/lib/sql/sqlCompletion.ts:3110 — "Detect INSERT INTO table (column list) context" repeats the code it sits on: 5 of its 6 words (detect, insert, column, list, context) are already in `const insertInfo = detectInsertColumnListContext(beforeCursor);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: EditorToolbarActions (32 required operations) apps/desktop/src/components/layout/editorToolbarActions.ts:23 — `EditorToolbarActions` declares 32 required operations: `newQuery`, `databaseRequiredSignalFor`, `connectionRequiredSignalFor`, `captureExecutionSnapshot`, `toolbarExecute`, `toolbarExecuteAll`, `toolbarExecuteInNewResultTab`, `cancelExecution`, `explain`, `formatSql`, `compressSql`, `toggleSqlKeywordCase`, `saveSql`, `saveRoutineToDatabase`, `saveAllTabs`, `openSqlFile`, `importResultArchive`, `pasteSqlInCondition`, `multiExecute`, `previewChanges`, `changeConnection`, `changeCatalog`, `changeDatabase`, `changeSchema`, `setDefaultDatabase`, `clearDefaultDatabase`, `activateSettingsPage`, `closeSettingsPage`, `activateDriverStore`, `closeDriverStore`, `activatePluginCenter`, `closePluginCenter`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: QueryEditorSurfaceHandle (24 required operations) apps/desktop/src/components/layout/querySurfaces.ts:15 — `QueryEditorSurfaceHandle` declares 24 required operations: `focusSqlEditor`, `focusSearch`, `focusWhere`, `openGoToColumn`, `refreshData`, `toggleResultsPane`, `refreshQueryEditorCompletionCache`, `handleModRTarget`, `requestQueryEditorExecute`, `requestQueryEditorExecuteAll`, `captureQueryEditorExecutionSnapshot`, `requestQueryEditorExecuteInNewResultTab`, `requestQueryEditorPreviewChanges`, `shouldBlockQueryEditorExecutionShortcut`, `cancelQueryEditorExecutionViewport`, `acceptQueryEditorExecutionViewport`, `pasteClipboardAsSqlInCondition`, `applyTableStructureChanges`, `insertRedisCommand`, `executeRedisCommand`, `isRedisConsoleReady`, `previewStatementRange`, `focusStatementRange`, `focusErrorPosition`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: UseDataGridLargeValuesOptions (18 required operations) apps/desktop/src/composables/useDataGridLargeValues.ts:52 — `UseDataGridLargeValuesOptions` declares 18 required operations: `gridScrollerElement`, `displayItemAt`, `getRowItem`, `tableColumnForGridColumn`, `formatCell`, `formatCellCached`, `scheduleCanvasDraw`, `clearCellFormatCache`, `invalidateResultEstimate`, `connectionIdentifierQuote`, `getConnectionConfig`, `uuid`, `translate`, `translateBackendError`, `appendDebugLog`, `toast`, `cloneRow`, `cloneRows`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D21 · Naming Consistency · `ServiceID` spells `ID` where 2602 names in the project spell it `Id` · ×2
  • `ServiceID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:476 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `ServiceId`. [rule N6]
  • `ServiceID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:520 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `ServiceId`. [rule N6]
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×2
  • REDACTED
  • REDACTED
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×2
  • Hand-rolled JSON/XML parsing via regex apps/desktop/src/lib/model/modelCodeHighlighter.ts:37 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex apps/desktop/src/lib/ai/aiCodeHighlighter.ts:89 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 29 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (121 single-owned of 1855 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1855 of the 2665 production source files in this repository met that bar). They are anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)) (+23 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: REDACTED, crates/dbx-formats/src/sql_file_zip_package.rs, apps/desktop/src/lib/sidebar/sidebarLargeSchema.bench.ts, crates/dbx-tauri-consul/src/lib.rs, apps/desktop/src/lib/connection/connectionPickerTree.ts, apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts, apps/desktop/src/lib/sidebar/elasticsearchIndexActions.ts, apps/desktop/src/lib/mongo/mongoQueryResultEditing.ts (+27 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found package.json:8 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `package.json` makes this repository a deployable product (line 8).
D21 · Naming Consistency · `genTSInsertRecordReq` spells `TS` where 24 names in the project spell it `Ts` · ×1
  • `genTSInsertRecordReq` spells `TS` where 24 names in the project spell it `Ts` agents/go-common/iotdb-client-go/client/session.go:886 — 24 of 26 names in project github.com/apache/iotdb-client-go/v2 spell the token `Ts` (24 of 26; unit: names in project github.com/apache/iotdb-client-go/v2 containing `Ts`). Peers: client.byteToTsDataType (agents/go-common/iotdb-client-go/client/protocol.go:57); IoTDBRpcDataSet.columnName2TsBlockColumnIndexMap (agents/go-common/iotdb-client-go/client/rpcdataset.go:22); IoTDBRpcDataSet.columnIndex2TsBlockColumnIndexList (agents/go-common/iotdb-client-go/client/rpcdataset.go:25); IoTDBRpcDataSet.dataTypeForTsBlockColumn (agents/go-common/iotdb-client-go/client/rpcdataset.go:27); IoTDBRpcDataSet.curTsBlock (agents/go-common/iotdb-client-go/client/rpcdataset.go:44). Rename to `genTsInsertRecordReq`. [rule N6]
D21 · Naming Consistency · `genTSInsertTabletReq` spells `TS` where 24 names in the project spell it `Ts` · ×1
  • `genTSInsertTabletReq` spells `TS` where 24 names in the project spell it `Ts` agents/go-common/iotdb-client-go/client/session.go:1478 — 24 of 26 names in project github.com/apache/iotdb-client-go/v2 spell the token `Ts` (24 of 26; unit: names in project github.com/apache/iotdb-client-go/v2 containing `Ts`). Peers: client.byteToTsDataType (agents/go-common/iotdb-client-go/client/protocol.go:57); IoTDBRpcDataSet.columnName2TsBlockColumnIndexMap (agents/go-common/iotdb-client-go/client/rpcdataset.go:22); IoTDBRpcDataSet.columnIndex2TsBlockColumnIndexList (agents/go-common/iotdb-client-go/client/rpcdataset.go:25); IoTDBRpcDataSet.dataTypeForTsBlockColumn (agents/go-common/iotdb-client-go/client/rpcdataset.go:27); IoTDBRpcDataSet.curTsBlock (agents/go-common/iotdb-client-go/client/rpcdataset.go:44). Rename to `genTsInsertTabletReq`. [rule N6]
D21 · Naming Consistency · `reconnectDialTimeoutMS` spells `MS` where 21 names in the project spell it `Ms` · ×1
  • `reconnectDialTimeoutMS` spells `MS` where 21 names in the project spell it `Ms` agents/go-common/iotdb-client-go/client/session.go:1592 — 21 of 22 names in project github.com/apache/iotdb-client-go/v2 spell the token `Ms` (21 of 22; unit: names in project github.com/apache/iotdb-client-go/v2 containing `Ms`). Peers: Session.Open(connectionTimeoutInMs) (agents/go-common/iotdb-client-go/client/session.go:193); Session.ExecuteQueryStatementWithContext(timeoutMs) (agents/go-common/iotdb-client-go/client/session.go:665); Session.ExecuteQueryStatement(timeoutMs) (agents/go-common/iotdb-client-go/client/session.go:756); Session.ExecuteAggregationQuery(timeoutMs) (agents/go-common/iotdb-client-go/client/session.go:787); Session.ExecuteAggregationQueryWithLegalNodes(timeoutMs) (agents/go-common/iotdb-client-go/client/session.go:820). Rename to `reconnectDialTimeoutMs`. [rule N6]
D21 · Naming Consistency · `propertiesJSON` spells `JSON` where 236 names in the project spell it `Json` · ×1
  • `propertiesJSON` spells `JSON` where 236 names in the project spell it `Json` apps/desktop/src/lib/graph/neo4jGraph.ts:46 — 236 of 237 names in project dbx spell the token `Json` (236 of 237; unit: names in project dbx containing `Json`). Peers: useCellDetailEditor.looksLikeJsonString (apps/desktop/src/composables/useCellDetailEditor.ts:69); useCellDetailEditor.shouldUseJsonMode (apps/desktop/src/composables/useCellDetailEditor.ts:76); UseDataGridCellDetailEditOptions.warnFormattedJsonEdit (apps/desktop/src/composables/useDataGridCellDetailEdit.ts:31); ExtractorRequestSource.keepUnsafeJsonText (apps/desktop/src/composables/useDataGridExtractor.ts:47); apps.desktop.src.lib.app.documentJsonValues.ParseDocumentStoreJsonDocumentError (apps/desktop/src/lib/app/documentJsonValues.ts:9). Rename to `propertiesJson`. [rule N6]
D21 · Naming Consistency · `CheckID` spells `ID` where 2602 names in the project spell it `Id` · ×1
  • `CheckID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:515 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `CheckId`. [rule N6]
D21 · Naming Consistency · `AccessorID` spells `ID` where 2602 names in the project spell it `Id` · ×1
  • `AccessorID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:737 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `AccessorId`. [rule N6]
D21 · Naming Consistency · `SecretID` spells `ID` where 2602 names in the project spell it `Id` · ×1
  • `SecretID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:738 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `SecretId`. [rule N6]
D21 · Naming Consistency · `MaxTokenTTL` spells `TTL` where 34 names in the project spell it `Ttl` · ×1
  • `MaxTokenTTL` spells `TTL` where 34 names in the project spell it `Ttl` apps/desktop/src/types/consul.ts:775 — 34 of 35 names in project dbx spell the token `Ttl` (34 of 35; unit: names in project dbx containing `Ttl`). Peers: http.redisGetTtl (apps/desktop/src/lib/backend/http.ts:4155); http.redisHashFieldSetTtl (apps/desktop/src/lib/backend/http.ts:4231); http.redisSetTtl (apps/desktop/src/lib/backend/http.ts:4303); http.redisSetKeysTtl (apps/desktop/src/lib/backend/http.ts:4316); http.etcdSupportsTtl (apps/desktop/src/lib/backend/http.ts:4399). Rename to `MaxTokenTtl`. [rule N6]
D21 · Naming Consistency · `PeerID` spells `ID` where 2602 names in the project spell it `Id` · ×1
  • `PeerID` spells `ID` where 2602 names in the project spell it `Id` apps/desktop/src/types/consul.ts:918 — 2602 of 2608 names in project dbx spell the token `Id` (2602 of 2608; unit: names in project dbx containing `Id`). Peers: ConnectionTestPersistenceState.testConfigId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:4); ConnectionTestPersistenceState.activeDraftId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:5); ConnectionTestPersistenceState.testRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:6); ConnectionTestPersistenceState.activeTestRunId (apps/desktop/src/components/connection/connectionEditDraftSync.ts:7); connectionEditDraftSync.connectionEditDraftSyncAction(configId) (apps/desktop/src/components/connection/connectionEditDraftSync.ts:13). Rename to `PeerId`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 8 of 101 project(s) overshoot their size bounds, lowering Project Cohesion to 8.4/10. The most over is `(repository root)` (484133 LoC, 5940 module-visible types across 140 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 25 of 1855 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1855 of the 2665 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: apps/desktop/src/lib/diagram/edge-obstacle-router.ts, apps/desktop/src/lib/mq/rocketmqTraceUtils.ts, apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts, crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs, apps/desktop/src/lib/document/gridFsBrowser.ts, REDACTED, apps/desktop/src/lib/editor/semanticSelectionRanges.ts, apps/desktop/src/lib/editor/plainTextSelectionRanges.ts (and 17 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 28/86 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `agents/drivers/access`, `agents/drivers/bigquery`, `agents/drivers/cache`, `agents/drivers/cassandra-go`, `agents/drivers/databend` and 53 more.
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations agents/drivers/zookeeper/integration_test.go — A Go testing.B suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
R7 · Dead Code · Unused export 'resolvePlDebugProbe' · ×1
  • Unused export 'resolvePlDebugProbe' apps/desktop/src/components/debug/plDebugLaunch.ts:46 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DATA_GRID_DISTINCT_VALUE_DEBOUNCE_MS' · ×1
  • Unused export 'DATA_GRID_DISTINCT_VALUE_DEBOUNCE_MS' apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'schemaDiffSessionNextProgressStep' · ×1
  • Unused export 'schemaDiffSessionNextProgressStep' apps/desktop/src/composables/useSchemaDiffSession.ts:452 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'runAiAction' · ×1
  • Unused export 'runAiAction' apps/desktop/src/lib/ai/ai.ts:284 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'runAiStream' · ×1
  • Unused export 'runAiStream' apps/desktop/src/lib/ai/ai.ts:296 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'extractSql' · ×1
  • Unused export 'extractSql' apps/desktop/src/lib/ai/ai.ts:379 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'formatCouchDbDocumentOperationPreview' · ×1
  • Unused export 'formatCouchDbDocumentOperationPreview' apps/desktop/src/lib/app/documentStoreSave.ts:24 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PlainConfigPayload' · ×1
  • Unused export 'PlainConfigPayload' apps/desktop/src/lib/backend/configCrypto.ts:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'formatErrorWithContext' · ×1
  • Unused export 'formatErrorWithContext' apps/desktop/src/lib/backend/errorUtils.ts:379 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugProbe' · ×1
  • Unused export 'plDebugProbe' apps/desktop/src/lib/backend/pl-debug-tauri.ts:245 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugExecute' · ×1
  • Unused export 'plDebugExecute' apps/desktop/src/lib/backend/pl-debug-tauri.ts:340 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugSetValue' · ×1
  • Unused export 'plDebugSetValue' apps/desktop/src/lib/backend/pl-debug-tauri.ts:348 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugSetExceptionBreakpoint' · ×1
  • Unused export 'plDebugSetExceptionBreakpoint' apps/desktop/src/lib/backend/pl-debug-tauri.ts:353 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugStepOut' · ×1
  • Unused export 'plDebugStepOut' apps/desktop/src/lib/backend/pl-debug-tauri.ts:374 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugAbort' · ×1
  • Unused export 'plDebugAbort' apps/desktop/src/lib/backend/pl-debug-tauri.ts:378 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DATABASE_BACKUP_CONFIG_CHANGED_EVENT' · ×1
  • Unused export 'DATABASE_BACKUP_CONFIG_CHANGED_EVENT' REDACTED:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'writeDatabaseBackupSchedules' · ×1
  • Unused export 'writeDatabaseBackupSchedules' REDACTED:439 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'writeDatabaseBackupRuns' · ×1
  • Unused export 'writeDatabaseBackupRuns' REDACTED:450 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'findJsonTreeMatches' · ×1
  • Unused export 'findJsonTreeMatches' apps/desktop/src/lib/common/jsonTreeSearch.ts:48 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TEXT_DIFF_MAX_CHARACTER_DIFF_CHARACTERS' · ×1
  • Unused export 'TEXT_DIFF_MAX_CHARACTER_DIFF_CHARACTERS' apps/desktop/src/lib/common/textDiff.ts:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'databaseInfoSummary' · ×1
  • Unused export 'databaseInfoSummary' apps/desktop/src/lib/connection/connectionDatabaseInfo.ts:123 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isLocalFileDb' · ×1
  • Unused export 'isLocalFileDb' apps/desktop/src/lib/connection/connectionFile.ts:59 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ORACLE_LEGACY_CHARSETS' · ×1
  • Unused export 'ORACLE_LEGACY_CHARSETS' apps/desktop/src/lib/connection/oracleLegacyCharset.ts:4 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'layerReferencesProfile' · ×1
  • Unused export 'layerReferencesProfile' apps/desktop/src/lib/connection/tunnelProfiles.ts:88 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'capabilityStatus' · ×1
  • Unused export 'capabilityStatus' apps/desktop/src/lib/consul/consulPolicy.ts:15 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete docs/public/_headers:1 — Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.)
X2 · Cancellation propagation · Not all functions that make a request accept a context.Context or an AbortSignal · ×1
  • Not all functions that make a request accept a context.Context or an AbortSignal — Only 17/72 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 3/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~2.5 `!` null assertions per 1k TypeScript source lines — 1272 assertion(s) across the 517454 source line(s) of the 1580 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: apps/desktop/src/stores/queryStore.ts (92), apps/desktop/src/components/transfer/queryResultTransferDdl.ts (39), apps/desktop/src/stores/connectionStore.ts (36). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:285 — `matchNativeNames` returns `List.of()` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
Minor — 12 finding(s)
D12 · Dependency Hygiene · Outdated · ×9
  • Outdated: gitee.com/XuguDB/go-xugu-driver — `gitee.com/XuguDB/go-xugu-driver` is required at v1.0.12 in REDACTED, but v1.0.16 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gitee.com/XuguDB/go-xugu-driver@v1.0.16 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/apache/thrift — `github.com/apache/thrift` is required at v0.22.0 in REDACTED, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/apache/thrift@v0.25.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/apache/thrift — `github.com/apache/thrift` is required at v0.24.0 in REDACTED, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/apache/thrift@v0.25.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/godror/godror — `github.com/godror/godror` is required at v0.51.5 in REDACTED, but v0.52.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/godror/godror@v0.52.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/neo4j/neo4j-go-driver/v6 — `github.com/neo4j/neo4j-go-driver/v6` is required at v6.3.0 in REDACTED, but v6.4.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/neo4j/neo4j-go-driver/v6@v6.4.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/rabbitmq/amqp091-go — `github.com/rabbitmq/amqp091-go` is required at v1.13.0 in REDACTED, but v1.16.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rabbitmq/amqp091-go@v1.16.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.60.0 in REDACTED, but v0.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.62.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.41.0 in REDACTED, but v0.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.62.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/text — `golang.org/x/text` is required at v0.22.0 in REDACTED, but v0.44.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/text@v0.44.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
D10 · Test Quality · Skipped (documented) · ×1
  • Skipped (documented): (unnamed test) apps/desktop/src/lib/dataGrid/__tests__/mysqlGeneratePartitions.spec.ts:86 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names REDACTED:1275 — 0 of 22 documented parameters and 2 of 4131 summaries in `dbx` only repeat the member or parameter name (e.g. "Keywords whose value is itself a schema." for `SCHEMA_NESTING_KEYWORDS`). Delete the restating tags, or add what the name does not say.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: dbx-agents:common — dbx-agents:common: abstractness 0.17, instability 0.00, distance 0.83 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-744639342a814414a52905d13158fbd7/history.json --exit-code 0 --source .15artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-744639342a814414a52905d13158fbd7/tree.json --exit-code 0 --source .8artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude agents/go-common/iotdb-client-go/common --exclude agents/go-common/iotdb-client-go/rpc --exclude apps/desktop/src/__tests__ --exclude apps/desktop/src/components/admin/__tests__ --exclude apps/desktop/src/components/ai/rich/__tests__ --exclude apps/desktop/src/components/auth/__tests__ --exclude apps/desktop/src/components/backup/__tests__ --exclude apps/desktop/src/components/chart/__tests__ --exclude apps/desktop/src/components/codeSnapshot/__tests__ --exclude apps/desktop/src/components/common/__tests__ --exclude apps/desktop/src/components/config/__tests__ --exclude apps/desktop/src/components/connection/__tests__ --exclude apps/desktop/src/components/consul/__tests__ --exclude apps/desktop/src/components/debug/__tests__ --exclude apps/desktop/src/components/diagram/__tests__ --exclude apps/desktop/src/components/diff/__tests__ --exclude apps/desktop/src/components/docs/__tests__ --exclude apps/desktop/src/components/document/__tests__ --exclude apps/desktop/src/components/editor/__tests__ --exclude apps/desktop/src/components/etcd/__tests__ --exclude apps/desktop/src/components/explain/__tests__ --exclude apps/desktop/src/components/export/__tests__ --exclude apps/desktop/src/components/generate/params/__tests__ --exclude apps/desktop/src/components/graph/__tests__ --exclude apps/desktop/src/components/grid/__tests__ --exclude apps/desktop/src/components/import/__tests__ --exclude apps/desktop/src/components/kv/__tests__ --exclude apps/desktop/src/components/layout/__tests__ --exclude apps/desktop/src/components/mcp/__tests__ --exclude apps/desktop/src/components/meilisearch/__tests__ --exclude apps/desktop/src/components/mq/__tests__ --exclude apps/desktop/src/components/mqtt/__tests__ --exclude apps/desktop/src/components/nacos/__tests__ --exclude apps/desktop/src/components/objects/__tests__ --exclude apps/desktop/src/components/plugins/__tests__ --exclude apps/desktop/src/components/quick-open/__tests__ --exclude apps/desktop/src/components/redis/__tests__ --exclude apps/desktop/src/components/search/__tests__ --exclude apps/desktop/src/components/settings/__tests__ --exclude apps/desktop/src/components/sidebar/__tests__ --exclude apps/desktop/src/components/ssh/__tests__ --exclude apps/desktop/src/components/structure/__tests__ --exclude apps/desktop/src/components/transfer/__tests__ --exclude apps/desktop/src/components/ui/__tests__ --exclude apps/desktop/src/components/ui/dialog/__tests__ --exclude apps/desktop/src/components/ui/input/__tests__ --exclude apps/desktop/src/components/ui/searchable-select/__tests__ --exclude apps/desktop/src/components/vector/__tests__ --exclude apps/desktop/src/components/zookeeper/__tests__ --exclude apps/desktop/src/composables/__tests__ --exclude apps/desktop/src/directives/__tests__ --exclude apps/desktop/src/docs/__tests__ --exclude apps/desktop/src/docs-export/__tests__ --exclude apps/desktop/src/i18n/__tests__ --exclude apps/desktop/src/lib/__tests__ --exclude apps/desktop/src/lib/ai/__tests__ --exclude apps/desktop/src/lib/ai/richContent/__tests__ --exclude apps/desktop/src/lib/app/__tests__ --exclude apps/desktop/src/lib/backend/__tests__ --exclude apps/desktop/src/lib/codeSnapshot/__tests__ --exclude apps/desktop/src/lib/common/__tests__ --exclude apps/desktop/src/lib/connection/__tests__ --exclude apps/desktop/src/lib/consul/__tests__ --exclude apps/desktop/src/lib/dataGrid/__tests__ --exclude apps/desktop/src/lib/database/__tests__ --exclude apps/desktop/src/lib/debug/__tests__ --exclude apps/desktop/src/lib/diagnostics/__tests__ --exclude apps/desktop/src/lib/diagram/__tests__ --exclude apps/desktop/src/lib/docs/__tests__ --exclude apps/desktop/src/lib/driverStore/__tests__ --exclude apps/desktop/src/lib/editor/__tests__ --exclude apps/desktop/src/lib/elasticsearch/__tests__ --exclude apps/desktop/src/lib/etcd/__tests__ --exclude apps/desktop/src/lib/export/__tests__ --exclude apps/desktop/src/lib/format/__tests__ --exclude apps/desktop/src/lib/globalSearch/__tests__ --exclude apps/desktop/src/lib/gridSnapshot/__tests__ --exclude apps/desktop/src/lib/history/__tests__ --exclude apps/desktop/src/lib/influxdb/__tests__ --exclude apps/desktop/src/lib/metadata/__tests__ --exclude apps/desktop/src/lib/mongo/__tests__ --exclude apps/desktop/src/lib/mq/__tests__ --exclude apps/desktop/src/lib/nacos/__tests__ --exclude apps/desktop/src/lib/naming/__tests__ --exclude apps/desktop/src/lib/navigation/__tests__ --exclude apps/desktop/src/lib/plugins/__tests__ --exclude apps/desktop/src/lib/query/__tests__ --exclude apps/desktop/src/lib/redis/__tests__ --exclude apps/desktop/src/lib/redis/codec/__tests__ --exclude apps/desktop/src/lib/savedSql/__tests__ --exclude apps/desktop/src/lib/schema/__tests__ --exclude apps/desktop/src/lib/settings/__tests__ --exclude apps/desktop/src/lib/sidebar/__tests__ --exclude apps/desktop/src/lib/soql/__tests__ --exclude apps/desktop/src/lib/sql/__tests__ --exclude apps/desktop/src/lib/sqlFile/__tests__ --exclude apps/desktop/src/lib/sqlserver/__tests__ --exclude apps/desktop/src/lib/table/__tests__ --exclude apps/desktop/src/lib/tabs/__tests__ --exclude apps/desktop/src/lib/ui/__tests__ --exclude apps/desktop/src/lib/updates/__tests__ --exclude apps/desktop/src/stores/__tests__ --exclude apps/desktop/src/styles/__tests__ --exclude apps/desktop/src/types/generated --exclude packages/app-tests --exclude packages/mcp-server/tests --exclude packages/plugin-cli/tests --exclude vendor/tauri-plugin-updater/permissions/autogenerated/commands .615artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .178artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .31artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 65 file(s) — `.github/scripts/suggest-similar-issues.mjs`, `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java`, `apps/desktop/src/components/editor/queryEditorCodeMirrorRuntime.ts`, `apps/desktop/src/components/editor/queryEditorSqlExtensions.ts`, `apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts`, … (+60 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dadb-91ac-7233-9725-f9eacfd0d39f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md