Public report of QuantConnect/Lean, published 23 October 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.10.5). Watchdog 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, 23 October 2026, 08:20 UTC Β· Survey ID cd_26992932714b4772aa50b2fa3bacf646

QuantConnect/Lean

Measured 23 October 2026, 08:03 UTC, at code version f3d841e

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: No coverage collector is wired up.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 46out of 100 At risk No change 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: 541,430 lines of product code in 23 projects, tests not counted Β· Estimated rebuild effort: about 5.1 person-years Β· Weakest lens: Code Health, 39

Findings by how serious they are

146 critical 1620 serious 914 minor

5 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 08:03 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 Watchdog. It is open to any tool that implements it, and today Watchdog 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. Watchdog works 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 β–Έ

72of 77 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
2636of 2680 findings point to an exact file and line, so you can open each one in the code. The other 44 concern the repository as a whole, such as missing documentation.
77dimensions across 6 lenses, read from 541,430 lines of product code in 23 projects.
Chapters

Executive summary

QuantConnect/Lean scores 46 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Code Health, which scores 39 and is rated Weak. Its Async correctness dimension scores 1.1 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt and to resolve the 8 REDACTED finding(s) in Secrets (history), and if Code Health rose to 70, the score would rise from 46 to about 51.

146 findings are critical: 80 in Explicit Debt, 28 in Static Analysis (SAST), ten in Knowledge Freshness, nine in Secrets (history), five in Dependency Vulnerabilities, five in Project dependency cycles, five in Test Quality, three in IaC & Container Security and one in Dependency Hygiene.

Watchdog couldn't measure Test Reliability and Runtime accessibility in this code, so those dimensions are left out of the score. The product code is 541,430 lines, which would take an estimated 5.1 person-years, around €740,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.
Code Health 39 Β· counts for 46%Security and Compliance 40 Β· counts for 25%Production Readiness 57 Β· counts for 14%Maturity 61 Β· counts for 8%Performance 65 Β· counts for 4%Architecture 91 Β· counts for 2%

If Code Health rose from 39 to 70, the lowest score rated Strong, the score would rise from 46 to about 51.

Code composition: what the lines of code are
Business logic 21%Supporting code 41%Tests 38%
New since the last survey: 141 findings

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

  • Code Duplication Β· Members sharing a duplicated core (55 members, 50+ identical tokens) Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs
  • Code Duplication Β· Duplicated block (10 lines × 55) Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs
  • Code Duplication Β· Duplicated block (10 lines × 2) Common/Data/Fundamental/Generated/InventoryValuationMethod.cs
  • Churn × Complexity Hotspots Β· Hotspot: Common/Securities/SecurityExchangeHours.cs Common/Securities/SecurityExchangeHours.cs
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock REDACTED
  • Explicit Debt Β· EmptyCatchBlock Algorithm.CSharp/OptionChainStrategyFiltersRegressionAlgorithm.cs
  • Explicit Debt Β· EmptyCatchBlock Brokerages/WebSocketClientWrapper.cs
  • Explicit Debt Β· EmptyCatchBlock Common/Data/Fundamental/Fundamental.cs
  • Explicit Debt Β· EmptyCatchBlock Common/Extensions.cs
  • Explicit Debt Β· EmptyCatchBlock Common/Scheduling/TimeMonitor.cs
  • Explicit Debt Β· EmptyCatchBlock Common/Util/RateGate.cs
  • Explicit Debt Β· EmptyCatchBlock Engine/DataFeeds/LiveTradingDataFeed.cs
  • Explicit Debt Β· EmptyCatchBlock Engine/Results/BacktestProgressMonitor.cs
  • Explicit Debt Β· EmptyCatchBlock Engine/Storage/LocalObjectStore.cs
  • Explicit Debt Β· EmptyCatchBlock Engine/Storage/LocalObjectStore.cs
  • Explicit Debt Β· EmptyCatchBlock Indicators/OptionGreekIndicatorBase.cs
  • Explicit Debt Β· EmptyCatchBlock Logging/Log.cs
  • Explicit Debt Β· EmptyCatchBlock Optimizer/LeanOptimizer.cs
  • Explicit Debt Β· EmptyCatchBlock ToolBox/TemporaryPathProvider.cs
  • Explicit Debt Β· BarePragmaDisable repeated across 15 files Tests/Algorithm/AlgorithmAddDataTests.cs
  • Explicit Debt Β· Dead code: CancelComboOrders Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: LongFromZero Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: CloseFromLong Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ShortFromZero Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: CloseFromShort Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ShortFromLong Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: LongFromShort Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: LongCombo Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ShortCombo Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: LongFromZeroUpdateAndCancel Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ContingentOrdersCancel Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ContingentOrdersUpdate Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ContingentOrdersGetOpenOrders Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: ContingentOrdersTrigger Tests/Brokerages/BrokerageTests.cs
  • Explicit Debt Β· Dead code: OneTriggersOther Tests/Brokerages/ContingentOrderTestParameters.cs
  • Explicit Debt Β· Dead code: EnsureInternalCurrencyDataFeedsForNonUsdQuoteCurrencyGetAdded Tests/Common/Securities/CashTests.cs
  • Explicit Debt Β· Dead code: TwelveTenCentralTime Tests/Common/Securities/Futures/FuturesExpiryFunctionsTests.cs
  • Explicit Debt Β· Dead code: WithExpiration Tests/Common/Securities/Options/StrategyMatcher/Option.cs
  • Explicit Debt Β· Dead code: WithUnderlying Tests/Common/Securities/Options/StrategyMatcher/Option.cs
  • Explicit Debt Β· Dead code: WithName Tests/Common/Securities/Options/StrategyMatcher/OptionStrategyLegPredicateTests.cs
  • Explicit Debt Β· Dead code: IsAlwaysOpen Tests/Common/Securities/SecurityExchangeHoursTests.cs
  • Explicit Debt Β· Dead code: LastTradeProfit_ShortToLong Tests/Common/Securities/SecurityPortfolioModelTests.cs
  • Explicit Debt Β· Dead code: GetGenericClassObject Tests/Common/Util/ExtensionsTests.cs
  • Explicit Debt Β· Dead code: IntReturnTypeMethod Tests/Python/BasePythonWrapperTests.cs
  • Explicit Debt Β· Dead code: MethodWithOutParams Tests/Python/BasePythonWrapperTests.cs
  • Explicit Debt Β· Dead code: GetDictionary Tests/Python/BasePythonWrapperTests.cs
  • Explicit Debt Β· Dead code: ShouldWriteToDisk ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesProcessor.cs
  • Explicit Debt Β· Dead code: CreateFactorFile ToolBox/FactorFileGenerator.cs
  • Explicit Debt Β· Dead code: FilteredBy ToolBox/IDataProcessor.cs
  • Explicit Debt Β· Dead code: GetExchangeTimeZone ToolBox/LeanDataReader.cs
  • Explicit Debt Β· Dead code: FromCrisis Report/Crisis.cs
  • Static Analysis (SAST) Β· REDACTED
  • Static Analysis (SAST) Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Supply-chain Provenance & Signing Β· REDACTED
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Engine/DataFeeds/LiveOptionChainProvider.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Engine/DataFeeds/LiveOptionChainProvider.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Wait(…)` Engine/DataFeeds/WorkScheduling/WeightedWorkScheduler.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Engine/Engine.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/Collective2SignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/Collective2SignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/VBaseSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/VBaseSignalExport.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Common/Extensions.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Wait(…)` Common/Isolator.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Api/Api.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Api/Api.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Api/Api.cs
  • Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Algorithm.CSharp/CustomSignalExportDemonstrationAlgorithm.cs

Watchdog compares 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: 44 findings

These 44 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one.

  • Churn × Complexity Hotspots Β· Hotspot: Common/Orders/OrderJsonConverter.cs Common/Orders/OrderJsonConverter.cs
  • Churn × Complexity Hotspots Β· Hotspot: Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs
  • Churn × Complexity Hotspots Β· Hotspot: Engine/Results/LiveTradingResultHandler.cs Engine/Results/LiveTradingResultHandler.cs
  • Churn × Complexity Hotspots Β· Hotspot: Common/Brokerages/IBrokerageModel.cs Common/Brokerages/IBrokerageModel.cs
  • Explicit Debt Β· BarePragmaDisable repeated across 14 files Tests/Algorithm/AlgorithmAddDataTests.cs
  • Supply-chain Provenance & Signing REDACTED
  • Exception handling Β· Swallowed exception (caught, then discarded) Engine/DataFeeds/BaseSubscriptionDataSourceReader.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/BinaryComparison.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Data/Fundamental/FundamentalUniverse.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Data/UniverseSelection/CoarseFundamentalDataProvider.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Data/UniverseSelection/ConstituentsUniverseData.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Extensions.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Securities/Security.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Securities/SecurityDefinition.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Util/Composer.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Util/Composer.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Util/Composer.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Util/Validate.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Common/Util/Validate.cs
  • Exception handling Β· Swallowed exception (empty catch) Brokerages/WebSocketClientWrapper.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) REDACTED
  • Exception handling Β· Swallowed exception (caught, then discarded) Api/ApiConnection.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Algorithm.CSharp/CustomDataTypeHistoryAlgorithm.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Algorithm.CSharp/CustomDataZipFileRegressionAlgorithm.cs
  • Exception handling Β· Swallowed exception (caught, then discarded) Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/ClassicRenkoConsolidatorWithFuturesAndDefaultTickTypeRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/ClassicRenkoConsolidatorWithFuturesQuoteTickTypeRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/ClassicRenkoConsolidatorWithFuturesTickTypesRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/CustomDataZipFileEntryNamesRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/HSIFutureHourRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/IndicatorVolatilityModelAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/RegisterIndicatorRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/SecurityCustomPropertiesAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/SetHoldingsFutureRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.CSharp/StrictEndTimeLowerResolutionFillForwardRegressionAlgorithm.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesConverter.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Research/QuantBook.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Research/QuantBook.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Algorithm.Framework/NotifiedSecurityChanges.cs
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded REDACTED
  • Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Optimizer/Analysis/OptimizationAnalyzer.cs
Rebuild cost: about €740,000 Β· Estimate
Cost to rebuild€240,000 to €1,200,000, for 4,061 to 12,996 hours of work, about 5.1 person-years for 3 to 10 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 46. 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: 541,430 lines of product code
Comment linesThe estimate prices 330,256 lines. Comment lines count towards the size of 541,430 lines but aren't priced as work.

How the estimate is made: Watchdog prices 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.

Top priorities

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

1
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt β€” start with QuantConnect.Tests.csproj (2), QuantConnect.Algorithm.CSharp.csproj (2).
Raises the score by about 5 points Β· Low effort Β· Explicit Debt
2
Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED, REDACTED.
Raises the score by about 3 points Β· Low effort Β· Secrets (history)
3
Resolve the 9 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED, REDACTED, REDACTED.
Raises the score by about 3 points Β· Low effort Β· Supply-chain Provenance & Signing

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 €740,000 to build again, about 5.1 person-years of work. Its weakest lens is Code Health, at 39 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first Β· First action
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 4 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture β€” module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways β€” a layering smell or cycle. A clean layered graph has none.

arch QuantConnect QuantConnect QuantConnect.Compression Compression QuantConnect->QuantConnect.Compression QuantConnect.Configuration Configuration QuantConnect->QuantConnect.Configuration QuantConnect.Logging Logging QuantConnect->QuantConnect.Logging QuantConnect.Algorithm Algorithm QuantConnect.Algorithm->QuantConnect QuantConnect.Algorithm->QuantConnect.Configuration QuantConnect.Indicators Indicators QuantConnect.Algorithm->QuantConnect.Indicators QuantConnect.Algorithm->QuantConnect.Logging QuantConnect.Algorithm.CSharp CSharp QuantConnect.Algorithm.CSharp->QuantConnect QuantConnect.Algorithm.CSharp->QuantConnect.Algorithm QuantConnect.Algorithm.Framework Framework QuantConnect.Algorithm.CSharp->QuantConnect.Algorithm.Framework QuantConnect.Algorithm.CSharp->QuantConnect.Indicators QuantConnect.Algorithm.Framework->QuantConnect QuantConnect.Algorithm.Framework->QuantConnect.Algorithm QuantConnect.Algorithm.Framework->QuantConnect.Indicators QuantConnect.AlgorithmFactory AlgorithmFactory QuantConnect.AlgorithmFactory->QuantConnect QuantConnect.AlgorithmFactory->QuantConnect.Algorithm QuantConnect.AlgorithmFactory->QuantConnect.Configuration QuantConnect.AlgorithmFactory->QuantConnect.Logging QuantConnect.Api Api QuantConnect.Api->QuantConnect QuantConnect.Api->QuantConnect.Configuration QuantConnect.Api->QuantConnect.Logging QuantConnect.Brokerages Brokerages QuantConnect.Brokerages->QuantConnect QuantConnect.Brokerages->QuantConnect.Api QuantConnect.Brokerages->QuantConnect.Compression QuantConnect.Brokerages->QuantConnect.Configuration QuantConnect.Brokerages->QuantConnect.Logging QuantConnect.Compression->QuantConnect.Logging QuantConnect.Configuration->QuantConnect.Logging QuantConnect.DownloaderDataProvider.Launcher Launcher QuantConnect.DownloaderDataProvider.Launcher->QuantConnect QuantConnect.DownloaderDataProvider.Launcher->QuantConnect.Configuration QuantConnect.Lean.Engine Engine QuantConnect.DownloaderDataProvider.Launcher->QuantConnect.Lean.Engine QuantConnect.DownloaderDataProvider.Launcher->QuantConnect.Logging QuantConnect.Indicators->QuantConnect QuantConnect.Indicators->QuantConnect.Logging QuantConnect.Lean.Engine->QuantConnect QuantConnect.Lean.Engine->QuantConnect.Algorithm QuantConnect.Lean.Engine->QuantConnect.Algorithm.CSharp QuantConnect.Lean.Engine->QuantConnect.AlgorithmFactory QuantConnect.Lean.Engine->QuantConnect.Api QuantConnect.Lean.Engine->QuantConnect.Brokerages QuantConnect.Lean.Engine->QuantConnect.Compression QuantConnect.Lean.Engine->QuantConnect.Configuration QuantConnect.Lean.Engine->QuantConnect.Indicators QuantConnect.Lean.Engine->QuantConnect.Logging QuantConnect.Lean.Launcher Launcher QuantConnect.Lean.Launcher->QuantConnect QuantConnect.Lean.Launcher->QuantConnect.Algorithm QuantConnect.Lean.Launcher->QuantConnect.Algorithm.CSharp QuantConnect.Lean.Launcher->QuantConnect.AlgorithmFactory QuantConnect.Lean.Launcher->QuantConnect.Api QuantConnect.Lean.Launcher->QuantConnect.Brokerages QuantConnect.Lean.Launcher->QuantConnect.Compression QuantConnect.Lean.Launcher->QuantConnect.Configuration QuantConnect.Lean.Launcher->QuantConnect.DownloaderDataProvider.Launcher QuantConnect.Lean.Launcher->QuantConnect.Indicators QuantConnect.Lean.Launcher->QuantConnect.Lean.Engine QuantConnect.Lean.Launcher->QuantConnect.Logging QuantConnect.Messaging Messaging QuantConnect.Lean.Launcher->QuantConnect.Messaging QuantConnect.Optimizer.Launcher Launcher QuantConnect.Lean.Launcher->QuantConnect.Optimizer.Launcher QuantConnect.Queues Queues QuantConnect.Lean.Launcher->QuantConnect.Queues QuantConnect.Research Research QuantConnect.Lean.Launcher->QuantConnect.Research QuantConnect.Messaging->QuantConnect QuantConnect.Messaging->QuantConnect.Configuration QuantConnect.Messaging->QuantConnect.Logging QuantConnect.Optimizer Optimizer QuantConnect.Optimizer->QuantConnect QuantConnect.Optimizer->QuantConnect.Configuration QuantConnect.Optimizer->QuantConnect.Logging QuantConnect.Optimizer.Launcher->QuantConnect QuantConnect.Optimizer.Launcher->QuantConnect.Configuration QuantConnect.Optimizer.Launcher->QuantConnect.Logging QuantConnect.Optimizer.Launcher->QuantConnect.Optimizer QuantConnect.Queues->QuantConnect QuantConnect.Queues->QuantConnect.Brokerages QuantConnect.Queues->QuantConnect.Configuration QuantConnect.Queues->QuantConnect.Logging QuantConnect.Report Report QuantConnect.Report->QuantConnect QuantConnect.Report->QuantConnect.Algorithm QuantConnect.Report->QuantConnect.Api QuantConnect.Report->QuantConnect.Brokerages QuantConnect.Report->QuantConnect.Configuration QuantConnect.Report->QuantConnect.Lean.Engine QuantConnect.Report->QuantConnect.Logging QuantConnect.Report->QuantConnect.Messaging QuantConnect.Research->QuantConnect QuantConnect.Research->QuantConnect.Algorithm QuantConnect.Research->QuantConnect.Algorithm.Framework QuantConnect.Research->QuantConnect.Api QuantConnect.Research->QuantConnect.Configuration QuantConnect.Research->QuantConnect.Indicators QuantConnect.Research->QuantConnect.Lean.Engine QuantConnect.Research->QuantConnect.Logging QuantConnect.Research->QuantConnect.Queues __more__ +2 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.

656 modules, with 828 dependencies between them. 5 loops run through 68 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 616 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 Algorithm.Python.OptionStrategyFactoryMethodsBaseAlgorithm2 QuantConnect.Data.Fundamental3 QuantConnect.Orders.Fills4 QuantConnect.Orders.Slippage5 QuantConnect.Securities.Future6 QuantConnect.Securities.Option7 QuantConnect.Util8 QuantConnect.Statistics9 QuantConnect.Packets10 QuantConnect.Brokerages11 QuantConnect.Securities12 QuantConnect.Orders13 QuantConnect.Scheduling14 QuantConnect.Api15 QuantConnect.Commands16 QuantConnect.Interfaces17 QuantConnect.Algorithm.Framework.Portfolio.SignalExports18 QuantConnect.Python19 QuantConnect.Indicators20 QuantConnect.Data.Consolidators21 QuantConnect.Data.Market22 QuantConnect.Data.Auxiliary23 QuantConnect.Data24 QuantConnect.Data.UniverseSelection25 QuantConnect.Algorithm.Framework.Portfolio26 QuantConnect.Algorithm.Framework.Selection27 QuantConnect.Algorithm.Framework.Execution28 QuantConnect.Algorithm29 QuantConnect.Algorithm.Framework.Alphas30 QuantConnect31 QuantConnect.Algorithm.CSharp32 QuantConnect.Algorithm.CSharp.Alphas33 QuantConnect.AlgorithmFactory.Python.Wrappers34 QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages35 QuantConnect.Lean.Engine.TransactionHandlers36 QuantConnect.Lean.Engine.Results37 QuantConnect.Lean.Engine.DataFeeds.Enumerators38 QuantConnect.Lean.Engine.DataFeeds39 QuantConnect.Lean.Engine40 QuantConnect.Report
1 Algorithm.Python.OptionStrategyFactoryMethodsBaseAlgorithm
2 QuantConnect.Data.Fundamental941953
3 QuantConnect.Orders.Fills6281132
4 QuantConnect.Orders.Slippage7621111
5 QuantConnect.Securities.Future302219
6 QuantConnect.Securities.Option1115743121315120
7 QuantConnect.Util1124252116
8 QuantConnect.Statistics1221135
9 QuantConnect.Packets449124
10 QuantConnect.Brokerages2313851131123484
11 QuantConnect.Securities11122132161315288155
12 QuantConnect.Orders1221229129
13 QuantConnect.Scheduling1249
14 QuantConnect.Api11112112
15 QuantConnect.Commands311219
16 QuantConnect.Interfaces121391014121272173192144
17 QuantConnect.Algorithm.Framework.Portfolio.SignalExports311835
18 QuantConnect.Python5235341751253137
19 QuantConnect.Indicators6311663631
20 QuantConnect.Data.Consolidators31181810
21 QuantConnect.Data.Market219111147530
22 QuantConnect.Data.Auxiliary2152233
23 QuantConnect.Data2152534181258
24 QuantConnect.Data.UniverseSelection91123415152848
25 QuantConnect.Algorithm.Framework.Portfolio193258111521
26 QuantConnect.Algorithm.Framework.Selection4923112361716
27 QuantConnect.Algorithm.Framework.Execution2312151294
28 QuantConnect.Algorithm21222414761212111462131314211318
29 QuantConnect.Algorithm.Framework.Alphas1025212101420
30 QuantConnect11231374348311111919424
31 QuantConnect.Algorithm.CSharp189135372131072732574213819116258512513113656231734
32 QuantConnect.Algorithm.CSharp.Alphas1151128221262226
33 QuantConnect.AlgorithmFactory.Python.Wrappers111246312111154211110
34 QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages2
35 QuantConnect.Lean.Engine.TransactionHandlers36237111123
36 QuantConnect.Lean.Engine.Results58133410151141252
37 QuantConnect.Lean.Engine.DataFeeds.Enumerators37162174112411
38 QuantConnect.Lean.Engine.DataFeeds128113189110264286045
39 QuantConnect.Lean.Engine5331234223
40 QuantConnect.Report5357211825
Uses a module listed above itPart of a loopThe module itself
1 Algorithm.Python.OptionStrategyFactoryMethodsBaseAlgorithm2 QuantConnect.Data.Fundamental3 QuantConnect.Orders.Fills4 QuantConnect.Orders.Slippage5 QuantConnect.Securities.Future6 QuantConnect.Securities.Option7 QuantConnect.Util8 QuantConnect.Statistics9 QuantConnect.Packets10 QuantConnect.Brokerages11 QuantConnect.Securities12 QuantConnect.Orders13 QuantConnect.Scheduling14 QuantConnect.Api15 QuantConnect.Commands16 QuantConnect.Interfaces17 QuantConnect.Algorithm.Framework.Portfolio.SignalExports18 QuantConnect.Python19 QuantConnect.Indicators20 QuantConnect.Data.Consolidators21 QuantConnect.Data.Market22 QuantConnect.Data.Auxiliary23 QuantConnect.Data24 QuantConnect.Data.UniverseSelection25 QuantConnect.Algorithm.Framework.Portfolio26 QuantConnect.Algorithm.Framework.Selection27 QuantConnect.Algorithm.Framework.Execution28 QuantConnect.Algorithm29 QuantConnect.Algorithm.Framework.Alphas30 QuantConnect31 QuantConnect.Algorithm.CSharp32 QuantConnect.Algorithm.CSharp.Alphas33 QuantConnect.AlgorithmFactory.Python.Wrappers34 QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages35 QuantConnect.Lean.Engine.TransactionHandlers36 QuantConnect.Lean.Engine.Results37 QuantConnect.Lean.Engine.DataFeeds.Enumerators38 QuantConnect.Lean.Engine.DataFeeds39 QuantConnect.Lean.Engine40 QuantConnect.ReportAlgorithm.Python.OptionStrategyFactoryMethodsBaseAlgorithm1QuantConnect.Data.Fundamental2QuantConnect.Orders.Fills3QuantConnect.Orders.Slippage4QuantConnect.Securities.Future5QuantConnect.Securities.Option6QuantConnect.Util7QuantConnect.Statistics8QuantConnect.Packets9QuantConnect.Brokerages10QuantConnect.Securities11QuantConnect.Orders12QuantConnect.Scheduling13QuantConnect.Api14QuantConnect.Commands15QuantConnect.Interfaces16QuantConnect.Algorithm.Framework.Portfolio.SignalExports17QuantConnect.Python18QuantConnect.Indicators19QuantConnect.Data.Consolidators20QuantConnect.Data.Market21QuantConnect.Data.Auxiliary22QuantConnect.Data23QuantConnect.Data.UniverseSelection24QuantConnect.Algorithm.Framework.Portfolio25QuantConnect.Algorithm.Framework.Selection26QuantConnect.Algorithm.Framework.Execution27QuantConnect.Algorithm28QuantConnect.Algorithm.Framework.Alphas29QuantConnect30QuantConnect.Algorithm.CSharp31QuantConnect.Algorithm.CSharp.Alphas32QuantConnect.AlgorithmFactory.Python.Wrappers33QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages34QuantConnect.Lean.Engine.TransactionHandlers35QuantConnect.Lean.Engine.Results36QuantConnect.Lean.Engine.DataFeeds.Enumerators37QuantConnect.Lean.Engine.DataFeeds38QuantConnect.Lean.Engine39QuantConnect.Report409419536281132762111130221911157431213151201124252116122113544912423138511311234841112213216131528815512212291291249111121123112191213910141212721731921443118355235341751253137631166363131181810219111147530215223321525341812589112341515284819325811152149231123617162312151294212224147612121114621313142113181025212101420112313743483111119194241891353721310727325742138191162585125131136562317341151128221262226111246312111154211110236237111123581334101511412523716217411241112811318911026428604553312342235357211825+616 more modules (most-connected shown)

At a glance β€” Code Health Β· 39% Β· Weak Β· gated by X1, X5 Β·

At a glance β€” Architecture Β· 91% Β· Exemplary Β·

At a glance β€” Maturity Β· 61% Β· Adequate Β· gated by M2 Β·

At a glance β€” Readiness Β· 57% Β· Adequate Β·

At a glance β€” Security Β· 40% Β· Weak Β· gated by D28, D29, D36, C1 Β·

At a glance β€” Performance Β· 65% Β· Adequate Β·

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 β€” Injection44High / Critical
A03:2025 β€” Software Supply Chain Failures19High / Critical
A07:2025 β€” Authentication Failures10High / Critical
A02:2025 β€” Security Misconfiguration9High / Critical

Roadmap

First, secure sensitive data by implementing encryption at rest and managing keys in a vault, unless this is already handled by infrastructure. Next, address explicit code debt by resolving empty catch blocks, write-only private fields, and unnecessary suppression directives in the specified files. Finally, eliminate sync-over-async patterns that use .Result to prevent potential deadlocks and ensure thread safety.

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

Do thisHelpsEffortDimension
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt β€” start with QuantConnect.Tests.csproj (2), QuantConnect.Algorithm.CSharp.csproj (2).+5.1 ptsLowExplicit Debt
Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED, REDACTED.+3.1 ptsLowSecrets (history)
Resolve the 9 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED, REDACTED, REDACTED.+2.7 ptsLowSupply-chain Provenance & Signing
Encrypt sensitive data at rest (ASP.NET Core Data Protection / column encryption) and manage keys in a vault. Skip if delegated to infra (Postgres TDE, KMS, etc.).+5.3 ptsMediumData Protection
Resolve the 33 EmptyCatchBlock finding(s) in Explicit Debt β€” start with REDACTED (2), CustomDataBitcoinAlgorithm.cs (2), CustomDataNIFTYAlgorithm.cs (2).+5.1 ptsMediumExplicit Debt
Resolve the 35 WriteOnlyPrivateField finding(s) in Explicit Debt β€” start with IndicatorSuiteAlgorithm.cs (3), HistoryWithCustomDataSourceRegressionAlgorithm.cs (2), AssetAllocationReportElement.cs (2).+5.1 ptsMediumExplicit Debt
Sync-over-async (deadlock risk) through `.Result`+3.7 ptsMediumAsync correctness
Resolve the 5 Outdated finding(s) in Dependency Hygiene β€” start with QuantConnect.Logging.csproj, QuantConnect.Report.csproj, QuantConnect.Brokerages.csproj.+1.8 ptsLowDependency Hygiene

File quality

Per-file score 0–10 β€” a quality signature. Of 722 files carrying findings, judged against the Production bar: 3% slop Β· 48% mixed Β· 49% near-clean.

FileScoreBandWorst signal
REDACTED0.7SlopSecrets (history): REDACTED: REDACTED
Research/QuantBook.cs1.2SlopExplicit Debt: WriteOnlyPrivateField
REDACTED2.0SlopIaC & Container Security: High IaC: REDACTED
Algorithm.CSharp/BubbleAlgorithm.cs2.3SlopExplicit Debt: EmptyCatchBlock
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopDependency Vulnerabilities: Critical CVE: REDACTED
Common/Extensions.cs3.0SlopExplicit Debt: EmptyCatchBlock
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
Engine/DataFeeds/LiveTradingDataFeed.cs3.4SlopExplicit Debt: EmptyCatchBlock
REDACTED3.6SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.6SlopSecrets (history): REDACTED: REDACTED
REDACTED3.7SlopExplicit Debt: EmptyCatchBlock
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs3.8SlopExplicit Debt: EmptyCatchBlock

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 β€” 146

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 β€” 1620

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 β€” 914

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

Could not be resolved β€” 5

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

Watchdog 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. 72 of 77 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 β€” the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory β€” an LLM prose judgement. 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; ◐ Sampled Β· advisory marks an LLM verdict over a bounded sample β€” advisory, never a deterministic measurement.

What we checked β€” 77 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D18D19D20D21D24D26D27D28D29D30D31D34D35D36D39D44AX10AX3AX5AX6AX8C1C4ED5GD1IC1M1M2M3M4P1P10P3P4P6PF1PF2PF3S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X5

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, 2636 of 2680 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled Β· advisory β€” 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming β€” sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM Β· sampled Β· advisory

Every finding is locatable in findings.md. Run 01a167c8-ece5-7fdb-90af-f2be2560aa4f.

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.

  • D10 Test Quality β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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 5,481 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 14 test source file(s) (.py) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/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 β€” Watchdog 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 scored β€” the test tier(s) ran but surfaced none of this repository's 5481 test method(s) to the runner, so flakiness couldn't be exercised. This is an analysis-environment limitation, not a finding about the tests.
  • D22 Internal API Consistency β€” not measured this run β€” This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-Coupling β€” not measured this run β€” Watchdog 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. Large codebase (508,484 production LoC in the .NET projects) with no declared bounded contexts β€” cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (β‰₯2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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"]`.
  • D28 Secrets (history) β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `Data/alternative/alphastreams/portfoliostate/9fc8ef73792331b11dbd5429a/20180404.json`, `Data/alternative/alphastreams/portfoliostate/623b06b231eb1cc1aa3643a46/20180404.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
  • D32 Data Compliance (PII/GDPR) β€” not measured this run β€” Watchdog 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. `Common/Analysis.cs`, `Common/Data/UniverseSelection/BackupUniverseFileDataProvider.cs`, `Engine/Results/Analysis/Analyses/CrisisEventsAnalysis.cs`, `Engine/Results/Analysis/Analyses/InsightsEmittedForDelistedSecuritiesAnalysis.cs`, `Engine/Results/Analysis/Analyses/MarginCallsAnalysis.cs`, … (+48 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.
  • AXR1 Runtime accessibility β€” not measured this run β€” Watchdog 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 REDACTED (REDACTED). docker build failed (exit 1) β€” DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • IC1 Incompleteness & stubs β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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. 80 further occurrence(s) are not listed individually; the score already reflects all 120.
  • P5 DR & Backup β€” not measured this run β€” This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found β€” and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • X5 Nullable reference types β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared β€” every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals β€” a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment β€” a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs β€” it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity β€” never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present β€” it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample β€” it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample β€” it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • 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.
  • D27 Navigability: Indirection/navigability is structural β€” it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • 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 (go.mod, 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.
  • 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.
  • C4 Data Retention: This control is scored from in-repo evidence only β€” its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • ED5 Idempotency: Idempotency is judged from the handler body's visible writes and guards β€” a guard enforced by a database unique constraint, a broker's exactly-once delivery, or a domain method whose no-op-when-applied logic the scan can't follow may read as at-risk; the at-risk candidates are confirmed by a SAMPLED LLM verdict (advisory, not exhaustive) and degrade to heuristic-only when no model is configured. It flags the at-least-once double-apply SHAPE, not a runtime proof of a duplicate effect.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present β€” it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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".
  • 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.

The LLM boundary

LLM-set scores this run (5): D19, D21, D24, ED5, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 Β· Cyclomatic Complexity6.0 / 10Adequateβœ“ 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 6.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

162 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Exchanges.GetPrimaryExchange at 106. A further 10 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 BrokerageModel.Create at 38 β€” they are counted neither in the figure above nor in this dimension's score. 9 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: Common/Brokerages/IBrokerageModel.cs (BrokerageModel.Create at 38), Common/Brokerages/FxcmBrokerageModel.cs (FxcmBrokerageModel.IsValidOrderPrices at 26), Common/StringExtensions.cs (StringExtensions.ConvertInvariant at 20), Indicators/CandlestickPatterns/TasukiGap.cs (TasukiGap.ComputeNextValue at 19), Common/Algorithm/Framework/Portfolio/SignalExports/Collective2SignalExport.cs (Collective2SignalExport.GetMICExchangeCode at 18), and 4 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.

Exchanges.GetPrimaryExchange (cyclomatic 106)Common/Global.cs:1012
LeanData.GenerateLine (cyclomatic 100)Common/Util/LeanData.cs:90
AlgorithmManager.Run (cyclomatic 72)Engine/AlgorithmManager.cs:121
TimeSliceFactory.Create (cyclomatic 64)Engine/DataFeeds/TimeSliceFactory.cs:89
OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin (cyclomatic 47)Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:50

+ 157 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity β€” start with Exchanges.GetPrimaryExchange (cyclomatic 106), LeanData.GenerateLine (cyclomatic 100), AlgorithmManager.Run (cyclomatic 72). β€” 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 4 together lifts Cyclomatic Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D2 Β· Cognitive Complexity5.3 / 10Adequateβœ“ 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 5.3 / 10 Β· rule-coverage 100% Β· ceiling Prevented

323 method(s) exceeded the cognitive complexity threshold of 15; the worst was LeanData.GenerateLine at 187.

LeanData.GenerateLine (cognitive 187)Common/Util/LeanData.cs:90
TimeSliceFactory.Create (cognitive 182)Engine/DataFeeds/TimeSliceFactory.cs:89
AlgorithmManager.Run (cognitive 175)Engine/AlgorithmManager.cs:121
SubscriptionSynchronizer.Sync (cognitive 106)Engine/DataFeeds/SubscriptionSynchronizer.cs:88
RandomDataGenerator.Run (cognitive 97)ToolBox/RandomDataGenerator/RandomDataGenerator.cs:53

+ 318 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity β€” start with LeanData.GenerateLine (cognitive 187), TimeSliceFactory.Create (cognitive 182), AlgorithmManager.Run (cognitive 175). β€” 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 3 together lifts Cognitive Complexity from 5.4 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D3 Β· God Classes9.6 / 10Stronggated by 54 serious findingsβœ“ 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 9.6 / 10 Β· rule-coverage 100% Β· ceiling Prevented

54 god class(es) detected.

TooManyMethods: QCAlgorithm Β· Γ—25Algorithm/QCAlgorithm.Indicators.cs
MethodTooLong: LeanData.GenerateLine Β· Γ—14Common/Util/LeanData.cs:90
FileTooLong: Algorithm/QCAlgorithm.Indicators.cs Β· Γ—12Algorithm/QCAlgorithm.Indicators.cs
ClassTooLong: FillModel Β· Γ—3Common/Orders/Fills/FillModel.cs

What to do

  1. Resolve the 25 TooManyMethods finding(s) in God Classes β€” start with QCAlgorithm.Indicators.cs, AlgorithmPythonWrapper.cs, Api.cs. β€” One of this dimension's main actionable groups (25 warning-level).
  2. Resolve the 14 MethodTooLong finding(s) in God Classes β€” start with LeanData.cs, AlgorithmManager.cs, Engine.cs. β€” One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 12 FileTooLong finding(s) in God Classes β€” start with QCAlgorithm.Indicators.cs, QCAlgorithm.cs, BrokerageTransactionHandler.cs. β€” One of this dimension's main actionable groups (12 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D4 Β· Code Duplication9.5 / 10Stronggated by 568 serious findingsβœ“ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.5 / 10 Β· rule-coverage 100% Β· ceiling Verified

521 duplicated block group(s) detected. A further 47 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 4 of the 568 are in trees this repository does not ship β€” vendored, example/demo, 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.

Duplicated block (7 lines × 2) Β· Γ—31Common/Data/Auxiliary/CorporateFactorProvider.cs:113
Duplicated block (6 lines × 2) Β· Γ—31Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:56
Duplicated block (11 lines × 2) Β· Γ—27Algorithm.CSharp/BaseFrameworkRegressionAlgorithm.cs:42
Duplicated block (5 lines × 2) Β· Γ—27Algorithm.CSharp/IndexOptionCallCalendarSpreadAlgorithm.cs:61
Duplicated block (8 lines × 2) Β· Γ—21Common/Orders/Fills/FillModel.cs:196

+ 163 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 31 Duplicated block (7 lines × 2) finding(s) in Code Duplication β€” start with CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.py (2), FutureContractsExtendedMarketHoursRegressionAlgorithm.py (2), ReportCharts.py (2). β€” One of this dimension's main actionable groups (31 warning-level).
  2. Resolve the 31 Duplicated block (6 lines × 2) finding(s) in Code Duplication β€” start with IndexOptionCallITMExpiryRegressionAlgorithm.cs (2), OptionStrategyPositionGroupBuyingPowerModel.cs (2), OptionEquityBearCallLadderRegressionAlgorithm.cs. β€” One of this dimension's main actionable groups (31 warning-level).
  3. Resolve the 27 Duplicated block (11 lines × 2) finding(s) in Code Duplication β€” start with CoarseFineFundamentalComboAlgorithm.cs (2), BaseFrameworkRegressionAlgorithm.cs, UniverseExtensions.cs. β€” One of this dimension's main actionable groups (27 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D5 Β· Coupling8.3 / 10Strongβœ“ 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 8.3 / 10 Β· rule-coverage 100% Β· ceiling Prevented

23 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

Off the main sequence: QuantConnect.Configuration Β· Γ—5Configuration/QuantConnect.Configuration.csproj:1

What to do

  1. Resolve the 5 Off the main sequence finding(s) in Coupling β€” start with QuantConnect.Configuration.csproj, QuantConnect.Logging.csproj, REDACTED. β€” One of this dimension's main actionable groups (5 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D6 Β· Cohesion (LCOM4)9.9 / 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.9 / 10 Β· rule-coverage 100% Β· ceiling Verified

7 of 994 classes have LCOM4 above 3.

Low cohesion: Security (LCOM4 11) Β· Γ—7Common/Securities/Security.cs:47

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) β€” start with Security.cs, Brokerage.cs, Option.cs. β€” One of this dimension's main actionable groups (7 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D9 Β· Test Distribution10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

5494 test methods: 5494 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 13 test function(s) across 2 file(s) declaring at least one β€” every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d9_recommendation.md.

D10 Β· Test Quality9.9 / 10Adequategated by 5 critical 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 9.9 / 10 Β· rule-coverage 100% Β· ceiling Prevented

48 skipped (32 with a documented reason), 11 zero-assertion, 1 whose failure is swallowed by a catch-all, 1 mock references across 5481 tests. Measured on the C# suite only β€” at least 14 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.

No assertions (empty test): PriceGapBehaviorIsTheExpectedOne Β· Γ—5Tests/Common/Data/ClassicRangeConsolidatorTests.cs:35
Skipped test: BuyingPowerForStrategyStartingFromOptionPositionInOppositeDirectionAndLiquidating Β· Γ—16Tests/Common/Securities/OptionStrategyPositionGroupBuyingPowerModelTests.cs:2452
No assertions: TestGetChartUpdatesWhileAdding Β· Γ—6Tests/Algorithm/AlgorithmPlottingTests.cs:92
Test cannot fail: DoesNotParseCSVTests/Common/Securities/SecurityDefinitionTests.cs:43
Skipped (documented): ApiConnectionWillAuthenticate_ValidCredentials_Successfully Β· Γ—32Tests/Api/ApiTests.cs:34

+ 1 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 No assertions (empty test) finding(s) in Test Quality β€” start with OptionBaseIndicatorTests.cs (2), PythonIndicatorTests.cs (2), ClassicRangeConsolidatorTests.cs. β€” One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 16 Skipped test finding(s) in Test Quality β€” start with PythonPackagesTests.cs (10), OptionStrategyPositionGroupBuyingPowerModelTests.cs (3), SymbolPropertiesDatabaseTests.cs (2). β€” One of this dimension's main actionable groups (16 warning-level).
  3. Resolve the 6 No assertions finding(s) in Test Quality β€” start with AlgorithmPlottingTests.cs, SecurityExchangeHoursTests.cs, ConcurrentSetTests.cs. β€” One of this dimension's main actionable groups (6 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D12 Β· Dependency Hygiene5.8 / 10Adequateβœ“ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.8 / 10 Β· rule-coverage 100% Β· ceiling Verified

21 outdated, 1 vulnerable, 1 deprecated packages.

Vulnerable: DotNetZip
Deprecated: DotNetZipREDACTED:32
Outdated: System.ComponentModel.Composition Β· Γ—5Logging/QuantConnect.Logging.csproj:37
Outdated: Newtonsoft.Json Β· Γ—16

What to do

  1. Resolve the 5 Outdated finding(s) in Dependency Hygiene β€” start with QuantConnect.Logging.csproj, QuantConnect.Report.csproj, QuantConnect.Brokerages.csproj. β€” One of this dimension's main actionable groups (5 recommendation-level).
  2. Resolve the 1 Vulnerable finding(s) in Dependency Hygiene. β€” One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Deprecated finding(s) in Dependency Hygiene β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D13 Β· REDACTED Scanning10.0 / 10Exemplaryβ—‹ Nothing flagged

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 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

REDACTED scan ran and found no leaked secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d13_recommendation.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 268 packages use a banned license. β˜… DEPTH: this repository's MSBuild projects declare 33 direct `PackageReference`(s), and 187 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph β€” so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d14_recommendation.md.

D15 Β· Churn × Complexity Hotspots9.9 / 10Stronggated by 6 serious findingsβœ“ 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 9.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

Top hotspots: Engine/TransactionHandlers/BrokerageTransactionHandler.cs (5×42=210); Engine/Engine.cs (5×38=190); Engine/Results/BacktestingResultHandler.cs (10×17=170)

Hotspot: Engine/TransactionHandlers/BrokerageTransactionHandler.cs Β· Γ—6Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1266

What to do

  1. Resolve the 6 Hotspot finding(s) in Churn × Complexity Hotspots β€” start with BrokerageTransactionHandler.cs, Engine.cs, BacktestingResultHandler.cs. β€” One of this dimension's main actionable groups (6 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

133 source file(s) have their living knowledge concentrated in one author (β‰₯90% of recent, decayed contribution). The largest is Common/Securities/Option/OptionFilterUniverse.cs. Counted over 1877 of the 2737 production source files in this repository: 624 are under the ~2,400-byte size floor this dimension measures over, and the remaining 236 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 Β· Γ—7
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 Debt9.3 / 10Adequategated by 80 critical 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 9.3 / 10 Β· rule-coverage 100% Β· ceiling Prevented

298 deducted debt markers + 50 dead symbols across 508484 LoC in the .NET projects (0.3/KLoC) β†’ score 9.3.

WriteOnlyPrivateField Β· Γ—35Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:41
EmptyCatchBlock Β· Γ—33Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:87
NoWarnInCsproj Β· Γ—4Tests/QuantConnect.Tests.csproj:15
InvertedNullGuard Β· Γ—3Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:114
FileScopedPragmaDisable Β· Γ—2Tests/Common/Util/DisposableExtensionsTests.cs:25

+ 10 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 35 WriteOnlyPrivateField finding(s) in Explicit Debt β€” start with IndicatorSuiteAlgorithm.cs (3), HistoryWithCustomDataSourceRegressionAlgorithm.cs (2), AssetAllocationReportElement.cs (2). β€” One of this dimension's main actionable groups (35 issue-level).
  2. Resolve the 33 EmptyCatchBlock finding(s) in Explicit Debt β€” start with REDACTED (2), CustomDataBitcoinAlgorithm.cs (2), CustomDataNIFTYAlgorithm.cs (2). β€” One of this dimension's main actionable groups (33 issue-level).
  3. Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt β€” start with QuantConnect.Tests.csproj (2), QuantConnect.Algorithm.CSharp.csproj (2). β€” One of this dimension's main actionable groups (4 issue-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D18 Β· Solution Shape10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

23 projects, 3597 source files, 693387 hand-written lines of code (508484 production / 184903 test β€” the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), 118 inter-project edges.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d18_recommendation.md.

D19 Β· Documentation QualityExemplary◐ Sampled Β· advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective Exemplary / 10 Β· rule-coverage 100% Β· ceiling Documented

The repository's root README is a strong overview of the project with links to documentation, download options, and an excellent feature list. The .vscode/readme.md document provides focused local development guidance for VS Code (Lean CLI, Dev container, Python setup), while Algorithm.Python/readme.md covers Python-specific usage (autocomplete, PythonNet compilation). Data/, Research/, and ToolBox/READMEs describe data formats, research options, and toolboxes respectively. The Documentation/README is a system overview with an architecture diagram plus plugin list, and the lean-header branding consistently signals the repository's scope. All four READMEs for the Data/future/*-margins directories are identical and document that directory rather than the repository, so they each serve only their own purpose. The project's root README is the one with the overview, installation, usage, contributing, and license sections; none of these four files address the repository's scope or provide a cross-directory reference. (9 of 23 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)

XML-doc coverage: QuantConnect.Lean.Launcher Β· Γ—21Launcher/QuantConnect.Lean.Launcher.csproj

βœ“ On the Gold path β€” maintain.

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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. β€” 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 ConsistencyExemplary◐ Sampled Β· advisory

What it measures: Whether names β€” types, methods, variables β€” are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective Exemplary / 10 Β· rule-coverage 100% Β· ceiling Verified

0 naming inconsistencies across 200 sampled symbols.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d21_recommendation.md.

D24 Β· Comment ValueExemplary◐ Sampled Β· advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective Exemplary / 10 Β· rule-coverage 100% Β· ceiling Documented

70 valuable / 0 redundant across 200 sampled comments.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d24_recommendation.md.

D26 Β· Project Cohesion6.5 / 10Adequateβœ“ 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, LLM-independent.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.5 / 10 Β· rule-coverage 100% Β· ceiling Documented

4 of 23 projects 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.

D27 Β· Navigability5.5 / 10Adequateβœ“ Tool-verified

What it measures: How far you must trace to follow a call β€” low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≀400 methods) β€” not exhaustive.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.5 / 10 Β· rule-coverage 100% Β· ceiling Documented

81 % of calls cross a namespace and 16 % go through an interface, but 82 % of collaborators are co-located β€” so a call's collaborators sit together and tracing stays easy. Baseline: large β€” vertical-slice locality expected.

Pass-through layerCompression/ZipStreamWriter.cs:25

What to do

  1. Resolve the 1 Pass-through layer finding(s) in Navigability β€” start with ZipStreamWriter.cs. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D28 Β· Secrets (history)1.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 1.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

9 finding(s): 0 critical, 9 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 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED, REDACTED. β€” One of this dimension's main actionable groups (8 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.2 / 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.2 / 10 Β· rule-coverage 100% Β· ceiling Documented

44 finding(s): 0 critical, 28 high, 15 medium, 1 low. 10 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 58 file(s) β€” `Algorithm.CSharp/StressSymbols.cs`, `Common/Analysis.cs` (line 26, line 31, line 57), `Common/Data/UniverseSelection/BackupUniverseFileDataProvider.cs` (line 44, line 45), `Data/alternative/alphastreams/portfoliostate/623b06b231eb1cc1aa3643a46/20180404.json`, `Data/alternative/alphastreams/portfoliostate/9fc8ef73792331b11dbd5429a/20180404.json`, … (+53 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. In 1 of those file(s) β€” `Common/Analysis.cs` β€” the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. Separately, one or more rules could not re-parse an embedded snippet in 1 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

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

What to do

  1. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (4). β€” One of this dimension's main actionable groups (4 issue-level).
  3. No action in Static Analysis (SAST) β€” all 10 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 (10 issue-level, 0 of them charged here).

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

D30 Β· Dependency Vulnerabilities6.2 / 10Adequateβœ“ 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.2 / 10 Β· rule-coverage 100% Β· ceiling Documented

5 finding(s): 1 critical, 4 high, 0 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (3), REDACTED. β€” One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 issue-level).

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

D31 Β· IaC & Container Security8.7 / 10Adequategated by 3 critical findingsβœ“ 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 8.7 / 10 Β· rule-coverage 100% Β· ceiling Documented

9 finding(s): 0 critical, 3 high, 2 medium, 4 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 3 High IaC finding(s) in IaC & Container Security β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 4 Low IaC finding(s) in IaC & Container Security β€” start with REDACTED (4). β€” One of this dimension's main actionable groups (4 recommendation-level).
  3. Resolve the 2 Medium IaC finding(s) in IaC & Container Security β€” start with REDACTED (2). β€” One of this dimension's main actionable groups (2 warning-level).

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

D34 Β· Knowledge Freshness6.5 / 10Adequateβœ“ 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 6.5 / 10 Β· rule-coverage 100% Β· ceiling Documented

746 of 2113 significant source file(s) are orphaned β€” their living knowledge has decayed to nothing, so no one currently understands them. The largest is Algorithm.CSharp/StressSymbols.cs. Counted over 2113 of the 2737 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge Β· Γ—10Algorithm.CSharp/StressSymbols.cs:1
Orphaned file Β· Γ—736Common/Util/LinqExtensions.cs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 736 Orphaned file finding(s) in Knowledge Freshness β€” start with Program.cs (2), LinqExtensions.cs, HistoryAlgorithm.cs. β€” One of this dimension's main actionable groups (736 recommendation-level).
  2. Resolve the 10 Orphaned knowledge finding(s) in Knowledge Freshness β€” start with StressSymbols.cs, CandlestickPatterns.cs, AssetClassificationHelper.cs. β€” One of this dimension's main actionable groups (10 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D35 Β· Change Coupling10.0 / 10Stronggated by 2 serious 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 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: BlackLittermanOptimizationPortfolioConstructionModel.py↔MeanVarianceOptimizationPortfolioConstructionModel.py 63%; DefaultBrokerageModel.cs↔BrokerageModelPythonWrapper.cs 50%

Change coupling: BlackLittermanOptimizationPortfolioConstructionModel.py ↔ MeanVarianceOptimizationPortfolioConstructionModel.py Β· Γ—2Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.py:1

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling β€” start with BlackLittermanOptimizationPortfolioConstructionModel.py, DefaultBrokerageModel.cs. β€” One of this dimension's main actionable groups (2 warning-level).

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

D36 Β· Supply-chain Provenance & Signing0.0 / 10Criticalβœ“ 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 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

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

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

D39 Β· IL Efficiency9.8 / 10Exemplaryβœ“ Tool-verified

Method: IL instruction count per method, read from the BUILT first-party assemblies via Mono.Cecil (the target is compiled on a deep run); scored on the fraction of methods whose emitted IL body exceeds the size threshold. Sees compiler-generated bloat source can't; not-applicable when the target fails to build. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.8 / 10 Β· rule-coverage 100% Β· ceiling Verified

131 of 11749 first-party methods have an oversized IL body.

IL efficiency: 131 authored method(s) exceed the IL budgetAlgorithm.CSharp/CapacityTests/EmaPortfolioRebalance100.cs:33

βœ“ On the Gold path β€” maintain.

Detailed fixes: d39_recommendation.md Β· top locations in Appendix A, every location in findings.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 23 platform declaration(s) and 0 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.

AX10 Β· Code composition9.0 / 10Strongβœ“ 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.

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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all β€” so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

  • The namespaces QuantConnect ↔ QuantConnect.Algorithm ↔ QuantConnect.Algorithm.Framework ↔ QuantConnect.Algorithm.Framework.Alphas ↔ QuantConnect.Algorithm.Framework.Alphas.Analysis ↔ QuantConnect.Algorithm.Framework.Alphas.Serialization ↔ QuantConnect.Algorithm.Framework.Execution ↔ QuantConnect.Algorithm.Framework.Portfolio ↔ QuantConnect.Algorithm.Framework.Portfolio.SignalExports ↔ QuantConnect.Algorithm.Framework.Risk ↔ QuantConnect.Algorithm.Framework.Selection ↔ QuantConnect.Api ↔ QuantConnect.Benchmarks ↔ QuantConnect.Brokerages ↔ QuantConnect.Brokerages.Authentication ↔ QuantConnect.Brokerages.CrossZero ↔ QuantConnect.Commands ↔ QuantConnect.Data ↔ QuantConnect.Data.Auxiliary ↔ QuantConnect.Data.Consolidators ↔ QuantConnect.Data.Fundamental ↔ QuantConnect.Data.Market ↔ QuantConnect.Data.UniverseSelection ↔ QuantConnect.Indicators ↔ QuantConnect.Indicators.CandlestickPatterns ↔ QuantConnect.Interfaces ↔ QuantConnect.Optimizer ↔ QuantConnect.Optimizer.Objectives ↔ QuantConnect.Optimizer.Strategies ↔ QuantConnect.Orders ↔ QuantConnect.Orders.Fees ↔ QuantConnect.Orders.Fills ↔ QuantConnect.Orders.OptionExercise ↔ QuantConnect.Orders.Serialization ↔ QuantConnect.Orders.Slippage ↔ QuantConnect.Packets ↔ QuantConnect.Python ↔ QuantConnect.Scheduling ↔ QuantConnect.Securities ↔ QuantConnect.Securities.Cfd ↔ QuantConnect.Securities.Crypto ↔ QuantConnect.Securities.CryptoFuture ↔ QuantConnect.Securities.CurrencyConversion ↔ QuantConnect.Securities.Equity ↔ QuantConnect.Securities.Forex ↔ QuantConnect.Securities.Future ↔ QuantConnect.Securities.Index ↔ QuantConnect.Securities.IndexOption ↔ QuantConnect.Securities.Interfaces ↔ QuantConnect.Securities.Option ↔ QuantConnect.Securities.Option.StrategyMatcher ↔ QuantConnect.Securities.Positions ↔ QuantConnect.Securities.Volatility ↔ QuantConnect.Statistics ↔ QuantConnect.Storage ↔ QuantConnect.Util depend on each other. The lightest dependency in the cycle is QuantConnect β†’ QuantConnect.Commands (QuantConnect.BaseCommandHandler β†’ QuantConnect.Commands.ICommand, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. β€” Common/Messages/Messages.Commands.cs:17
  • The namespaces QuantConnect.Lean.Engine.Results ↔ QuantConnect.Lean.Engine.Results.Analysis ↔ QuantConnect.Lean.Engine.Results.Analysis.Analyses ↔ QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages ↔ QuantConnect.Lean.Engine.TransactionHandlers depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine.Results β†’ QuantConnect.Lean.Engine.Results.Analysis (QuantConnect.Lean.Engine.Results.BacktestingResultHandler β†’ QuantConnect.Lean.Engine.Results.Analysis.ResultsAnalyzer, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. β€” Engine/Results/BacktestingResultHandler.cs:23
  • The namespaces QuantConnect.Lean.Engine.DataFeeds ↔ QuantConnect.Lean.Engine.DataFeeds.Enumerators ↔ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine.DataFeeds β†’ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories (QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed β†’ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories.SubscriptionDataReaderSubscriptionEnumeratorFactory, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. β€” Engine/DataFeeds/FileSystemDataFeed.cs:27
  • The namespaces QuantConnect.Lean.Engine ↔ QuantConnect.Lean.Engine.Server depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine β†’ QuantConnect.Lean.Engine.Server (QuantConnect.Lean.Engine.AlgorithmManager β†’ QuantConnect.Lean.Engine.Server.ILeanManager, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. β€” Engine/AlgorithmManager.cs:32
  • The namespaces QuantConnect.Report ↔ QuantConnect.Report.ReportElements depend on each other. The lightest dependency in the cycle is QuantConnect.Report β†’ QuantConnect.Report.ReportElements (QuantConnect.Report.Report β†’ QuantConnect.Report.ReportElements.IReportElement, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. β€” REDACTED:25

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
AX5 Β· Architecture & structure10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 Β· Interface segregation9.8 / 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.

  • `IResultHandler` declares 24 members: `Messages`, `IsActive`, `OnSecuritiesChanged`, `OnWarmupFinished`, `Initialize`, `DebugMessage`, `SystemDebugMessage`, `SecurityType`, `LogMessage`, `ErrorMessage`, `RuntimeError`, `BrokerageMessage`, `Sample`, `SetAlgorithm`, `SendStatusUpdate`, `RuntimeStatistic`, `AddDeploymentDetail`, `DeploymentDetails`, `OrderEvent`, `Exit`, `ProcessSynchronousEvents`, `SaveResults`, `AlgorithmNameUpdated`, `AlgorithmTagsUpdated`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. β€” Engine/Results/IResultHandler.cs:35
  • `IBrokerageModel` declares 18 members: `AccountType`, `RequiredFreeBuyingPowerPercent`, `DefaultMarkets`, `CanSubmitOrder`, `CanUpdateOrder`, `CanExecuteOrder`, `ApplySplit`, `GetLeverage`, `GetBenchmark`, `GetFillModel`, `GetFeeModel`, `GetSlippageModel`, `GetSettlementModel`, `GetMarginInterestRateModel`, `GetSettlementModel`, `GetBuyingPowerModel`, `GetBuyingPowerModel`, `GetShortableProvider`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 18 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. β€” Common/Brokerages/IBrokerageModel.cs:34
  • `IAlgorithm` declares 126 members: `InsightsGenerated`, `TimeKeeper`, `SubscriptionManager`, `ProjectId`, `Securities`, `UniverseManager`, `Portfolio`, `Transactions`, `BrokerageModel`, `BrokerageName`, `RiskFreeInterestRateModel`, `BrokerageMessageHandler`, `Notify`, `Schedule`, `HistoryProvider`, `Status`, `IsWarmingUp`, `Name`, `Tags`, `NameUpdated`, `TagsUpdated`, `Time`, `TimeZone`, `UtcTime`, `StartDate`, `EndDate`, `AlgorithmId`, `LiveMode`, `AlgorithmMode`, `DeploymentTarget`, `UniverseSettings`, `DebugMessages`, `ErrorMessages`, `LogMessages`, `RunTimeError`, `RuntimeStatistics`, `Statistics`, `Benchmark`, `TradeBuilder`, `Settings`, and 86 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 126 declarations carry 119 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 119 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. β€” Common/Interfaces/IAlgorithm.cs:52
  • `IAlgorithmSettings` declares 19 members: `AutomaticIndicatorWarmUp`, `RebalancePortfolioOnSecurityChanges`, `RebalancePortfolioOnInsightChanges`, `MaxAbsolutePortfolioTargetPercentage`, `MinAbsolutePortfolioTargetPercentage`, `MinimumOrderMarginPortfolioPercentage`, `FreePortfolioValue`, `FreePortfolioValuePercentage`, `LiquidateEnabled`, `DailyPreciseEndTime`, `DailyConsolidationUseExtendedMarketHours`, `DataSubscriptionLimit`, `StalePriceTimeSpan`, `WarmupResolution`, `TradingDaysPerYear`, `DatabasesRefreshPeriod`, `IgnoreUnknownAssetHoldings`, `PerformanceSamplePeriod`, `SeedInitialPrices`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. β€” Common/Interfaces/IAlgorithmSettings.cs:24
  • `IApi` declares 65 members: `Initialize`, `CreateProject`, `ReadProject`, `UpdateProject`, `AddProjectFile`, `UpdateProjectFileName`, `UpdateProjectFileContent`, `ReadProjectFile`, `ReadProjectFiles`, `ReadProjectNodes`, `UpdateProjectNodes`, `DeleteProjectFile`, `DeleteProject`, `ListProjects`, `CreateCompile`, `ReadCompile`, `CreateBacktest`, `ReadBacktest`, `UpdateBacktest`, `UpdateBacktestTags`, `DeleteBacktest`, `ListBacktests`, `ReadBacktestInsights`, `ReadBacktestOrders`, `ReadBacktestLog`, `EstimateOptimization`, `CreateOptimization`, `ListOptimizations`, `ReadOptimization`, `AbortOptimization`, `UpdateOptimization`, `DeleteOptimization`, `ReadLiveLogs`, `ReadLiveChart`, `ReadLivePortfolio`, `ReadLiveInsights`, `ReadLiveInsights`, `ReadLiveOrders`, `ReadDataLink`, `ReadDataDirectory`, and 25 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 65 declarations carry 64 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 64 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. β€” Common/Interfaces/IApi.cs:32
  • `IBrokerage` declares 23 members: `OrderIdChanged`, `OrdersStatusChanged`, `OrderUpdated`, `OptionPositionAssigned`, `OptionNotification`, `NewBrokerageOrderNotification`, `DelistingNotification`, `AccountChanged`, `Message`, `Name`, `IsConnected`, `GetOpenOrders`, `GetAccountHoldings`, `GetCashBalance`, `PlaceOrder`, `UpdateOrder`, `CancelOrder`, `Connect`, `Disconnect`, `AccountInstantlyUpdated`, `AccountBaseCurrency`, `GetHistory`, `ConcurrencyEnabled`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. β€” Common/Interfaces/IBrokerage.cs:29
  • `IOptionContractFilters<TSelf>` declares 42 members: `Strikes`, `Strikes`, `StrikesAbove`, `StrikesBelow`, `OutOfTheMoney`, `OTM`, `InTheMoney`, `ITM`, `AtTheMoney`, `ATM`, `CallsOnly`, `PutsOnly`, `Delta`, `D`, `Gamma`, `G`, `Theta`, `T`, `Vega`, `V`, `Rho`, `R`, `ImpliedVolatility`, `IV`, `NakedCall`, `NakedPut`, `CallSpread`, `PutSpread`, `CallCalendarSpread`, `PutCalendarSpread`, `Strangle`, `Straddle`, `ProtectiveCollar`, `Conversion`, `CallButterfly`, `PutButterfly`, `IronButterfly`, `IronCondor`, `BoxSpread`, `JellyRoll`, and 2 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 42 declarations carry 41 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 41 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. β€” Common/Securities/Option/IOptionContractFilters.cs:27

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 Β· Test isolation10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether production projects stay free of references to test projects β€” tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

C1 Β· Data Protection0.0 / 10Criticalβœ“ Tool-verified

Other Β· Security β€” Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No data-protection or encryption usage (ASP.NET Data Protection, AES, column encryption, PBKDF2) was found β€” sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.

What to do

  • Encrypt sensitive data at rest (ASP.NET Core Data Protection / column encryption) and manage keys in a vault. Skip if delegated to infra (Postgres TDE, KMS, etc.).
  • Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
C4 Β· Data Retention10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Security β€” Whether data has a defined lifetime β€” retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

ED5 Β· Idempotency9.4 / 10Exemplary◐ Sampled Β· advisory

Other Β· Readiness β€” Whether retry-prone mutations (command handlers + message/event consumers) are idempotent so an at-least-once redelivery or client retry doesn't double-apply the effect β€” heuristic at-risk detection confirmed by language model, advisory.

Method: Roslyn heuristic (any mutation, ungated): command handlers and message/event consumers that mutate persistent state without a visible idempotency guard (exists/dedup check, upsert, idempotency-key/inbox, conditional/versioned write, fixed-value set) flagged as at-risk; each at-risk candidate then confirmed or cleared by a language model as genuinely non-idempotent versus naturally-idempotent. Advisory without a model (heuristic-only, degraded), per-candidate judged with one.

Coverage: Population: retry-prone mutations β€” command handlers (CQRS write side) + message/event consumers (IConsumer/I*EventHandler) β€” that mutate persistent state; runs on any repo with mutations, not only event-driven ones. The at-risk subset (no obvious guard) is a HEURISTIC candidate set, each then LLM-JUDGED non-idempotent vs safe; a handler outside those conventions, or a guard the LLM can't confirm, is bounded by the sample. Degrades to heuristic-only when no model is configured.

  • `Setup.BacktestingSetupHandler.Setup` mutates persistent state (a repository write one hop away, in ScheduleManager.SetEventSchedule) with no idempotency guard, and the model confirms a re-run would double-apply it. A retry or at-least-once redelivery means it can run twice β€” add an exists/dedup check, an upsert, an idempotency-key/inbox, or a versioned write. β€” Engine/Setup/BacktestingSetupHandler.cs:136

What to do

  • Make retry-prone mutations idempotent β€” guard each write with an exists/dedup check, an upsert, an idempotency-key/inbox, or a versioned write, so a re-run doesn't double-apply.
GD1 Β· Unfinished & placeholder code10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Code Health β€” Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface. (×9) β€” Common/Data/UniverseSelection/BaseFundamentalDataProvider.cs:58, Common/DefaultConverter.cs:55, Common/Util/NullStringValueConverter.cs:35, …

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 Β· Incompleteness & stubs7.1 / 10Strongβœ“ Tool-verified

Other Β· Code Health β€” Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • Control only reaches here when `marginRemaining > 0` is false, because the guard on line 62 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. β€” Algorithm.CSharp/CryptoFutureLeverageBasedMarginRegressionAlgorithm.cs:99
  • Control only reaches here when `bollingerBands.Window.IsReady` is false, because the guard on line 46 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test. β€” Algorithm.CSharp/IndicatorHistoryRegressionAlgorithm.cs:53
  • The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. (×2) β€” Algorithm.CSharp/ScheduledUniverseSelectionModelRegressionAlgorithm.cs:109, Common/Securities/Future/FuturesExpiryFunctions.cs:2299
  • `GetAlphaWeight` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface. β€” Algorithm.Framework/Portfolio/AlphaStreamsPortfolioConstructionModel.cs:32
  • Control only reaches here when `resolution != null` is false, because the guard on line 1428 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. β€” Algorithm/QCAlgorithm.History.cs:1458
  • `CanConvert` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface. (×3) β€” Common/DefaultConverter.cs:55, Common/SymbolValueJsonConverter.cs:65, Common/Util/NullStringValueConverter.cs:66
  • The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` β€” leaving them duplicated inside makes the branches read as though they handled this differently. β€” Common/Statistics/TradeBuilder.cs:424
  • `ReadJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface. β€” Common/SymbolValueJsonConverter.cs:53
  • `WriteJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface. (×3) β€” Common/Util/NullStringValueConverter.cs:35, Report/NullResultValueTypeJsonConverter.cs:114, Report/OrderTypeNormalizingJsonConverter.cs:74
  • A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers). (×25) β€” Algorithm.CSharp/AddUniverseSelectionModelCoarseAlgorithm.cs:42, Algorithm.CSharp/AlgorithmModeAndDeploymentTargetAlgorithm.cs:51, Algorithm.CSharp/AlgorithmModeAndDeploymentTargetAlgorithm.cs:52, …
  • `Rebalance` has an empty body β€” confirm it's an intentional no-op and not an unfinished method. β€” Algorithm.CSharp/Benchmarks/ScheduledEventsBenchmark.cs:38

What to do

  • Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) β€” they are dead surface that looks live.
  • Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 Β· Documentation (README)7.0 / 10Strongβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README β€” the high-level shape.
  • Add a README to the 19 of 23 project(s) that lack one β€” worth up to 1.7 pts.
M2 Β· Architecture documentation2.0 / 10Criticalβœ“ 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 structure8.0 / 10Strongβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo is organised deliberately β€” src/test separation and consistent project naming.

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

  • Production code isn't grouped under a src/ folder β€” it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 Β· Documentation accuracy9.9 / 10Exemplary◐ Sampled Β· advisory

Maturity Β· Maturity β€” Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • Algorithm.Python/readme.md runs `dotnet build pythonnet.sln`, but no project, solution or folder named `pythonnet.sln` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β€” Algorithm.Python/readme.md:126

What to do

  • Reconcile the README with reality: Algorithm.Python/readme.md runs `dotnet build pythonnet.sln`, but no project, solution or folder named `pythonnet.sln` exists.
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 & versioning6.0 / 10Adequateβœ“ Tool-verified

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 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.

What to do

  • Make types internal by default and expose only the deliberate public API β€” even for a small library, every public type is a stability contract.
P3 Β· Security & performance tooling4.0 / 10Weakβœ“ 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

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 Β· Deployment & Rollback5.0 / 10Adequateβœ“ 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.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 Β· Release Hygiene5.0 / 10Adequateβœ“ 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.

  • No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 Β· Benchmark discipline8.0 / 10Strongβœ“ 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.

PF2 Β· Allocation hygiene6.0 / 10Adequateβœ“ Tool-verified

Readiness Β· Performance β€” Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager β€” buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs β€” in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths β€” currently 14 use(s) across 509,151 production line(s) (~0.0/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 Β· Async & latency hygiene6.0 / 10Adequateβœ“ 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 the language 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.

  • 10 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) β€” these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • `manualEvent.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). β€” Engine/DataFeeds/BaseDataExchange.cs:155
  • `_newLiveDataEmitted.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). β€” Engine/DataFeeds/LiveSynchronizer.cs:112
  • `task.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). β€” Common/Data/LeanDataWriter.cs:184
  • `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×6) β€” Common/Extensions.cs:3461, Common/Extensions.cs:3471, Common/Extensions.cs:3495, …
  • `_messagesProcessedEvent.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). β€” Brokerages/BrokerageConcurrentMessageHandler.cs:110

What to do

  • Make the call chain async end-to-end and await it β€” never block on a Task with .Wait()/.GetAwaiter().GetResult().
S1 Β· Cryptographic Hygiene6.0 / 10Adequateβœ“ Tool-verified

Other Β· Security β€” Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Outbound TLS (certificate validation, protocol version) is scored wherever it appears β€” a client verifies its peer whether or not it serves anything itself.

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.

  • `SecurityProtocol` explicitly selects `SecurityProtocolType.Tls11`, a protocol version that is broken (SSL 2.0/3.0) or withdrawn (TLS 1.0/1.1, RFC 8996). Offering an obsolete version does not merely permit it β€” it is what a downgrade attack negotiates, so the weakest version on the list is the one that decides the connection's strength. Stop pinning versions here: leave the protocol unset (`SecurityProtocolType.SystemDefault`, or simply do not assign it) so the connection uses the OS policy and picks up TLS 1.3 and future versions without a code change. Where a version must be named explicitly, name `Tls12` and `Tls13` only. β€” Engine/DataFeeds/LiveOptionChainProvider.cs:62
  • MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything β€” a signature, an integrity or tamper check, a credential, or any value an attacker can influence β€” that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead β€” a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code β€” since the algorithm alone cannot distinguish the two uses. β€” Common/Extensions.cs:2427

What to do

  • Drop SSL 2.0/3.0 and TLS 1.0/1.1 from the enabled protocol list β€” prefer leaving it to the OS default (`SystemDefault`) so new versions are picked up automatically, or name `Tls12`/`Tls13` explicitly if it must be pinned.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name.
X1 Β· Async correctness1.1 / 10Criticalβœ“ 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.

  • Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×27) β€” Engine/DataFeeds/LiveOptionChainProvider.cs:216, Engine/DataFeeds/LiveOptionChainProvider.cs:218, Engine/Engine.cs:121, …
  • `.Wait(…)` blocks this thread until the task completes or the bound expires β€” sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). (×2) β€” Engine/DataFeeds/WorkScheduling/WeightedWorkScheduler.cs:104, Common/Isolator.cs:150
  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×7) β€” Common/Data/LeanDataWriter.cs:184, Common/Extensions.cs:3461, Common/Extensions.cs:3471, …

What to do

  • Sync-over-async (deadlock risk) through `.Result`
X12 Β· Unreachable branch10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether any branch is dead by construction β€” a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 Β· Undrained process stream10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a child process that has BOTH standard streams redirected drains both β€” reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

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 reader10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

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.

X17 Β· Uncapped recursion over a caller-supplied document10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Security β€” Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go β€” an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value β€” `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind β€” that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 Β· Disposal-pattern correctness7.3 / 10Strongβœ“ Tool-verified

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.

  • `manualEvent` is a `ManualResetEventSlim`, which implements `IDisposable`, and it is created here (line 146). Every use of it in `Start` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var manualEvent = …;`), which releases it at the end of the scope on every path including a throw. β€” Engine/DataFeeds/BaseDataExchange.cs:146
  • `blockingCollection` is a `BlockingCollection`, which implements `IDisposable`, and it is created here (line 197). Every use of it in `GetContractsData` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var blockingCollection = …;`), which releases it at the end of the scope on every path including a throw. β€” Engine/DataFeeds/DataDownloader/CanonicalDataDownloaderDecorator.cs:197
  • `_enumerator` is never created by `BaseDataCollectionAggregatorEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 160). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/BaseDataCollectionAggregatorEnumerator.cs:160
  • `_enumerator` is never created by `FastForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 128). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/FastForwardEnumerator.cs:128
  • `_enumerator` is never created by `FillForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 303). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:303
  • `_enumerator` is never created by `FilterEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 50). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/FilterEnumerator.cs:50
  • `_enumerator` is never created by `FrontierAwareEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 146). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/FrontierAwareEnumerator.cs:146
  • `_rawDataEnumerator` is never created by `PriceScaleFactorEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 88). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/PriceScaleFactorEnumerator.cs:88
  • `_enumerator` is never created by `QuoteBarFillForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 101). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/QuoteBarFillForwardEnumerator.cs:101
  • `_enumerator` is never created by `RateLimitEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 125). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/RateLimitEnumerator.cs:125
  • `_underlyingEnumerator` is never created by `ScheduledEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 172). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/ScheduledEnumerator.cs:172
  • `_underlying` is never created by `StrictDailyEndTimesEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 92). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/StrictDailyEndTimesEnumerator.cs:92
  • `_enumerator` is never created by `SubscriptionDataEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 95). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/SubscriptionDataEnumerator.cs:95
  • `_enumerator` is never created by `SubscriptionFilterEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 173). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Engine/DataFeeds/Enumerators/SubscriptionFilterEnumerator.cs:173
  • `FakeDataQueue` implements `IDisposable` β€” so it has told every caller it holds something worth releasing β€” and it constructs `_subscriptionManager` itself (line 42), which makes that instance its own. But `_subscriptionManager` is named in none of the methods the disposal search covered: `Dispose` (line 155) β€” that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not β€” which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_subscriptionManager?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. β€” Engine/DataFeeds/Queues/FakeDataQueue.cs:42
  • `testInstance` is a `CommandPythonWrapper`, which implements `IDisposable`, and it is created here (line 1920). Every use of it in `AddCommand` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var testInstance = …;`), which releases it at the end of the scope on every path including a throw. β€” Algorithm/QCAlgorithm.Python.cs:1920
  • `First` is never created by `SequentialConsolidator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 113). Its declared type `IDataConsolidator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Common/Data/Consolidators/SequentialConsolidator.cs:113
  • `Second` is never created by `SequentialConsolidator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 114). Its declared type `IDataConsolidator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Common/Data/Consolidators/SequentialConsolidator.cs:114
  • `writer` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 1896). Every use of it in `ToStream` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var writer = …;`), which releases it at the end of the scope on every path including a throw. β€” Common/Extensions.cs:1896
  • `_orderedEventUtcTimes` is never created by `ScheduledEvent` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 247). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Common/Scheduling/ScheduledEvent.cs:247
  • `_store` is never created by `ObjectStore` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 299). Its declared type `IObjectStore` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” Common/Storage/ObjectStore.cs:299
  • `StreamReaderEnumerable` declares a finalizer (line 102), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one β€” where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. β€” Common/Util/StreamReaderEnumerable.cs:102
  • `tcpListener` is a `TcpListener`, which implements `IDisposable`, and it is created here (line 117). Every use of it in `CheckPort` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var tcpListener = …;`), which releases it at the end of the scope on every path including a throw. β€” Messaging/StreamingMessageHandler.cs:117
  • `resetEvent` is a `ManualResetEvent`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `ConnectSync` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var resetEvent = …;`), which releases it at the end of the scope on every path including a throw. β€” Brokerages/BaseWebsocketsBrokerage.cs:221
  • `connectedEvent` is a `ManualResetEvent`, which implements `IDisposable`, and it is created here (line 282). Every use of it in `Connect` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var connectedEvent = …;`), which releases it at the end of the scope on every path including a throw. β€” Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:282
  • `application` is a `CommandLineApplication`, which implements `IDisposable`, and it is created here (line 27). Every use of it in `Parse` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var application = …;`), which releases it at the end of the scope on every path including a throw. β€” Configuration/ApplicationParser.cs:27
  • `process` is a `Process`, which implements `IDisposable`, and it is created here (line 1063). Every use of it in `Extract7ZipArchive` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw. β€” REDACTED:1063
  • `_destination` is never created by `ConsolidatorDataProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 77). Its declared type `IDataProcessor` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” ToolBox/ConsolidatorDataProcessor.cs:77
  • `_processor` is never created by `FilteredDataProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 58). Its declared type `IDataProcessor` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” ToolBox/FilteredDataProcessor.cs:58
  • `_streamProvider` is never created by `RawFileProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 110). Its declared type `IStreamProvider` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” ToolBox/RawFileProcessor.cs:110
  • `_parser` is never created by `RawFileProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 111). Its declared type `IStreamParser` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. β€” ToolBox/RawFileProcessor.cs:111
  • `pyDict` is a `PyDict`, which implements `IDisposable`, and it is created here (line 986). Every use of it in `GetDictionaryFromSeries` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var pyDict = …;`), which releases it at the end of the scope on every path including a throw. β€” Research/QuantBook.cs:986
  • `looper` is a `PortfolioLooper`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `GetHistory` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var looper = …;`), which releases it at the end of the scope on every path including a throw. β€” Report/PortfolioLooper/PortfolioLooper.cs:221
  • `looper` is a `PortfolioLooper`, which implements `IDisposable`, and it is created here (line 310). Every use of it in `FromOrders` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var looper = …;`), which releases it at the end of the scope on every path including a throw. β€” Report/PortfolioLooper/PortfolioLooper.cs:310
  • `process` is a `Process`, which implements `IDisposable`, and it is created here (line 134). Every use of it in `Main` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw. β€” Report/Program.cs:134

What to do

  • Each finding names the value and the span that decides who owns it β€” the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
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 propagation4.0 / 10Weakβœ“ Tool-verified

Other Β· Code Health β€” Whether async methods accept a CancellationToken so work can be cancelled (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 0/7 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up β€” whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice β€” judge against your hosting model.
  • No CancellationToken parameter β€” this work can't be stopped early once started. (×6) β€” REDACTED:254, REDACTED:316, REDACTED:330, …
  • No CancellationToken parameter β€” the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. β€” Api/ApiConnection.cs:234

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 Β· Mistyped argument guard5.6 / 10Adequateβœ“ Tool-verified

Other Β· Code Health β€” Whether an argument guard throws the exception its own condition describes β€” a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` β€” an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

  • The guard on line 630 rejects `dataTypes` and line 632 reports that rejection as `ArgumentNullException` β€” but the condition's own test `!dataTypes.Any()` is true of a value that is NOT null: it is satisfied by an EMPTY `dataTypes`, and on that path `dataTypes` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Engine/DataFeeds/DataManager.cs:632
  • The guard on line 61 rejects `permtick` and line 63 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(permtick)` is true of a value that is NOT null: it is satisfied by an EMPTY `permtick`, and on that path `permtick` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Common/Data/Auxiliary/MapFile.cs:63
  • The guard on line 49 rejects `channelName` and line 51 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(channelName)` is true of a value that is NOT null: it is satisfied by an EMPTY `channelName`, and on that path `channelName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Common/Data/Channel.cs:51
  • The guard on line 63 rejects `jsonBacktestResult` and line 65 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(jsonBacktestResult)` is true of a value that is NOT null: it is satisfied by an EMPTY `jsonBacktestResult`, and on that path `jsonBacktestResult` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Common/Optimizer/Objectives/Constraint.cs:65
  • The guard on line 63 rejects `target` and line 65 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(target)` is true of a value that is NOT null: it is satisfied by an EMPTY `target`, and on that path `target` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Common/Optimizer/Objectives/Objective.cs:65
  • The guard on line 74 rejects `jsonBacktestResult` and line 76 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(jsonBacktestResult)` is true of a value that is NOT null: it is satisfied by an EMPTY `jsonBacktestResult`, and on that path `jsonBacktestResult` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Common/Optimizer/Objectives/Target.cs:76
  • The guard on line 41 rejects `handlers` and line 43 reports that rejection as `ArgumentNullException` β€” but the condition's own test `handlers.Length == 0` is true of a value that is NOT null: it is satisfied by an EMPTY `handlers`, and on that path `handlers` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. β€” Logging/CompositeLogHandler.cs:43

What to do

  • Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you β€” `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
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.

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.

X23 Β· Unguarded diagnostic materialisation7.3 / 10Strongβœ“ Tool-verified

Other Β· Code Health β€” Whether the work a diagnostic log line costs is paid only when that line is wanted β€” C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence β€” a LINQ operator, a materialisation, `string.Join`, a serializer β€” with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` β€” outside any arrow or function passed as an argument, which the logger calls only when the level is on β€” with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `Trace` at line 253 is called with an argument built by `string.Join(",", timeProviders.Select(x => x.GetType()))` (line 253), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Engine/DataFeeds/DataQueueHandlerManager.cs:253
  • `Trace` at line 126 is called with an argument built by `string.Join(",", _historyProviders.Select(x => x.GetType().Name))` (line 126), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Engine/HistoricalData/HistoryProviderManager.cs:126
  • `Trace` at line 165 is called with an argument built by `string.Join(",", _historyProviders.Skip(1).Select(x => x.GetType().Name))` (line 166), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Engine/HistoricalData/HistoryProviderManager.cs:165
  • `Trace` at line 400 is called with an argument built by `string.Join(Environment.NewLine, holdings)` (line 400), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Engine/Results/RegressionResultHandler.cs:400
  • `Trace` at line 66 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 66), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Common/Data/EventBasedDataQueueHandlerSubscriptionManager.cs:66
  • `Trace` at line 78 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 78), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Common/Data/EventBasedDataQueueHandlerSubscriptionManager.cs:78
  • `Debug` at line 251 is called with an argument built by `string.Join(",", types)` (line 251), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” AlgorithmFactory/Loader.cs:251
  • `Trace` at line 137 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 137), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:137
  • `Trace` at line 158 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 158), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:158
  • `Trace` at line 1008 is called with an argument built by `string.Join(',', dataLink.Errors)` (line 1009), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” Api/Api.cs:1008
  • `Trace` at line 75 is called with an argument built by `string.Join(";", resolutionList.Select(x => x.ToString()).ToArray())` (line 75), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesProgram.cs:75
  • `Debug` at line 144 is called with an argument built by `string.Join(",", sidContext.Tickers)` (line 144), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. β€” ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:144

What to do

  • Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call β€” that is C#'s evaluation order, not a guess β€” then put the construction behind the same level check the sink applies: `if (logger.IsEnabled(LogLevel.Trace))` for Microsoft.Extensions.Logging, the repository's own debug flag where it has one, or a message template whose ARGUMENTS the logging framework only formats when the level is on. Moving the call is not the fix: it is the join/projection in the argument that is paid, wherever the call sits.
X24 Β· Document value interpolated into markup unescaped10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

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.

X26 Β· Unsynchronised callback handoff10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed β€” a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it β€” and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 Β· Collection changed while being enumerated10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a `foreach` leaves the collection it is walking alone β€” a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A β€” the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B β€” the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

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 handling5.6 / 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.

  • `catch (InvalidOperationException)` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. β€” Engine/DataFeeds/DownloaderDataProvider.cs:155
  • `productResults` is used without ever being checked for null, but `JsonConvert` returns null for the document `null` β€” and no catch clause around it catches NullReferenceException, so that one input throws past every handler here and out of the method. The try already answers unreadable files and malformed JSON; answer the empty document too, by testing the result before using it (or by rejecting null where the value is produced) rather than by widening the catch to swallow the deref. β€” Engine/DataFeeds/LiveOptionChainProvider.cs:157
  • `tradesAndExpiriesResponse` is used without ever being checked for null, but `JsonConvert` returns null for the document `null` β€” and no catch clause around it catches NullReferenceException, so that one input throws past every handler here and out of the method. The try already answers unreadable files and malformed JSON; answer the empty document too, by testing the result before using it (or by rejecting null where the value is produced) rather than by widening the catch to swallow the deref. β€” Engine/DataFeeds/LiveOptionChainProvider.cs:176
  • 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. (×32) β€” Engine/DataFeeds/LiveTradingDataFeed.cs:550, Engine/HistoricalData/HistoryProviderManager.cs:171, Engine/Results/BacktestProgressMonitor.cs:56, …
  • `catch` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. β€” Algorithm/Portfolio/PortfolioConstructionModel.cs:233
  • `catch (PythonException)` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. β€” Common/Python/FeeModelPythonWrapper.cs:55
  • An empty catch block silently discards the error β€” failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems β€” or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else). β€” Brokerages/WebSocketClientWrapper.cs:130

What to do

  • Swallowed exception (caught, then discarded)
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.

X32 Β· Type resolved by simple name across every loaded assembly10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a plugin lookup names the type it means β€” searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call β€” a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X5 Β· Nullable reference types2.4 / 10Criticalβœ“ Tool-verified

Other Β· Code Health β€” Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • This method contradicts itself about `security`: line 1027 writes `security?.`, which says `security` can be null, but line 1025 then dereferences it directly as `security.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `security` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `security` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Engine/AlgorithmManager.cs:1025
  • This method contradicts itself about `logs`: line 240 writes `logs?.Count`, which says `logs` can be null, but line 242 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `logs` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `logs` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Engine/Results/Analysis/Analyses/AlgorithmSpeedAnalysis.cs:242
  • This method contradicts itself about `limit`: line 1357 assigns it with `as LimitOrder`, which hands back null rather than throwing when the value is not a `LimitOrder`, but line 1358 then dereferences it directly as `limit.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limit` once before the first use and handle the null case, or cast with `(LimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1358
  • This method contradicts itself about `legLimitOrder`: line 1361 assigns it with `as ComboLegLimitOrder`, which hands back null rather than throwing when the value is not a `ComboLegLimitOrder`, but line 1362 then dereferences it directly as `legLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `legLimitOrder` once before the first use and handle the null case, or cast with `(ComboLegLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1362
  • This method contradicts itself about `marketOrder`: line 1365 assigns it with `as StopMarketOrder`, which hands back null rather than throwing when the value is not a `StopMarketOrder`, but line 1366 then dereferences it directly as `marketOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `marketOrder` once before the first use and handle the null case, or cast with `(StopMarketOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1366
  • This method contradicts itself about `stopLimitOrder`: line 1369 assigns it with `as StopLimitOrder`, which hands back null rather than throwing when the value is not a `StopLimitOrder`, but line 1370 then dereferences it directly as `stopLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopLimitOrder` once before the first use and handle the null case, or cast with `(StopLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1370
  • This method contradicts itself about `trailingStopOrder`: line 1374 assigns it with `as TrailingStopOrder`, which hands back null rather than throwing when the value is not a `TrailingStopOrder`, but line 1375 then dereferences it directly as `trailingStopOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `trailingStopOrder` once before the first use and handle the null case, or cast with `(TrailingStopOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1375
  • This method contradicts itself about `limitIfTouchedOrder`: line 1379 assigns it with `as LimitIfTouchedOrder`, which hands back null rather than throwing when the value is not a `LimitIfTouchedOrder`, but line 1380 then dereferences it directly as `limitIfTouchedOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitIfTouchedOrder` once before the first use and handle the null case, or cast with `(LimitIfTouchedOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1380
  • This method contradicts itself about `contingency`: line 2136 writes `contingency?.GetLink`, which says `contingency` can be null, but line 2150 then dereferences it directly as `contingency.Id` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `contingency` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `contingency` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:2150
  • This method contradicts itself about `instance`: line 707 assigns it with `as BaseDataCollection`, which hands back null rather than throwing when the value is not a `BaseDataCollection`, but line 708 then dereferences it directly as `instance.UniverseSymbol` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `instance` once before the first use and handle the null case, or cast with `(BaseDataCollection)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Algorithm/QCAlgorithm.Universe.cs:708
  • This method contradicts itself about `algorithm`: line 150 writes `algorithm?.Settings`, which says `algorithm` can be null, but line 139 then dereferences it directly as `algorithm.Name` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `algorithm` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `algorithm` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Common/AlgorithmConfiguration.cs:139
  • This method contradicts itself about `optimizationBacktest`: line 90 assigns it with `as OptimizationBacktest`, which hands back null rather than throwing when the value is not a `OptimizationBacktest`, but line 95 then dereferences it directly as `optimizationBacktest.Name` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `optimizationBacktest` once before the first use and handle the null case, or cast with `(OptimizationBacktest)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Api/OptimizationBacktestJsonConverter.cs:95
  • This method contradicts itself about `parameterSet`: line 46 assigns it with `as ParameterSet`, which hands back null rather than throwing when the value is not a `ParameterSet`, but line 51 then dereferences it directly as `parameterSet.Value` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `parameterSet` once before the first use and handle the null case, or cast with `(ParameterSet)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Api/ParameterSetJsonConverter.cs:51
  • This method contradicts itself about `typeData`: line 211 assigns it with `as DataDictionary<T>`, which hands back null rather than throwing when the value is not a `DataDictionary<T>`, but line 212 then dereferences it directly as `typeData.ContainsKey` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `typeData` once before the first use and handle the null case, or cast with `(DataDictionary<T>)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Data/SliceExtensions.cs:212
  • This method contradicts itself about `exchange`: line 399 assigns it with `as Exchange`, which hands back null rather than throwing when the value is not a `Exchange`, but line 407 then dereferences it directly as `exchange.Code` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `exchange` once before the first use and handle the null case, or cast with `(Exchange)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Exchange.cs:407
  • This method contradicts itself about `limitOrder`: line 2824 assigns it with `as LimitOrder`, which hands back null rather than throwing when the value is not a `LimitOrder`, but line 2825 then dereferences it directly as `limitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitOrder` once before the first use and handle the null case, or cast with `(LimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2825
  • This method contradicts itself about `stopMarketOrder`: line 2828 assigns it with `as StopMarketOrder`, which hands back null rather than throwing when the value is not a `StopMarketOrder`, but line 2829 then dereferences it directly as `stopMarketOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopMarketOrder` once before the first use and handle the null case, or cast with `(StopMarketOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2829
  • This method contradicts itself about `stopLimitOrder`: line 2832 assigns it with `as StopLimitOrder`, which hands back null rather than throwing when the value is not a `StopLimitOrder`, but line 2833 then dereferences it directly as `stopLimitOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopLimitOrder` once before the first use and handle the null case, or cast with `(StopLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2833
  • This method contradicts itself about `trailingStopOrder`: line 2837 assigns it with `as TrailingStopOrder`, which hands back null rather than throwing when the value is not a `TrailingStopOrder`, but line 2838 then dereferences it directly as `trailingStopOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `trailingStopOrder` once before the first use and handle the null case, or cast with `(TrailingStopOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2838
  • This method contradicts itself about `limitIfTouched`: line 2843 assigns it with `as LimitIfTouchedOrder`, which hands back null rather than throwing when the value is not a `LimitIfTouchedOrder`, but line 2844 then dereferences it directly as `limitIfTouched.TriggerPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitIfTouched` once before the first use and handle the null case, or cast with `(LimitIfTouchedOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2844
  • This method contradicts itself about `legLimitOrder`: line 2859 assigns it with `as ComboLegLimitOrder`, which hands back null rather than throwing when the value is not a `ComboLegLimitOrder`, but line 2860 then dereferences it directly as `legLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `legLimitOrder` once before the first use and handle the null case, or cast with `(ComboLegLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:2860
  • This method contradicts itself about `data`: line 3850 writes `data?.Scale`, which says `data` can be null, but line 3852 then dereferences it directly as `data.Scale` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `data` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `data` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Common/Extensions.cs:3852
  • This method contradicts itself about `point`: line 175 assigns it with `as IndicatorDataPoint`, which hands back null rather than throwing when the value is not a `IndicatorDataPoint`, but line 177 then dereferences it directly as `point.EndTime` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `point` once before the first use and handle the null case, or cast with `(IndicatorDataPoint)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Indicators/InternalIndicatorValues.cs:177
  • This method contradicts itself about `markets`: line 78 assigns it with `as dynamic`, which hands back null rather than throwing when the value is not a `dynamic`, but line 89 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `markets` once before the first use and handle the null case, or cast with `(dynamic)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Python/BrokerageModelPythonWrapper.cs:89
  • This method contradicts itself about `pyItem`: line 87 assigns it with `as PyObject`, which hands back null rather than throwing when the value is not a `PyObject`, but line 88 then dereferences it directly as `pyItem.As` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `pyItem` once before the first use and handle the null case, or cast with `(PyObject)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Python/BrokerageModelPythonWrapper.cs:88
  • This method contradicts itself about `baseData`: line 153 assigns it with `as BaseData`, which hands back null rather than throwing when the value is not a `BaseData`, but line 155 then dereferences it directly as `baseData.Symbol` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `baseData` once before the first use and handle the null case, or cast with `(BaseData)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Python/PandasConverter.DataFrameGenerator.cs:155
  • This method contradicts itself about `collectionData`: line 154 assigns it with `as IEnumerable`, which hands back null rather than throwing when the value is not a `IEnumerable`, but line 155 then dereferences it directly as `collectionData.Cast` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `collectionData` once before the first use and handle the null case, or cast with `(IEnumerable)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Python/PandasConverter.DataFrameGenerator.cs:155
  • This method contradicts itself about `security`: line 207 writes `security?.GetLastData`, which says `security` can be null, but line 213 then dereferences it directly as `security.Symbol` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `security` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `security` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Common/Securities/Future/FutureMarginModel.cs:213
  • This method contradicts itself about `symbol`: line 35 assigns it with `as Symbol`, which hands back null rather than throwing when the value is not a `Symbol`, but line 40 then dereferences it directly as `symbol.Value` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `symbol` once before the first use and handle the null case, or cast with `(Symbol)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/SymbolJsonConverter.cs:40
  • This method contradicts itself about `currencyPair`: line 73 writes `currencyPair?.SecurityType`, which says `currencyPair` can be null, but line 74 then dereferences it directly as `currencyPair.SecurityType` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `currencyPair` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `currencyPair` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Common/Util/CurrencyPairUtil.cs:74
  • This method contradicts itself about `bigTradeBar`: line 254 assigns it with `as TradeBar`, which hands back null rather than throwing when the value is not a `TradeBar`, but line 255 then dereferences it directly as `bigTradeBar.Open` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `bigTradeBar` once before the first use and handle the null case, or cast with `(TradeBar)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Common/Util/LeanData.cs:255
  • This method contradicts itself about `capture`: line 229 assigns it with `as Match`, which hands back null rather than throwing when the value is not a `Match`, but line 231 then dereferences it directly as `capture.Groups` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `capture` once before the first use and handle the null case, or cast with `(Match)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” REDACTED:231
  • This method contradicts itself about `args`: line 267 assigns it with `as PyObject`, which hands back null rather than throwing when the value is not a `PyObject`, but line 271 then dereferences it directly as `args.Dispose` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `args` once before the first use and handle the null case, or cast with `(PyObject)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” REDACTED:271
  • This method contradicts itself about `args`: line 277 assigns it with `as PyObject`, which hands back null rather than throwing when the value is not a `PyObject`, but line 281 then dereferences it directly as `args.Dispose` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `args` once before the first use and handle the null case, or cast with `(PyObject)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” REDACTED:281
  • This method contradicts itself about `option`: line 82 assigns it with `as Option`, which hands back null rather than throwing when the value is not a `Option`, but line 83 then dereferences it directly as `option.Underlying` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `option` once before the first use and handle the null case, or cast with `(Option)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Indicators/IndicatorBasedOptionPriceModel.cs:83
  • This method contradicts itself about `exerciseValues`: line 129 writes `exerciseValues?.Length`, which says `exerciseValues` can be null, but line 159 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `exerciseValues` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `exerciseValues` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Indicators/OptionGreekIndicatorsHelper.cs:159
  • This method contradicts itself about `dynAlgorithm`: line 120 assigns it with `as dynamic`, which hands back null rather than throwing when the value is not a `dynamic`, but line 123 then dereferences it directly as `dynAlgorithm.SetPandasConverter` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `dynAlgorithm` once before the first use and handle the null case, or cast with `(dynamic)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” AlgorithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs:123
  • This method contradicts itself about `security`: line 567 writes `security?.GetLastData`, which says `security` can be null, but line 568 then dereferences it directly as `security.Exchange` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `security` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `security` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side. β€” Brokerages/Backtesting/BacktestingBrokerage.cs:568
  • This method contradicts itself about `marginModel`: line 128 assigns it with `as FuturesOptionsMarginModel`, which hands back null rather than throwing when the value is not a `FuturesOptionsMarginModel`, but line 129 then dereferences it directly as `marginModel.InitialIntradayMarginRequirement` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `marginModel` once before the first use and handle the null case, or cast with `(FuturesOptionsMarginModel)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Algorithm.CSharp/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.cs:129
  • This method contradicts itself about `futureMarginModel`: line 111 assigns it with `as FutureMarginModel`, which hands back null rather than throwing when the value is not a `FutureMarginModel`, but line 116 then dereferences it directly as `futureMarginModel.InitialOvernightMarginRequirement` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `futureMarginModel` once before the first use and handle the null case, or cast with `(FutureMarginModel)` so the failure is reported where it happens β€” rather than leaving the two readings side by side. β€” Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:116

What to do

  • Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

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 Health39%Weak β€” gated by X1, X5Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture91%ExemplaryStrongest area.
Maturity61%Adequate β€” gated by M2Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Readiness57%AdequateAcceptable, with room to improve.
Security40%Weak β€” gated by D28, D29, D36, C1Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Performance65%AdequateAcceptable, with room to improve.
Unscored β€” 4 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.

  • P12 CI test-gate honesty β€” 24 observation(s) recorded Β· Reported, not scored β€” this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene β€” 1 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate β€” 25 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
  • X7 Silent fallback defaults β€” 4 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 β€” Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes β€” absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C5 Data-Subject Rights β€” Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary β€” absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup β€” not evidenced β€” repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included β€” 37 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.

  • AC1 Text alternatives β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC2 Forms & labels β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC3 Page structure β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC4 Keyboard semantics β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC5 ARIA correctness β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC6 Visual & motion safety β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AC7 A11y enforcement β€” No user-facing web UI (the repo is a library/CLI/worker/headless service) β€” accessibility is not applicable.
  • AX1 Captive dependencies β€” no DI registrations detected
  • AX2 Stateful singletons β€” no singleton implementations detected
  • AX4 Dependency direction β€” not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX7 Slice cohesion β€” not applicable β€” not a vertical-slice architecture
  • AX9 CQS / query purity β€” no CQRS query handlers detected β€” query purity is not applicable to this codebase
  • AXB2 Runtime readiness β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility β€” docker build failed (exit 1) β€” DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; 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.
  • C2 Access Controls β€” No access-control surface detected in the analyzed source β€” no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here β€” this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • D11 Test Reliability β€” Test runner surfaced no tests
  • D22 Internal API Consistency β€” No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling β€” Cross-context type coupling could not be assessed β€” this codebase's bounded contexts are neither declared nor inferable.
  • D25 ADR Conformance β€” no ADRs to check
  • D32 Data Compliance (PII/GDPR) β€” 53 file(s) were not parsed by semgrep β€” the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy β€” No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • 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.
  • D43 Malicious Dependencies β€” Not scored β€” no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) β€” not scanned yet).
  • D7 Architectural Integrity β€” no checkable ADRs and no dependency cycles β€” architectural integrity not assessed
  • D8 Code Coverage β€” Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none β€” no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
  • DM1 Domain Modelling β€” not scored β€” this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven β€” applicable but not scored (2 of 3 signals for this style β€” below the bar we score at): a message-bus package; 2 CQRS handler(s)
  • ES1 Event Sourcing β€” not scored β€” this repository shows none of the 3 signals this lens looks for
  • P2 Observability β€” This repo is a library, not a deployed service β€” it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
  • P7 Outbound HTTP resilience β€” not applicable β€” this isn't a service/API/worker
  • P8 Schema migrations β€” no EF Core usage detected
  • P9 Domain vs controller coverage β€” no coverage report found on disk β€” produce a coverage report in a standard format (Cobertura β€” `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it β€” a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • X4 Structured logging β€” This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's C# was read, and every log call in it goes through a logger that takes one finished message β€” its own wrapper, log4net, Console or Debug β€” so an interpolated message there loses nothing the API could have kept. Calls through Microsoft.Extensions.Logging, Serilog, NLog or ZLogger, or any logger with a message-template overload, would be judged.
  • X6 Hand-rolled structured-format parsing β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.

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 β€” 146 finding(s)
D17 Β· Explicit Debt Β· WriteOnlyPrivateField Β· Γ—35
  • WriteOnlyPrivateField Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:41 β€” private Symbol _futureSymbol β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/Benchmarks/HistoryRequestBenchmark.cs:22 β€” private Symbol _symbol β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField REDACTED:35 β€” private SecurityChanges _changes β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/CustomPartialFillModelAlgorithm.cs:69 β€” private QCAlgorithm _algorithm β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/FuzzyInferenceAlgorithm.cs:45 β€” private Accord.Math.Matrix3x3 _matrix β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/HistoryWithCustomDataSourceRegressionAlgorithm.cs:31 β€” private Symbol _aapl β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/HistoryWithCustomDataSourceRegressionAlgorithm.cs:32 β€” private Symbol _spy β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Tests/Algorithm/AlgorithmPlottingTests.cs:35 β€” private Symbol _spy β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/IndicatorSuiteAlgorithm.cs:44 β€” private Indicators _selectorIndicators β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/IndicatorSuiteAlgorithm.cs:49 β€” private Minimum _minCustom β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/IndicatorSuiteAlgorithm.cs:50 β€” private Maximum _maxCustom β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField REDACTED:35 β€” private bool _isConnected β€” assigned 3 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Algorithm.CSharp/TickDataFilteringAlgorithm.cs:144 β€” private IAlgorithm _algo β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Api/Api.cs:51 β€” private string _dataFolder β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Common/Python/PythonData.cs:32 β€” private dynamic _pythonData β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Engine/DataFeeds/FileSystemDataFeed.cs:43 β€” private ITimeProvider _timeProvider β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Engine/HistoricalData/BrokerageHistoryProvider.cs:32 β€” private IDataPermissionManager _dataPermissionManager β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Engine/Results/RegressionResultHandler.cs:50 β€” private Dictionary<string, string> _currentAlphaRuntimeStatistics β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Messaging/EventMessagingHandler.cs:29 β€” private AlgorithmNodePacket _job β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/AssetAllocationReportElement.cs:28 β€” private BacktestResult _backtest β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/ExposureReportElement.cs:29 β€” private BacktestResult _backtest β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/LeverageUtilizationReportElement.cs:29 β€” private BacktestResult _backtest β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/AssetAllocationReportElement.cs:30 β€” private LiveResult _live β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/CrisisReportElement.cs:28 β€” private LiveResult _live β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Report/ReportElements/EstimatedCapacityReportElement.cs:28 β€” private LiveResult _live β€” assigned 1 time(s), read never β€” this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments β€” or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • + 10 more in this group β€” see findings.md.
D17 Β· Explicit Debt Β· EmptyCatchBlock Β· Γ—33
  • EmptyCatchBlock Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:87 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/BubbleAlgorithm.cs:276 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:205 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:226 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:158 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:179 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:192 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:256 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:248 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:267 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:252 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:273 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:214 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:234 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Algorithm.CSharp/OptionChainStrategyFiltersRegressionAlgorithm.cs:84 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Brokerages/WebSocketClientWrapper.cs:130 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Brokerages/WebSocketClientWrapper.cs:255 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Data/Fundamental/Fundamental.cs:116 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Extensions.cs:3033 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Scheduling/TimeMonitor.cs:113 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Util/CurrencyPairUtil.cs:56 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Util/DateTimeJsonConverter.cs:91 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Common/Util/RateGate.cs:149 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Engine/DataFeeds/LiveTradingDataFeed.cs:550 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock Engine/HistoricalData/HistoryProviderManager.cs:171 β€” empty catch block β€” the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct β€” as it often is on a teardown/dispose path where throwing would mask the original failure β€” catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 8 more in this group β€” see findings.md.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 Β· Knowledge Freshness Β· Orphaned knowledge Β· Γ—10
  • Orphaned knowledge Algorithm.CSharp/StressSymbols.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Algorithm/CandlestickPatterns.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Common/Data/Fundamental/AssetClassificationHelper.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Common/Algorithm/Framework/Alphas/Insight.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Common/Data/Custom/Intrinio/EconomicDataSources.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Algorithm.CSharp/OpeningBreakoutAlgorithm.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Common/Statistics/StatisticsBuilder.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Common/Securities/LocalMarketHours.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Indicators/ImpliedVolatility.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Engine/Results/RegressionResultHandler.cs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 Β· Secrets (history) Β· REDACTED Β· Γ—8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX3 Β· Project dependency cycles Β· Namespace dependency cycle Β· Γ—5
  • Namespace dependency cycle Common/Messages/Messages.Commands.cs:17 β€” The namespaces QuantConnect ↔ QuantConnect.Algorithm ↔ QuantConnect.Algorithm.Framework ↔ QuantConnect.Algorithm.Framework.Alphas ↔ QuantConnect.Algorithm.Framework.Alphas.Analysis ↔ QuantConnect.Algorithm.Framework.Alphas.Serialization ↔ QuantConnect.Algorithm.Framework.Execution ↔ QuantConnect.Algorithm.Framework.Portfolio ↔ QuantConnect.Algorithm.Framework.Portfolio.SignalExports ↔ QuantConnect.Algorithm.Framework.Risk ↔ QuantConnect.Algorithm.Framework.Selection ↔ QuantConnect.Api ↔ QuantConnect.Benchmarks ↔ QuantConnect.Brokerages ↔ QuantConnect.Brokerages.Authentication ↔ QuantConnect.Brokerages.CrossZero ↔ QuantConnect.Commands ↔ QuantConnect.Data ↔ QuantConnect.Data.Auxiliary ↔ QuantConnect.Data.Consolidators ↔ QuantConnect.Data.Fundamental ↔ QuantConnect.Data.Market ↔ QuantConnect.Data.UniverseSelection ↔ QuantConnect.Indicators ↔ QuantConnect.Indicators.CandlestickPatterns ↔ QuantConnect.Interfaces ↔ QuantConnect.Optimizer ↔ QuantConnect.Optimizer.Objectives ↔ QuantConnect.Optimizer.Strategies ↔ QuantConnect.Orders ↔ QuantConnect.Orders.Fees ↔ QuantConnect.Orders.Fills ↔ QuantConnect.Orders.OptionExercise ↔ QuantConnect.Orders.Serialization ↔ QuantConnect.Orders.Slippage ↔ QuantConnect.Packets ↔ QuantConnect.Python ↔ QuantConnect.Scheduling ↔ QuantConnect.Securities ↔ QuantConnect.Securities.Cfd ↔ QuantConnect.Securities.Crypto ↔ QuantConnect.Securities.CryptoFuture ↔ QuantConnect.Securities.CurrencyConversion ↔ QuantConnect.Securities.Equity ↔ QuantConnect.Securities.Forex ↔ QuantConnect.Securities.Future ↔ QuantConnect.Securities.Index ↔ QuantConnect.Securities.IndexOption ↔ QuantConnect.Securities.Interfaces ↔ QuantConnect.Securities.Option ↔ QuantConnect.Securities.Option.StrategyMatcher ↔ QuantConnect.Securities.Positions ↔ QuantConnect.Securities.Volatility ↔ QuantConnect.Statistics ↔ QuantConnect.Storage ↔ QuantConnect.Util depend on each other. The lightest dependency in the cycle is QuantConnect β†’ QuantConnect.Commands (QuantConnect.BaseCommandHandler β†’ QuantConnect.Commands.ICommand, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle Engine/Results/BacktestingResultHandler.cs:23 β€” The namespaces QuantConnect.Lean.Engine.Results ↔ QuantConnect.Lean.Engine.Results.Analysis ↔ QuantConnect.Lean.Engine.Results.Analysis.Analyses ↔ QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages ↔ QuantConnect.Lean.Engine.TransactionHandlers depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine.Results β†’ QuantConnect.Lean.Engine.Results.Analysis (QuantConnect.Lean.Engine.Results.BacktestingResultHandler β†’ QuantConnect.Lean.Engine.Results.Analysis.ResultsAnalyzer, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle Engine/DataFeeds/FileSystemDataFeed.cs:27 β€” The namespaces QuantConnect.Lean.Engine.DataFeeds ↔ QuantConnect.Lean.Engine.DataFeeds.Enumerators ↔ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine.DataFeeds β†’ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories (QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed β†’ QuantConnect.Lean.Engine.DataFeeds.Enumerators.Factories.SubscriptionDataReaderSubscriptionEnumeratorFactory, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle Engine/AlgorithmManager.cs:32 β€” The namespaces QuantConnect.Lean.Engine ↔ QuantConnect.Lean.Engine.Server depend on each other. The lightest dependency in the cycle is QuantConnect.Lean.Engine β†’ QuantConnect.Lean.Engine.Server (QuantConnect.Lean.Engine.AlgorithmManager β†’ QuantConnect.Lean.Engine.Server.ILeanManager, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle REDACTED:25 β€” The namespaces QuantConnect.Report ↔ QuantConnect.Report.ReportElements depend on each other. The lightest dependency in the cycle is QuantConnect.Report β†’ QuantConnect.Report.ReportElements (QuantConnect.Report.Report β†’ QuantConnect.Report.ReportElements.IReportElement, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
D10 Β· Test Quality Β· No assertions (empty test) Β· Γ—5
  • No assertions (empty test): PriceGapBehaviorIsTheExpectedOne Tests/Common/Data/ClassicRangeConsolidatorTests.cs:35 β€” Test method has an empty body β€” it asserts nothing and exercises no code.
  • No assertions (empty test): ComparesAgainstExternalData Tests/Indicators/OptionBaseIndicatorTests.cs:442 β€” Test method has an empty body β€” it asserts nothing and exercises no code.
  • No assertions (empty test): ComparesAgainstExternalDataAfterReset Tests/Indicators/OptionBaseIndicatorTests.cs:448 β€” Test method has an empty body β€” it asserts nothing and exercises no code.
  • No assertions (empty test): AcceptsRenkoBarsAsInput Tests/Indicators/PythonIndicatorTests.cs:531 β€” Test method has an empty body β€” it asserts nothing and exercises no code.
  • No assertions (empty test): AcceptsVolumeRenkoBarsAsInput Tests/Indicators/PythonIndicatorTests.cs:540 β€” Test method has an empty body β€” it asserts nothing and exercises no code.
D17 Β· Explicit Debt Β· NoWarnInCsproj Β· Γ—4
  • NoWarnInCsproj Tests/QuantConnect.Tests.csproj:15 β€” CA1707 β€” this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or β€” if some occurrences really are legitimate β€” narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj Tests/QuantConnect.Tests.csproj:15 β€” IDE0066 β€” this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or β€” if some occurrences really are legitimate β€” narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj:13 β€” CS0618 β€” this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or β€” if some occurrences really are legitimate β€” narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj:13 β€” CA1002 β€” this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or β€” if some occurrences really are legitimate β€” narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· High CVE Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 Β· Explicit Debt Β· InvertedNullGuard Β· Γ—3
  • InvertedNullGuard Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:114 β€” if (buyingPowerModel == null) … buyingPowerModel.GetType β€” the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant β€” if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
  • InvertedNullGuard Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:118 β€” if (buyingPowerModel == null) … buyingPowerModel.GetType β€” the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant β€” if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
  • InvertedNullGuard Algorithm.CSharp/HSIFutureHourRegressionAlgorithm.cs:116 β€” if (buyingPowerModel == null) … buyingPowerModel.GetType β€” the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant β€” if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 Β· IaC & Container Security Β· High IaC Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D17 Β· Explicit Debt Β· FileScopedPragmaDisable Β· Γ—2
  • FileScopedPragmaDisable Tests/Common/Util/DisposableExtensionsTests.cs:25 β€” #pragma warning disable CA2000 β€” the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers β€” that alone turns a standing exemption into a scoped one β€” or fix the cause and drop the directive entirely.
  • FileScopedPragmaDisable Tests/Compression/ZipStreamWriterTests.cs:27 β€” #pragma warning disable CA2000 β€” the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers β€” that alone turns a standing exemption into a scoped one β€” or fix the cause and drop the directive entirely.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
D12 Β· Dependency Hygiene Β· Vulnerable Β· Γ—1
  • Vulnerable: DotNetZip β€” REDACTED β€” High severity. https://github.com/advisories/[GHSA redacted]
D17 Β· Explicit Debt Β· DeadLoopAccumulator Β· Γ—1
  • DeadLoopAccumulator Algorithm.CSharp/FillForwardUntilExpiryRegressionAlgorithm.cs:65 β€” BaseData bar = null; … if (bar == null && value.QuoteBars.TryGetValue(contact.Key, out quoteBar)) β€” this reset runs at the top of every pass, so the value is back to its starting constant before the test below it is reached: the test is decided the same way on every iteration, and whatever the loop adds to this variable further down is wiped out before anything can read it. The threshold it is guarding can therefore never be crossed, however many times the loop goes round, which is why nothing has ever been seen to trip. Move the reset ABOVE the loop, so the count accumulates across iterations the way the test below assumes; if it really is meant to be per-iteration state, then the test belongs with it and the accumulation does not.
D17 Β· Explicit Debt Β· DiscardedPureResult Β· Γ—1
  • DiscardedPureResult Tests/Common/StringExtensionsTests.cs:225 β€” sourceString.Substring(startIndex, length); β€” strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result β€” to the same variable, or to the field or property the transformed text was meant to reach β€” or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
D17 Β· Explicit Debt Β· NoWarnInCsproj repeated across 20 files Β· Γ—1
  • NoWarnInCsproj repeated across 20 files ToolBox/QuantConnect.ToolBox.csproj:15 β€” The identical NoWarnInCsproj (`CA1062`) appears in 20 files (20 occurrences) β€” a single repo-wide policy (e.g. a Directory.Build.props decision or an idiomatic suppression), not 20 independent debts. Decide it once centrally rather than file-by-file. (Every occurrence still counts toward the score and metrics.)
D28 Β· Secrets (history) Β· High secret Β· Γ—1
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Critical CVE Β· Γ—1
  • REDACTED
Serious β€” 1620 finding(s)
D17 Β· Explicit Debt Β· TodoComment Β· Γ—70
  • TodoComment Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs:74 β€” // TODO : In fact, we're unable to properly detect whether or not we auto-added or it was manually added β€” 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 Algorithm.CSharp/RegressionTests/Universes/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.cs:118 β€” // TODO: shouldn't be sending AAPL as a removed security since it was added by another universe β€” 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 Algorithm/QCAlgorithm.History.cs:965 β€” // TODO: This is a patch to fix the issue with the Slice.GetImpl method returning only the last tick β€” 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 Algorithm/QCAlgorithm.Python.cs:317 β€” // TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
  • TodoComment Algorithm/QCAlgorithm.Python.cs:680 β€” // TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
  • TodoComment Algorithm/QCAlgorithm.Python.cs:731 β€” // TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
  • TodoComment Algorithm/QCAlgorithm.Python.cs:746 β€” // TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
  • TodoComment Algorithm/QCAlgorithm.Python.cs:760 β€” // TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved
  • TodoComment Algorithm/QCAlgorithm.Trading.cs:850 β€” // todo: Left here for now but should review β€” 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 Brokerages/Backtesting/BacktestingBrokerage.cs:373 β€” // TODO : This check can be removed in April, 2019 -- a 6-month window to upgrade (also, suspect small % of users, if any are impacted) β€” 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 Common/Brokerages/BybitBrokerageModel.cs:108 β€” //todo default conversion? β€” 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 Common/Brokerages/dYdXBrokerageModel.cs:100 β€” //todo default conversion? β€” 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 Common/Data/Market/OptionContract.cs:335 β€” // TODO: Null check required for FOPs: since OptionUniverse does not support FOPs, β€” 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 Common/Data/UniverseSelection/ContinuousContractUniverse.cs:86 β€” // TODO: this won't work with async universe selection β€” 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 Common/Data/UniverseSelection/UniverseExtensions.cs:107 β€” // TODO looks like we can just replace this for Symbol.Create? β€” 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 Common/Extensions.cs:3900 β€” // TODO: see related issue https://github.com/QuantConnect/Lean/issues/6964 which would avoid the need for this
  • TodoComment Common/Orders/Fees/ExanteFeeModel.cs:125 β€” // ToDo: clarify the value for different exchanges β€” 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 Common/Orders/Fills/EquityFillModel.cs:437 β€” // TODO: Add separate DepthLimited fill partial order quantities based on tick quantity / bar.Volume available. β€” 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 Common/Orders/Fills/EquityFillModel.cs:456 β€” // TODO: Add separate DepthLimited fill partial order quantities based on tick quantity / bar.Volume available. β€” 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 Common/Orders/OptionExercise/DefaultExerciseModel.cs:58 β€” // TODO : Support Manual Exercise of OTM contracts [ inTheMoney = false ] β€” 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 Common/Python/PandasData.cs:230 β€” // TODO field/property.GetValue is expensive β€” 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 Common/Securities/BuyingPowerModel.cs:512 β€” // TODO: Can this be smarter about its adjustment, instead of just stepping by lotsize? β€” 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 Common/Securities/BuyingPowerParameters.cs:61 β€” // TODO: Properly account for 'currency' - not accounted for currently as only performing mechanical refactoring β€” 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 Common/Securities/Cash.cs:270 β€” // TODO: remove once dydx SPOT market will be imlemented β€” 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 Common/Securities/Future/FuturesExpiryFunctions.cs:1759 β€” // TODO: Might need singapore calendar β€” 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.
  • + 45 more in this group β€” see findings.md.
D17 Β· Explicit Debt Β· ObsoleteWithCallers Β· Γ—53
  • ObsoleteWithCallers Algorithm.Framework/Selection/FundamentalUniverseSelectionModel.cs:121 β€” [Obsolete] .ctor
  • ObsoleteWithCallers Algorithm.Framework/Selection/FundamentalUniverseSelectionModel.cs:132 β€” [Obsolete] .ctor
  • ObsoleteWithCallers Common/Chart.cs:67 β€” [Obsolete] .ctor
  • ObsoleteWithCallers Algorithm.Framework/Selection/FundamentalUniverseSelectionModel.cs:226 β€” [Obsolete] SelectCoarse
  • ObsoleteWithCallers Algorithm.Framework/Selection/FundamentalUniverseSelectionModel.cs:244 β€” [Obsolete] SelectFine
  • ObsoleteWithCallers Algorithm/QCAlgorithm.History.cs:785 β€” [Obsolete] GetLastKnownPrice
  • ObsoleteWithCallers Algorithm/QCAlgorithm.History.cs:800 β€” [Obsolete] GetLastKnownPrice
  • ObsoleteWithCallers Algorithm/QCAlgorithm.Universe.cs:460 β€” [Obsolete] AddUniverse
  • ObsoleteWithCallers Algorithm/QCAlgorithm.cs:495 β€” [Obsolete] OptionChainProvider
  • ObsoleteWithCallers Algorithm/QCAlgorithm.cs:504 β€” [Obsolete] FutureChainProvider
  • ObsoleteWithCallers Algorithm/QCAlgorithm.cs:1213 β€” [Obsolete] OnEndOfDay
  • ObsoleteWithCallers AlgorithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs:850 β€” [Obsolete] OnEndOfDay
  • ObsoleteWithCallers Common/Interfaces/IAlgorithm.cs:605 β€” [Obsolete] OnEndOfDay
  • ObsoleteWithCallers Api/ApiConnection.cs:46 β€” [Obsolete] Client
  • ObsoleteWithCallers Common/Algorithm/Framework/Alphas/Serialization/SerializedInsight.cs:49 β€” [Obsolete] GeneratedTime
  • ObsoleteWithCallers Common/Brokerages/BrokerageName.cs:69 β€” [Obsolete] GDAX
  • ObsoleteWithCallers Common/Brokerages/GDAXBrokerageModel.cs:23 β€” [Obsolete] GDAXBrokerageModel
  • ObsoleteWithCallers Common/Chart.cs:38 β€” [Obsolete] ChartType
  • ObsoleteWithCallers Common/Data/Custom/AlphaStreams/PlaceHolder.cs:23 β€” [Obsolete] PlaceHolder
  • ObsoleteWithCallers Common/Data/Custom/Tiingo/TiingoDailyData.cs:25 β€” [Obsolete] TiingoDailyData
  • ObsoleteWithCallers Common/Data/Fundamental/FundamentalUniverse.cs:27 β€” [Obsolete] Fundamentals
  • ObsoleteWithCallers Common/Data/Market/RenkoBar.cs:28 β€” [Obsolete] End
  • ObsoleteWithCallers Common/Data/UniverseSelection/ETFConstituentUniverse.cs:28 β€” [Obsolete] ETFConstituentData
  • ObsoleteWithCallers Common/Data/UniverseSelection/Universe.cs:269 β€” [Obsolete] GetSubscriptionRequests
  • ObsoleteWithCallers Common/Orders/Fees/GDAXFeeModel.cs:23 β€” [Obsolete] GDAXFeeModel
  • + 28 more in this group β€” see findings.md.
D17 Β· Explicit Debt Β· Dead code Β· Γ—50
  • Dead code: GetUniverseProvider Engine/DataFeeds/LiveTradingDataFeed.cs:581 β€” Method GetUniverseProvider β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Lean.Engine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: PeriodAsByte Common/Data/Fundamental/Period.cs:87 β€” NamedType PeriodAsByte β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: UpdateSymbolProperties Common/Securities/Security.cs:1211 β€” Method UpdateSymbolProperties β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetAllDataNormalizationModes Tests/Algorithm/AlgorithmHistoryTests.cs:4765 β€” Method GetAllDataNormalizationModes β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: CancelComboOrders Tests/Brokerages/BrokerageTests.cs:360 β€” Method CancelComboOrders β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: LongFromZero Tests/Brokerages/BrokerageTests.cs:378 β€” Method LongFromZero β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: CloseFromLong Tests/Brokerages/BrokerageTests.cs:386 β€” Method CloseFromLong β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ShortFromZero Tests/Brokerages/BrokerageTests.cs:398 β€” Method ShortFromZero β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: CloseFromShort Tests/Brokerages/BrokerageTests.cs:406 β€” Method CloseFromShort β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ShortFromLong Tests/Brokerages/BrokerageTests.cs:418 β€” Method ShortFromLong β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: LongFromShort Tests/Brokerages/BrokerageTests.cs:435 β€” Method LongFromShort β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: LongCombo Tests/Brokerages/BrokerageTests.cs:452 β€” Method LongCombo β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ShortCombo Tests/Brokerages/BrokerageTests.cs:466 β€” Method ShortCombo β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: LongFromZeroUpdateAndCancel Tests/Brokerages/BrokerageTests.cs:488 β€” Method LongFromZeroUpdateAndCancel β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ContingentOrdersCancel Tests/Brokerages/BrokerageTests.cs:571 β€” Method ContingentOrdersCancel β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ContingentOrdersUpdate Tests/Brokerages/BrokerageTests.cs:585 β€” Method ContingentOrdersUpdate β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ContingentOrdersGetOpenOrders Tests/Brokerages/BrokerageTests.cs:623 β€” Method ContingentOrdersGetOpenOrders β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ContingentOrdersTrigger Tests/Brokerages/BrokerageTests.cs:647 β€” Method ContingentOrdersTrigger β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: OneTriggersOther Tests/Brokerages/ContingentOrderTestParameters.cs:70 β€” Method OneTriggersOther β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NonUpdateableLimitIfTouchedOrderTestParameters Tests/Brokerages/LimitIfTouchedOrderTestParameters.cs:96 β€” NamedType NonUpdateableLimitIfTouchedOrderTestParameters β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NonUpdateableLimitOrderTestParameters Tests/Brokerages/LimitOrderTestParameters.cs:81 β€” NamedType NonUpdateableLimitOrderTestParameters β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NonUpdateableStopLimitOrderTestParameters Tests/Brokerages/StopLimitOrderTestParameters.cs:85 β€” NamedType NonUpdateableStopLimitOrderTestParameters β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NonUpdateableStopMarketOrderTestParameters Tests/Brokerages/StopMarketOrderTestParameters.cs:83 β€” NamedType NonUpdateableStopMarketOrderTestParameters β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: AssertDailyTradeBar Tests/Common/Data/CalendarConsolidatorsTests.cs:419 β€” Method AssertDailyTradeBar β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: PublicArrayTest Tests/Common/Data/SliceTests.cs:1496 β€” NamedType PublicArrayTest β€” Roslyn's SymbolFinder walked every project the solution loads, including QuantConnect.Tests, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository β€” a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • + 25 more in this group β€” see findings.md.
X5 Β· Nullable reference types Β· Symbol treated as nullable, then dereferenced unguarded Β· Γ—40
  • Symbol treated as nullable, then dereferenced unguarded Engine/AlgorithmManager.cs:1025 β€” This method contradicts itself about `security`: line 1027 writes `security?.`, which says `security` can be null, but line 1025 then dereferences it directly as `security.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `security` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `security` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/Results/Analysis/Analyses/AlgorithmSpeedAnalysis.cs:242 β€” This method contradicts itself about `logs`: line 240 writes `logs?.Count`, which says `logs` can be null, but line 242 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `logs` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `logs` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1358 β€” This method contradicts itself about `limit`: line 1357 assigns it with `as LimitOrder`, which hands back null rather than throwing when the value is not a `LimitOrder`, but line 1358 then dereferences it directly as `limit.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limit` once before the first use and handle the null case, or cast with `(LimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1362 β€” This method contradicts itself about `legLimitOrder`: line 1361 assigns it with `as ComboLegLimitOrder`, which hands back null rather than throwing when the value is not a `ComboLegLimitOrder`, but line 1362 then dereferences it directly as `legLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `legLimitOrder` once before the first use and handle the null case, or cast with `(ComboLegLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1366 β€” This method contradicts itself about `marketOrder`: line 1365 assigns it with `as StopMarketOrder`, which hands back null rather than throwing when the value is not a `StopMarketOrder`, but line 1366 then dereferences it directly as `marketOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `marketOrder` once before the first use and handle the null case, or cast with `(StopMarketOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1370 β€” This method contradicts itself about `stopLimitOrder`: line 1369 assigns it with `as StopLimitOrder`, which hands back null rather than throwing when the value is not a `StopLimitOrder`, but line 1370 then dereferences it directly as `stopLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopLimitOrder` once before the first use and handle the null case, or cast with `(StopLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1375 β€” This method contradicts itself about `trailingStopOrder`: line 1374 assigns it with `as TrailingStopOrder`, which hands back null rather than throwing when the value is not a `TrailingStopOrder`, but line 1375 then dereferences it directly as `trailingStopOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `trailingStopOrder` once before the first use and handle the null case, or cast with `(TrailingStopOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1380 β€” This method contradicts itself about `limitIfTouchedOrder`: line 1379 assigns it with `as LimitIfTouchedOrder`, which hands back null rather than throwing when the value is not a `LimitIfTouchedOrder`, but line 1380 then dereferences it directly as `limitIfTouchedOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitIfTouchedOrder` once before the first use and handle the null case, or cast with `(LimitIfTouchedOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Engine/TransactionHandlers/BrokerageTransactionHandler.cs:2150 β€” This method contradicts itself about `contingency`: line 2136 writes `contingency?.GetLink`, which says `contingency` can be null, but line 2150 then dereferences it directly as `contingency.Id` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `contingency` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `contingency` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Algorithm/QCAlgorithm.Universe.cs:708 β€” This method contradicts itself about `instance`: line 707 assigns it with `as BaseDataCollection`, which hands back null rather than throwing when the value is not a `BaseDataCollection`, but line 708 then dereferences it directly as `instance.UniverseSymbol` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `instance` once before the first use and handle the null case, or cast with `(BaseDataCollection)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/AlgorithmConfiguration.cs:139 β€” This method contradicts itself about `algorithm`: line 150 writes `algorithm?.Settings`, which says `algorithm` can be null, but line 139 then dereferences it directly as `algorithm.Name` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `algorithm` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `algorithm` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Api/OptimizationBacktestJsonConverter.cs:95 β€” This method contradicts itself about `optimizationBacktest`: line 90 assigns it with `as OptimizationBacktest`, which hands back null rather than throwing when the value is not a `OptimizationBacktest`, but line 95 then dereferences it directly as `optimizationBacktest.Name` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `optimizationBacktest` once before the first use and handle the null case, or cast with `(OptimizationBacktest)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Api/ParameterSetJsonConverter.cs:51 β€” This method contradicts itself about `parameterSet`: line 46 assigns it with `as ParameterSet`, which hands back null rather than throwing when the value is not a `ParameterSet`, but line 51 then dereferences it directly as `parameterSet.Value` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `parameterSet` once before the first use and handle the null case, or cast with `(ParameterSet)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Data/SliceExtensions.cs:212 β€” This method contradicts itself about `typeData`: line 211 assigns it with `as DataDictionary<T>`, which hands back null rather than throwing when the value is not a `DataDictionary<T>`, but line 212 then dereferences it directly as `typeData.ContainsKey` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `typeData` once before the first use and handle the null case, or cast with `(DataDictionary<T>)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Exchange.cs:407 β€” This method contradicts itself about `exchange`: line 399 assigns it with `as Exchange`, which hands back null rather than throwing when the value is not a `Exchange`, but line 407 then dereferences it directly as `exchange.Code` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `exchange` once before the first use and handle the null case, or cast with `(Exchange)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2825 β€” This method contradicts itself about `limitOrder`: line 2824 assigns it with `as LimitOrder`, which hands back null rather than throwing when the value is not a `LimitOrder`, but line 2825 then dereferences it directly as `limitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitOrder` once before the first use and handle the null case, or cast with `(LimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2829 β€” This method contradicts itself about `stopMarketOrder`: line 2828 assigns it with `as StopMarketOrder`, which hands back null rather than throwing when the value is not a `StopMarketOrder`, but line 2829 then dereferences it directly as `stopMarketOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopMarketOrder` once before the first use and handle the null case, or cast with `(StopMarketOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2833 β€” This method contradicts itself about `stopLimitOrder`: line 2832 assigns it with `as StopLimitOrder`, which hands back null rather than throwing when the value is not a `StopLimitOrder`, but line 2833 then dereferences it directly as `stopLimitOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `stopLimitOrder` once before the first use and handle the null case, or cast with `(StopLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2838 β€” This method contradicts itself about `trailingStopOrder`: line 2837 assigns it with `as TrailingStopOrder`, which hands back null rather than throwing when the value is not a `TrailingStopOrder`, but line 2838 then dereferences it directly as `trailingStopOrder.StopPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `trailingStopOrder` once before the first use and handle the null case, or cast with `(TrailingStopOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2844 β€” This method contradicts itself about `limitIfTouched`: line 2843 assigns it with `as LimitIfTouchedOrder`, which hands back null rather than throwing when the value is not a `LimitIfTouchedOrder`, but line 2844 then dereferences it directly as `limitIfTouched.TriggerPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `limitIfTouched` once before the first use and handle the null case, or cast with `(LimitIfTouchedOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:2860 β€” This method contradicts itself about `legLimitOrder`: line 2859 assigns it with `as ComboLegLimitOrder`, which hands back null rather than throwing when the value is not a `ComboLegLimitOrder`, but line 2860 then dereferences it directly as `legLimitOrder.LimitPrice` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `legLimitOrder` once before the first use and handle the null case, or cast with `(ComboLegLimitOrder)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Extensions.cs:3852 β€” This method contradicts itself about `data`: line 3850 writes `data?.Scale`, which says `data` can be null, but line 3852 then dereferences it directly as `data.Scale` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `data` truly cannot be null here, the `?.` is misleading. Settle it one way β€” test `data` once before the first use and handle the null case, or drop the `?.` β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Indicators/InternalIndicatorValues.cs:177 β€” This method contradicts itself about `point`: line 175 assigns it with `as IndicatorDataPoint`, which hands back null rather than throwing when the value is not a `IndicatorDataPoint`, but line 177 then dereferences it directly as `point.EndTime` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `point` once before the first use and handle the null case, or cast with `(IndicatorDataPoint)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Python/BrokerageModelPythonWrapper.cs:89 β€” This method contradicts itself about `markets`: line 78 assigns it with `as dynamic`, which hands back null rather than throwing when the value is not a `dynamic`, but line 89 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `markets` once before the first use and handle the null case, or cast with `(dynamic)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded Common/Python/BrokerageModelPythonWrapper.cs:88 β€” This method contradicts itself about `pyItem`: line 87 assigns it with `as PyObject`, which hands back null rather than throwing when the value is not a `PyObject`, but line 88 then dereferences it directly as `pyItem.As` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for β€” and the NullReferenceException names neither the cast nor the type that failed. Settle it one way β€” test `pyItem` once before the first use and handle the null case, or cast with `(PyObject)` so the failure is reported where it happens β€” rather than leaving the two readings side by side.
  • + 15 more in this group β€” see findings.md.
X3 Β· Exception handling Β· Swallowed exception (empty catch) Β· Γ—33
  • Swallowed exception (empty catch) Engine/DataFeeds/LiveTradingDataFeed.cs:550 β€” 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) Engine/HistoricalData/HistoryProviderManager.cs:171 β€” 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) Engine/Results/BacktestProgressMonitor.cs:56 β€” 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) Engine/Storage/LocalObjectStore.cs:468 β€” 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) Engine/Storage/LocalObjectStore.cs:630 β€” 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) Common/Data/Fundamental/Fundamental.cs:116 β€” 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) Common/Extensions.cs:3033 β€” 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) Common/Scheduling/TimeMonitor.cs:113 β€” 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) Common/Util/CurrencyPairUtil.cs:56 β€” 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) Common/Util/DateTimeJsonConverter.cs:91 β€” 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) Common/Util/RateGate.cs:149 β€” 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) Logging/Log.cs:294 β€” 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) Logging/Log.cs:302 β€” 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) Indicators/OptionGreekIndicatorBase.cs:163 β€” 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) Brokerages/WebSocketClientWrapper.cs:130 β€” An empty catch block silently discards the error β€” failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems β€” or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
  • Swallowed exception (empty catch) Brokerages/WebSocketClientWrapper.cs:255 β€” 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) Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:87 β€” 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) Algorithm.CSharp/BubbleAlgorithm.cs:276 β€” 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:205 β€” 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:226 β€” 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) Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:158 β€” 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) Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:179 β€” 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) Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:192 β€” 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) Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:256 β€” 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) Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:248 β€” 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.
  • + 8 more in this group β€” see findings.md.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 2) Β· Γ—31
  • Duplicated block (7 lines × 2) Common/Data/Auxiliary/CorporateFactorProvider.cs:113 β€” Common/Data/Auxiliary/CorporateFactorProvider.cs:113-119 | Common/Data/Auxiliary/CorporateFactorProvider.cs:150-156 β€” both copies are in the same file, so extract the 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 `Common/Data/Auxiliary/CorporateFactorProvider.cs:113` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/IndexOptionBearCallSpreadAlgorithm.cs:56 β€” Algorithm.CSharp/IndexOptionBearCallSpreadAlgorithm.cs:56-62 | Algorithm.CSharp/IndexOptionBullCallSpreadAlgorithm.cs:56-62 β€” 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 (7 lines × 2) Common/Securities/Option/OptionFilterUniverse.cs:833 β€” Common/Securities/Option/OptionFilterUniverse.cs:833-839 | Common/Securities/Option/OptionFilterUniverse.cs:896-902 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionFilterUniverse.cs:833` 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 (7 lines × 2) Algorithm.CSharp/MarketOnCloseOrderFillsOnCloseTradeWithTickResolutionAlgorithm.cs:34 β€” Algorithm.CSharp/MarketOnCloseOrderFillsOnCloseTradeWithTickResolutionAlgorithm.cs:34-40 | Algorithm.CSharp/MarketOnOpenOrderFillsOnOpenTradeWithTickResolutionAlgorithm.cs:34-40 β€” before extracting anything, compare `Algorithm.CSharp/MarketOnCloseOrderFillsOnCloseTradeWithTickResolutionAlgorithm.cs` and `Algorithm.CSharp/MarketOnOpenOrderFillsOnOpenTradeWithTickResolutionAlgorithm.cs` as WHOLE FILES: 88% 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. 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 `Algorithm.CSharp/MarketOnCloseOrderFillsOnCloseTradeWithTickResolutionAlgorithm.cs: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.
  • Duplicated block (7 lines × 2) Engine/HistoricalData/SubscriptionDataReaderHistoryProvider.cs:161 β€” Engine/HistoricalData/SubscriptionDataReaderHistoryProvider.cs:161-167 | Engine/HistoricalData/SynchronizingHistoryProvider.cs:174-180 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Engine/HistoricalData/SynchronizingHistoryProvider.cs:170` calls `ConvertFromUtc` and `Engine/HistoricalData/SubscriptionDataReaderHistoryProvider.cs:159` 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) Algorithm/QCAlgorithm.Indicators.cs:3965 β€” Algorithm/QCAlgorithm.Indicators.cs:3965-3971 | Algorithm/QCAlgorithm.Indicators.cs:4003-4009 β€” both copies are in the same file, so extract the 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 `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 × 2) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:178 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:178-184 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:369-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 `Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:178` 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) Common/Util/LeanData.cs:821 β€” Common/Util/LeanData.cs:821-827 | Common/Util/LeanData.cs:832-838 β€” both copies are in the same file, so extract the 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 `Common/Util/LeanData.cs:821` 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 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) Algorithm.CSharp/CustomDataUsingMapFileRegressionAlgorithm.cs:68 β€” Algorithm.CSharp/CustomDataUsingMapFileRegressionAlgorithm.cs:68-80 | Algorithm.CSharp/IndiaDataRegressionAlgorithm.cs:103-109 β€” 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 (7 lines × 2) Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:74 β€” Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:74-80 | Algorithm.CSharp/QLOptionPricingModelRegressionAlgorithm.cs:64-70 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Algorithm.CSharp/QLOptionPricingModelRegressionAlgorithm.cs:62` calls `foreach` and `Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:72` 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 × 2) ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:133 β€” ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:133-139 | ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs: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. Read the line range as the matched WINDOW rather than a finished unit: at `ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:133` 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) Report/ReportElements/RollingPortfolioBetaReportElement.cs:66 β€” Report/ReportElements/RollingPortfolioBetaReportElement.cs:66-72 | Report/ReportElements/RollingPortfolioBetaReportElement.cs:74-80 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/BinanceCashAccountFeeRegressionAlgorithm.cs:33 β€” Algorithm.CSharp/BinanceCashAccountFeeRegressionAlgorithm.cs:33-39 | Algorithm.CSharp/BinanceMarginAccountFeeRegressionAlgorithm.cs:33-39 β€” before extracting anything, compare `Algorithm.CSharp/BinanceCashAccountFeeRegressionAlgorithm.cs` and `Algorithm.CSharp/BinanceMarginAccountFeeRegressionAlgorithm.cs` as WHOLE FILES: 93% 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. 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 (7 lines × 2) Algorithm.Python/AddOptionContractExpiresRegressionAlgorithm.py:47 β€” Algorithm.Python/AddOptionContractExpiresRegressionAlgorithm.py:47-53 | Algorithm.Python/AddOptionContractFromUniverseRegressionAlgorithm.py:71-77 β€” 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 (7 lines × 2) Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:23 β€” Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:23-29 | Algorithm.Python/ContingentComboOrderRegressionAlgorithm.py:24-30 β€” 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 (7 lines × 2) Algorithm.Python/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.py:46 β€” Algorithm.Python/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.py:46-52 | Algorithm.Python/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.py:39-45 β€” before extracting anything, compare `Algorithm.Python/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.py` and `Algorithm.Python/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.py` as WHOLE FILES: 85% 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 2 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. 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 × 2) Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:93 β€” Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:93-99 | Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py:84-90 β€” before extracting anything, compare `Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py` and `Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 5 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.
  • Duplicated block (7 lines × 2) Algorithm.Python/FundamentalRegressionAlgorithm.py:107 β€” Algorithm.Python/FundamentalRegressionAlgorithm.py:107-113 | Algorithm.Python/FundamentalUniverseSelectionAlgorithm.py:43-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 `Algorithm.Python/FundamentalRegressionAlgorithm.py:107` 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) Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:36 β€” Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:36-42 | Algorithm.Python/FuturesExtendedMarketHoursRegressionAlgorithm.py:37-43 β€” 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 (7 lines × 2) Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:44 β€” Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:44-50 | Algorithm.Python/FuturesExtendedMarketHoursRegressionAlgorithm.py:45-51 β€” 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 (7 lines × 2) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:94 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:94-100 | Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:93-99 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py` 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. 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, `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:103` calls `AssertionError` and `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:102` 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) Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:95 β€” Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:95-101 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:95-101 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 × 2) Algorithm.Python/LongAndShortCallCalendarSpreadStrategiesAlgorithm.py:32 β€” Algorithm.Python/LongAndShortCallCalendarSpreadStrategiesAlgorithm.py:32-38 | Algorithm.Python/LongAndShortPutCalendarSpreadStrategiesAlgorithm.py:32-38 β€” 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 (7 lines × 2) Algorithm.Python/OrderTicketDemoAlgorithm.py:438 β€” Algorithm.Python/OrderTicketDemoAlgorithm.py:438-444 | Algorithm.Python/OrderTicketDemoAlgorithm.py:460-466 β€” both copies are in the same file, so extract the 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) Algorithm.Python/SecuritySessionRegressionAlgorithm.py:115 β€” Algorithm.Python/SecuritySessionRegressionAlgorithm.py:115-122 | Algorithm.Python/SecuritySessionWithFuturesRegressionAlgorithm.py:69-75 β€” 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 `Algorithm.Python/SecuritySessionRegressionAlgorithm.py:115` 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.
  • + 6 more in this group β€” see findings.md.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 2) Β· Γ—31
  • Duplicated block (6 lines × 2) Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:56 β€” Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:56-61 | Algorithm.CSharp/OptionEquityBullPutLadderRegressionAlgorithm.cs:56-61 β€” 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 (6 lines × 2) Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:57 β€” Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:57-62 | Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs:57-62 β€” 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 (6 lines × 2) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119-124 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:120-125 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119` 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) Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:117 β€” Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:117-122 | Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:114-119 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs` 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 `Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:117` 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) Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:81 β€” Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:81-86 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:90-95 β€” 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 (6 lines × 2) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:119 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:119-124 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:627-632 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/BasicTemplateFuturesHistoryAlgorithm.cs:95 β€” Algorithm.CSharp/BasicTemplateFuturesHistoryAlgorithm.cs:95-100 | Algorithm.CSharp/BasicTemplateOptionsHistoryAlgorithm.cs:69-74 β€” 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 `Algorithm.CSharp/BasicTemplateFuturesHistoryAlgorithm.cs:95` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/PortfolioRebalanceOnInsightChangesRegressionAlgorithm.cs:53 β€” Algorithm.CSharp/PortfolioRebalanceOnInsightChangesRegressionAlgorithm.cs:53-58 | Algorithm.CSharp/PortfolioRebalanceOnSecurityChangesRegressionAlgorithm.cs:60-65 β€” 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 (6 lines × 2) Common/Securities/Option/OptionFilterUniverse.cs:1204 β€” Common/Securities/Option/OptionFilterUniverse.cs:1204-1209 | Common/Securities/Option/OptionFilterUniverse.cs:1210-1215 β€” both copies are in the same file, so extract the 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, `Common/Securities/Option/OptionFilterUniverse.cs:1200` calls `GetContractsForExpiry`, `Where`, `ToList` and `Common/Securities/Option/OptionFilterUniverse.cs:1209` 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 × 2) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:652 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:652-657 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:675-680 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:652` 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) Algorithm.CSharp/FutureOptionCallITMGreeksExpiryRegressionAlgorithm.cs:130 β€” Algorithm.CSharp/FutureOptionCallITMGreeksExpiryRegressionAlgorithm.cs:130-137 | Algorithm.CSharp/IndexOptionCallITMGreeksExpiryRegressionAlgorithm.cs:118-123 β€” 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 `Algorithm.CSharp/FutureOptionCallITMGreeksExpiryRegressionAlgorithm.cs:130` 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) Algorithm.CSharp/IndexOptionBullCallSpreadAlgorithm.cs:35 β€” Algorithm.CSharp/IndexOptionBullCallSpreadAlgorithm.cs:35-40 | Algorithm.CSharp/IndexOptionIronCondorAlgorithm.cs:33-38 β€” 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 (6 lines × 2) Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:51 β€” Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:51-56 | Algorithm.CSharp/IndexOptionCallITMGreeksExpiryRegressionAlgorithm.cs:45-50 β€” 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 `Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs: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.
  • Duplicated block (6 lines × 2) Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:56 β€” Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:56-61 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:50-55 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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 `Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:56` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/BacktestingAsynchronousOrdersRegressionAlgorithm.cs:32 β€” Algorithm.CSharp/BacktestingAsynchronousOrdersRegressionAlgorithm.cs:32-37 | Algorithm.CSharp/TrailingStopOrderRegressionAlgorithm.cs:44-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. 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) Algorithm.CSharp/BitfinexCashAccountFeeRegressionAlgorithm.cs:33 β€” Algorithm.CSharp/BitfinexCashAccountFeeRegressionAlgorithm.cs:33-38 | Algorithm.CSharp/BitfinexMarginAccountFeeRegressionAlgorithm.cs:33-38 β€” before extracting anything, compare `Algorithm.CSharp/BitfinexCashAccountFeeRegressionAlgorithm.cs` and `Algorithm.CSharp/BitfinexMarginAccountFeeRegressionAlgorithm.cs` as WHOLE FILES: 93% 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. 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 × 2) Algorithm.CSharp/TickQuoteBarConsolidatorWithTickTypeRegressionAlgorithm.cs:39 β€” Algorithm.CSharp/TickQuoteBarConsolidatorWithTickTypeRegressionAlgorithm.cs:39-44 | Algorithm.CSharp/TickTradeBarConsolidatorWithDefaultTickTypeRegressionAlgorithm.cs:39-44 β€” before extracting anything, compare `Algorithm.CSharp/TickQuoteBarConsolidatorWithTickTypeRegressionAlgorithm.cs` and `Algorithm.CSharp/TickTradeBarConsolidatorWithDefaultTickTypeRegressionAlgorithm.cs` as WHOLE FILES: 83% 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. 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 × 2) Algorithm.Framework/Alphas/HistoricalReturnsAlphaModel.cs:136 β€” Algorithm.Framework/Alphas/HistoricalReturnsAlphaModel.cs:136-141 | Algorithm.Framework/Alphas/MacdAlphaModel.cs:155-160 β€” 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 (6 lines × 2) Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:131 β€” Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:131-136 | Algorithm.Python/BybitCryptoFuturesRegressionAlgorithm.py:123-128 β€” 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 (6 lines × 2) Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:178 β€” Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:178-183 | Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:185-190 β€” both copies are in the same file, so extract the 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 `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 (6 lines × 2) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:60 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:60-65 | Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:59-64 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py` 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. 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) Algorithm.Python/FutureOptionChainFullDataRegressionAlgorithm.py:23 β€” Algorithm.Python/FutureOptionChainFullDataRegressionAlgorithm.py:23-28 | Algorithm.Python/FutureOptionChainsMultipleFullDataRegressionAlgorithm.py:23-28 β€” 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 (6 lines × 2) Algorithm.Python/IronCondorStrategyAlgorithm.py:68 β€” Algorithm.Python/IronCondorStrategyAlgorithm.py:68-73 | Algorithm.Python/IronCondorStrategyAlgorithm.py:75-80 β€” both copies are in the same file, so extract the 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 `Algorithm.Python/IronCondorStrategyAlgorithm.py:68` 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) Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:56 β€” Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:56-61 | Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:64-69 β€” both copies are in the same file, so extract the 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) Algorithm.Python/LongAndShortButterflyPutStrategiesAlgorithm.py:56 β€” Algorithm.Python/LongAndShortButterflyPutStrategiesAlgorithm.py:56-61 | Algorithm.Python/LongAndShortButterflyPutStrategiesAlgorithm.py:64-69 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • + 6 more in this group β€” see findings.md.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—27
  • Duplicated block (11 lines × 2) Algorithm.CSharp/BaseFrameworkRegressionAlgorithm.cs:42 β€” Algorithm.CSharp/BaseFrameworkRegressionAlgorithm.cs:42-52 | Algorithm.CSharp/PearsonCorrelationPairsTradingAlphaModelFrameworkAlgorithm.cs:41-51 β€” 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 `Algorithm.CSharp/BaseFrameworkRegressionAlgorithm.cs:42` 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) Common/Data/UniverseSelection/UniverseExtensions.cs:147 β€” Common/Data/UniverseSelection/UniverseExtensions.cs:147-157 | Common/Symbol.cs:93-103 β€” 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 `Common/Data/UniverseSelection/UniverseExtensions.cs:147` 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, `Common/Symbol.cs:91` calls `CreateOption` and `Common/Data/UniverseSelection/UniverseExtensions.cs:145` 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) Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:90 β€” Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:90-100 | Algorithm.CSharp/SetHoldingsFutureRegressionAlgorithm.cs:61-71 β€” 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 `Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:90` it does not close everything it opens, so those exact lines 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) Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:321 β€” Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:321-331 | Algorithm.Framework/Portfolio/RiskParityPortfolioConstructionModel.cs:253-263 β€” 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 `Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:321` 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, `Algorithm.Framework/Portfolio/RiskParityPortfolioConstructionModel.cs:249` calls `RegisterIndicator` and `Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:317` 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) Indicators/CandlestickPatterns/AdvanceBlock.cs:111 β€” Indicators/CandlestickPatterns/AdvanceBlock.cs:111-121 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:97-107 β€” 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 lines × 2) Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:45 β€” Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:45-55 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:47-57 β€” 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 lines × 2) Common/Orders/Fills/EquityFillModel.cs:805 β€” Common/Orders/Fills/EquityFillModel.cs:805-815 | Common/Orders/Fills/EquityFillModel.cs:914-924 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/EquityFillModel.cs:805` 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) Common/Util/LeanData.cs:283 β€” Common/Util/LeanData.cs:283-293 | Common/Util/LeanData.cs:306-316 β€” both copies are in the same file, so extract the 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 `Common/Util/LeanData.cs:283` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:100 β€” Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:100-110 | Indicators/CandlestickPatterns/ThreeBlackCrows.cs:91-101 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Indicators/CandlestickPatterns/ThreeBlackCrows.cs:89` calls `GetCandleColor` and `Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:98` 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) Indicators/CandlestickPatterns/StalledPattern.cs:106 β€” Indicators/CandlestickPatterns/StalledPattern.cs:106-116 | Indicators/CandlestickPatterns/ThreeLineStrike.cs:77-87 β€” 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 `Indicators/CandlestickPatterns/StalledPattern.cs:106` 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) Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:84 β€” Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:84-94 | Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs:84-94 β€” before extracting anything, compare `Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs` and `Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:84` 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) Algorithm.CSharp/BasicTemplateOptionsFrameworkAlgorithm.cs:53 β€” Algorithm.CSharp/BasicTemplateOptionsFrameworkAlgorithm.cs:53-63 | Algorithm.CSharp/OptionChainSubscriptionRemovalRegressionAlgorithm.cs:61-71 β€” 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 (11 lines × 2) Algorithm.CSharp/BasicTemplateSPXWeeklyIndexOptionsAlgorithm.cs:76 β€” Algorithm.CSharp/BasicTemplateSPXWeeklyIndexOptionsAlgorithm.cs:76-86 | Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:65-75 β€” 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 `Algorithm.CSharp/BasicTemplateSPXWeeklyIndexOptionsAlgorithm.cs:76` 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) Algorithm.CSharp/CoarseFineFundamentalComboAlgorithm.cs:113 β€” Algorithm.CSharp/CoarseFineFundamentalComboAlgorithm.cs:113-123 | Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:137-147 β€” 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 (11 lines × 2) Algorithm.CSharp/HourMarketOrderFillsAtBarCloseRegressionAlgorithm.cs:54 β€” Algorithm.CSharp/HourMarketOrderFillsAtBarCloseRegressionAlgorithm.cs:54-64 | Algorithm.CSharp/RestingMarketOrderFillsAtBarOpenRegressionAlgorithm.cs:61-71 β€” 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 lines × 2) Common/Securities/Option/OptionFilterUniverse.cs:473 β€” Common/Securities/Option/OptionFilterUniverse.cs:473-484 | Common/Securities/Option/OptionFilterUniverse.cs:541-551 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionFilterUniverse.cs:473` 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) REDACTED:957 β€” REDACTED:957-967 | REDACTED:991-1001 β€” both copies are in the same file, so extract the 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, `REDACTED:1002` calls `Close` and `REDACTED:968` 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 × 2) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:62 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:62-72 | Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:68-79 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:62` 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) Algorithm.CSharp/NakedShortOptionStrategyOverMarginAlgorithm.cs:45 β€” Algorithm.CSharp/NakedShortOptionStrategyOverMarginAlgorithm.cs:45-55 | Algorithm.CSharp/OptionStrategyFactoryMethodsBaseAlgorithm.cs:41-51 β€” 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 (11 lines × 2) Algorithm.CSharp/CoarseFineFundamentalComboAlgorithm.cs:44 β€” Algorithm.CSharp/CoarseFineFundamentalComboAlgorithm.cs:44-54 | Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:44-54 β€” 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 (11 lines × 2) Algorithm.CSharp/FeeModelNotUsingAccountCurrency.cs:71 β€” Algorithm.CSharp/FeeModelNotUsingAccountCurrency.cs:71-81 | Algorithm.CSharp/ZeroFeeRegressionAlgorithm.cs:53-63 β€” 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 (11 lines × 2) Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:84 β€” Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:84-94 | Algorithm.Python/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.py:108-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 (11 lines × 2) Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:55 β€” Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:55-65 | Algorithm.Python/FuturesExtendedMarketHoursRegressionAlgorithm.py:62-72 β€” 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 lines × 2) Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:23 β€” Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:23-33 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:23-33 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallButterflyAlgorithm.py` and `Algorithm.Python/IndexOptionPutButterflyAlgorithm.py` 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. 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 (11 lines × 2) Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py:29 β€” Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py:29-39 | Algorithm.Python/OptionExerciseAssignRegressionAlgorithm.py:27-37 β€” 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.
  • + 2 more in this group β€” see findings.md.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 2) Β· Γ—27
  • Duplicated block (5 lines × 2) Algorithm.CSharp/IndexOptionCallCalendarSpreadAlgorithm.cs:61 β€” Algorithm.CSharp/IndexOptionCallCalendarSpreadAlgorithm.cs:61-65 | Algorithm.CSharp/IndexOptionPutCalendarSpreadAlgorithm.cs:67-71 β€” 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) Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:66 β€” Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:66-70 | Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:71-75 β€” 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 `Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:66` 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) REDACTED:85 β€” REDACTED:85-89 | REDACTED:99-103 β€” both copies are in the same file, so extract the 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:85` 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) Algorithm.CSharp/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.cs:29 β€” Algorithm.CSharp/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.cs:29-33 | Algorithm.CSharp/OptionPriceModelForUnsupportedAmericanOptionRegressionAlgorithm.cs:29-33 β€” before extracting anything, compare `Algorithm.CSharp/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionPriceModelForUnsupportedAmericanOptionRegressionAlgorithm.cs` as WHOLE FILES: 89% 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. 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) Common/Scheduling/TimeRules.cs:261 β€” Common/Scheduling/TimeRules.cs:261-265 | Common/Scheduling/TimeRules.cs:375-379 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:70 β€” Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:70-74 | Algorithm.CSharp/OptionSplitRegressionAlgorithm.cs:65-69 β€” 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 `Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:70` it does not close everything it opens, so those exact lines 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) Common/Orders/OrderTicket.cs:629 β€” Common/Orders/OrderTicket.cs:629-633 | Common/Orders/OrderTicket.cs:644-648 β€” both copies are in the same file, so extract the 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 `CancelOrderRequest` in one and `UpdateOrderRequest` 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) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:159 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:159-163 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:346-350 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:159` 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 `parameters` to `PositionGroupMaintenanceMarginParameters` in one and `PositionGroupInitialMarginParameters` 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) Algorithm.CSharp/AddAndRemoveOptionContractRegressionAlgorithm.cs:44 β€” Algorithm.CSharp/AddAndRemoveOptionContractRegressionAlgorithm.cs:44-48 | Algorithm.CSharp/SecuritySessionWithOptionRegressionAlgorithm.cs:41-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 `Algorithm.CSharp/AddAndRemoveOptionContractRegressionAlgorithm.cs:44` 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) Algorithm.CSharp/BubbleAlgorithm.cs:133 β€” Algorithm.CSharp/BubbleAlgorithm.cs:133-137 | Algorithm.CSharp/BubbleAlgorithm.cs:161-165 β€” both copies are in the same file, so extract the 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 `Algorithm.CSharp/BubbleAlgorithm.cs:133` 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) Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:358 β€” Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:358-362 | Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:435-439 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:358` it does not close everything it opens, so those exact lines 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) Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:373 β€” Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:373-377 | Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:419-423 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:373` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/EveningStar.cs:57 β€” Indicators/CandlestickPatterns/EveningStar.cs:57-61 | Indicators/CandlestickPatterns/MorningStar.cs:57-61 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningStar.cs` and `Indicators/CandlestickPatterns/MorningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 (5 lines × 2) Indicators/CandlestickPatterns/Hammer.cs:54 β€” Indicators/CandlestickPatterns/Hammer.cs:54-58 | Indicators/CandlestickPatterns/HangingMan.cs:54-58 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Hammer.cs` and `Indicators/CandlestickPatterns/HangingMan.cs` as WHOLE FILES: this scan already matched 4 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. 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 × 2) Algorithm.CSharp/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.cs:34 β€” Algorithm.CSharp/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.cs:34-38 | Algorithm.CSharp/HistoryWithDifferentDataMappingModeRegressionAlgorithm.cs:32-36 β€” 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) Report/ReportElements/ExposureReportElement.cs:101 β€” Report/ReportElements/ExposureReportElement.cs:101-105 | Report/ReportElements/ExposureReportElement.cs:106-110 β€” both copies are in the same file, so extract the 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) Algorithm.Python/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.py:37 β€” Algorithm.Python/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.py:37-41 | Algorithm.Python/HistoryWithDifferentDataMappingModeRegressionAlgorithm.py:36-40 β€” 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) Algorithm.Python/LongAndShortCallCalendarSpreadStrategiesAlgorithm.py:52 β€” Algorithm.Python/LongAndShortCallCalendarSpreadStrategiesAlgorithm.py:52-56 | Algorithm.Python/LongAndShortPutCalendarSpreadStrategiesAlgorithm.py:52-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 `Algorithm.Python/LongAndShortCallCalendarSpreadStrategiesAlgorithm.py:52` 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) Algorithm.Python/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.py:23 β€” Algorithm.Python/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.py:23-27 | Algorithm.Python/OptionPriceModelForUnsupportedAmericanOptionRegressionAlgorithm.py:23-27 β€” before extracting anything, compare `Algorithm.Python/OptionPriceModelForSupportedAmericanOptionRegressionAlgorithm.py` and `Algorithm.Python/OptionPriceModelForUnsupportedAmericanOptionRegressionAlgorithm.py` as WHOLE FILES: 82% 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. 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) Report/ReportCharts.py:252 β€” Report/ReportCharts.py:252-256 | Report/ReportCharts.py:1136-1140 β€” both copies are in the same file, so extract the 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 `Report/ReportCharts.py:252` it does not close everything it opens, so those 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, `Report/ReportCharts.py:1141` calls `set_axisbelow` and `Report/ReportCharts.py:257` 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 (5 lines × 2) Algorithm.Python/CustomModelsAlgorithm.py:93 β€” Algorithm.Python/CustomModelsAlgorithm.py:93-97 | Algorithm.Python/CustomModelsPEP8Algorithm.py:91-95 β€” before extracting anything, compare `Algorithm.Python/CustomModelsAlgorithm.py` and `Algorithm.Python/CustomModelsPEP8Algorithm.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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. 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 (5 lines × 2) Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:51 β€” Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:51-55 | Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py:51-55 β€” before extracting anything, compare `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py` and `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py` as WHOLE FILES: this scan already matched 4 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 × 2) Algorithm.Python/SetHoldingsRegressionAlgorithm.py:25 β€” Algorithm.Python/SetHoldingsRegressionAlgorithm.py:25-29 | Algorithm.Python/StringToSymbolImplicitConversionRegressionAlgorithm.py:22-26 β€” 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) Algorithm.Python/BasicCSharpIntegrationTemplateAlgorithm.py:20 β€” Algorithm.Python/BasicCSharpIntegrationTemplateAlgorithm.py:20-24 | Algorithm.Python/BrokerageActivityEventHandlingAlgorithm.py:26-30 β€” 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) Algorithm.Python/FutureOptionChainsMultipleFullDataRegressionAlgorithm.py:58 β€” Algorithm.Python/FutureOptionChainsMultipleFullDataRegressionAlgorithm.py:58-62 | Algorithm.Python/FuturesChainsMultipleFullDataRegressionAlgorithm.py:53-57 β€” 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.
  • + 2 more in this group β€” see findings.md.
X1 Β· Async correctness Β· Sync-over-async (deadlock risk) through `.Result` Β· Γ—27
  • Sync-over-async (deadlock risk) through `.Result` Engine/DataFeeds/LiveOptionChainProvider.cs:216 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Engine/DataFeeds/LiveOptionChainProvider.cs:218 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Engine/Engine.cs:121 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/Collective2SignalExport.cs:290 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/Collective2SignalExport.cs:293 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:192 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:195 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:220 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:223 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:234 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:248 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:257 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:277 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/CrunchDAOSignalExport.cs:280 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:200 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:201 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:229 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:263 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:264 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/VBaseSignalExport.cs:159 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Algorithm/Framework/Portfolio/SignalExports/VBaseSignalExport.cs:160 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Common/Extensions.cs:421 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Api/Api.cs:1028 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Api/Api.cs:1139 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` Api/Api.cs:1415 β€” Reading `.Result` of a task that has not completed blocks this thread until it does β€” the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • + 2 more in this group β€” see findings.md.
D3 Β· God Classes Β· TooManyMethods Β· Γ—25
  • TooManyMethods: QCAlgorithm Algorithm/QCAlgorithm.Indicators.cs β€” TooManyMethods β€” 5400 significant lines (blank, comment-only and punctuation-only lines excluded), 716 methods, declared across 10 files: Algorithm/QCAlgorithm.Indicators.cs (222), Algorithm/QCAlgorithm.cs (169), Algorithm/QCAlgorithm.Python.cs (92), Algorithm/QCAlgorithm.Trading.cs (72), +6 more file(s). The bar is 30 methods; this is 686 over it, 23.87× 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: AlgorithmPythonWrapper AlgorithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs β€” TooManyMethods β€” 340 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 30 methods; this is 53 over it, 2.77× 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: Api Api/Api.cs β€” TooManyMethods β€” 533 significant lines (blank, comment-only and punctuation-only lines excluded), 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: ConstituentUniverseDefinitions Algorithm/ConstituentUniverseDefinitions.cs β€” TooManyMethods β€” 292 significant lines (blank, comment-only and punctuation-only lines excluded), 73 methods. The bar is 30 methods; this is 43 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.
  • TooManyMethods: BaseOptionFilterUniverse Common/Securities/Option/OptionFilterUniverse.cs β€” TooManyMethods β€” 439 significant lines (blank, comment-only and punctuation-only lines excluded), 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: CandlestickPatterns Algorithm/CandlestickPatterns.cs β€” TooManyMethods β€” 309 significant lines (blank, comment-only and punctuation-only lines excluded), 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: BaseResultsHandler Engine/Results/BaseResultsHandler.cs β€” TooManyMethods β€” 512 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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: IndicatorBase Indicators/IndicatorBase.Operators.cs β€” TooManyMethods β€” 176 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods, declared across 2 files: Indicators/IndicatorBase.Operators.cs (49), Indicators/IndicatorBase.cs (9). The bar is 30 methods; this is 28 over it, 1.93× 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: BrokerageTransactionHandler Engine/TransactionHandlers/BrokerageTransactionHandler.cs β€” TooManyMethods β€” 923 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 30 methods; this is 24 over it, 1.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: Security Common/Securities/Security.cs β€” TooManyMethods β€” 427 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 30 methods; this is 24 over it, 1.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: LeanData Common/Util/LeanData.cs β€” TooManyMethods β€” 807 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: OptionChain Common/Data/Market/OptionChain.Filters.cs β€” TooManyMethods β€” 119 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods, declared across 2 files: Market/OptionChain.Filters.cs (44), Market/OptionChain.cs (6). The bar is 30 methods; this is 20 over it, 1.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: OptionStrategies Common/Securities/Option/OptionStrategies.cs β€” TooManyMethods β€” 418 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: LiveTradingResultHandler Engine/Results/LiveTradingResultHandler.cs β€” TooManyMethods β€” 567 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 30 methods; 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.
  • TooManyMethods: Compression REDACTED β€” TooManyMethods β€” 380 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: DateRules Common/Scheduling/DateRules.cs β€” TooManyMethods β€” 199 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: TradeBar Common/Data/Market/TradeBar.cs β€” TooManyMethods β€” 312 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; 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.
  • TooManyMethods: Symbol Common/Symbol.cs β€” TooManyMethods β€” 297 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; 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.
  • TooManyMethods: QuantBook Research/QuantBook.cs β€” TooManyMethods β€” 480 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: SecurityIdentifier Common/SecurityIdentifier.cs β€” TooManyMethods β€” 385 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: Brokerage Brokerages/Brokerage.cs β€” TooManyMethods β€” 296 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.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: SecurityTransactionManager Common/Securities/SecurityTransactionManager.cs β€” TooManyMethods β€” 186 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: ContractSecurityFilterUniverse Common/Securities/ContractSecurityFilterUniverse.cs β€” TooManyMethods β€” 177 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: Time Common/Time.cs β€” TooManyMethods β€” 234 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: BacktestingResultHandler Engine/Results/BacktestingResultHandler.cs β€” TooManyMethods β€” 375 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 30 methods; 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.
P12 Β· CI test-gate honesty Β· CI test gate excludes suites by filter Β· Γ—23
  • CI test gate excludes suites by filter REDACTED:44 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --blame-hang-timeout 300seconds --blame-crash --filter "TestCategory!=TravisExclud…` filters with `TestCategory!=TravisExclude&TestCategory!=ResearchRegressionTests` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:29 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter TestCategory=RegressionTests -- TestRunParameters.Parameter\(name=\…` filters with `TestCategory=RegressionTests` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:45 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter TestCategory=ResearchRegressionTests -- "TestRunParameters.Paramete…` filters with `TestCategory=ResearchRegressionTests` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:33 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTes…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:39 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTes…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:42 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests" --blam…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:45 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StableB…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StableBaselinesTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:48 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.AxPlatf…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.AxPlatformTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:51 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tensorl…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorlyTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:54 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.IgniteT…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.IgniteTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:57 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tensorf…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:60 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tensorf…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowProbabilityTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:63 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Riskpar…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.RiskparityportfolioTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:66 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transfo…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transformers` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:68 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.XTransf…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.XTransformers` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:71 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.KerasTe…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.KerasTest|PyvinecopulibTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:73 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StatsFo…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StatsForecast|Mlforecast` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:75 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Mlxtend…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.MlxtendTest|Thinc` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:77 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ModuleV…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ModuleVersionTestExplicit` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:79 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Neuralf…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Neuralforecast` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:81 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tsfel" …` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tsfel` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter REDACTED:83 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ScikitO…` filters with `FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ScikitOptimizeTest` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
  • CI test gate excludes suites by filter .travis.yml:23 β€” `dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter TestCategory!=TravisExclude -- TestRunParameters.Parameter\(name=\"log-ha…` filters with `TestCategory!=TravisExclude` β€” 112 test(s) it drops β€” run by no other gate before merge (categories TravisExclude; e.g. AlgorithmDownloadTests.Download_Without_Parameters_Successfully, AlgorithmDownloadTests.Download_With_CSharp_Parameter_Successfully). Run what it drops in another job before merge (a complementary filter), or remove the filter.
D17 Β· Explicit Debt Β· CommentedOutCode Β· Γ—22
  • CommentedOutCode Algorithm.CSharp/BrokerageModelAlgorithm.cs:45 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/BubbleAlgorithm.cs:65 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/BubbleAlgorithm.cs:70 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:77 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseCallLadderRegressionAlgorithm.cs:77 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseConversionRegressionAlgorithm.cs:69 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs:70 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs:77 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniversePutLadderRegressionAlgorithm.cs:77 β€” 3 consecutive commented-code lines
  • CommentedOutCode Tests/Algorithm/AlgorithmSetHoldingsTests.cs:193 β€” 3 consecutive commented-code lines
  • CommentedOutCode Tests/Algorithm/AlgorithmSetHoldingsTests.cs:239 β€” 3 consecutive commented-code lines
  • CommentedOutCode Tests/Common/Util/MarketHoursDatabaseJsonConverterTests.cs:328 β€” 3 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:97 β€” 4 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:80 β€” 4 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs:82 β€” 4 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/OptionStrategyFilteringUniverseJellyRollRegressionAlgorithm.cs:80 β€” 4 consecutive commented-code lines
  • CommentedOutCode Tests/Engine/Results/BacktestingResultHandlerTests.cs:90 β€” 4 consecutive commented-code lines
  • CommentedOutCode Algorithm.CSharp/HistoryAlgorithm.cs:109 β€” 6 consecutive commented-code lines
  • CommentedOutCode Tests/Common/Securities/SecurityPortfolioManagerTests.cs:289 β€” 6 consecutive commented-code lines
  • CommentedOutCode Tests/Algorithm/AlgorithmSetHoldingsTests.cs:135 β€” 9 consecutive commented-code lines
  • CommentedOutCode Tests/Algorithm/AlgorithmSetHoldingsTests.cs:178 β€” 7 consecutive commented-code lines
  • CommentedOutCode Tests/Algorithm/AlgorithmSetHoldingsTests.cs:224 β€” 7 consecutive commented-code lines
D4 Β· Code Duplication Β· Duplicated block (8 lines × 2) Β· Γ—21
  • Duplicated block (8 lines × 2) Common/Orders/Fills/FillModel.cs:196 β€” Common/Orders/Fills/FillModel.cs:196-203 | Common/Orders/Fills/FillModel.cs:217-224 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/FillModel.cs:196` it does not close everything it opens, so those exact lines 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) Common/Orders/Fills/FillModel.cs:882 β€” Common/Orders/Fills/FillModel.cs:882-889 | Common/Orders/Fills/FillModel.cs:941-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 `Common/Orders/Fills/FillModel.cs:882` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/AdvanceBlock.cs:134 β€” Indicators/CandlestickPatterns/AdvanceBlock.cs:134-141 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:131-138 β€” 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) Algorithm.CSharp/OptionEquityCallCalendarSpreadRegressionAlgorithm.cs:44 β€” Algorithm.CSharp/OptionEquityCallCalendarSpreadRegressionAlgorithm.cs:44-51 | Algorithm.CSharp/OptionEquityPutCalendarSpreadRegressionAlgorithm.cs:44-51 β€” 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 `Algorithm.CSharp/OptionEquityCallCalendarSpreadRegressionAlgorithm.cs:44` 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) Algorithm/QCAlgorithm.Python.cs:1053 β€” Algorithm/QCAlgorithm.Python.cs:1053-1060 | Algorithm/QCAlgorithm.Python.cs:1127-1134 β€” both copies are in the same file, so extract the 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 `Algorithm/QCAlgorithm.Python.cs:1053` 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) Common/Data/Market/QuoteBar.cs:608 β€” Common/Data/Market/QuoteBar.cs:608-615 | Common/Data/Market/TradeBar.cs:636-643 β€” 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 `Common/Data/Market/QuoteBar.cs:608` it does not close everything it opens, so those exact lines 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) Indicators/Rho.cs:224 β€” Indicators/Rho.cs:224-231 | Indicators/Theta.cs:223-230 β€” before extracting anything, compare `Indicators/Rho.cs` and `Indicators/Theta.cs` 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. 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, `Indicators/Theta.cs:231` calls `Exp`, `Max`, `Density` and `Indicators/Rho.cs:233` 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) Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:40 β€” Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:40-47 | Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs:40-47 β€” before extracting anything, compare `Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs` and `Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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. 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) Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:50 β€” Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:50-57 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:47-54 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 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 `Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:50` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/OptionEquityStrategyMatcherRegressionAlgorithm.cs:89 β€” Algorithm.CSharp/OptionEquityStrategyMatcherRegressionAlgorithm.cs:89-96 | Algorithm.CSharp/OptionEquityStrategyMatcherRegressionAlgorithm.cs:100-107 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/FutureOptionBuySellCallIntradayRegressionAlgorithm.cs:42 β€” Algorithm.CSharp/FutureOptionBuySellCallIntradayRegressionAlgorithm.cs:42-53 | Algorithm.CSharp/FutureOptionIndicatorsRegressionAlgorithm.cs:28-35 β€” 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 `Algorithm.CSharp/FutureOptionBuySellCallIntradayRegressionAlgorithm.cs:42` it does not close everything it opens, so those 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 lines × 2) Engine/Results/Analysis/Analyses/OrderResponseErrorsAnalyses/BrokerageModelRefusedToSubmitOrderOrderResponseErrorAnalysis.cs:105 β€” Engine/Results/Analysis/Analyses/OrderResponseErrorsAnalyses/BrokerageModelRefusedToSubmitOrderOrderResponseErrorAnalysis.cs:105-112 | Engine/Results/Analysis/Analyses/OrderResponseErrorsAnalyses/BrokerageModelRefusedToUpdateOrderOrderResponseErrorAnalysis.cs:70-77 β€” 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 (8 lines × 2) Algorithm.Framework/Selection/CoarseFundamentalUniverseSelectionModel.cs:62 β€” Algorithm.Framework/Selection/CoarseFundamentalUniverseSelectionModel.cs:62-69 | Algorithm.Framework/Selection/FineFundamentalUniverseSelectionModel.cs:73-81 β€” 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. 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) Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:59 β€” Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:59-66 | Algorithm.Python/BasicTemplateCryptoFutureHourlyAlgorithm.py:57-64 β€” 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) Algorithm.Python/ComboOrdersFillModelAlgorithm.py:91 β€” Algorithm.Python/ComboOrdersFillModelAlgorithm.py:91-98 | Algorithm.Python/CustomPartialFillModelAlgorithm.py:62-69 β€” 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) Algorithm.Python/CustomOptionPriceModelRegressionAlgorithm.py:22 β€” Algorithm.Python/CustomOptionPriceModelRegressionAlgorithm.py:22-29 | Algorithm.Python/OptionStrategyFactoryMethodsBaseAlgorithm.py:23-30 β€” 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) Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:21 β€” Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:21-28 | Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:21-28 β€” 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) Algorithm.Python/IndexOptionCallCalendarSpreadAlgorithm.py:41 β€” Algorithm.Python/IndexOptionCallCalendarSpreadAlgorithm.py:41-48 | Algorithm.Python/IndexOptionPutCalendarSpreadAlgorithm.py:44-51 β€” 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) Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:32 β€” Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:32-39 | Algorithm.Python/LongAndShortButterflyPutStrategiesAlgorithm.py:32-39 β€” 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) Algorithm.Python/CustomBrokerageSideOrderHandlingRegressionAlgorithm.py:39 β€” Algorithm.Python/CustomBrokerageSideOrderHandlingRegressionAlgorithm.py:39-46 | Algorithm.Python/CustomBrokerageSideOrderHandlingRegressionPartialAlgorithm.py:39-46 β€” before extracting anything, compare `Algorithm.Python/CustomBrokerageSideOrderHandlingRegressionAlgorithm.py` and `Algorithm.Python/CustomBrokerageSideOrderHandlingRegressionPartialAlgorithm.py` as WHOLE FILES: 93% 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 3 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. 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) Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs:39 β€” Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs:39-46 | Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.cs:39-46 β€” before extracting anything, compare `Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs` and `Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.cs` as WHOLE FILES: 92% 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 2 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. 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.
D17 Β· Explicit Debt Β· BarePragmaDisable Β· Γ—20
  • BarePragmaDisable AlgorithmFactory/Loader.cs:385 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/CapacityEstimate.cs:115 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Interfaces/IApi.cs:247 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Interfaces/IApi.cs:273 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Interfaces/IRegressionResearchDefinition.cs:23 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Optimizer/Parameters/OptimizationStepParameter.cs:44 β€” #pragma warning disable CS1574 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Brokerages/CoinbaseBrokerageModel.cs:239 β€” #pragma warning disable CA1062 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Data/DataQueueHandlerSubscriptionManager.cs:113 β€” #pragma warning disable CA1309 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Data/Fundamental/AssetClassificationHelper.cs:79 β€” #pragma warning disable 1591 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Messaging/EventMessagingHandler.cs:71 β€” #pragma warning disable 1591 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Data/Fundamental/FundamentalProperty.cs:25 β€” #pragma warning disable CS1591, CA1707 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Orders/Fees/InteractiveBrokersFeeModel.cs:35 β€” #pragma warning disable CS1570 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Securities/Future/Futures.cs:1446 β€” #pragma warning disable CS1570 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Common/Securities/Future/Futures.cs:1490 β€” #pragma warning disable CS1570 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Common/Data/SliceTests.cs:819 β€” #pragma warning disable CA1829 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Common/Orders/Fills/PartialMarketFillModelTests.cs:104 β€” # pragma warning disable CA2000 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Engine/DataFeeds/SubscriptionCollectionTests.cs:411 β€” # pragma warning disable CA2000 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Engine/DataFeeds/SubscriptionSynchronizerTests.cs:98 β€” # pragma warning disable CA2000 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Engine/DataFeeds/SubscriptionTests.cs:185 β€” # pragma warning disable CA2000 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable Tests/Engine/DataProviders/ApiDataProviderTests.cs:172 β€” # pragma warning disable CA2000 β€” the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line β€” what makes this site legitimately different β€” or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 2) Β· Γ—20
  • Duplicated block (9 lines × 2) Indicators/ImpliedVolatility.cs:113 β€” Indicators/ImpliedVolatility.cs:113-121 | Indicators/ImpliedVolatility.cs:144-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. Note first that the copies are not typed on the same thing: the declarations holding them bind `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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) Common/Securities/BuyingPowerModel.cs:397 β€” Common/Securities/BuyingPowerModel.cs:397-405 | Common/Securities/Positions/PositionGroupBuyingPowerModel.cs:305-313 β€” 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 `Common/Securities/BuyingPowerModel.cs:397` it does not close everything it opens, so those 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 `parameters` to `GetMaximumOrderQuantityForTargetBuyingPowerParameters` in one and `GetMaximumLotsForTargetBuyingPowerParameters` 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) Indicators/CandlestickPatterns/EveningDojiStar.cs:116 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:116-124 | Indicators/CandlestickPatterns/EveningStar.cs:109-117 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/EveningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Indicators/CandlestickPatterns/EveningDojiStar.cs:116` 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 (9 lines × 2) Indicators/CandlestickPatterns/MatHold.cs:115 β€” Indicators/CandlestickPatterns/MatHold.cs:115-123 | Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:98-106 β€” before extracting anything, compare `Indicators/CandlestickPatterns/MatHold.cs` and `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Indicators/CandlestickPatterns/MatHold.cs:115` 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, `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:95` calls `GetCandleRange` and `Indicators/CandlestickPatterns/MatHold.cs:112` 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) Common/Securities/Positions/SecurityPositionGroupBuyingPowerModel.cs:100 β€” Common/Securities/Positions/SecurityPositionGroupBuyingPowerModel.cs:100-108 | Common/Securities/Positions/SecurityPositionGroupBuyingPowerModel.cs:128-136 β€” both copies are in the same file, so extract the 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 `parameters` to `GetMaximumLotsForTargetBuyingPowerParameters` in one and `GetMaximumLotsForDeltaBuyingPowerParameters` 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) Algorithm.CSharp/SectorExposureRiskFrameworkAlgorithm.cs:38 β€” Algorithm.CSharp/SectorExposureRiskFrameworkAlgorithm.cs:38-46 | Algorithm.CSharp/SectorWeightingFrameworkAlgorithm.cs:40-48 β€” 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 (9 lines × 2) Algorithm.CSharp/RiskParityPortfolioAlgorithm.cs:33 β€” Algorithm.CSharp/RiskParityPortfolioAlgorithm.cs:33-41 | Algorithm.CSharp/RiskParityPortfolioWeightsCheckAlgorithm.cs:36-44 β€” before extracting anything, compare `Algorithm.CSharp/RiskParityPortfolioAlgorithm.cs` and `Algorithm.CSharp/RiskParityPortfolioWeightsCheckAlgorithm.cs` as WHOLE FILES: 94% 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. 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 × 2) Common/Scheduling/DateRules.cs:617 β€” Common/Scheduling/DateRules.cs:617-625 | Common/Scheduling/DateRules.cs:668-676 β€” both copies are in the same file, so extract the 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 `Common/Scheduling/DateRules.cs:617` it does not close everything it opens, so those 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 × 2) Report/ReportElements/DailyReturnsReportElement.cs:48 β€” Report/ReportElements/DailyReturnsReportElement.cs:48-56 | Report/ReportElements/MonthlyReturnsReportElement.cs:49-57 β€” 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 `Report/ReportElements/DailyReturnsReportElement.cs:48` it does not close everything it opens, so those 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 × 2) Indicators/Beta.cs:62 β€” Indicators/Beta.cs:62-70 | Indicators/Covariance.cs:55-63 β€” 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) Algorithm.CSharp/CoarseFundamentalImmediateSelectionRegressionAlgorithm.cs:35 β€” Algorithm.CSharp/CoarseFundamentalImmediateSelectionRegressionAlgorithm.cs:35-43 | Algorithm.CSharp/CoarseFundamentalTop3Algorithm.cs:42-52 β€” 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 (9 lines × 2) Algorithm.CSharp/CoarseFundamentalTop3Algorithm.cs:57 β€” Algorithm.CSharp/CoarseFundamentalTop3Algorithm.cs:57-65 | Algorithm.CSharp/RawPricesCoarseUniverseAlgorithm.cs:68-76 β€” 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) Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:167 β€” Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:167-175 | Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs:134-142 β€” before extracting anything, compare `Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs` and `Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 (9 lines × 2) Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:40 β€” Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:40-48 | Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py:40-48 β€” before extracting anything, compare `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py` and `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py` as WHOLE FILES: this scan already matched 4 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. 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 (9 lines × 2) Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:44 β€” Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:44-52 | Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:44-52 β€” 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 (9 lines × 2) Algorithm.Python/ManuallySetMarketHoursAndSymbolPropertiesDatabaseEntriesAlgorithm.py:47 β€” Algorithm.Python/ManuallySetMarketHoursAndSymbolPropertiesDatabaseEntriesAlgorithm.py:47-55 | Algorithm.Python/ManuallySetMarketHoursAndSymbolPropertiesDatabaseEntriesAlgorithm.py:62-70 β€” both copies are in the same file, so extract the 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) Algorithm.Python/SectorExposureRiskFrameworkAlgorithm.py:31 β€” Algorithm.Python/SectorExposureRiskFrameworkAlgorithm.py:31-39 | Algorithm.Python/SectorWeightingFrameworkAlgorithm.py:27-35 β€” 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 (9 lines × 2) Algorithm.Framework/Portfolio/MaximumSharpeRatioPortfolioOptimizer.py:79 β€” Algorithm.Framework/Portfolio/MaximumSharpeRatioPortfolioOptimizer.py:79-87 | Algorithm.Framework/Portfolio/MinimumVariancePortfolioOptimizer.py:74-82 β€” 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. 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 (9 lines × 2) Algorithm.Python/BasicTemplateFuturesAlgorithm.py:63 β€” Algorithm.Python/BasicTemplateFuturesAlgorithm.py:63-71 | Algorithm.Python/BasicTemplateFuturesWithExtendedMarketAlgorithm.py:66-74 β€” before extracting anything, compare `Algorithm.Python/BasicTemplateFuturesAlgorithm.py` and `Algorithm.Python/BasicTemplateFuturesWithExtendedMarketAlgorithm.py` as WHOLE FILES: 87% 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. 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 × 2) Algorithm.Python/FutureOptionChainFiltersRegressionAlgorithm.py:70 β€” Algorithm.Python/FutureOptionChainFiltersRegressionAlgorithm.py:70-78 | Algorithm.Python/IndexOptionChainFiltersRegressionAlgorithm.py:107-115 β€” 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.
X18 Β· Disposal-pattern correctness Β· Disposes a dependency it does not own Β· Γ—20
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/BaseDataCollectionAggregatorEnumerator.cs:160 β€” `_enumerator` is never created by `BaseDataCollectionAggregatorEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 160). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/FastForwardEnumerator.cs:128 β€” `_enumerator` is never created by `FastForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 128). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:303 β€” `_enumerator` is never created by `FillForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 303). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/FilterEnumerator.cs:50 β€” `_enumerator` is never created by `FilterEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 50). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/FrontierAwareEnumerator.cs:146 β€” `_enumerator` is never created by `FrontierAwareEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 146). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/PriceScaleFactorEnumerator.cs:88 β€” `_rawDataEnumerator` is never created by `PriceScaleFactorEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 88). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/QuoteBarFillForwardEnumerator.cs:101 β€” `_enumerator` is never created by `QuoteBarFillForwardEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 101). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/RateLimitEnumerator.cs:125 β€” `_enumerator` is never created by `RateLimitEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 125). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/ScheduledEnumerator.cs:172 β€” `_underlyingEnumerator` is never created by `ScheduledEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 172). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/StrictDailyEndTimesEnumerator.cs:92 β€” `_underlying` is never created by `StrictDailyEndTimesEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 92). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/SubscriptionDataEnumerator.cs:95 β€” `_enumerator` is never created by `SubscriptionDataEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 95). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Engine/DataFeeds/Enumerators/SubscriptionFilterEnumerator.cs:173 β€” `_enumerator` is never created by `SubscriptionFilterEnumerator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 173). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Common/Data/Consolidators/SequentialConsolidator.cs:113 β€” `First` is never created by `SequentialConsolidator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 113). Its declared type `IDataConsolidator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Common/Data/Consolidators/SequentialConsolidator.cs:114 β€” `Second` is never created by `SequentialConsolidator` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 114). Its declared type `IDataConsolidator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Common/Scheduling/ScheduledEvent.cs:247 β€” `_orderedEventUtcTimes` is never created by `ScheduledEvent` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 247). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own Common/Storage/ObjectStore.cs:299 β€” `_store` is never created by `ObjectStore` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 299). Its declared type `IObjectStore` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own ToolBox/ConsolidatorDataProcessor.cs:77 β€” `_destination` is never created by `ConsolidatorDataProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 77). Its declared type `IDataProcessor` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own ToolBox/FilteredDataProcessor.cs:58 β€” `_processor` is never created by `FilteredDataProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 58). Its declared type `IDataProcessor` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own ToolBox/RawFileProcessor.cs:110 β€” `_streamProvider` is never created by `RawFileProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 110). Its declared type `IStreamProvider` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
  • Disposes a dependency it does not own ToolBox/RawFileProcessor.cs:111 β€” `_parser` is never created by `RawFileProcessor` β€” every assignment to it takes a constructor parameter β€” yet this type disposes it here (line 111). Its declared type `IStreamParser` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call β€” a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 2) Β· Γ—18
  • Duplicated block (16 lines × 2) Indicators/CandlestickPatterns/BeltHold.cs:81 β€” Indicators/CandlestickPatterns/BeltHold.cs:81-96 | Indicators/CandlestickPatterns/ClosingMarubozu.cs:81-96 β€” before extracting anything, compare `Indicators/CandlestickPatterns/BeltHold.cs` and `Indicators/CandlestickPatterns/ClosingMarubozu.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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 `Indicators/CandlestickPatterns/BeltHold.cs:81` 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) Algorithm/QCAlgorithm.Framework.cs:180 β€” Algorithm/QCAlgorithm.Framework.cs:180-195 | Algorithm/QCAlgorithm.Framework.cs:201-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 `Algorithm/QCAlgorithm.Framework.cs:180` it does not close everything it opens, so those exact lines 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) Indicators/Delta.cs:55 β€” Indicators/Delta.cs:55-70 | Indicators/Delta.cs:87-102 β€” both copies are in the same file, so extract the 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 `Indicators/Delta.cs:55` 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 `dividendYieldModel` to `IDividendYieldModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Delta.cs:119 β€” Indicators/Delta.cs:119-134 | Indicators/Delta.cs:151-166 β€” both copies are in the same file, so extract the 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 `Indicators/Delta.cs:119` 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 `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Gamma.cs:55 β€” Indicators/Gamma.cs:55-70 | Indicators/Gamma.cs:87-102 β€” both copies are in the same file, so extract the 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 `Indicators/Gamma.cs:55` 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 `dividendYieldModel` to `IDividendYieldModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Gamma.cs:119 β€” Indicators/Gamma.cs:119-134 | Indicators/Gamma.cs:151-166 β€” both copies are in the same file, so extract the 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 `Indicators/Gamma.cs:119` 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 `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Rho.cs:55 β€” Indicators/Rho.cs:55-70 | Indicators/Rho.cs:87-102 β€” both copies are in the same file, so extract the 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 `Indicators/Rho.cs:55` 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 `dividendYieldModel` to `IDividendYieldModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Rho.cs:119 β€” Indicators/Rho.cs:119-134 | Indicators/Rho.cs:151-166 β€” both copies are in the same file, so extract the 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 `Indicators/Rho.cs:119` 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 `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Theta.cs:55 β€” Indicators/Theta.cs:55-70 | Indicators/Theta.cs:87-102 β€” both copies are in the same file, so extract the 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 `Indicators/Theta.cs:55` 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 `dividendYieldModel` to `IDividendYieldModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Theta.cs:119 β€” Indicators/Theta.cs:119-134 | Indicators/Theta.cs:151-166 β€” both copies are in the same file, so extract the 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 `Indicators/Theta.cs:119` 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 `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Vega.cs:55 β€” Indicators/Vega.cs:55-70 | Indicators/Vega.cs:87-102 β€” both copies are in the same file, so extract the 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 `Indicators/Vega.cs:55` 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 `dividendYieldModel` to `IDividendYieldModel` in one and `PyObject` 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 (16 lines × 2) Indicators/Vega.cs:119 β€” Indicators/Vega.cs:119-134 | Indicators/Vega.cs:151-166 β€” both copies are in the same file, so extract the 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 `Indicators/Vega.cs:119` 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 `riskFreeRateModel` to `IRiskFreeInterestRateModel` in one and `PyObject` 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 (16 lines × 2) Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:84 β€” Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:84-99 | Algorithm.CSharp/BasicTemplateCryptoFutureHourlyAlgorithm.cs:79-94 β€” 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 `Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:84` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/DragonflyDoji.cs:95 β€” Indicators/CandlestickPatterns/DragonflyDoji.cs:95-110 | Indicators/CandlestickPatterns/GravestoneDoji.cs:95-110 β€” 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 `Indicators/CandlestickPatterns/DragonflyDoji.cs:95` 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 (16 lines × 2) Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:52 β€” Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:52-67 | Algorithm.CSharp/FuturesExtendedMarketHoursRegressionAlgorithm.cs:52-67 β€” before extracting anything, compare `Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs` and `Algorithm.CSharp/FuturesExtendedMarketHoursRegressionAlgorithm.cs` as WHOLE FILES: 94% 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. 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 (16 lines × 2) Indicators/CandlestickPatterns/BeltHold.cs:92 β€” Indicators/CandlestickPatterns/BeltHold.cs:92-107 | Indicators/CandlestickPatterns/SeparatingLines.cs:108-123 β€” 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 `Indicators/CandlestickPatterns/BeltHold.cs:92` 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, `Indicators/CandlestickPatterns/SeparatingLines.cs:103` calls `GetCandleColor`, `GetCandleAverage` and `Indicators/CandlestickPatterns/BeltHold.cs:90` 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) Indicators/CandlestickPatterns/EveningStar.cs:131 β€” Indicators/CandlestickPatterns/EveningStar.cs:131-146 | Indicators/CandlestickPatterns/MorningStar.cs:131-146 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningStar.cs` and `Indicators/CandlestickPatterns/MorningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `Indicators/CandlestickPatterns/EveningStar.cs: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. 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 (16 lines × 2) Algorithm.Python/CustomDataBitcoinAlgorithm.py:83 β€” Algorithm.Python/CustomDataBitcoinAlgorithm.py:83-98 | Algorithm.Python/LiveFeaturesAlgorithm.py:118-133 β€” before extracting anything, compare `Algorithm.Python/CustomDataBitcoinAlgorithm.py` and `Algorithm.Python/LiveFeaturesAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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. 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 × 2) Β· Γ—17
  • Duplicated block (12 lines × 2) Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs:434 β€” Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs:434-445 | Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs:471-482 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.cs:63 β€” Algorithm.CSharp/EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.cs:63-74 | Algorithm.CSharp/InteractiveBrokersBrokerageDisablesIndexOptionsExerciseRegressionAlgorithm.cs:67-78 β€” 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 (12 lines × 2) Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:103 β€” Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:103-114 | Algorithm.CSharp/WarmupOptionResolutionRegressionAlgorithm.cs:37-48 β€” 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 `Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:103` 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) Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:58 β€” Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:58-69 | Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:58-69 β€” 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 `Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs: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 (12 lines × 2) Common/Brokerages/SamcoBrokerageModel.cs:170 β€” Common/Brokerages/SamcoBrokerageModel.cs:170-181 | Common/Brokerages/ZerodhaBrokerageModel.cs:166-177 β€” 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) Indicators/CandlestickPatterns/MatHold.cs:101 β€” Indicators/CandlestickPatterns/MatHold.cs:101-112 | Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:83-94 β€” before extracting anything, compare `Indicators/CandlestickPatterns/MatHold.cs` and `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Indicators/CandlestickPatterns/MatHold.cs:101` it does not close everything it opens, so those 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, `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:95` calls `GetCandleRange` and `Indicators/CandlestickPatterns/MatHold.cs:113` 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 (12 lines × 2) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:489 β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs:489-500 | Engine/TransactionHandlers/BrokerageTransactionHandler.cs:561-572 β€” both copies are in the same file, so extract the 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 `Engine/TransactionHandlers/BrokerageTransactionHandler.cs:489` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `UpdateOrderRequest` in one and `CancelOrderRequest` 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 (12 lines × 2) Common/Data/Market/QuoteBar.cs:529 β€” Common/Data/Market/QuoteBar.cs:529-540 | Common/Data/Market/TradeBar.cs:666-677 β€” 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 `Common/Data/Market/QuoteBar.cs:529` 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) Indicators/CandlestickPatterns/Harami.cs:98 β€” Indicators/CandlestickPatterns/Harami.cs:98-109 | Indicators/CandlestickPatterns/HaramiCross.cs:98-109 β€” 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 `Indicators/CandlestickPatterns/Harami.cs:98` 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) Algorithm.CSharp/BasicTemplateContinuousFutureAlgorithm.cs:77 β€” Algorithm.CSharp/BasicTemplateContinuousFutureAlgorithm.cs:77-88 | Algorithm.CSharp/BasicTemplateContinuousFutureWithExtendedMarketAlgorithm.cs:88-99 β€” 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 (12 lines × 2) Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:42 β€” Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:42-69 | Algorithm.CSharp/StartingCapitalRegressionAlgorithm.cs:34-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 `Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:42` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:171 β€” Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:171-182 | REDACTED:226-237 β€” before extracting anything, compare `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 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 `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:171` 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, `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:169` calls `AddDays` and `REDACTED:224` 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 (12 lines × 2) Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:65 β€” Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:65-76 | Algorithm.CSharp/WarmupOptionRegressionAlgorithm.cs:54-68 β€” 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 `Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:65` it does not close everything it opens, so those 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 lines × 2) Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:109 β€” Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs:109-120 | Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:113-124 β€” 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) Algorithm.CSharp/SetDataNormalizationModeOnAddSecurityAlgorithm.cs:67 β€” Algorithm.CSharp/SetDataNormalizationModeOnAddSecurityAlgorithm.cs:67-78 | Algorithm.CSharp/SetEquityDataNormalizationModeOnAddEquity.cs:56-67 β€” 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) Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:37 β€” Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:37-48 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:37-48 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallButterflyAlgorithm.py` and `Algorithm.Python/IndexOptionPutButterflyAlgorithm.py` 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. 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. 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) Report/ReportCharts.py:717 β€” Report/ReportCharts.py:717-728 | Report/ReportCharts.py:806-817 β€” both copies are in the same file, so extract the 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 `Report/ReportCharts.py:717` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D10 Β· Test Quality Β· Skipped test Β· Γ—16
  • Skipped test: BuyingPowerForStrategyStartingFromOptionPositionInOppositeDirectionAndLiquidating Tests/Common/Securities/OptionStrategyPositionGroupBuyingPowerModelTests.cs:2452 β€” Skipped β€” [Explicit]
  • Skipped test: BuyingPowerForOptionStartingFromStrategyWithALegInTheOppositeDirection Tests/Common/Securities/OptionStrategyPositionGroupBuyingPowerModelTests.cs:2520 β€” Skipped β€” [Explicit]
  • Skipped test: BuyingPowerForOptionStartingFromStrategyWithALegInTheOppositeDirectionAndLiquidating Tests/Common/Securities/OptionStrategyPositionGroupBuyingPowerModelTests.cs:2555 β€” Skipped β€” [Explicit]
  • Skipped test: FetchSymbolPropertiesFromCoinbase Tests/Common/Securities/SymbolPropertiesDatabaseTests.cs:228 β€” Skipped β€” [Explicit]
  • Skipped test: FetchSymbolPropertiesFromBitfinex Tests/Common/Securities/SymbolPropertiesDatabaseTests.cs:342 β€” Skipped β€” [Explicit]
  • Skipped test: TestAlgorithmManagerSpeed Tests/Engine/AlgorithmManagerTests.cs:92 β€” Skipped β€” TravisExclude
  • Skipped test: Tsfel Tests/Python/PythonPackagesTests.cs:94 β€” Skipped β€” [Explicit]
  • Skipped test: Thinc Tests/Python/PythonPackagesTests.cs:180 β€” Skipped β€” Run separate
  • Skipped test: StatsForecast Tests/Python/PythonPackagesTests.cs:281 β€” Skipped β€” [Explicit]
  • Skipped test: alibi_detect Tests/Python/PythonPackagesTests.cs:518 β€” Skipped β€” Legacy
  • Skipped test: Mlforecast Tests/Python/PythonPackagesTests.cs:770 β€” Skipped β€” Run separate
  • Skipped test: PyvinecopulibTest Tests/Python/PythonPackagesTests.cs:1010 β€” Skipped β€” Run separate
  • Skipped test: MlxtendTest Tests/Python/PythonPackagesTests.cs:1325 β€” Skipped β€” Run separate
  • Skipped test: AesaraTest Tests/Python/PythonPackagesTests.cs:1649 β€” Skipped β€” Legacy
  • Skipped test: ScikitOptimizeTest Tests/Python/PythonPackagesTests.cs:2474 β€” Skipped β€” [Explicit]
  • Skipped test: NeuralTangentsTest Tests/Python/PythonPackagesTests.cs:2620 β€” Skipped β€” Legacy
D4 Β· Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ—16
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Common/Data/Market/OpenInterest.cs:133 β€” Common/Data/Market/OpenInterest.cs:133-146 | Common/Data/Market/QuoteBar.cs:662-675 | Common/Data/Market/Tick.cs:752-765 | Common/Data/Market/TradeBar.cs:814-827 β€” 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) Common/Orders/Fees/AlphaStreamsFeeModel.cs:54 β€” Common/Orders/Fees/AlphaStreamsFeeModel.cs:54-137 | Common/Orders/Fees/BinanceFeeModel.cs:58-90 | Common/Orders/Fees/BitfinexFeeModel.cs:47-82 | Common/Orders/Fees/BybitFeeModel.cs:59-91 β€” 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) Common/Orders/Fills/EquityFillModel.cs:775 β€” Common/Orders/Fills/EquityFillModel.cs:775-867 | Common/Orders/Fills/EquityFillModel.cs:884-976 | Common/Orders/Fills/FillModel.cs:881-930 | Common/Orders/Fills/FillModel.cs:940-989 β€” 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) Indicators/CandlestickPatterns/ConcealedBabySwallow.cs:74 β€” Indicators/CandlestickPatterns/ConcealedBabySwallow.cs:74-126 | Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:78-141 | Indicators/CandlestickPatterns/ThreeBlackCrows.cs:73-127 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:87-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) Indicators/CandlestickPatterns/MorningStar.cs:95 β€” Indicators/CandlestickPatterns/MorningStar.cs:95-146 | Indicators/CandlestickPatterns/ThreeInside.cs:76-121 | Indicators/CandlestickPatterns/TwoCrows.cs:73-111 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:78-127 β€” 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) Indicators/Gamma.cs:193 β€” Indicators/Gamma.cs:193-253 | Indicators/Rho.cs:193-245 | Indicators/Theta.cs:193-253 | Indicators/Vega.cs:193-236 β€” 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) Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:42 β€” Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:42-62 | Algorithm.CSharp/NakedShortOptionStrategyOverMarginAlgorithm.cs:44-55 | Algorithm.CSharp/OptionStrategyFactoryMethodsBaseAlgorithm.cs:40-51 | Algorithm.CSharp/TradingNotAddedOptionsRegressionAlgorithm.cs:37-69 β€” 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) Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:146 β€” Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:146-182 | Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:173-196 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:236-270 | REDACTED:202-237 β€” 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) Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:105 β€” Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:105-132 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:103-130 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:100-128 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:100-127 β€” 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) Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:48 β€” Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:48-86 | Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs:48-86 | Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:39-66 | Algorithm.CSharp/LongAndShortButterflyPutStrategiesAlgorithm.cs:39-66 β€” 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) Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:101 β€” Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:101-128 | Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:98-125 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:95-123 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:95-122 β€” 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) Report/ReportElements/CumulativeReturnsReportElement.cs:51 β€” Report/ReportElements/CumulativeReturnsReportElement.cs:51-147 | Report/ReportElements/LeverageUtilizationReportElement.cs:62-82 | Report/ReportElements/RollingPortfolioBetaReportElement.cs:56-88 | Report/ReportElements/RollingSharpeReportElement.cs:55-87 β€” 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) Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:28 β€” Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:28-36 | Algorithm.Python/CoveredAndProtectivePutStrategiesAlgorithm.py:28-36 | Algorithm.Python/NakedCallStrategyAlgorithm.py:28-35 | Algorithm.Python/NakedPutStrategyAlgorithm.py:28-35 β€” 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) Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:39 β€” Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:39-55 | Algorithm.Python/CoveredAndProtectivePutStrategiesAlgorithm.py:40-56 | Algorithm.Python/NakedCallStrategyAlgorithm.py:38-49 | Algorithm.Python/NakedPutStrategyAlgorithm.py:38-49 β€” 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) Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:92 β€” Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:92-99 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:93-100 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:78-83 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:78-83 β€” 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) Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:64 β€” Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:64-79 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:58-71 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:65-79 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:65-78 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (14 lines × 2) Β· Γ—16
  • Duplicated block (14 lines × 2) Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:63 β€” Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:63-76 | Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs:63-76 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:63` 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) Common/BinaryComparisonExtensions.cs:83 β€” Common/BinaryComparisonExtensions.cs:83-96 | Common/BinaryComparisonExtensions.cs:134-147 β€” both copies are in the same file, so extract the 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 `Common/BinaryComparisonExtensions.cs:83` 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) Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:129 β€” Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:129-142 | Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs:114-127 β€” before extracting anything, compare `Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs` and `Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs: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 (14 lines × 2) Indicators/CandlestickPatterns/EveningDojiStar.cs:131 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:131-144 | Indicators/CandlestickPatterns/EveningStar.cs:124-137 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/EveningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Indicators/CandlestickPatterns/EveningDojiStar.cs:131` 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) Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:122 β€” Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:122-135 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:147-160 β€” 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 `Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:122` 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) Indicators/CandlestickPatterns/LongLeggedDoji.cs:94 β€” Indicators/CandlestickPatterns/LongLeggedDoji.cs:94-107 | Indicators/CandlestickPatterns/RickshawMan.cs:115-128 β€” 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 `Indicators/CandlestickPatterns/LongLeggedDoji.cs:94` 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, `Indicators/CandlestickPatterns/RickshawMan.cs:130` calls `GetCandleRange` and `Indicators/CandlestickPatterns/LongLeggedDoji.cs:109` 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 (14 lines × 2) Indicators/CandlestickPatterns/MatHold.cs:146 β€” Indicators/CandlestickPatterns/MatHold.cs:146-159 | Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:127-140 β€” before extracting anything, compare `Indicators/CandlestickPatterns/MatHold.cs` and `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Indicators/CandlestickPatterns/MatHold.cs:146` 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, `Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:142` calls `GetCandleRange` and `Indicators/CandlestickPatterns/MatHold.cs:161` 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 (14 lines × 2) Indicators/CandlestickPatterns/MorningDojiStar.cs:131 β€” Indicators/CandlestickPatterns/MorningDojiStar.cs:131-144 | Indicators/CandlestickPatterns/MorningStar.cs:124-137 β€” 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 `Indicators/CandlestickPatterns/MorningDojiStar.cs:131` 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) Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:37-50 | Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:37-50 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs` as WHOLE FILES: 84% 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 2 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. 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 `Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs: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 (14 lines × 2) Common/Util/LeanData.cs:112 β€” Common/Util/LeanData.cs:112-125 | Common/Util/LeanData.cs:128-141 β€” both copies are in the same file, so extract the 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 `Common/Util/LeanData.cs:112` 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 (14 lines × 2) Common/Orders/LimitIfTouchedOrder.cs:145 β€” Common/Orders/LimitIfTouchedOrder.cs:145-158 | Common/Orders/StopLimitOrder.cs:99-112 β€” 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 (14 lines × 2) Algorithm.CSharp/FundamentalCustomSelectionTimeRegressionAlgorithm.cs:69 β€” Algorithm.CSharp/FundamentalCustomSelectionTimeRegressionAlgorithm.cs:69-82 | Algorithm.CSharp/FundamentalCustomSelectionTimeWarmupRegressionAlgorithm.cs:76-89 β€” 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 (14 lines × 2) Algorithm.CSharp/RawPricesCoarseUniverseAlgorithm.cs:81 β€” Algorithm.CSharp/RawPricesCoarseUniverseAlgorithm.cs:81-94 | Algorithm.CSharp/RawPricesUniverseRegressionAlgorithm.cs:66-79 β€” 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 (14 lines × 2) Algorithm.Python/Alphas/GreenblattMagicFormulaAlpha.py:78 β€” Algorithm.Python/Alphas/GreenblattMagicFormulaAlpha.py:78-91 | Algorithm.Python/Alphas/PriceGapMeanReversionAlpha.py:94-107 β€” 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. 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 × 2) Algorithm.Python/DropboxBaseDataUniverseSelectionAlgorithm.py:56 β€” Algorithm.Python/DropboxBaseDataUniverseSelectionAlgorithm.py:56-69 | Algorithm.Python/DropboxUniverseSelectionAlgorithm.py:70-83 β€” 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. 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 × 2) Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs:72 β€” Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs:72-85 | Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.cs:63-76 β€” before extracting anything, compare `Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs` and `Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.cs` as WHOLE FILES: 92% 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 2 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. 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 (13 lines × 2) Β· Γ—16
  • Duplicated block (13 lines × 2) Indicators/CandlestickPatterns/MatchingLow.cs:89 β€” Indicators/CandlestickPatterns/MatchingLow.cs:89-101 | Indicators/CandlestickPatterns/StickSandwich.cs:96-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. Read the line range as the matched WINDOW rather than a finished unit: at `Indicators/CandlestickPatterns/MatchingLow.cs:89` 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 (13 lines × 2) Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:44 β€” Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:44-56 | Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs:44-56 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs` and `Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs` as WHOLE FILES: 84% 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 3 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. 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 (13 lines × 2) Common/Data/UniverseSelection/UniverseExtensions.cs:133 β€” Common/Data/UniverseSelection/UniverseExtensions.cs:133-145 | Common/Symbol.cs:76-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. 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, `Common/Symbol.cs:91` calls `CreateOption` and `Common/Data/UniverseSelection/UniverseExtensions.cs: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 × 2) Indicators/CandlestickPatterns/AdvanceBlock.cs:123 β€” Indicators/CandlestickPatterns/AdvanceBlock.cs:123-135 | Indicators/CandlestickPatterns/StalledPattern.cs:112-124 β€” 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 `Indicators/CandlestickPatterns/AdvanceBlock.cs:123` 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, `Indicators/CandlestickPatterns/StalledPattern.cs:126` calls `GetRealBody`, `GetCandleAverage`, `GetUpperShadow` and `Indicators/CandlestickPatterns/AdvanceBlock.cs:137` 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 × 2) Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:53 β€” Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:53-65 | Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs:53-65 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 (13 lines × 2) Algorithm.CSharp/ComboOrdersFillModelAlgorithm.cs:200 β€” Algorithm.CSharp/ComboOrdersFillModelAlgorithm.cs:200-212 | Algorithm.CSharp/CustomPartialFillModelAlgorithm.cs:92-104 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Algorithm.CSharp/ComboOrdersFillModelAlgorithm.cs:214` calls `Add` and `Algorithm.CSharp/CustomPartialFillModelAlgorithm.cs:105` 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 × 2) Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:33 β€” Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:33-45 | Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs:33-45 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs` and `Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 (13 lines × 2) Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:41 β€” Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:41-53 | Algorithm.CSharp/LongAndShortButterflyPutStrategiesAlgorithm.cs:41-53 β€” 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 `Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:41` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:41 β€” Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:41-53 | Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs:41-53 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:41` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/EveningStar.cs:128 β€” Indicators/CandlestickPatterns/EveningStar.cs:128-140 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:112-124 β€” 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 `Indicators/CandlestickPatterns/EveningStar.cs: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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Indicators/CandlestickPatterns/EveningStar.cs:142` calls `GetCandleRange` and `Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:126` 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 × 2) Indicators/CandlestickPatterns/TwoCrows.cs:78 β€” Indicators/CandlestickPatterns/TwoCrows.cs:78-90 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:88-101 β€” 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 `Indicators/CandlestickPatterns/TwoCrows.cs:78` 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, `Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:103` calls `GetRealBody`, `GetCandleAverage` and `Indicators/CandlestickPatterns/TwoCrows.cs:92` 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 × 2) Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:111 β€” Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:111-124 | Algorithm.CSharp/BasicTemplateOptionTradesAlgorithm.cs:62-74 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:127` calls `MarketOrder` and `Algorithm.CSharp/BasicTemplateOptionTradesAlgorithm.cs:75` 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 × 2) Algorithm.Python/BasicTemplateOptionsFilterUniverseAlgorithm.py:28 β€” Algorithm.Python/BasicTemplateOptionsFilterUniverseAlgorithm.py:28-40 | Algorithm.Python/FilterUniverseRegressionAlgorithm.py:27-39 β€” 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 (13 lines × 2) Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:22 β€” Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py:22-34 | Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py:22-34 β€” before extracting anything, compare `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithm.py` and `Algorithm.Python/ETFConstituentUniverseCompositeDelistingRegressionAlgorithmNoAddEquityETF.py` as WHOLE FILES: this scan already matched 4 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 (13 lines × 2) Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:33 β€” Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:33-45 | Algorithm.Python/IndexOptionBullPutSpreadAlgorithm.py:33-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.
  • Duplicated block (13 lines × 2) Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:29 β€” Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:29-41 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:29-41 β€” before extracting anything, compare `Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 5 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.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—15
  • Duplicated block (15 lines × 2) Common/Brokerages/AlpacaBrokerageModel.cs:92 β€” Common/Brokerages/AlpacaBrokerageModel.cs:92-106 | Common/Brokerages/BinanceBrokerageModel.cs:124-138 β€” 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) Indicators/ImpliedVolatility.cs:168 β€” Indicators/ImpliedVolatility.cs:168-182 | Indicators/ImpliedVolatility.cs:199-213 β€” both copies are in the same file, so extract the 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 `Indicators/ImpliedVolatility.cs:168` 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) Indicators/CandlestickPatterns/Hammer.cs:119 β€” Indicators/CandlestickPatterns/Hammer.cs:119-133 | Indicators/CandlestickPatterns/InvertedHammer.cs:111-125 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Hammer.cs` and `Indicators/CandlestickPatterns/InvertedHammer.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `Indicators/CandlestickPatterns/Hammer.cs:119` 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, `Indicators/CandlestickPatterns/Hammer.cs:136` calls `GetCandleRange` and `Indicators/CandlestickPatterns/InvertedHammer.cs:128` 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) Indicators/CandlestickPatterns/HangingMan.cs:119 β€” Indicators/CandlestickPatterns/HangingMan.cs:119-133 | Indicators/CandlestickPatterns/ShootingStar.cs:112-126 β€” before extracting anything, compare `Indicators/CandlestickPatterns/HangingMan.cs` and `Indicators/CandlestickPatterns/ShootingStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `Indicators/CandlestickPatterns/HangingMan.cs:119` 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, `Indicators/CandlestickPatterns/HangingMan.cs:136` calls `GetCandleRange` and `Indicators/CandlestickPatterns/ShootingStar.cs:129` 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) Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:46 β€” Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:46-60 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:45-59 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 (15 lines × 2) Algorithm.CSharp/OptionChainConsistencyRegressionAlgorithm.cs:41 β€” Algorithm.CSharp/OptionChainConsistencyRegressionAlgorithm.cs:41-55 | Algorithm.CSharp/OptionExerciseAssignRegressionAlgorithm.cs:41-55 β€” 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 (15 lines × 2) Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs:37-51 | Algorithm.CSharp/OptionEquityShortButterflyPutRegressionAlgorithm.cs:37-51 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortButterflyPutRegressionAlgorithm.cs` as WHOLE FILES: 85% 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 2 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. 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 `Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs: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 (15 lines × 2) Api/Api.cs:488 β€” Api/Api.cs:488-502 | Api/Api.cs:858-872 β€” both copies are in the same file, so extract the 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 `Api/Api.cs:488` 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 (15 lines × 2) Algorithm.CSharp/ContinuousBackMonthRawFutureRegressionAlgorithm.cs:57 β€” Algorithm.CSharp/ContinuousBackMonthRawFutureRegressionAlgorithm.cs:57-72 | Algorithm.CSharp/ContinuousFutureBackMonthRegressionAlgorithm.cs:71-85 β€” 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 `Algorithm.CSharp/ContinuousBackMonthRawFutureRegressionAlgorithm.cs:57` it does not close everything it opens, so those 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 (15 lines × 2) Algorithm.CSharp/PortfolioRebalanceOnInsightChangesRegressionAlgorithm.cs:63 β€” Algorithm.CSharp/PortfolioRebalanceOnInsightChangesRegressionAlgorithm.cs:63-77 | Algorithm.CSharp/PortfolioRebalanceOnSecurityChangesRegressionAlgorithm.cs:72-86 β€” 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 (15 lines × 2) Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py:33 β€” Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py:33-47 | Algorithm.Python/CustomDataUniverseScheduledRegressionAlgorithm.py:35-49 β€” before extracting anything, compare `Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py` and `Algorithm.Python/CustomDataUniverseScheduledRegressionAlgorithm.py` as WHOLE FILES: 82% 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 2 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. 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 (15 lines × 2) Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py:90 β€” Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py:90-104 | Algorithm.Python/CustomDataUniverseScheduledRegressionAlgorithm.py:79-93 β€” before extracting anything, compare `Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py` and `Algorithm.Python/CustomDataUniverseScheduledRegressionAlgorithm.py` as WHOLE FILES: 82% 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 2 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. 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. 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 (15 lines × 2) Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:77 β€” Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:77-91 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:77-91 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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. 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) Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:61 β€” Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:61-75 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:61-75 β€” before extracting anything, compare `Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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. 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) Report/ReportCharts.py:691 β€” Report/ReportCharts.py:691-705 | Report/ReportCharts.py:785-799 β€” both copies are in the same file, so extract the 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 × 2) Β· Γ—15
  • Duplicated block (10 lines × 2) Common/Securities/BuyingPowerModel.cs:148 β€” Common/Securities/BuyingPowerModel.cs:148-157 | Common/Securities/Future/FutureMarginModel.cs:132-141 β€” 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 (10 lines × 2) Common/Data/Fundamental/Generated/InventoryValuationMethod.cs:100 β€” Common/Data/Fundamental/Generated/InventoryValuationMethod.cs:100-109 | Common/Data/Fundamental/Generated/PeriodAuditor.cs:100-109 β€” 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 (10 lines × 2) Indicators/CandlestickPatterns/Hikkake.cs:79 β€” Indicators/CandlestickPatterns/Hikkake.cs:79-88 | Indicators/CandlestickPatterns/Hikkake.cs:109-118 β€” both copies are in the same file, so extract the 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 `Indicators/CandlestickPatterns/Hikkake.cs: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 (10 lines × 2) Indicators/Rho.cs:220 β€” Indicators/Rho.cs:220-229 | Indicators/Vega.cs:220-229 β€” before extracting anything, compare `Indicators/Rho.cs` and `Indicators/Vega.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 `Indicators/Rho.cs:220` 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 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) Algorithm.CSharp/LongAndShortCallCalendarSpreadStrategiesAlgorithm.cs:42 β€” Algorithm.CSharp/LongAndShortCallCalendarSpreadStrategiesAlgorithm.cs:42-51 | Algorithm.CSharp/LongAndShortPutCalendarSpreadStrategiesAlgorithm.cs:42-51 β€” 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 `Algorithm.CSharp/LongAndShortCallCalendarSpreadStrategiesAlgorithm.cs:42` 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) Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs:53 β€” Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs:53-62 | Algorithm.CSharp/OptionStrategyMarginCallEventsAlgorithm.cs:58-67 β€” 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 `Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs:53` it does not close everything it opens, so those exact lines 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) Engine/Results/LiveTradingResultHandler.cs:249 β€” Engine/Results/LiveTradingResultHandler.cs:249-258 | Engine/Results/LiveTradingResultHandler.cs:316-325 β€” both copies are in the same file, so extract the 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) Algorithm.CSharp/AutomaticIndicatorWarmupDataTypeRegressionAlgorithm.cs:44 β€” Algorithm.CSharp/AutomaticIndicatorWarmupDataTypeRegressionAlgorithm.cs:44-53 | Algorithm.CSharp/AutomaticIndicatorWarmupDataTypeRegressionAlgorithm.cs:71-81 β€” both copies are in the same file, so extract the 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) Common/Orders/GroupOrderManager.cs:66 β€” Common/Orders/GroupOrderManager.cs:66-75 | Common/Orders/Order.cs:178-187 β€” 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 (10 lines × 2) Algorithm.Python/BaseFrameworkRegressionAlgorithm.py:28 β€” Algorithm.Python/BaseFrameworkRegressionAlgorithm.py:28-37 | Algorithm.Python/PearsonCorrelationPairsTradingAlphaModelFrameworkAlgorithm.py:32-41 β€” 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 `Algorithm.Python/BaseFrameworkRegressionAlgorithm.py: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 (10 lines × 2) Algorithm.Python/BasicTemplateOptionsAlgorithm.py:47 β€” Algorithm.Python/BasicTemplateOptionsAlgorithm.py:47-56 | Algorithm.Python/BasicTemplateOptionsHourlyAlgorithm.py:47-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 `Algorithm.Python/BasicTemplateOptionsAlgorithm.py:47` it does not close everything it opens, so those exact lines 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) Algorithm.Python/CustomConsolidatorRegressionAlgorithm.py:146 β€” Algorithm.Python/CustomConsolidatorRegressionAlgorithm.py:146-155 | Algorithm.Python/ManuallyRemovedConsolidatorsAlgorithm.py:88-97 β€” 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 (10 lines × 2) Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:100 β€” Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:100-109 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:98-107 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 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. 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 (10 lines × 2) Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:52 β€” Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:52-61 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:52-61 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallButterflyAlgorithm.py` and `Algorithm.Python/IndexOptionPutButterflyAlgorithm.py` 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. 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. 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) Algorithm.Python/MarketOnCloseOrderBufferExtendedMarketHoursRegressionAlgorithm.py:56 β€” Algorithm.Python/MarketOnCloseOrderBufferExtendedMarketHoursRegressionAlgorithm.py:56-65 | Algorithm.Python/MarketOnCloseOrderBufferRegressionAlgorithm.py:49-58 β€” before extracting anything, compare `Algorithm.Python/MarketOnCloseOrderBufferExtendedMarketHoursRegressionAlgorithm.py` and `Algorithm.Python/MarketOnCloseOrderBufferRegressionAlgorithm.py` as WHOLE FILES: 84% 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 2 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. 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.
D3 Β· God Classes Β· MethodTooLong Β· Γ—14
  • MethodTooLong: LeanData.GenerateLine Common/Util/LeanData.cs:90 β€” MethodTooLong β€” GenerateLine runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) 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: AlgorithmManager.Run Engine/AlgorithmManager.cs:121 β€” MethodTooLong β€” Run runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× 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: Engine.Run Engine/Engine.cs:87 β€” MethodTooLong β€” Run runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.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.
  • MethodTooLong: Exchanges.GetPrimaryExchange Common/Global.cs:1012 β€” MethodTooLong β€” GetPrimaryExchange runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: RandomDataGeneratorSettings.FromCommandLineArguments ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:53 β€” MethodTooLong β€” FromCommandLineArguments runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:50 β€” MethodTooLong β€” GetMaintenanceMargin runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.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.
  • MethodTooLong: TimeSliceFactory.Create Engine/DataFeeds/TimeSliceFactory.cs:89 β€” MethodTooLong β€” Create runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.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.
  • MethodTooLong: RandomDataGenerator.Run ToolBox/RandomDataGenerator/RandomDataGenerator.cs:53 β€” MethodTooLong β€” Run runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: BrokerageTransactionHandler.HandleOrderEvents Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1266 β€” MethodTooLong β€” HandleOrderEvents runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.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: QCAlgorithm.GetMatchingSubscriptions Algorithm/QCAlgorithm.History.cs:1194 β€” MethodTooLong β€” GetMatchingSubscriptions runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: LiveTradingResultHandler.Update Engine/Results/LiveTradingResultHandler.cs:161 β€” MethodTooLong β€” Update runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: EmaPortfolioRebalance100.Initialize Algorithm.CSharp/CapacityTests/EmaPortfolioRebalance100.cs:31 β€” MethodTooLong β€” Initialize runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: BrokerageSetupHandler.Setup Engine/Setup/BrokerageSetupHandler.cs:148 β€” MethodTooLong β€” Setup runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.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.
  • MethodTooLong: SecurityService.CreateSecurity Common/Securities/SecurityService.cs:75 β€” MethodTooLong β€” CreateSecurity runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.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.
X18 Β· Disposal-pattern correctness Β· Disposable created and abandoned in the method that made it Β· Γ—13
  • Disposable created and abandoned in the method that made it Engine/DataFeeds/BaseDataExchange.cs:146 β€” `manualEvent` is a `ManualResetEventSlim`, which implements `IDisposable`, and it is created here (line 146). Every use of it in `Start` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var manualEvent = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Engine/DataFeeds/DataDownloader/CanonicalDataDownloaderDecorator.cs:197 β€” `blockingCollection` is a `BlockingCollection`, which implements `IDisposable`, and it is created here (line 197). Every use of it in `GetContractsData` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var blockingCollection = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Algorithm/QCAlgorithm.Python.cs:1920 β€” `testInstance` is a `CommandPythonWrapper`, which implements `IDisposable`, and it is created here (line 1920). Every use of it in `AddCommand` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var testInstance = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Common/Extensions.cs:1896 β€” `writer` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 1896). Every use of it in `ToStream` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var writer = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Messaging/StreamingMessageHandler.cs:117 β€” `tcpListener` is a `TcpListener`, which implements `IDisposable`, and it is created here (line 117). Every use of it in `CheckPort` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var tcpListener = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Brokerages/BaseWebsocketsBrokerage.cs:221 β€” `resetEvent` is a `ManualResetEvent`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `ConnectSync` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var resetEvent = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:282 β€” `connectedEvent` is a `ManualResetEvent`, which implements `IDisposable`, and it is created here (line 282). Every use of it in `Connect` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var connectedEvent = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Configuration/ApplicationParser.cs:27 β€” `application` is a `CommandLineApplication`, which implements `IDisposable`, and it is created here (line 27). Every use of it in `Parse` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var application = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it REDACTED:1063 β€” `process` is a `Process`, which implements `IDisposable`, and it is created here (line 1063). Every use of it in `Extract7ZipArchive` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Research/QuantBook.cs:986 β€” `pyDict` is a `PyDict`, which implements `IDisposable`, and it is created here (line 986). Every use of it in `GetDictionaryFromSeries` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var pyDict = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Report/PortfolioLooper/PortfolioLooper.cs:221 β€” `looper` is a `PortfolioLooper`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `GetHistory` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var looper = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Report/PortfolioLooper/PortfolioLooper.cs:310 β€” `looper` is a `PortfolioLooper`, which implements `IDisposable`, and it is created here (line 310). Every use of it in `FromOrders` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var looper = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it Report/Program.cs:134 β€” `process` is a `Process`, which implements `IDisposable`, and it is created here (line 134). Every use of it in `Main` reads a member through it β€” it is never returned, never stored, never handed to anything else, and never disposed β€” so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw.
D3 Β· God Classes Β· FileTooLong Β· Γ—12
  • FileTooLong: Algorithm/QCAlgorithm.Indicators.cs Algorithm/QCAlgorithm.Indicators.cs β€” FileTooLong β€” 1526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1026 over it, 3.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: Algorithm/QCAlgorithm.cs Algorithm/QCAlgorithm.cs β€” FileTooLong β€” 1409 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 909 over it, 2.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: TransactionHandlers/BrokerageTransactionHandler.cs Engine/TransactionHandlers/BrokerageTransactionHandler.cs β€” FileTooLong β€” 953 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 453 over it, 1.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: Report/ReportCharts.py Report/ReportCharts.py β€” FileTooLong β€” 890 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 390 over it, 1.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: Util/LeanData.cs Common/Util/LeanData.cs β€” FileTooLong β€” 825 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 325 over it, 1.65× 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: Algorithm/QCAlgorithm.Python.cs Algorithm/QCAlgorithm.Python.cs β€” FileTooLong β€” 731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 231 over it, 1.46× 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: Algorithm/QCAlgorithm.History.cs Algorithm/QCAlgorithm.History.cs β€” FileTooLong β€” 696 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 196 over it, 1.39× 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: Results/LiveTradingResultHandler.cs Engine/Results/LiveTradingResultHandler.cs β€” FileTooLong β€” 603 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 103 over it, 1.21× 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: Api/Api.cs Api/Api.cs β€” FileTooLong β€” 555 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 55 over it, 1.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: Results/BaseResultsHandler.cs Engine/Results/BaseResultsHandler.cs β€” FileTooLong β€” 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08× 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: Fills/FillModel.cs Common/Orders/Fills/FillModel.cs β€” FileTooLong β€” 532 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 32 over it, 1.06× 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: Research/QuantBook.cs Research/QuantBook.cs β€” FileTooLong β€” 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× 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.
PF3 Β· Async & latency hygiene Β· Sync-over-async blocking Β· Γ—11
  • Sync-over-async blocking β€” 10 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) β€” these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Engine/DataFeeds/BaseDataExchange.cs:155 β€” `manualEvent.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Engine/DataFeeds/LiveSynchronizer.cs:112 β€” `_newLiveDataEmitted.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Common/Data/LeanDataWriter.cs:184 β€” `task.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Common/Extensions.cs:3461 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Common/Extensions.cs:3471 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Common/Extensions.cs:3495 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Common/Extensions.cs:3509 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking Brokerages/BrokerageConcurrentMessageHandler.cs:110 β€” `_messagesProcessedEvent.Wait()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking REDACTED:245 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking REDACTED:303 β€” `.GetAwaiter().GetResult()` blocks this thread until the async work completes β€” it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 Β· Supply-chain Provenance & Signing REDACTED Β· Γ—9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
GD1 Β· Unfinished & placeholder code Β· Unfinished stub Β· Γ—9
  • Unfinished stub β€” throws NotImplementedException Common/Data/UniverseSelection/BaseFundamentalDataProvider.cs:58 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/DefaultConverter.cs:55 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/Util/NullStringValueConverter.cs:35 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/Util/NullStringValueConverter.cs:66 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Algorithm.Framework/Portfolio/AlphaStreamsPortfolioConstructionModel.cs:32 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Algorithm.Framework/Portfolio/AlphaStreamsPortfolioConstructionModel.cs:42 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Algorithm.Framework/Portfolio/AlphaStreamsPortfolioConstructionModel.cs:53 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Report/NullResultValueTypeJsonConverter.cs:114 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Report/OrderTypeNormalizingJsonConverter.cs:74 β€” A shipped member still throws NotImplementedException β€” generated scaffolding that was never completed. Implement it or remove the dead surface.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 2) Β· Γ—8
  • Duplicated block (21 lines × 2) Common/Orders/Fees/BinanceFeeModel.cs:70 β€” Common/Orders/Fees/BinanceFeeModel.cs:70-90 | Common/Orders/Fees/BitfinexFeeModel.cs:62-82 β€” 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 `Common/Orders/Fees/BinanceFeeModel.cs: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. 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) Common/Data/Market/QuoteBar.cs:304 β€” Common/Data/Market/QuoteBar.cs:304-324 | Common/Data/Market/QuoteBar.cs:353-373 β€” both copies are in the same file, so extract the 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 `Common/Data/Market/QuoteBar.cs:304` it does not close everything it opens, so those 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) Common/Securities/SecurityExchangeHours.cs:459 β€” Common/Securities/SecurityExchangeHours.cs:459-479 | Common/Securities/SecurityExchangeHours.cs:532-552 β€” both copies are in the same file, so extract the 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 `Common/Securities/SecurityExchangeHours.cs:459` 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 (21 lines × 2) Common/Brokerages/FxcmBrokerageModel.cs:79 β€” Common/Brokerages/FxcmBrokerageModel.cs:79-99 | Common/Brokerages/OandaBrokerageModel.cs:84-104 β€” before extracting anything, compare `Common/Brokerages/FxcmBrokerageModel.cs` and `Common/Brokerages/OandaBrokerageModel.cs` as WHOLE FILES: 88% 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 2 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. 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 `Common/Brokerages/FxcmBrokerageModel.cs: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 (21 lines × 2) Common/Orders/Fills/FillModel.cs:799 β€” Common/Orders/Fills/FillModel.cs:799-819 | Common/Orders/Fills/FillModel.cs:851-871 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/FillModel.cs:799` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `order` to `MarketOnOpenOrder` in one and `MarketOnCloseOrder` 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, `Common/Orders/Fills/FillModel.cs:796` calls `IsExchangeOpen` and `Common/Orders/Fills/FillModel.cs:846` 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 (21 lines × 2) Indicators/CandlestickPatterns/DojiStar.cs:78 β€” Indicators/CandlestickPatterns/DojiStar.cs:78-98 | Indicators/CandlestickPatterns/HaramiCross.cs:76-96 β€” 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 `Indicators/CandlestickPatterns/DojiStar.cs:78` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/LongAndShortStraddleStrategiesAlgorithm.cs:61 β€” Algorithm.CSharp/LongAndShortStraddleStrategiesAlgorithm.cs:61-81 | Algorithm.CSharp/LongAndShortStrangleStrategiesAlgorithm.cs:71-91 β€” 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 (21 lines × 2) Algorithm.CSharp/CapacityTests/CheeseMilkHourlyRebalance.cs:50 β€” Algorithm.CSharp/CapacityTests/CheeseMilkHourlyRebalance.cs:50-70 | Algorithm.CSharp/CapacityTests/IntradayMinuteScalpingFuturesES.cs:53-73 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 2) Β· Γ—8
  • Duplicated block (18 lines × 2) Common/Orders/Fills/EquityFillModel.cs:776 β€” Common/Orders/Fills/EquityFillModel.cs:776-793 | Common/Orders/Fills/EquityFillModel.cs:885-902 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/EquityFillModel.cs:776` it does not close everything it opens, so those exact lines 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) Report/ReportElements/MonthlyReturnsReportElement.cs:69 β€” Report/ReportElements/MonthlyReturnsReportElement.cs:69-86 | Report/ReportElements/MonthlyReturnsReportElement.cs:91-108 β€” both copies are in the same file, so extract the 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 (18 lines × 2) Indicators/CandlestickPatterns/Harami.cs:76 β€” Indicators/CandlestickPatterns/Harami.cs:76-93 | Indicators/CandlestickPatterns/UniqueThreeRiver.cs:77-94 β€” 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 `Indicators/CandlestickPatterns/Harami.cs:76` it does not close everything it opens, so those exact lines 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) Engine/DataFeeds/Enumerators/LiveDividendEventProvider.cs:38 β€” Engine/DataFeeds/Enumerators/LiveDividendEventProvider.cs:38-55 | Engine/DataFeeds/Enumerators/LiveSplitEventProvider.cs:38-55 β€” before extracting anything, compare `Engine/DataFeeds/Enumerators/LiveDividendEventProvider.cs` and `Engine/DataFeeds/Enumerators/LiveSplitEventProvider.cs` as WHOLE FILES: 93% 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. 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 (18 lines × 2) Indicators/Rho.cs:196 β€” Indicators/Rho.cs:196-213 | Indicators/Vega.cs:196-213 β€” before extracting anything, compare `Indicators/Rho.cs` and `Indicators/Vega.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 `Indicators/Rho.cs:196` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/NakedCallStrategyAlgorithm.cs:53 β€” Algorithm.CSharp/NakedCallStrategyAlgorithm.cs:53-70 | Algorithm.CSharp/NakedPutStrategyAlgorithm.cs:53-70 β€” before extracting anything, compare `Algorithm.CSharp/NakedCallStrategyAlgorithm.cs` and `Algorithm.CSharp/NakedPutStrategyAlgorithm.cs` as WHOLE FILES: 85% 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. 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 (18 lines × 2) Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:78 β€” Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:78-95 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:76-93 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 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. 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. 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) Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:72 β€” Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:72-89 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:73-90 β€” before extracting anything, compare `Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 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. 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.
IC1 Β· Incompleteness & stubs Β· Unfinished stub Β· Γ—8
  • Unfinished stub β€” throws NotImplementedException Algorithm.Framework/Portfolio/AlphaStreamsPortfolioConstructionModel.cs:32 β€” `GetAlphaWeight` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/DefaultConverter.cs:55 β€” `CanConvert` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/SymbolValueJsonConverter.cs:53 β€” `ReadJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/SymbolValueJsonConverter.cs:65 β€” `CanConvert` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/Util/NullStringValueConverter.cs:35 β€” `WriteJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Common/Util/NullStringValueConverter.cs:66 β€” `CanConvert` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Report/NullResultValueTypeJsonConverter.cs:114 β€” `WriteJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub β€” throws NotImplementedException Report/OrderTypeNormalizingJsonConverter.cs:74 β€” `WriteJson` is a shipped member whose whole body throws NotImplementedException β€” scaffolding that was never completed. Implement it or remove the dead surface.
D4 Β· Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) Β· Γ—7
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Common/Data/Market/QuoteBar.cs:303 β€” Common/Data/Market/QuoteBar.cs:303-341 | Common/Data/Market/QuoteBar.cs:352-387 | Common/Data/Market/TradeBar.cs:196-249 | Common/Data/Market/TradeBar.cs:261-316 | Common/Data/Market/TradeBar.cs:322-338 β€” 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) Indicators/CandlestickPatterns/EveningDojiStar.cs:98 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:98-153 | Indicators/CandlestickPatterns/EveningStar.cs:95-146 | Indicators/CandlestickPatterns/Harami.cs:75-115 | Indicators/CandlestickPatterns/MorningDojiStar.cs:98-153 | Indicators/CandlestickPatterns/UniqueThreeRiver.cs:76-125 β€” 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) Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:57 β€” Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:57-80 | Algorithm.CSharp/ComboOrderAlgorithm.cs:66-100 | Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs:55-96 | Algorithm.CSharp/ContingentComboOrderRegressionAlgorithm.cs:62-137 | Algorithm.CSharp/RevertComboOrderPositionsAlgorithm.cs:58-93 β€” 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:193 β€” REDACTED:193-229 | Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:146-182 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:236-270 | REDACTED:240-276 | REDACTED:202-237 β€” 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) Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:36-77 | Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs:36-76 | Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:36-77 | Algorithm.CSharp/OptionEquityShortButterflyPutRegressionAlgorithm.cs:36-75 | Algorithm.CSharp/OptionEquityStrategyMatcherRegressionAlgorithm.cs:41-110 β€” 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) Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:37-76 | Algorithm.CSharp/OptionEquityProtectiveCollarRegressionAlgorithm.cs:38-77 | Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs:37-76 | Algorithm.CSharp/OptionEquityStraddleRegressionAlgorithm.cs:37-73 | Algorithm.CSharp/OptionEquityStrangleRegressionAlgorithm.cs:37-73 β€” 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) Algorithm.Python/BasicTemplateOptionsAlgorithm.py:47 β€” Algorithm.Python/BasicTemplateOptionsAlgorithm.py:47-63 | Algorithm.Python/BasicTemplateOptionsHourlyAlgorithm.py:47-63 | Algorithm.Python/CustomOptionPriceModelRegressionAlgorithm.py:34-50 | Algorithm.Python/OptionChainedUniverseSelectionModelRegressionAlgorithm.py:39-52 | Algorithm.Python/OptionFilterReturnsNullRegressionAlgorithm.py:44-63 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 3) Β· Γ—7
  • Duplicated block (9 lines × 3) Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:60 β€” Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:60-68 | Algorithm.CSharp/ComboOrderAlgorithm.cs:69-77 | Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs:58-66 β€” before extracting anything, compare `Algorithm.CSharp/ComboOrderAlgorithm.cs` and `Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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 `Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:60` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/ComboOrderAlgorithm.cs:72 β€” Algorithm.CSharp/ComboOrderAlgorithm.cs:72-80 | Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs:61-69 | Algorithm.CSharp/RevertComboOrderPositionsAlgorithm.cs:64-72 β€” before extracting anything, compare `Algorithm.CSharp/ComboOrderAlgorithm.cs` and `Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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 × 3) Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:62 β€” Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:62-70 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:34-42 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:49-57 β€” before extracting anything, compare `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs` and `Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 × 3) Algorithm.CSharp/AddFutureOptionContractWithInternalMappedUnderlyingRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/AddFutureOptionContractWithInternalMappedUnderlyingRegressionAlgorithm.cs:36-44 | Algorithm.CSharp/ContinuousFutureRegressionAlgorithm.cs:42-51 | Algorithm.CSharp/ManualContinuousFuturesPositionRolloverRegressionAlgorithm.cs:38-47 β€” 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 (9 lines × 3) Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55 β€” Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55-63 | Algorithm.Python/OptionChainedUniverseSelectionModelRegressionAlgorithm.py:44-52 | Algorithm.Python/OptionFilterReturnsNullRegressionAlgorithm.py:55-63 β€” 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 `Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55` 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) Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:32 β€” Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:32-40 | Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:39-47 | Algorithm.Python/IndexOptionBullPutSpreadAlgorithm.py:32-40 β€” 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. 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) Report/ReportCharts.py:606 β€” Report/ReportCharts.py:606-614 | Report/ReportCharts.py:738-746 | Report/ReportCharts.py:963-971 β€” 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 `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, `Report/ReportCharts.py:960` calls `ylabel`, `xlabel`, `set_axisbelow` and `Report/ReportCharts.py:605` 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.
D6 Β· Cohesion (LCOM4) Β· Low cohesion Β· Γ—7
  • Low cohesion: Security (LCOM4 11) Common/Securities/Security.cs:47 β€” Security's methods fall into 11 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 11 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: Brokerage (LCOM4 8) Brokerages/Brokerage.cs:39 β€” Brokerage's methods fall into 8 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 8 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: Option (LCOM4 8) Common/Securities/Option/Option.cs:38 β€” Option's methods fall into 8 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 8 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: DefaultBrokerageModel (LCOM4 7) Common/Brokerages/DefaultBrokerageModel.cs:39 β€” DefaultBrokerageModel's methods fall into 7 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 7 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: PythonData (LCOM4 7) Common/Python/PythonData.cs:27 β€” PythonData's methods fall into 7 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 7 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: SecurityHolding (LCOM4 6) Common/Securities/SecurityHolding.cs:24 β€” SecurityHolding'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: BaseData (LCOM4 4) REDACTED:33 β€” BaseData'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.
X1 Β· Async correctness Β· Sync-over-async (deadlock risk) Β· Γ—7
  • Sync-over-async (deadlock risk) Common/Data/LeanDataWriter.cs:184 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) Common/Extensions.cs:3461 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) Common/Extensions.cs:3471 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) Common/Extensions.cs:3495 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) Common/Extensions.cs:3509 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) REDACTED:245 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) REDACTED:303 β€” Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay β€” a public sync API you cannot break, or a process entry point that must not return until the work finishes β€” the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
X20 Β· Mistyped argument guard Β· Argument guard throws the exception its own condition disproves Β· Γ—7
  • Argument guard throws the exception its own condition disproves Engine/DataFeeds/DataManager.cs:632 β€” The guard on line 630 rejects `dataTypes` and line 632 reports that rejection as `ArgumentNullException` β€” but the condition's own test `!dataTypes.Any()` is true of a value that is NOT null: it is satisfied by an EMPTY `dataTypes`, and on that path `dataTypes` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Common/Data/Auxiliary/MapFile.cs:63 β€” The guard on line 61 rejects `permtick` and line 63 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(permtick)` is true of a value that is NOT null: it is satisfied by an EMPTY `permtick`, and on that path `permtick` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Common/Data/Channel.cs:51 β€” The guard on line 49 rejects `channelName` and line 51 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(channelName)` is true of a value that is NOT null: it is satisfied by an EMPTY `channelName`, and on that path `channelName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Common/Optimizer/Objectives/Constraint.cs:65 β€” The guard on line 63 rejects `jsonBacktestResult` and line 65 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(jsonBacktestResult)` is true of a value that is NOT null: it is satisfied by an EMPTY `jsonBacktestResult`, and on that path `jsonBacktestResult` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Common/Optimizer/Objectives/Objective.cs:65 β€” The guard on line 63 rejects `target` and line 65 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(target)` is true of a value that is NOT null: it is satisfied by an EMPTY `target`, and on that path `target` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Common/Optimizer/Objectives/Target.cs:76 β€” The guard on line 74 rejects `jsonBacktestResult` and line 76 reports that rejection as `ArgumentNullException` β€” but the condition's own test `string.IsNullOrEmpty(jsonBacktestResult)` is true of a value that is NOT null: it is satisfied by an EMPTY `jsonBacktestResult`, and on that path `jsonBacktestResult` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves Logging/CompositeLogHandler.cs:43 β€” The guard on line 41 rejects `handlers` and line 43 reports that rejection as `ArgumentNullException` β€” but the condition's own test `handlers.Length == 0` is true of a value that is NOT null: it is satisfied by an EMPTY `handlers`, and on that path `handlers` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose β€” `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
D10 Β· Test Quality Β· No assertions Β· Γ—6
  • No assertions: TestGetChartUpdatesWhileAdding Tests/Algorithm/AlgorithmPlottingTests.cs:92 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: Benchmark Tests/Common/Securities/SecurityExchangeHoursTests.cs:630 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: EnumerableIsThreadSafe Tests/Common/Util/ConcurrentSetTests.cs:240 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: SetJob Tests/Engine/DataFeeds/DataQueueHandlerManagerTests.cs:41 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: Accuracy Tests/Engine/DataFeeds/RealTimeScheduleEventServiceTests.cs:29 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: WorksForIndicatorsOfDifferentTypes Tests/Indicators/IndicatorExtensionsTests.cs:389 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
D15 Β· Churn × Complexity Hotspots Β· Hotspot Β· Γ—6
  • Hotspot: Engine/TransactionHandlers/BrokerageTransactionHandler.cs Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1266 β€” Engine/TransactionHandlers/BrokerageTransactionHandler.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in BrokerageTransactionHandler.HandleOrderEvents at line 1266. 1 of those changes was a fix/bug commit, and the other 4 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Engine/TransactionHandlers/BrokerageTransactionHandler.cs`: 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: Engine/Engine.cs Engine/Engine.cs:87 β€” Engine/Engine.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in Engine.Run at line 87. 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Engine/Engine.cs`: 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: Engine/Results/BacktestingResultHandler.cs Engine/Results/BacktestingResultHandler.cs:160 β€” Engine/Results/BacktestingResultHandler.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BacktestingResultHandler.Update at line 160. 1 of those changes was a fix/bug commit, and the other 9 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Engine/Results/BacktestingResultHandler.cs`: 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: Engine/AlgorithmManager.cs Engine/AlgorithmManager.cs:121 β€” Engine/AlgorithmManager.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in AlgorithmManager.Run at line 121. 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Engine/AlgorithmManager.cs`: 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: Engine/DataFeeds/UniverseSelection.cs Engine/DataFeeds/UniverseSelection.cs:119 β€” Engine/DataFeeds/UniverseSelection.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in UniverseSelection.ApplyUniverseSelection at line 119. 1 of those changes was a fix/bug commit, and the other 2 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Engine/DataFeeds/UniverseSelection.cs`: 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: Common/Securities/SecurityExchangeHours.cs Common/Securities/SecurityExchangeHours.cs:514 β€” Common/Securities/SecurityExchangeHours.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in SecurityExchangeHours.GetMarketHours at line 514. 1 of those changes was a fix/bug commit, and the other 1 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-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 18:07:14 -03:00' --until='2026-10-21 18:07:14 -03:00' --full-history --no-merges -- Common/Securities/SecurityExchangeHours.cs`: 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 4) Β· Γ—6
  • Duplicated block (6 lines × 4) Common/Orders/Fills/EquityFillModel.cs:788 β€” Common/Orders/Fills/EquityFillModel.cs:788-793 | Common/Orders/Fills/EquityFillModel.cs:897-902 | Common/Orders/Fills/FillModel.cs:884-889 | Common/Orders/Fills/FillModel.cs:943-948 β€” 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 `Common/Orders/Fills/EquityFillModel.cs:788` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:169 β€” Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:169-174 | Algorithm.CSharp/CustomDataNIFTYAlgorithm.cs:184-189 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:259-264 | REDACTED:224-229 β€” before extracting anything, compare `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` and `Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 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, `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:175` calls `ToDecimal` and `Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:265` 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 × 4) Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:57 β€” Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:57-62 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:64-69 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:63-68 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:54-59 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 `Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:57` 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) Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55 β€” Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55-60 | Algorithm.Python/CustomOptionPriceModelRegressionAlgorithm.py:42-47 | Algorithm.Python/OptionChainedUniverseSelectionModelRegressionAlgorithm.py:44-49 | Algorithm.Python/OptionFilterReturnsNullRegressionAlgorithm.py:55-60 β€” 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 `Algorithm.Python/BasicTemplateOptionsAlgorithm.py:55` 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 (6 lines × 4) Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:28 β€” Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:28-33 | Algorithm.Python/CoveredAndProtectivePutStrategiesAlgorithm.py:28-33 | Algorithm.Python/NakedCallStrategyAlgorithm.py:28-33 | Algorithm.Python/NakedPutStrategyAlgorithm.py:28-33 β€” 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 (6 lines × 4) Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:49 β€” Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:49-54 | Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:97-102 | Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py:88-93 | Algorithm.Python/DescendingCustomDataObjectStoreRegressionAlgorithm.py:104-109 β€” before extracting anything, compare `Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py` and `Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 5 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. 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.
X2 Β· Cancellation propagation Β· Async method without CancellationToken Β· Γ—6
  • Async method without CancellationToken: UnzipDataAsync REDACTED:254 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
  • Async method without CancellationToken: ZipBytesAsync REDACTED:316 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
  • Async method without CancellationToken: ZipBytesAsync REDACTED:330 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
  • Async method without CancellationToken: ZipStreamsAsync REDACTED:351 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
  • Async method without CancellationToken: ZipStreamsAsync REDACTED:369 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
  • Async method without CancellationToken: TryRequestAsync Api/ApiConnection.cs:185 β€” No CancellationToken parameter β€” this work can't be stopped early once started.
D4 Β· Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) Β· Γ—5
  • Members sharing a duplicated core (8 members, 50+ identical tokens) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:98 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:98-125 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:99-126 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:99-126 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:99-126 | Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:96-123 | Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:93-120 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:105-132 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:104-131 β€” 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) Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:46 β€” Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:46-70 | Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:52-75 | Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:44-67 | Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:49-72 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:45-79 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:46-69 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:44-78 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:46-69 β€” 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) Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:36-86 | Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:36-89 | Algorithm.CSharp/OptionEquityIronCondorRegressionAlgorithm.cs:36-86 | Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:37-87 | Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs:36-93 | Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs:36-89 | Algorithm.CSharp/OptionEquityShortIronCondorRegressionAlgorithm.cs:36-86 | Algorithm.CSharp/OptionEquityShortJellyRollRegressionAlgorithm.cs:37-87 β€” 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) Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:40 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:40-83 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallCalendarSpreadRegressionAlgorithm.cs:40-76 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallLadderRegressionAlgorithm.cs:40-83 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallSpreadRegressionAlgorithm.cs:40-76 | Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs:40-83 | Algorithm.CSharp/OptionStrategyFilteringUniversePutCalendarSpreadRegressionAlgorithm.cs:40-76 | Algorithm.CSharp/OptionStrategyFilteringUniversePutLadderRegressionAlgorithm.cs:40-83 | Algorithm.CSharp/OptionStrategyFilteringUniversePutSpreadRegressionAlgorithm.cs:40-76 β€” 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) Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:45 β€” Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:45-54 | Algorithm.Python/CustomDataBitcoinAlgorithm.py:64-118 | Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:93-102 | Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py:84-93 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:75-120 | Algorithm.Python/CustomDataRegressionAlgorithm.py:70-120 | Algorithm.Python/DescendingCustomDataObjectStoreRegressionAlgorithm.py:100-109 | Algorithm.Python/LiveFeaturesAlgorithm.py:99-147 β€” 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 Β· Duplicated block (22 lines × 2) Β· Γ—5
  • Duplicated block (22 lines × 2) Common/Util/LeanData.cs:697 β€” Common/Util/LeanData.cs:697-718 | Common/Util/LeanData.cs:725-746 β€” both copies are in the same file, so extract the 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 (22 lines × 2) Common/Brokerages/BitfinexBrokerageModel.cs:135 β€” Common/Brokerages/BitfinexBrokerageModel.cs:135-156 | Common/Brokerages/KrakenBrokerageModel.cs:94-115 β€” 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 `Common/Brokerages/BitfinexBrokerageModel.cs:135` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/FutureOptionCallITMGreeksExpiryRegressionAlgorithm.cs:75 β€” Algorithm.CSharp/FutureOptionCallITMGreeksExpiryRegressionAlgorithm.cs:75-96 | Algorithm.CSharp/IndexOptionCallITMGreeksExpiryRegressionAlgorithm.cs:65-86 β€” 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 (22 lines × 2) Algorithm.CSharp/OptionEquityIronCondorRegressionAlgorithm.cs:40 β€” Algorithm.CSharp/OptionEquityIronCondorRegressionAlgorithm.cs:40-61 | Algorithm.CSharp/OptionEquityShortIronCondorRegressionAlgorithm.cs:40-61 β€” 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 `Algorithm.CSharp/OptionEquityIronCondorRegressionAlgorithm.cs: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.
  • Duplicated block (22 lines × 2) Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:259 β€” Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:259-280 | Algorithm.CSharp/CustomModelsAlgorithm.cs:92-113 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Algorithm.CSharp/CustomModelsAlgorithm.cs:115` calls `Log` and `Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:282` 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 lines × 2) Β· Γ—5
  • Duplicated block (19 lines × 2) Common/Orders/Fills/FillModel.cs:909 β€” Common/Orders/Fills/FillModel.cs:909-927 | Common/Orders/Fills/FillModel.cs:968-986 β€” both copies are in the same file, so extract the 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 (19 lines × 2) Common/Orders/Fees/BinanceFeeModel.cs:59 β€” Common/Orders/Fees/BinanceFeeModel.cs:59-77 | Common/Orders/Fees/BybitFeeModel.cs:60-78 β€” 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. 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) Common/Securities/Security.cs:349 β€” Common/Securities/Security.cs:349-367 | Common/Securities/Security.cs:381-399 β€” both copies are in the same file, so extract the 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 `Common/Securities/Security.cs:349` 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 (19 lines × 2) Indicators/CandlestickPatterns/HikkakeModified.cs:94 β€” Indicators/CandlestickPatterns/HikkakeModified.cs:94-112 | Indicators/CandlestickPatterns/HikkakeModified.cs:139-157 β€” both copies are in the same file, so extract the 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 `Indicators/CandlestickPatterns/HikkakeModified.cs:94` it does not close everything it opens, so those exact lines 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) Algorithm.Python/CustomModelsAlgorithm.py:66 β€” Algorithm.Python/CustomModelsAlgorithm.py:66-84 | Algorithm.Python/CustomModelsPEP8Algorithm.py:64-82 β€” before extracting anything, compare `Algorithm.Python/CustomModelsAlgorithm.py` and `Algorithm.Python/CustomModelsPEP8Algorithm.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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. 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 (17 lines × 2) Β· Γ—5
  • Duplicated block (17 lines × 2) Indicators/CandlestickPatterns/DragonflyDoji.cs:76 β€” Indicators/CandlestickPatterns/DragonflyDoji.cs:76-92 | Indicators/CandlestickPatterns/GravestoneDoji.cs:76-92 β€” 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 `Indicators/CandlestickPatterns/DragonflyDoji.cs:76` it does not close everything it opens, so those exact lines 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) Indicators/CandlestickPatterns/EveningDojiStar.cs:137 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:137-153 | Indicators/CandlestickPatterns/MorningDojiStar.cs:137-153 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/MorningDojiStar.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/EveningDojiStar.cs:137` 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 (17 lines × 2) Algorithm.CSharp/AddBetaIndicatorNewAssetsRegressionAlgorithm.cs:77 β€” Algorithm.CSharp/AddBetaIndicatorNewAssetsRegressionAlgorithm.cs:77-93 | Algorithm.CSharp/AddBetaIndicatorRegressionAlgorithm.cs:74-90 β€” 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 (17 lines × 2) Indicators/CandlestickPatterns/ThreeInside.cs:77 β€” Indicators/CandlestickPatterns/ThreeInside.cs:77-93 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:79-95 β€” 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 `Indicators/CandlestickPatterns/ThreeInside.cs:77` it does not close everything it opens, so those exact lines 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) Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:56 β€” Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:56-72 | Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py:47-63 β€” before extracting anything, compare `Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py` and `Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 5 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 `Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:56` it does not close everything it opens, so those 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) Β· Γ—5
  • Duplicated block (9 lines × 4) Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:68 β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:68-76 | Algorithm.CSharp/BasicTemplateOptionsHourlyAlgorithm.cs:69-77 | Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:59-67 | Algorithm.CSharp/SamcoBasicTemplateOptionsAlgorithm.cs:67-75 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs` and `Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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 `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:68` it does not close everything it opens, so those exact lines 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) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:63 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:63-71 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:82-90 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:111-119 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:317-325 β€” 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 `Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:63` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `parameters` to `PositionGroupMaintenanceMarginParameters` in one and `PositionGroupInitialMarginParameters` 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 × 4) Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:42 β€” Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:42-55 | Algorithm.CSharp/NakedShortOptionStrategyOverMarginAlgorithm.cs:44-52 | Algorithm.CSharp/OptionStrategyFactoryMethodsBaseAlgorithm.cs:40-48 | Algorithm.CSharp/TradingNotAddedOptionsRegressionAlgorithm.cs:37-50 β€” 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 `Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:42` it does not close everything it opens, so those 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 × 4) Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:54 β€” Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:54-62 | Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:52-60 | Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs:54-62 | Algorithm.CSharp/OptionEquityShortJellyRollRegressionAlgorithm.cs:52-60 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs: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. 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 × 4) Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:64 β€” Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:64-72 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:58-66 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:65-74 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:65-73 β€” before extracting anything, compare `Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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. 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–13 lines × 2) Β· Γ—5
  • Duplicated block (12–13 lines × 2) Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:90 β€” Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:90-101 | Algorithm/Execution/ImmediateExecutionModel.cs:46-58 β€” 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 `Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:90` it does not close everything it opens, so those 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) Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:65 β€” Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:65-76 | Algorithm.CSharp/BasicTemplateOptionTradesAlgorithm.cs:58-70 β€” 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 `Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:65` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:97 β€” Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:97-109 | Algorithm.CSharp/UniverseSelectionRegressionAlgorithm.cs:81-92 β€” 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. 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, `Algorithm.CSharp/UniverseSelectionRegressionAlgorithm.cs:78` calls `Log`, `Join` and `Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:95` 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 (12–13 lines × 2) Algorithm.CSharp/LimitOrdersAreFilledAfterHoursForFuturesRegressionAlgorithm.cs:41 β€” Algorithm.CSharp/LimitOrdersAreFilledAfterHoursForFuturesRegressionAlgorithm.cs:41-52 | Algorithm.CSharp/MarketOrdersAreSupportedOnExtendedHoursForFuturesRegressionAlgorithm.cs:36-48 β€” 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 (12–13 lines × 2) Report/ReportElements/LeverageUtilizationReportElement.cs:64 β€” Report/ReportElements/LeverageUtilizationReportElement.cs:64-76 | Report/ReportElements/RollingSharpeReportElement.cs:65-76 β€” before extracting anything, compare `Report/ReportElements/LeverageUtilizationReportElement.cs` and `Report/ReportElements/RollingSharpeReportElement.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `Report/ReportElements/LeverageUtilizationReportElement.cs:64` it does not close everything it opens, so those 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 × 3) Β· Γ—5
  • Duplicated block (8 lines × 3) Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:40 β€” Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:40-51 | Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs:40-47 | Algorithm.CSharp/OptionEquityBaseStrategyRegressionAlgorithm.cs:39-50 β€” 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 `Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:40` 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, `Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs:40` calls `SetCash` and `Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:40` 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 (8 lines × 3) Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:30 β€” Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:30-37 | Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs:30-37 | Algorithm.CSharp/IndexOptionIronCondorAlgorithm.cs:30-37 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs` and `Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs` as WHOLE FILES: 84% 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 3 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. 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 `Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs: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. 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 lines × 3) Common/Data/Auxiliary/LocalZipFactorFileProvider.cs:44 β€” Common/Data/Auxiliary/LocalZipFactorFileProvider.cs:44-51 | Common/Data/Auxiliary/LocalZipMapFileProvider.cs:45-52 | Common/Data/DividendYieldProvider.cs:69-76 β€” 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 (8 lines × 3) Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:39 β€” Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:39-47 | Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:41-48 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:41-48 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallButterflyAlgorithm.py` and `Algorithm.Python/IndexOptionPutButterflyAlgorithm.py` 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. 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. 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) Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:21 β€” Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:21-28 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:21-28 | Algorithm.Python/IndexOptionPutCalendarSpreadAlgorithm.py:19-26 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallButterflyAlgorithm.py` and `Algorithm.Python/IndexOptionPutButterflyAlgorithm.py` 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. 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 (5 lines × 4) Β· Γ—5
  • Duplicated block (5 lines × 4) Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64 β€” Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64-68 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:59-63 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:60-64 | Algorithm.CSharp/OptionOTMExpiryOrderHasZeroPriceRegressionAlgorithm.cs:65-69 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64` 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) Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:39 β€” Algorithm.Python/CoveredAndProtectiveCallStrategiesAlgorithm.py:39-43 | Algorithm.Python/CoveredAndProtectivePutStrategiesAlgorithm.py:40-44 | Algorithm.Python/NakedCallStrategyAlgorithm.py:38-42 | Algorithm.Python/NakedPutStrategyAlgorithm.py:38-42 β€” 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 (5 lines × 4) Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:106 β€” Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:106-110 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:106-110 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:90-94 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:92-96 β€” before extracting anything, compare `Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:46 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:46-50 | Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:52-56 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:48-52 | Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:48-52 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:46` 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) Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:45 β€” Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:45-49 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:52-56 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:48-52 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:49-53 β€” before extracting anything, compare `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:45` 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.
D5 Β· Coupling Β· Off the main sequence Β· Γ—5
  • Off the main sequence: QuantConnect.Configuration Configuration/QuantConnect.Configuration.csproj:1 β€” QuantConnect.Configuration: abstractness 0.00, instability 0.07, distance 0.93 β€” zone of pain β€” concrete and depended on by 10 project(s), so it's rigid to change.
  • Off the main sequence: QuantConnect.Logging Logging/QuantConnect.Logging.csproj:1 β€” QuantConnect.Logging: abstractness 0.08, instability 0.00, distance 0.92 β€” zone of pain β€” concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: QuantConnect.Compression REDACTED:1 β€” QuantConnect.Compression: abstractness 0.00, instability 0.20, distance 0.80 β€” zone of pain β€” concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: QuantConnect Common/QuantConnect.csproj:1 β€” QuantConnect: abstractness 0.08, instability 0.15, distance 0.77 β€” zone of pain β€” concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: QuantConnect.Indicators Indicators/QuantConnect.Indicators.csproj:1 β€” QuantConnect.Indicators: abstractness 0.06, instability 0.22, distance 0.71 β€” zone of pain β€” concrete and depended on by 6 project(s), so it's rigid to change.
D4 Β· Code Duplication Β· Members sharing a duplicated core (6 members, 50+ identical tokens) Β· Γ—4
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:71 β€” Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:71-105 | Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:76-109 | Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:87-210 | Algorithm.CSharp/FutureSharingTickerRegressionAlgorithm.cs:50-68 | Algorithm.CSharp/FuturesMomentumAlgorithm.cs:69-93 | Algorithm.CSharp/SetHoldingsFutureRegressionAlgorithm.cs:56-110 β€” 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) Algorithm.Python/AccumulativeInsightPortfolioRegressionAlgorithm.py:22 β€” Algorithm.Python/AccumulativeInsightPortfolioRegressionAlgorithm.py:22-37 | Algorithm.Python/AddRiskManagementAlgorithm.py:23-43 | Algorithm.Python/BasicTemplateFrameworkAlgorithm.py:26-56 | Algorithm.Python/ConfidenceWeightedFrameworkAlgorithm.py:22-41 | Algorithm.Python/InsightScoringRegressionAlgorithm.py:23-36 | Algorithm.Python/InsightWeightingFrameworkAlgorithm.py:28-47 β€” 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) Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:21 β€” Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:21-32 | Algorithm.Python/IndexOptionBullCallSpreadAlgorithm.py:21-32 | Algorithm.Python/IndexOptionCallButterflyAlgorithm.py:21-33 | Algorithm.Python/IndexOptionCallCalendarSpreadAlgorithm.py:19-33 | Algorithm.Python/IndexOptionPutButterflyAlgorithm.py:21-33 | Algorithm.Python/IndexOptionPutCalendarSpreadAlgorithm.py:19-31 β€” 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) Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:29 β€” Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:29-49 | Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:35-62 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:29-44 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:35-62 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:31-46 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:31-46 β€” 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 Β· Duplicated block (20 lines × 2) Β· Γ—4
  • Duplicated block (20 lines × 2) Common/Brokerages/BybitBrokerageModel.cs:128 β€” Common/Brokerages/BybitBrokerageModel.cs:128-147 | Common/Brokerages/CoinbaseBrokerageModel.cs:135-154 β€” 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 `Common/Brokerages/BybitBrokerageModel.cs:128` 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 (20 lines × 2) Algorithm.CSharp/FundamentalRegressionAlgorithm.cs:185 β€” Algorithm.CSharp/FundamentalRegressionAlgorithm.cs:185-204 | Algorithm.CSharp/FundamentalUniverseSelectionRegressionAlgorithm.cs:69-88 β€” 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) Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:47 β€” Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:47-66 | Algorithm.Python/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.py:54-73 β€” 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. 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) Algorithm.Python/LongAndShortStraddleStrategiesAlgorithm.py:48 β€” Algorithm.Python/LongAndShortStraddleStrategiesAlgorithm.py:48-67 | Algorithm.Python/LongAndShortStrangleStrategiesAlgorithm.py:53-72 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 3) Β· Γ—4
  • Duplicated block (12 lines × 3) Indicators/CandlestickPatterns/EveningDojiStar.cs:111 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:111-122 | Indicators/CandlestickPatterns/MorningDojiStar.cs:111-122 | Indicators/CandlestickPatterns/UniqueThreeRiver.cs:84-95 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/MorningDojiStar.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/EveningDojiStar.cs:111` 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 × 3) Common/Securities/Option/OptionFilterUniverse.cs:466 β€” Common/Securities/Option/OptionFilterUniverse.cs:466-477 | Common/Securities/Option/OptionFilterUniverse.cs:525-536 | Common/Securities/Option/OptionFilterUniverse.cs:757-768 β€” 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 (12 lines × 3) Indicators/CandlestickPatterns/DarkCloudCover.cs:110 β€” Indicators/CandlestickPatterns/DarkCloudCover.cs:110-121 | Indicators/CandlestickPatterns/EveningDojiStar.cs:132-144 | Indicators/CandlestickPatterns/EveningStar.cs:125-137 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/EveningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Indicators/CandlestickPatterns/DarkCloudCover.cs:110` 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 × 3) Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:57 β€” Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:57-68 | Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:58-69 | Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs:57-68 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 (13 lines × 3) Β· Γ—4
  • Duplicated block (13 lines × 3) Common/Util/LeanData.cs:275 β€” Common/Util/LeanData.cs:275-287 | Common/Util/LeanData.cs:346-358 | Common/Util/LeanData.cs:417-429 β€” 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 `Common/Util/LeanData.cs:275` it does not close everything it opens, so those 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 × 3) Common/Orders/Fills/EquityFillModel.cs:1063 β€” Common/Orders/Fills/EquityFillModel.cs:1063-1075 | Common/Orders/Fills/FillModel.cs:1179-1191 | Common/Orders/Fills/LatestPriceFillModel.cs:37-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 all 3 call sites, so a change lands once. 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 × 3) Common/Brokerages/AlpacaBrokerageModel.cs:148 β€” Common/Brokerages/AlpacaBrokerageModel.cs:148-160 | Common/Brokerages/ClearStreetBrokerageModel.cs:62-74 | Common/Brokerages/WebullBrokerageModel.cs:110-122 β€” 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. 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 × 3) Algorithm.Python/FundamentalRegressionAlgorithm.py:117 β€” Algorithm.Python/FundamentalRegressionAlgorithm.py:117-129 | Algorithm.Python/FundamentalUniverseSelectionAlgorithm.py:53-65 | Algorithm.Python/FundamentalUniverseSelectionRegressionAlgorithm.py:41-53 β€” before extracting anything, compare `Algorithm.Python/FundamentalRegressionAlgorithm.py` and `Algorithm.Python/FundamentalUniverseSelectionRegressionAlgorithm.py` as WHOLE FILES: 83% 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 2 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. 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. 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 × 4) Β· Γ—4
  • Duplicated block (13 lines × 4) Common/Data/Market/OpenInterest.cs:134 β€” Common/Data/Market/OpenInterest.cs:134-146 | Common/Data/Market/QuoteBar.cs:663-675 | Common/Data/Market/Tick.cs:753-765 | Common/Data/Market/TradeBar.cs:815-827 β€” 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. 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 × 4) Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:38 β€” Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:38-50 | Algorithm.CSharp/OptionEquityBullPutLadderRegressionAlgorithm.cs:37-49 | Algorithm.CSharp/OptionEquityPutBackspreadRegressionAlgorithm.cs:38-50 | Algorithm.CSharp/OptionEquityShortPutBackspreadRegressionAlgorithm.cs:39-51 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityPutBackspreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortPutBackspreadRegressionAlgorithm.cs` as WHOLE FILES: 83% 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 2 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. 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 `Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:38` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72 β€” Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72-87 | Algorithm.CSharp/BasicTemplateFuturesWithExtendedMarketAlgorithm.cs:86-99 | Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:92-105 | Algorithm.CSharp/FutureSharingTickerRegressionAlgorithm.cs:51-63 β€” 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 `Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:37-49 | Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs:38-50 | Algorithm.CSharp/OptionEquityCallBackspreadRegressionAlgorithm.cs:38-50 | Algorithm.CSharp/OptionEquityShortCallBackspreadRegressionAlgorithm.cs:39-51 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs: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.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 3) Β· Γ—4
  • Duplicated block (10 lines × 3) Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs:37-46 | Algorithm.CSharp/OptionEquityBearCallSpreadSetHoldingsRegressionAlgorithm.cs:45-54 | Algorithm.CSharp/OptionEquityBullCallSpreadRegressionAlgorithm.cs:37-46 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullCallSpreadRegressionAlgorithm.cs` as WHOLE FILES: 85% 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 2 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. 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 `Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs: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 (10 lines × 3) Algorithm/QCAlgorithm.Python.cs:1645 β€” Algorithm/QCAlgorithm.Python.cs:1645-1654 | Algorithm/QCAlgorithm.Python.cs:1685-1694 | Algorithm/QCAlgorithm.Python.cs:1749-1758 β€” 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 `Algorithm/QCAlgorithm.Python.cs:1645` it does not close everything it opens, so those 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 `period` to `Resolution` in one and `TimeSpan` 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) Indicators/CandlestickPatterns/MorningStar.cs:96 β€” Indicators/CandlestickPatterns/MorningStar.cs:96-105 | Indicators/CandlestickPatterns/ThreeInside.cs:77-86 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:79-88 β€” 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 `Indicators/CandlestickPatterns/MorningStar.cs: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, `Indicators/CandlestickPatterns/MorningStar.cs:106` calls `GetCandleRange` and `Indicators/CandlestickPatterns/ThreeInside.cs:87` 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) Common/Orders/Fees/AxosFeeModel.cs:37 β€” Common/Orders/Fees/AxosFeeModel.cs:37-46 | Common/Orders/Fees/RBIFeeModel.cs:39-48 | Common/Orders/Fees/WolverineFeeModel.cs:39-48 β€” before extracting anything, compare `Common/Orders/Fees/AxosFeeModel.cs` and `Common/Orders/Fees/RBIFeeModel.cs` as WHOLE FILES: 83% 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. 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. 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 × 4) Β· Γ—4
  • Duplicated block (11 lines × 4) Indicators/Gamma.cs:194 β€” Indicators/Gamma.cs:194-204 | Indicators/Rho.cs:194-204 | Indicators/Theta.cs:194-204 | Indicators/Vega.cs:194-204 β€” before extracting anything, compare `Indicators/Rho.cs` and `Indicators/Theta.cs` 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 `Indicators/Gamma.cs: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 (11 lines × 4) Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:71 β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:71-81 | Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs:56-66 | Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:62-72 | Algorithm.CSharp/SamcoBasicTemplateOptionsAlgorithm.cs:70-80 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs` and `Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:71` it does not close everything it opens, so those 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, `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:82` calls `MarketOnCloseOrder` and `Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:73` 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 × 4) Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:60 β€” Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:60-70 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:64-74 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:60-70 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:61-71 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 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 `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:60` 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) Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:54 β€” Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:54-64 | Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:59-69 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:65-75 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:56-66 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 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 `Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:54` 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 (7 lines × 3) Β· Γ—4
  • Duplicated block (7 lines × 3) Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:45 β€” Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs:45-51 | Algorithm.CSharp/IndexOptionBullCallSpreadAlgorithm.cs:51-57 | Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs:45-51 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionBearPutSpreadAlgorithm.cs` and `Algorithm.CSharp/IndexOptionBullPutSpreadAlgorithm.cs` as WHOLE FILES: 84% 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 3 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. 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) Messaging/EventMessagingHandler.cs:124 β€” Messaging/EventMessagingHandler.cs:124-130 | Messaging/Messaging.cs:115-121 | Messaging/StreamingMessageHandler.cs:76-82 β€” 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. 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 (7 lines × 3) Algorithm.CSharp/BasicTemplateAlgorithm.cs:37 β€” Algorithm.CSharp/BasicTemplateAlgorithm.cs:37-50 | Algorithm.CSharp/BrokerageActivityEventHandlingAlgorithm.cs:31-37 | Algorithm.CSharp/NoMinimumOrderMarginRegressionAlgorithm.cs:32-38 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Algorithm.CSharp/BasicTemplateAlgorithm.cs:31` calls `Create` and `Algorithm.CSharp/NoMinimumOrderMarginRegressionAlgorithm.cs:27` 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) Algorithm.Python/EmaCrossUniverseSelectionAlgorithm.py:71 β€” Algorithm.Python/EmaCrossUniverseSelectionAlgorithm.py:71-77 | Algorithm.Python/RawPricesCoarseUniverseAlgorithm.py:63-69 | Algorithm.Python/RawPricesUniverseRegressionAlgorithm.py:58-64 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 3) Β· Γ—4
  • Duplicated block (6 lines × 3) Algorithm.CSharp/IndexOptionBearCallSpreadAlgorithm.cs:35 β€” Algorithm.CSharp/IndexOptionBearCallSpreadAlgorithm.cs:35-40 | Algorithm.CSharp/IndexOptionCallCalendarSpreadAlgorithm.cs:38-44 | Algorithm.CSharp/IndexOptionPutCalendarSpreadAlgorithm.cs:37-42 β€” 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 (6 lines × 3) Indicators/CandlestickPatterns/AbandonedBaby.cs:61 β€” Indicators/CandlestickPatterns/AbandonedBaby.cs:61-66 | Indicators/CandlestickPatterns/EveningDojiStar.cs:59-64 | Indicators/CandlestickPatterns/MorningDojiStar.cs:59-64 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/MorningDojiStar.cs` as WHOLE FILES: this scan already matched 4 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. 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 × 3) Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:88 β€” Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:88-93 | Algorithm.Python/CustomDataRegressionAlgorithm.py:84-89 | Algorithm.Python/LiveFeaturesAlgorithm.py:112-117 β€” before extracting anything, compare `Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py` and `Algorithm.Python/CustomDataRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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) Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:19 β€” Algorithm.Python/IndexOptionBearPutSpreadAlgorithm.py:19-24 | Algorithm.Python/IndexOptionBullPutSpreadAlgorithm.py:19-24 | Algorithm.Python/IndexOptionIronCondorAlgorithm.py:21-26 β€” 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.
D3 Β· God Classes Β· ClassTooLong Β· Γ—3
  • ClassTooLong: FillModel Common/Orders/Fills/FillModel.cs β€” ClassTooLong β€” 510 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 110 over it, 1.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: EquityFillModel Common/Orders/Fills/EquityFillModel.cs β€” ClassTooLong β€” 452 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 52 over it, 1.13× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: AlgorithmManager Engine/AlgorithmManager.cs β€” ClassTooLong β€” 430 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 30 over it, 1.08× 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 Β· Members sharing a duplicated core (9 members, 50+ identical tokens) Β· Γ—3
  • Members sharing a duplicated core (9 members, 50+ identical tokens) Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:36-49 | Algorithm.CSharp/AddRiskManagementAlgorithm.cs:36-50 | Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:40-67 | Algorithm.CSharp/CompositeRiskManagementModelFrameworkAlgorithm.cs:32-51 | Algorithm.CSharp/ConfidenceWeightedFrameworkAlgorithm.cs:36-53 | Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:39-53 | Algorithm.CSharp/InsightScoringRegressionAlgorithm.cs:39-51 | Algorithm.CSharp/InsightWeightingFrameworkAlgorithm.cs:36-53 | Algorithm.CSharp/PortfolioTargetTagsRegressionAlgorithm.cs:35-46 β€” 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.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:44 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:44-72 | Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:50-79 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:45-73 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:49-77 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:45-73 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:46-74 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:45-73 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:46-74 | Algorithm.CSharp/OptionOTMExpiryOrderHasZeroPriceRegressionAlgorithm.cs:51-74 β€” 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.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:36-80 | Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:37-83 | Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs:37-83 | Algorithm.CSharp/OptionEquityBullPutLadderRegressionAlgorithm.cs:36-80 | Algorithm.CSharp/OptionEquityCallBackspreadRegressionAlgorithm.cs:37-82 | Algorithm.CSharp/OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.cs:41-95 | Algorithm.CSharp/OptionEquityPutBackspreadRegressionAlgorithm.cs:37-82 | Algorithm.CSharp/OptionEquityShortCallBackspreadRegressionAlgorithm.cs:38-84 | Algorithm.CSharp/OptionEquityShortPutBackspreadRegressionAlgorithm.cs:38-84 β€” 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 Β· Duplicated block (32 lines × 2) Β· Γ—3
  • Duplicated block (32 lines × 2) Common/Securities/BuyingPowerModel.cs:188 β€” Common/Securities/BuyingPowerModel.cs:188-219 | Common/Securities/CryptoFuture/CryptoFutureMarginModel.cs:103-134 β€” 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 (32 lines × 2) Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:70 β€” Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:70-101 | Algorithm.CSharp/LongAndShortButterflyPutStrategiesAlgorithm.cs:70-101 β€” 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 (32 lines × 2) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:129 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:129-160 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:130-161 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 (26 lines × 2) Β· Γ—3
  • Duplicated block (26 lines × 2) Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:39 β€” Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:39-64 | Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs:39-64 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:39` it does not close everything it opens, so those exact lines 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) Common/Orders/Fills/EquityFillModel.cs:587 β€” Common/Orders/Fills/EquityFillModel.cs:587-612 | Common/Orders/Fills/EquityFillModel.cs:698-723 β€” both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `order` to `MarketOnOpenOrder` in one and `MarketOnCloseOrder` 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 (26 lines × 2) Indicators/CandlestickPatterns/InvertedHammer.cs:83 β€” Indicators/CandlestickPatterns/InvertedHammer.cs:83-108 | Indicators/CandlestickPatterns/ShootingStar.cs:84-109 β€” before extracting anything, compare `Indicators/CandlestickPatterns/InvertedHammer.cs` and `Indicators/CandlestickPatterns/ShootingStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 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 `Indicators/CandlestickPatterns/InvertedHammer.cs:83` 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 (25–26 lines × 2) Β· Γ—3
  • Duplicated block (25–26 lines × 2) Common/Data/Market/TradeBar.cs:199 β€” Common/Data/Market/TradeBar.cs:199-224 | Common/Data/Market/TradeBar.cs:264-288 β€” both copies are in the same file, so extract the 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 `Common/Data/Market/TradeBar.cs:199` it does not close everything it opens, so those 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–26 lines × 2) Indicators/CandlestickPatterns/Hikkake.cs:114 β€” Indicators/CandlestickPatterns/Hikkake.cs:114-139 | Indicators/CandlestickPatterns/HikkakeModified.cs:152-176 β€” 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 `Indicators/CandlestickPatterns/Hikkake.cs:114` 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, `Indicators/CandlestickPatterns/HikkakeModified.cs:181` calls `GetCandleRange` and `Indicators/CandlestickPatterns/Hikkake.cs:141` 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 (25–26 lines × 2) Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:91 β€” Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:91-115 | Algorithm.Python/BasicTemplateCryptoFutureHourlyAlgorithm.py:73-98 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (22–23 lines × 2) Β· Γ—3
  • Duplicated block (22–23 lines × 2) Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:182 β€” Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:182-204 | Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:246-267 β€” both copies are in the same file, so extract the 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 `Common/Algorithm/Framework/Portfolio/SignalExports/NumeraiSignalExport.cs:182` 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 `filename` to `$filename modelId: $modelId` in one and `$filename modelId: $modelId triggerId: $triggerId source: ""numerapi""` 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 (22–23 lines × 2) Common/Orders/Fills/FillModel.cs:348 β€” Common/Orders/Fills/FillModel.cs:348-370 | Common/Orders/Fills/FillModel.cs:407-428 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/FillModel.cs:348` it does not close everything it opens, so those 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 `order` to `StopMarketOrder` in one and `TrailingStopOrder` 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 (22–23 lines × 2) Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:76 β€” Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:76-97 | Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs:60-82 β€” before extracting anything, compare `Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs` and `Algorithm.Framework/Execution/VolumeWeightedAveragePriceExecutionModel.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `Algorithm.Framework/Execution/StandardDeviationExecutionModel.cs:76` it does not close everything it opens, so those 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 (16–17 lines × 3) Β· Γ—3
  • Duplicated block (16–17 lines × 3) Common/Orders/Fees/AlphaStreamsFeeModel.cs:89 β€” Common/Orders/Fees/AlphaStreamsFeeModel.cs:89-105 | Common/Orders/Fees/BinanceFeeModel.cs:74-89 | Common/Orders/Fees/BitfinexFeeModel.cs:66-81 β€” 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 `Common/Orders/Fees/AlphaStreamsFeeModel.cs: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. 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–17 lines × 3) Common/Orders/Fills/EquityFillModel.cs:53 β€” Common/Orders/Fills/EquityFillModel.cs:53-68 | Common/Orders/Fills/EquityFillModel.cs:281-297 | Common/Orders/Fills/EquityFillModel.cs:407-422 β€” 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 `Common/Orders/Fills/EquityFillModel.cs:53` it does not close everything it opens, so those 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 `order` to `LimitIfTouchedOrder` in one and `StopLimitOrder` 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 (16–17 lines × 3) Indicators/CandlestickPatterns/BeltHold.cs:104 β€” Indicators/CandlestickPatterns/BeltHold.cs:104-119 | Indicators/CandlestickPatterns/ClosingMarubozu.cs:104-119 | Indicators/CandlestickPatterns/Marubozu.cs:92-108 β€” before extracting anything, compare `Indicators/CandlestickPatterns/BeltHold.cs` and `Indicators/CandlestickPatterns/ClosingMarubozu.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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 `Indicators/CandlestickPatterns/BeltHold.cs:104` 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.
D4 Β· Code Duplication Β· Duplicated block (16–17 lines × 2) Β· Γ—3
  • Duplicated block (16–17 lines × 2) Indicators/CandlestickPatterns/DojiStar.cs:104 β€” Indicators/CandlestickPatterns/DojiStar.cs:104-119 | Indicators/CandlestickPatterns/HaramiCross.cs:99-115 β€” 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 `Indicators/CandlestickPatterns/DojiStar.cs:104` 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 (16–17 lines × 2) Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:88 β€” Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:88-104 | Algorithm.CSharp/OptionExerciseAssignRegressionAlgorithm.cs:71-86 β€” 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 `Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs:88` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/DropboxBaseDataUniverseSelectionAlgorithm.cs:91 β€” Algorithm.CSharp/DropboxBaseDataUniverseSelectionAlgorithm.cs:91-107 | Algorithm.CSharp/DropboxUniverseSelectionAlgorithm.cs:122-137 β€” 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. 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 (14 lines × 3) Β· Γ—3
  • Duplicated block (14 lines × 3) Common/Util/LeanData.cs:297 β€” Common/Util/LeanData.cs:297-310 | Common/Util/LeanData.cs:368-381 | Common/Util/LeanData.cs:439-452 β€” 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 `Common/Util/LeanData.cs: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. 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) Indicators/CandlestickPatterns/Harami.cs:102 β€” Indicators/CandlestickPatterns/Harami.cs:102-115 | Indicators/CandlestickPatterns/HomingPigeon.cs:106-119 | Indicators/CandlestickPatterns/UniqueThreeRiver.cs:112-125 β€” 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 `Indicators/CandlestickPatterns/Harami.cs:102` 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 (14 lines × 3) Common/Orders/Fills/FillModel.cs:360 β€” Common/Orders/Fills/FillModel.cs:360-374 | Common/Orders/Fills/FillModel.cs:419-432 | Common/Orders/Fills/FutureFillModel.cs:130-144 β€” before extracting anything, compare `Common/Orders/Fills/FillModel.cs` and `Common/Orders/Fills/FutureFillModel.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Common/Orders/Fills/FillModel.cs:360` it does not close everything it opens, so those 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `order` to `StopMarketOrder` in one and `TrailingStopOrder` 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 (11 lines × 3) Β· Γ—3
  • Duplicated block (11 lines × 3) Common/Data/Market/QuoteBar.cs:306 β€” Common/Data/Market/QuoteBar.cs:306-316 | Common/Data/Market/QuoteBar.cs:355-365 | Common/Data/Market/TradeBar.cs:323-333 β€” 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 `Common/Data/Market/QuoteBar.cs:306` it does not close everything it opens, so those 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 × 3) Indicators/CandlestickPatterns/EveningStar.cs:130 β€” Indicators/CandlestickPatterns/EveningStar.cs:130-140 | Indicators/CandlestickPatterns/MorningStar.cs:130-140 | Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:114-124 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningStar.cs` and `Indicators/CandlestickPatterns/MorningStar.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `Indicators/CandlestickPatterns/EveningStar.cs:130` 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, `Indicators/CandlestickPatterns/EveningStar.cs:142` calls `GetCandleRange` and `Indicators/CandlestickPatterns/UpsideGapTwoCrows.cs:126` 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 × 3) Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:63 β€” Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:63-73 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:67-77 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:57-67 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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 `Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:63` 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 (8 lines × 4) Β· Γ—3
  • Duplicated block (8 lines × 4) Indicators/CandlestickPatterns/ConcealedBabySwallow.cs:74 β€” Indicators/CandlestickPatterns/ConcealedBabySwallow.cs:74-81 | Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:78-85 | Indicators/CandlestickPatterns/ThreeBlackCrows.cs:73-80 | Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:87-94 β€” 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 `Indicators/CandlestickPatterns/ConcealedBabySwallow.cs: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. 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 lines × 4) Algorithm.Python/CustomDataBitcoinAlgorithm.py:83 β€” Algorithm.Python/CustomDataBitcoinAlgorithm.py:83-90 | Algorithm.Python/CustomDataBitcoinAlgorithm.py:110-118 | Algorithm.Python/LiveFeaturesAlgorithm.py:118-125 | Algorithm.Python/LiveFeaturesAlgorithm.py:139-147 β€” before extracting anything, compare `Algorithm.Python/CustomDataBitcoinAlgorithm.py` and `Algorithm.Python/LiveFeaturesAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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. 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) Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:94 β€” Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:94-101 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:112-120 | Algorithm.Python/CustomDataRegressionAlgorithm.py:90-97 | Algorithm.Python/CustomDataRegressionAlgorithm.py:112-120 β€” before extracting anything, compare `Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py` and `Algorithm.Python/CustomDataRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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. 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, `Algorithm.Python/CustomDataRegressionAlgorithm.py:102` calls `strip`, `isdigit` and `Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:106` 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 (6–7 lines × 2) Β· Γ—3
  • Duplicated block (6–7 lines × 2) Engine/HistoricalData/HistoryProviderManager.cs:117 β€” Engine/HistoricalData/HistoryProviderManager.cs:117-122 | Engine/HistoricalData/SubscriptionDataReaderHistoryProvider.cs:125-131 β€” 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 `Engine/HistoricalData/SubscriptionDataReaderHistoryProvider.cs:125` 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 × 2) Algorithm.Python/FutureOptionDailyRegressionAlgorithm.py:39 β€” Algorithm.Python/FutureOptionDailyRegressionAlgorithm.py:39-45 | Algorithm.Python/FutureOptionHourlyRegressionAlgorithm.py:38-43 β€” 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 `Algorithm.Python/FutureOptionDailyRegressionAlgorithm.py:39` 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–7 lines × 2) Algorithm.Python/OptionRenameRegressionAlgorithm.py:43 β€” Algorithm.Python/OptionRenameRegressionAlgorithm.py:43-49 | Algorithm.Python/OptionRenameRegressionAlgorithm.py:61-66 β€” both copies are in the same file, so extract the 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 (5 lines × 3) Β· Γ—3
  • Duplicated block (5 lines × 3) Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:46 β€” Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:46-59 | Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:44-48 | Algorithm.CSharp/InsightScoringRegressionAlgorithm.cs:41-45 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs` and `Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 before the matched lines, `Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:46` calls `SetCash` and `Algorithm.CSharp/InsightScoringRegressionAlgorithm.cs:41` 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) Algorithm.Python/FundamentalRegressionAlgorithm.py:106 β€” Algorithm.Python/FundamentalRegressionAlgorithm.py:106-110 | Algorithm.Python/FundamentalUniverseSelectionAlgorithm.py:42-46 | Algorithm.Python/FundamentalUniverseSelectionRegressionAlgorithm.py:63-67 β€” before extracting anything, compare `Algorithm.Python/FundamentalRegressionAlgorithm.py` and `Algorithm.Python/FundamentalUniverseSelectionRegressionAlgorithm.py` as WHOLE FILES: 83% 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 2 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. 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) Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:27 β€” Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:27-31 | Algorithm.Python/IndexOptionCallCalendarSpreadAlgorithm.py:26-30 | Algorithm.Python/IndexOptionPutCalendarSpreadAlgorithm.py:25-29 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Algorithm.Python/IndexOptionCallCalendarSpreadAlgorithm.py:23` calls `add_equity` and `Algorithm.Python/IndexOptionBearCallSpreadAlgorithm.py:23` 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.
IC1 Β· Incompleteness & stubs Β· Condition was already decided Β· Γ—3
  • Condition was already decided β€” an earlier guard makes this test constant Algorithm.CSharp/CryptoFutureLeverageBasedMarginRegressionAlgorithm.cs:99 β€” Control only reaches here when `marginRemaining > 0` is false, because the guard on line 62 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
  • Condition was already decided β€” an earlier guard makes this test constant Algorithm.CSharp/IndicatorHistoryRegressionAlgorithm.cs:53 β€” Control only reaches here when `bollingerBands.Window.IsReady` is false, because the guard on line 46 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test.
  • Condition was already decided β€” an earlier guard makes this test constant Algorithm/QCAlgorithm.History.cs:1458 β€” Control only reaches here when `resolution != null` is false, because the guard on line 1428 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
X3 Β· Exception handling Β· Swallowed exception (caught, then discarded) Β· Γ—3
  • Swallowed exception (caught, then discarded) Engine/DataFeeds/DownloaderDataProvider.cs:155 β€” `catch (InvalidOperationException)` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) Algorithm/Portfolio/PortfolioConstructionModel.cs:233 β€” `catch` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) Common/Python/FeeModelPythonWrapper.cs:55 β€” `catch (PythonException)` does nothing with the exception it caught β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
D31 Β· IaC & Container Security Β· Medium IaC Β· Γ—2
  • REDACTED
  • REDACTED
D35 Β· Change Coupling Β· Change coupling Β· Γ—2
  • Change coupling: BlackLittermanOptimizationPortfolioConstructionModel.py ↔ MeanVarianceOptimizationPortfolioConstructionModel.py Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.py:1 β€” `Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.py` and `Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.py` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history β€” 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 12 shared commits counted here, the most recent 3 are `5729be46` Make RollingWindow compatible with any data type (#8836); `7c68e3f3` Refactor Portfolio Construction Models to Use Insight Manager (#7077); `75ca2862` Address reviews β€” run `git show` on any of them.
  • Change coupling: DefaultBrokerageModel.cs ↔ BrokerageModelPythonWrapper.cs Common/Brokerages/DefaultBrokerageModel.cs:1 β€” `Common/Brokerages/DefaultBrokerageModel.cs` and `Common/Python/BrokerageModelPythonWrapper.cs` 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, and counted over this repository's 10,000 most recent commits rather than its whole history β€” 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder β€” so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `5e9901c6` Shortable modeling improvements (#7579); `94d766ff` Refactor Default Benchmark (#5158); `3e7af17e` Implements Easy To Borrow Reality Modeling (WIP) (#5159) β€” run `git show` on any of them.
D4 Β· Code Duplication Β· Near-duplicate member family (4 members, 19 shared lines) Β· Γ—2
  • Near-duplicate member family (4 members, 19 shared lines) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:30 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:30-52 | Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:34-59 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:30-54 | Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:31-54 β€” These 4 members are variants of one another: a block of 19 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 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.
  • Near-duplicate member family (4 members, 19 shared lines) Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:29 β€” Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:29-51 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:34-58 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:30-54 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:31-55 β€” These 4 members are variants of one another: a block of 19 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 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.
D4 Β· Code Duplication Β· Edited copy of a member (17 corresponding lines) Β· Γ—2
  • Edited copy of a member (17 corresponding lines) Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:51 β€” Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:51-68 | Algorithm.CSharp/FuturesExtendedMarketHoursRegressionAlgorithm.cs:51-78 β€” 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) Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:36 β€” Algorithm.Python/FutureContractsExtendedMarketHoursRegressionAlgorithm.py:36-52 | Algorithm.Python/FuturesExtendedMarketHoursRegressionAlgorithm.py:37-59 β€” 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 Β· Members sharing a duplicated core (7 members, 50+ identical tokens) Β· Γ—2
  • Members sharing a duplicated core (7 members, 50+ identical tokens) Common/Brokerages/CharlesSchwabBrokerageModel.cs:95 β€” Common/Brokerages/CharlesSchwabBrokerageModel.cs:95-119 | Common/Brokerages/EzeBrokerageModel.cs:91-122 | Common/Brokerages/PublicBrokerageModel.cs:82-121 | Common/Brokerages/RBIBrokerageModel.cs:59-88 | Common/Brokerages/TDAmeritradeBrokerageModel.cs:60-90 | Common/Brokerages/TastytradeBrokerageModel.cs:90-118 | Common/Brokerages/TradeStationBrokerageModel.cs:129-186 β€” 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) Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:40 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:40-87 | Algorithm.CSharp/OptionStrategyFilteringUniverseConversionRegressionAlgorithm.cs:40-75 | Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs:40-89 | Algorithm.CSharp/OptionStrategyFilteringUniverseJellyRollRegressionAlgorithm.cs:40-87 | Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs:40-76 | Algorithm.CSharp/OptionStrategyFilteringUniverseStraddleRegressionAlgorithm.cs:40-74 | Algorithm.CSharp/OptionStrategyFilteringUniverseStrangleRegressionAlgorithm.cs:40-75 β€” 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 Β· Duplicated block (29 lines × 2) Β· Γ—2
  • Duplicated block (29 lines × 2) Common/Orders/Fills/FillModel.cs:295 β€” Common/Orders/Fills/FillModel.cs:295-323 | Common/Orders/Fills/FutureFillModel.cs:48-76 β€” before extracting anything, compare `Common/Orders/Fills/FillModel.cs` and `Common/Orders/Fills/FutureFillModel.cs` as WHOLE FILES: this scan already matched 3 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. 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 `order` to `Order` in one and `MarketOrder` 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 (29 lines × 2) Algorithm.CSharp/AddFutureOptionContractDataStreamingRegressionAlgorithm.cs:124 β€” Algorithm.CSharp/AddFutureOptionContractDataStreamingRegressionAlgorithm.cs:124-152 | Algorithm.CSharp/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.cs:180-208 β€” 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 `Algorithm.CSharp/AddFutureOptionContractDataStreamingRegressionAlgorithm.cs:124` 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 (28–29 lines × 4) Β· Γ—2
  • Duplicated block (28–29 lines × 4) Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:105 β€” Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:105-132 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:103-130 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:100-128 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:100-127 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 (28–29 lines × 4) Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:101 β€” Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:101-128 | Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:98-125 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:95-123 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:95-122 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 4) Β· Γ—2
  • Duplicated block (21 lines × 4) Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:51 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:51-71 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallLadderRegressionAlgorithm.cs:51-71 | Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs:51-71 | Algorithm.CSharp/OptionStrategyFilteringUniversePutLadderRegressionAlgorithm.cs:51-71 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs` as WHOLE FILES: 83% 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 2 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. 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 (21 lines × 4) REDACTED:194 β€” REDACTED:194-214 | Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:147-167 | REDACTED:241-261 | REDACTED:203-223 β€” before extracting anything, compare `REDACTED` and `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 `REDACTED: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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:216` calls `AddDays` and `REDACTED:225` 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 (24 lines × 3) Β· Γ—2
  • Duplicated block (24 lines × 3) Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:100 β€” Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:100-123 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:100-123 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:100-123 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 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 (24 lines × 3) Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:94 β€” Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:94-117 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:106-129 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:105-128 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 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 (26–27 lines × 2) Β· Γ—2
  • Duplicated block (26–27 lines × 2) Common/Orders/Fills/EquityFillModel.cs:55 β€” Common/Orders/Fills/EquityFillModel.cs:55-81 | Common/Orders/Fills/EquityFillModel.cs:409-434 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/EquityFillModel.cs:55` it does not close everything it opens, so those 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `order` to `LimitIfTouchedOrder` in one and `Order` 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 (26–27 lines × 2) Common/Orders/Fills/EquityFillModel.cs:1068 β€” Common/Orders/Fills/EquityFillModel.cs:1068-1093 | Common/Orders/Fills/LatestPriceFillModel.cs:42-68 β€” before extracting anything, compare `Common/Orders/Fills/EquityFillModel.cs` and `Common/Orders/Fills/LatestPriceFillModel.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 `Common/Orders/Fills/EquityFillModel.cs:1068` it does not close everything it opens, so those 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) Β· Γ—2
  • Duplicated block (24 lines × 2) Indicators/CandlestickPatterns/EveningDojiStar.cs:99 β€” Indicators/CandlestickPatterns/EveningDojiStar.cs:99-122 | Indicators/CandlestickPatterns/MorningDojiStar.cs:99-122 β€” before extracting anything, compare `Indicators/CandlestickPatterns/EveningDojiStar.cs` and `Indicators/CandlestickPatterns/MorningDojiStar.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/EveningDojiStar.cs:99` it does not close everything it opens, so those exact lines 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) Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:100 β€” Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs:100-124 | Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs:100-123 β€” before extracting anything, compare `Algorithm.CSharp/ForexInternalFeedOnDataHigherResolutionRegressionAlgorithm.cs` and `Algorithm.CSharp/ForexInternalFeedOnDataSameResolutionRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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.
D4 Β· Code Duplication Β· Duplicated block (27 lines × 2) Β· Γ—2
  • Duplicated block (27 lines × 2) REDACTED:203 β€” REDACTED:203-229 | REDACTED:250-276 β€” before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 99 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 `REDACTED: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. 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 (27 lines × 2) Algorithm.CSharp/CustomDataMultiFileObjectStoreRegressionAlgorithm.cs:105 β€” Algorithm.CSharp/CustomDataMultiFileObjectStoreRegressionAlgorithm.cs:105-131 | Algorithm.CSharp/CustomDataObjectStoreRegressionAlgorithm.cs:72-98 β€” before extracting anything, compare `Algorithm.CSharp/CustomDataMultiFileObjectStoreRegressionAlgorithm.cs` and `Algorithm.CSharp/CustomDataObjectStoreRegressionAlgorithm.cs` as WHOLE FILES: 92% 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. 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 (25–27 lines × 2) Β· Γ—2
  • Duplicated block (25–27 lines × 2) Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:51 β€” Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:51-77 | Algorithm.CSharp/OptionEquityShortButterflyPutRegressionAlgorithm.cs:51-75 β€” 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 `Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:51` 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–27 lines × 2) Report/ReportCharts.py:1016 β€” Report/ReportCharts.py:1016-1042 | Report/ReportCharts.py:1055-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.
D4 Β· Code Duplication Β· Duplicated block (23–24 lines × 2) Β· Γ—2
  • Duplicated block (23–24 lines × 2) Common/Brokerages/RBIBrokerageModel.cs:59 β€” Common/Brokerages/RBIBrokerageModel.cs:59-81 | Common/Brokerages/TDAmeritradeBrokerageModel.cs:60-83 β€” before extracting anything, compare `Common/Brokerages/RBIBrokerageModel.cs` and `Common/Brokerages/TDAmeritradeBrokerageModel.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Common/Brokerages/RBIBrokerageModel.cs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–24 lines × 2) Algorithm.Python/SecuritySessionRegressionAlgorithm.py:64 β€” Algorithm.Python/SecuritySessionRegressionAlgorithm.py:64-86 | Algorithm.Python/SecuritySessionWithFuturesRegressionAlgorithm.py:90-113 β€” 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 `Algorithm.Python/SecuritySessionRegressionAlgorithm.py:64` it does not close everything it opens, so those 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 (23 lines × 2) Β· Γ—2
  • Duplicated block (23 lines × 2) Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs:106 β€” Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs:106-128 | Algorithm.CSharp/Collective2SignalExportDemonstrationAlgorithm.cs:127-149 β€” before extracting anything, compare `Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs` and `Algorithm.CSharp/Collective2SignalExportDemonstrationAlgorithm.cs` as WHOLE FILES: 84% 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. 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 `Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs:106` 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 (23 lines × 2) Algorithm.CSharp/CapacityTests/MonthlyRebalanceDaily.cs:29 β€” Algorithm.CSharp/CapacityTests/MonthlyRebalanceDaily.cs:29-51 | Algorithm.CSharp/CapacityTests/MonthlyRebalanceHourly.cs:29-51 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 4) Β· Γ—2
  • Duplicated block (16 lines × 4) Algorithm.CSharp/OptionStrategyFilteringUniverseConversionRegressionAlgorithm.cs:48 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseConversionRegressionAlgorithm.cs:48-63 | Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs:49-64 | Algorithm.CSharp/OptionStrategyFilteringUniverseStraddleRegressionAlgorithm.cs:48-63 | Algorithm.CSharp/OptionStrategyFilteringUniverseStrangleRegressionAlgorithm.cs:49-64 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniverseStrangleRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 (16 lines × 4) Indicators/CandlestickPatterns/Hammer.cs:84 β€” Indicators/CandlestickPatterns/Hammer.cs:84-99 | Indicators/CandlestickPatterns/HangingMan.cs:84-99 | Indicators/CandlestickPatterns/InvertedHammer.cs:81-96 | Indicators/CandlestickPatterns/ShootingStar.cs:82-97 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Hammer.cs` and `Indicators/CandlestickPatterns/HangingMan.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/Hammer.cs:84` it does not close everything it opens, so those 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) Β· Γ—2
  • Duplicated block (18–19 lines × 2) Common/Brokerages/PublicBrokerageModel.cs:82 β€” Common/Brokerages/PublicBrokerageModel.cs:82-99 | Common/Brokerages/TastytradeBrokerageModel.cs:90-108 β€” before extracting anything, compare `Common/Brokerages/PublicBrokerageModel.cs` and `Common/Brokerages/TastytradeBrokerageModel.cs` as WHOLE FILES: this scan already matched 4 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 `Common/Brokerages/PublicBrokerageModel.cs: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. 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) Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:75 β€” Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:75-92 | Algorithm.Python/CustomDataRegressionAlgorithm.py:70-88 β€” before extracting anything, compare `Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py` and `Algorithm.Python/CustomDataRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 51 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. 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 (15 lines × 3) Β· Γ—2
  • Duplicated block (15 lines × 3) Common/Data/Market/QuoteBar.cs:316 β€” Common/Data/Market/QuoteBar.cs:316-330 | Common/Data/Market/QuoteBar.cs:365-379 | Common/Data/Market/TradeBar.cs:291-305 β€” 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 `Common/Data/Market/QuoteBar.cs:316` 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 × 3) Indicators/CandlestickPatterns/Counterattack.cs:83 β€” Indicators/CandlestickPatterns/Counterattack.cs:83-97 | Indicators/CandlestickPatterns/Kicking.cs:84-98 | Indicators/CandlestickPatterns/KickingByLength.cs:85-99 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Kicking.cs` and `Indicators/CandlestickPatterns/KickingByLength.cs` as WHOLE FILES: 87% 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 2 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. 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 `Indicators/CandlestickPatterns/Counterattack.cs:83` 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 (17–18 lines × 2) Β· Γ—2
  • Duplicated block (17–18 lines × 2) Engine/Results/BacktestingResultHandler.cs:709 β€” Engine/Results/BacktestingResultHandler.cs:709-726 | Engine/Results/LiveTradingResultHandler.cs:735-751 β€” 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 `Engine/Results/BacktestingResultHandler.cs:709` it does not close everything it opens, so those 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 (17–18 lines × 2) Algorithm.Python/Collective2PortfolioSignalExportDemonstrationAlgorithm.py:76 β€” Algorithm.Python/Collective2PortfolioSignalExportDemonstrationAlgorithm.py:76-92 | Algorithm.Python/Collective2SignalExportDemonstrationAlgorithm.py:87-104 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (12–17 lines × 4) Β· Γ—2
  • Duplicated block (12–17 lines × 4) Common/Util/LeanData.cs:166 β€” Common/Util/LeanData.cs:166-177 | Common/Util/LeanData.cs:182-198 | Common/Util/LeanData.cs:355-367 | Common/Util/LeanData.cs:426-438 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Common/Util/LeanData.cs:178` calls `ArgumentException`, `nameof` and `Common/Util/LeanData.cs:368` 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–17 lines × 4) Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:41 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:41-57 | Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs:48-59 | Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs:41-57 | Algorithm.CSharp/OptionStrategyFilteringUniverseStrangleRegressionAlgorithm.cs:41-57 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:41` it does not close everything it opens, so those 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–16 lines × 2) Β· Γ—2
  • Duplicated block (15–16 lines × 2) Algorithm.CSharp/ConstituentsUniverseImmediateSelectionRegressionAlgorithm.cs:38 β€” Algorithm.CSharp/ConstituentsUniverseImmediateSelectionRegressionAlgorithm.cs:38-53 | Algorithm.CSharp/ConstituentsUniverseRegressionAlgorithm.cs:39-53 β€” 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–16 lines × 2) Algorithm.Python/StandardDeviationExecutionModelRegressionAlgorithm.py:36 β€” Algorithm.Python/StandardDeviationExecutionModelRegressionAlgorithm.py:36-50 | Algorithm.Python/VolumeWeightedAveragePriceExecutionModelRegressionAlgorithm.py:34-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.
D4 Β· Code Duplication Β· Duplicated block (14 lines × 4) Β· Γ—2
  • Duplicated block (14 lines × 4) Indicators/CandlestickPatterns/Hammer.cs:121 β€” Indicators/CandlestickPatterns/Hammer.cs:121-134 | Indicators/CandlestickPatterns/HangingMan.cs:121-134 | Indicators/CandlestickPatterns/InvertedHammer.cs:113-126 | Indicators/CandlestickPatterns/ShootingStar.cs:114-127 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Hammer.cs` and `Indicators/CandlestickPatterns/HangingMan.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/Hammer.cs: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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Indicators/CandlestickPatterns/Hammer.cs:136` calls `GetCandleRange` and `Indicators/CandlestickPatterns/InvertedHammer.cs:128` 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 (14 lines × 4) Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:73 β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:73-86 | Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs:58-71 | Algorithm.CSharp/OptionFilterReturnsNullRegressionAlgorithm.cs:70-83 | Algorithm.CSharp/SamcoBasicTemplateOptionsAlgorithm.cs:72-85 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs` and `Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:73` 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 (13–14 lines × 3) Β· Γ—2
  • Duplicated block (13–14 lines × 3) Indicators/Rho.cs:195 β€” Indicators/Rho.cs:195-208 | Indicators/Theta.cs:195-207 | Indicators/Vega.cs:195-208 β€” before extracting anything, compare `Indicators/Rho.cs` and `Indicators/Theta.cs` 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 `Indicators/Rho.cs: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. 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–14 lines × 3) Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64 β€” Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64-77 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:59-71 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:60-72 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:64` 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 (10–14 lines × 2) Β· Γ—2
  • Duplicated block (10–14 lines × 2) Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:41 β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:41-54 | Algorithm.CSharp/NonDynamicOptionsFilterRegressionAlgorithm.cs:38-47 β€” 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 `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:41` it does not close everything it opens, so those 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–14 lines × 2) Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs:37 β€” Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs:37-46 | Algorithm.CSharp/OptionEquityBaseStrategyRegressionAlgorithm.cs:36-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 `Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs: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. 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–13 lines × 3) Β· Γ—2
  • Duplicated block (12–13 lines × 3) Algorithm.CSharp/SpreadExecutionModelRegressionAlgorithm.cs:42 β€” Algorithm.CSharp/SpreadExecutionModelRegressionAlgorithm.cs:42-53 | Algorithm.CSharp/StandardDeviationExecutionModelRegressionAlgorithm.cs:40-52 | Algorithm.CSharp/VolumeWeightedAveragePriceExecutionModelRegressionAlgorithm.cs:41-53 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Algorithm.CSharp/StandardDeviationExecutionModelRegressionAlgorithm.cs:40` calls `SetCash` and `Algorithm.CSharp/SpreadExecutionModelRegressionAlgorithm.cs:42` 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–13 lines × 3) Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:60 β€” Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:60-71 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:67-79 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:67-78 β€” before extracting anything, compare `Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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. 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 × 5) Β· Γ—2
  • Duplicated block (10 lines × 5) Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:72 β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:72-81 | Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs:57-66 | Algorithm.CSharp/OptionFilterReturnsNullRegressionAlgorithm.cs:69-78 | Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:63-72 | Algorithm.CSharp/SamcoBasicTemplateOptionsAlgorithm.cs:71-80 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs` and `Algorithm.CSharp/OptionChainedUniverseSelectionModelRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:72` it does not close everything it opens, so those 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, `Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:82` calls `MarketOnCloseOrder` and `Algorithm.CSharp/OptionResolutionRegressionAlgorithm.cs:73` 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 × 5) REDACTED:116 β€” REDACTED:116-125 | Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:73-82 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:163-172 | REDACTED:163-172 | REDACTED:129-138 β€” before extracting anything, compare `REDACTED` and `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 `REDACTED:116` it does not close everything it opens, so those 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 lines × 4) Β· Γ—2
  • Duplicated block (10 lines × 4) Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:259 β€” Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:259-268 | Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:273-282 | Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:287-297 | Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:302-311 β€” 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 `Common/Securities/Option/StrategyMatcher/OptionStrategyDefinitions.cs:259` 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 × 4) Algorithm.CSharp/ComboOrderAlgorithm.cs:72 β€” Algorithm.CSharp/ComboOrderAlgorithm.cs:72-83 | Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs:61-72 | Algorithm.CSharp/ContingentComboOrderRegressionAlgorithm.cs:70-79 | Algorithm.CSharp/RevertComboOrderPositionsAlgorithm.cs:64-75 β€” before extracting anything, compare `Algorithm.CSharp/ComboOrderAlgorithm.cs` and `Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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, `Algorithm.CSharp/RevertComboOrderPositionsAlgorithm.cs:77` calls `Debug` and `Algorithm.CSharp/ComboOrderAlgorithm.cs:85` 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 × 4) Β· Γ—2
  • Duplicated block (7 lines × 4) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119-125 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:120-126 | Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:117-123 | Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:114-120 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:119` 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) Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:52 β€” Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:52-58 | Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:72-78 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:29-35 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:64-70 β€” before extracting anything, compare `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs` and `Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:52` it does not close everything it opens, so those 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 × 8) Β· Γ—2
  • Duplicated block (6 lines × 8) Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:40 β€” Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:40-46 | Algorithm.CSharp/AddRiskManagementAlgorithm.cs:39-44 | Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:44-55 | Algorithm.CSharp/CompositeRiskManagementModelFrameworkAlgorithm.cs:36-42 | Algorithm.CSharp/ConfidenceWeightedFrameworkAlgorithm.cs:44-50 | Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:42-47 | Algorithm.CSharp/InsightWeightingFrameworkAlgorithm.cs:44-50 | Algorithm.CSharp/PortfolioTargetTagsRegressionAlgorithm.cs:36-41 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs` and `Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 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 × 8) Algorithm.Python/CustomDataBitcoinAlgorithm.py:83 β€” Algorithm.Python/CustomDataBitcoinAlgorithm.py:83-88 | Algorithm.Python/CustomDataBitcoinAlgorithm.py:110-116 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:94-99 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:112-118 | Algorithm.Python/CustomDataRegressionAlgorithm.py:90-95 | Algorithm.Python/CustomDataRegressionAlgorithm.py:112-118 | Algorithm.Python/LiveFeaturesAlgorithm.py:118-123 | Algorithm.Python/LiveFeaturesAlgorithm.py:139-145 β€” before extracting anything, compare `Algorithm.Python/CustomDataBitcoinAlgorithm.py` and `Algorithm.Python/LiveFeaturesAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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. 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, `Algorithm.Python/CustomDataRegressionAlgorithm.py:102` calls `strip`, `isdigit` and `Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:106` 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 (6 lines × 5) Β· Γ—2
  • Duplicated block (6 lines × 5) Report/ReportElements/CumulativeReturnsReportElement.cs:131 β€” Report/ReportElements/CumulativeReturnsReportElement.cs:131-136 | Report/ReportElements/LeverageUtilizationReportElement.cs:70-76 | Report/ReportElements/RollingPortfolioBetaReportElement.cs:69-74 | Report/ReportElements/RollingPortfolioBetaReportElement.cs:77-82 | Report/ReportElements/RollingSharpeReportElement.cs:71-76 β€” before extracting anything, compare `Report/ReportElements/LeverageUtilizationReportElement.cs` and `Report/ReportElements/RollingSharpeReportElement.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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, `Report/ReportElements/RollingPortfolioBetaReportElement.cs:76` calls `Beta` and `Report/ReportElements/CumulativeReturnsReportElement.cs:138` 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 × 5) Algorithm.CSharp/BasicTemplateDailyAlgorithm.cs:35 β€” Algorithm.CSharp/BasicTemplateDailyAlgorithm.cs:35-41 | Algorithm.CSharp/NamedArgumentsRegression.cs:33-46 | Algorithm.CSharp/OrderImmutabilityRegressionAlgorithm.cs:42-47 | Algorithm.CSharp/ResolutionSwitchingAlgorithm.cs:48-54 | Algorithm.CSharp/SetCashOnDataRegressionAlgorithm.cs:39-45 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateDailyAlgorithm.cs` and `Algorithm.CSharp/NamedArgumentsRegression.cs` as WHOLE FILES: 86% 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. 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 before the matched lines, `Algorithm.CSharp/BasicTemplateDailyAlgorithm.cs:29` calls `Create` and `Algorithm.CSharp/NamedArgumentsRegression.cs:28` 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–14 lines × 2) Β· Γ—2
  • Duplicated block (13–14 lines × 2) Algorithm.Python/CustomModelsAlgorithm.py:154 β€” Algorithm.Python/CustomModelsAlgorithm.py:154-166 | Algorithm.Python/CustomModelsPEP8Algorithm.py:149-162 β€” before extracting anything, compare `Algorithm.Python/CustomModelsAlgorithm.py` and `Algorithm.Python/CustomModelsPEP8Algorithm.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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. 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–14 lines × 2) Algorithm.Python/CustomModelsAlgorithm.py:169 β€” Algorithm.Python/CustomModelsAlgorithm.py:169-181 | Algorithm.Python/CustomModelsPEP8Algorithm.py:165-178 β€” before extracting anything, compare `Algorithm.Python/CustomModelsAlgorithm.py` and `Algorithm.Python/CustomModelsPEP8Algorithm.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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. 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.
IC1 Β· Incompleteness & stubs Β· Both branches are identical Β· Γ—2
  • Both branches are identical β€” the condition decides nothing Algorithm.CSharp/ScheduledUniverseSelectionModelRegressionAlgorithm.cs:109 β€” The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
  • Both branches are identical β€” the condition decides nothing Common/Securities/Future/FuturesExpiryFunctions.cs:2299 β€” The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
X1 Β· Async correctness Β· Sync-over-async (deadlock risk) through `.Wait(…)` Β· Γ—2
  • Sync-over-async (deadlock risk) through `.Wait(…)` Engine/DataFeeds/WorkScheduling/WeightedWorkScheduler.cs:104 β€” `.Wait(…)` blocks this thread until the task completes or the bound expires β€” sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
  • Sync-over-async (deadlock risk) through `.Wait(…)` Common/Isolator.cs:150 β€” `.Wait(…)` blocks this thread until the task completes or the bound expires β€” sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
X3 Β· Exception handling Β· Unguarded deserialized result under a catch list that cannot catch it Β· Γ—2
  • Unguarded deserialized result under a catch list that cannot catch it Engine/DataFeeds/LiveOptionChainProvider.cs:157 β€” `productResults` is used without ever being checked for null, but `JsonConvert` returns null for the document `null` β€” and no catch clause around it catches NullReferenceException, so that one input throws past every handler here and out of the method. The try already answers unreadable files and malformed JSON; answer the empty document too, by testing the result before using it (or by rejecting null where the value is produced) rather than by widening the catch to swallow the deref.
  • Unguarded deserialized result under a catch list that cannot catch it Engine/DataFeeds/LiveOptionChainProvider.cs:176 β€” `tradesAndExpiriesResponse` is used without ever being checked for null, but `JsonConvert` returns null for the document `null` β€” and no catch clause around it catches NullReferenceException, so that one input throws past every handler here and out of the method. The try already answers unreadable files and malformed JSON; answer the empty document too, by testing the result before using it (or by rejecting null where the value is produced) rather than by widening the catch to swallow the deref.
C1 Β· Data Protection Β· No data-protection/encryption Β· Γ—1
  • No data-protection/encryption β€” No data-protection or encryption usage (ASP.NET Data Protection, AES, column encryption, PBKDF2) was found β€” sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.
D1 Β· Cyclomatic Complexity Β· Exchanges.GetPrimaryExchange (cyclomatic 106) Β· Γ—1
  • Exchanges.GetPrimaryExchange (cyclomatic 106) Common/Global.cs:1012 β€” Exchanges.GetPrimaryExchange has cyclomatic complexity 106 (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. Note what this body is, though: it carries an aggressive-inlining request, so its author has asked in the source for this body to be inlined into every caller. Each part pulled out of it becomes a call the runtime has to decide to inline again, against a size budget β€” so the split can quietly turn one inlined body into several real calls, on the path the marker exists to protect. The measurement stands β€” a hot path is not a licence to be unreadable β€” but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D1 Β· Cyclomatic Complexity Β· LeanData.GenerateLine (cyclomatic 100) Β· Γ—1
  • LeanData.GenerateLine (cyclomatic 100) Common/Util/LeanData.cs:90 β€” LeanData.GenerateLine has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· AlgorithmManager.Run (cyclomatic 72) Β· Γ—1
  • AlgorithmManager.Run (cyclomatic 72) Engine/AlgorithmManager.cs:121 β€” AlgorithmManager.Run 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.
D1 Β· Cyclomatic Complexity Β· TimeSliceFactory.Create (cyclomatic 64) Β· Γ—1
  • TimeSliceFactory.Create (cyclomatic 64) Engine/DataFeeds/TimeSliceFactory.cs:89 β€” TimeSliceFactory.Create 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 Β· OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin (cyclomatic 47) Β· Γ—1
  • OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin (cyclomatic 47) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:50 β€” OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin has cyclomatic complexity 47 (threshold 15). Of this number, 40 points are the body's own statements and 7 belong to 7 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 Β· BrokerageTransactionHandler.HandleOrderEvents (cyclomatic 42) Β· Γ—1
  • BrokerageTransactionHandler.HandleOrderEvents (cyclomatic 42) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1266 β€” BrokerageTransactionHandler.HandleOrderEvents 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 Β· QCAlgorithm.PreOrderChecksImpl (cyclomatic 42) Β· Γ—1
  • QCAlgorithm.PreOrderChecksImpl (cyclomatic 42) Algorithm/QCAlgorithm.Trading.cs:842 β€” QCAlgorithm.PreOrderChecksImpl 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 Β· OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement (cyclomatic 42) Β· Γ—1
  • OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement (cyclomatic 42) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:294 β€” OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement 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.
D1 Β· Cyclomatic Complexity Β· RandomDataGeneratorSettings.FromCommandLineArguments (cyclomatic 41) Β· Γ—1
  • RandomDataGeneratorSettings.FromCommandLineArguments (cyclomatic 41) ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:53 β€” RandomDataGeneratorSettings.FromCommandLineArguments 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 Β· SecurityCache.ProcessDataPoint (cyclomatic 39) Β· Γ—1
  • SecurityCache.ProcessDataPoint (cyclomatic 39) Common/Securities/SecurityCache.cs:192 β€” SecurityCache.ProcessDataPoint 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 Β· SecurityService.CreateSecurity (cyclomatic 39) Β· Γ—1
  • SecurityService.CreateSecurity (cyclomatic 39) Common/Securities/SecurityService.cs:75 β€” SecurityService.CreateSecurity 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 Β· TradeStatistics.TradeStatistics.ctor (cyclomatic 39) Β· Γ—1
  • TradeStatistics.TradeStatistics.ctor (cyclomatic 39) Common/Statistics/TradeStatistics.cs:276 β€” TradeStatistics.TradeStatistics.ctor 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 Β· OptionChainFiltersRegressionAlgorithm.Initialize (cyclomatic 39) Β· Γ—1
  • OptionChainFiltersRegressionAlgorithm.Initialize (cyclomatic 39) Algorithm.CSharp/OptionChainFiltersRegressionAlgorithm.cs:38 β€” OptionChainFiltersRegressionAlgorithm.Initialize has cyclomatic complexity 39 (threshold 15). Of this number, 33 points are the body's own statements and 6 belong to 6 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 Β· Engine.Run (cyclomatic 38) Β· Γ—1
  • Engine.Run (cyclomatic 38) Engine/Engine.cs:87 β€” Engine.Run has cyclomatic complexity 38 (threshold 15). Of this number, 31 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 Β· HikkakeModified.ComputeNextValue (cyclomatic 38) Β· Γ—1
  • HikkakeModified.ComputeNextValue (cyclomatic 38) Indicators/CandlestickPatterns/HikkakeModified.cs:81 β€” HikkakeModified.ComputeNextValue 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 Β· UniverseSelection.ApplyUniverseSelection (cyclomatic 37) Β· Γ—1
  • UniverseSelection.ApplyUniverseSelection (cyclomatic 37) Engine/DataFeeds/UniverseSelection.cs:119 β€” UniverseSelection.ApplyUniverseSelection has cyclomatic complexity 37 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BacktestingBrokerage.Scan (cyclomatic 37) Β· Γ—1
  • BacktestingBrokerage.Scan (cyclomatic 37) Brokerages/Backtesting/BacktestingBrokerage.cs:240 β€” BacktestingBrokerage.Scan has cyclomatic complexity 37 (threshold 15). Of this number, 34 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 Β· OrderJsonConverter.CreateOrderFromJObject (cyclomatic 32) Β· Γ—1
  • OrderJsonConverter.CreateOrderFromJObject (cyclomatic 32) Common/Orders/OrderJsonConverter.cs:84 β€” OrderJsonConverter.CreateOrderFromJObject 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 Β· RandomDataGenerator.Run (cyclomatic 32) Β· Γ—1
  • RandomDataGenerator.Run (cyclomatic 32) ToolBox/RandomDataGenerator/RandomDataGenerator.cs:53 β€” RandomDataGenerator.Run has cyclomatic complexity 32 (threshold 15). Of this number, 29 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 Β· SubscriptionSynchronizer.Sync (cyclomatic 31) Β· Γ—1
  • SubscriptionSynchronizer.Sync (cyclomatic 31) Engine/DataFeeds/SubscriptionSynchronizer.cs:88 β€” SubscriptionSynchronizer.Sync 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 Β· QCAlgorithm.GetMatchingSubscriptions (cyclomatic 31) Β· Γ—1
  • QCAlgorithm.GetMatchingSubscriptions (cyclomatic 31) Algorithm/QCAlgorithm.History.cs:1194 β€” QCAlgorithm.GetMatchingSubscriptions 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 Β· AdvanceBlock.ComputeNextValue (cyclomatic 30) Β· Γ—1
  • AdvanceBlock.ComputeNextValue (cyclomatic 30) Indicators/CandlestickPatterns/AdvanceBlock.cs:89 β€” AdvanceBlock.ComputeNextValue 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 Β· SubscriptionDataReader.MoveNext (cyclomatic 29) Β· Γ—1
  • SubscriptionDataReader.MoveNext (cyclomatic 29) Engine/DataFeeds/SubscriptionDataReader.cs:276 β€” SubscriptionDataReader.MoveNext 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 Β· InteractiveBrokersBrokerageModel.CanSubmitOrder (cyclomatic 29) Β· Γ—1
  • InteractiveBrokersBrokerageModel.CanSubmitOrder (cyclomatic 29) Common/Brokerages/InteractiveBrokersBrokerageModel.cs:164 β€” InteractiveBrokersBrokerageModel.CanSubmitOrder 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 Β· SecurityExchangeHours.GetMarketHours (cyclomatic 29) Β· Γ—1
  • SecurityExchangeHours.GetMarketHours (cyclomatic 29) Common/Securities/SecurityExchangeHours.cs:514 β€” SecurityExchangeHours.GetMarketHours 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 Β· ReportCharts.GetExposure (cyclomatic 29) Β· Γ—1
  • ReportCharts.GetExposure (cyclomatic 29) Report/ReportCharts.py:973 β€” ReportCharts.GetExposure 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 Β· Hikkake.ComputeNextValue (cyclomatic 28) Β· Γ—1
  • Hikkake.ComputeNextValue (cyclomatic 28) Indicators/CandlestickPatterns/Hikkake.cs:71 β€” Hikkake.ComputeNextValue 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 Β· BubbleAlgorithm.OnData (cyclomatic 28) Β· Γ—1
  • BubbleAlgorithm.OnData (cyclomatic 28) Algorithm.CSharp/BubbleAlgorithm.cs:121 β€” BubbleAlgorithm.OnData 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 Β· DividendSplitMapGenerator.GenerateSplitsDividends (cyclomatic 28) Β· Γ—1
  • DividendSplitMapGenerator.GenerateSplitsDividends (cyclomatic 28) ToolBox/RandomDataGenerator/DividendSplitMapGenerator.cs:84 β€” DividendSplitMapGenerator.GenerateSplitsDividends 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 Β· PeriodCountConsolidatorBase.Update (cyclomatic 27) Β· Γ—1
  • PeriodCountConsolidatorBase.Update (cyclomatic 27) Common/Data/Consolidators/PeriodCountConsolidatorBase.cs:147 β€” PeriodCountConsolidatorBase.Update 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 Β· InteractiveBrokersFeeModel.GetOrderFee (cyclomatic 27) Β· Γ—1
  • InteractiveBrokersFeeModel.GetOrderFee (cyclomatic 27) Common/Orders/Fees/InteractiveBrokersFeeModel.cs:77 β€” InteractiveBrokersFeeModel.GetOrderFee has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 Β· Cyclomatic Complexity Β· UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity (cyclomatic 27) Β· Γ—1
  • UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity (cyclomatic 27) Common/Securities/Option/StrategyMatcher/UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.cs:79 β€” UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity 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 Β· TradeBuilder.ProcessFillUsingFillToFill (cyclomatic 27) Β· Γ—1
  • TradeBuilder.ProcessFillUsingFillToFill (cyclomatic 27) Common/Statistics/TradeBuilder.cs:256 β€” TradeBuilder.ProcessFillUsingFillToFill 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 Β· ContingentComboOrderRegressionAlgorithm.on_data (cyclomatic 27) Β· Γ—1
  • ContingentComboOrderRegressionAlgorithm.on_data (cyclomatic 27) Algorithm.Python/ContingentComboOrderRegressionAlgorithm.py:37 β€” ContingentComboOrderRegressionAlgorithm.on_data 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 Β· SessionBar.Update (cyclomatic 26) Β· Γ—1
  • SessionBar.Update (cyclomatic 26) Common/Data/Market/SessionBar.cs:98 β€” SessionBar.Update 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 Β· SeriesSampler.SampleCandlestickSeries (cyclomatic 26) Β· Γ—1
  • SeriesSampler.SampleCandlestickSeries (cyclomatic 26) Common/SeriesSampler.cs:221 β€” SeriesSampler.SampleCandlestickSeries 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 Β· BracketOrderRegressionAlgorithm.OnData (cyclomatic 26) Β· Γ—1
  • BracketOrderRegressionAlgorithm.OnData (cyclomatic 26) Algorithm.CSharp/BracketOrderRegressionAlgorithm.cs:50 β€” BracketOrderRegressionAlgorithm.OnData has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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 Β· OptionChainFiltersRegressionAlgorithm.initialize (cyclomatic 26) Β· Γ—1
  • OptionChainFiltersRegressionAlgorithm.initialize (cyclomatic 26) Algorithm.Python/OptionChainFiltersRegressionAlgorithm.py:22 β€” OptionChainFiltersRegressionAlgorithm.initialize 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 Β· ApiDataProvider.NeedToDownload (cyclomatic 25) Β· Γ—1
  • ApiDataProvider.NeedToDownload (cyclomatic 25) Engine/DataFeeds/ApiDataProvider.cs:157 β€” ApiDataProvider.NeedToDownload 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 Β· ContingentComboOrderRegressionAlgorithm.OnData (cyclomatic 25) Β· Γ—1
  • ContingentComboOrderRegressionAlgorithm.OnData (cyclomatic 25) Algorithm.CSharp/ContingentComboOrderRegressionAlgorithm.cs:61 β€” ContingentComboOrderRegressionAlgorithm.OnData has cyclomatic complexity 25 (threshold 15). Of this number, 20 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 Β· DataManager.DataManager.ctor (cyclomatic 24) Β· Γ—1
  • DataManager.DataManager.ctor (cyclomatic 24) Engine/DataFeeds/DataManager.cs:68 β€” DataManager.DataManager.ctor 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 90, 201, 205). 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 Β· Tick.Tick.ctor (cyclomatic 24) Β· Γ—1
  • Tick.Tick.ctor (cyclomatic 24) Common/Data/Market/Tick.cs:555 β€” Tick.Tick.ctor 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 Β· Slice.GetImpl (cyclomatic 24) Β· Γ—1
  • Slice.GetImpl (cyclomatic 24) Common/Data/Slice.cs:403 β€” Slice.GetImpl 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 Β· CashBuyingPowerModel.GetOpenOrdersReservedQuantity (cyclomatic 24) Β· Γ—1
  • CashBuyingPowerModel.GetOpenOrdersReservedQuantity (cyclomatic 24) Common/Securities/CashBuyingPowerModel.cs:400 β€” CashBuyingPowerModel.GetOpenOrdersReservedQuantity has cyclomatic complexity 24 (threshold 15). Of this number, 16 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 Β· QLOptionPriceModel.Evaluate (cyclomatic 24) Β· Γ—1
  • QLOptionPriceModel.Evaluate (cyclomatic 24) Common/Securities/Option/QLOptionPriceModel.cs:108 β€” QLOptionPriceModel.Evaluate 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· SecurityPortfolioModel.ProcessFill (cyclomatic 24) Β· Γ—1
  • SecurityPortfolioModel.ProcessFill (cyclomatic 24) Common/Securities/SecurityPortfolioModel.cs:36 β€” SecurityPortfolioModel.ProcessFill 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 Β· RiseFallThreeMethods.ComputeNextValue (cyclomatic 24) Β· Γ—1
  • RiseFallThreeMethods.ComputeNextValue (cyclomatic 24) Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:81 β€” RiseFallThreeMethods.ComputeNextValue 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 Β· ThreeWhiteSoldiers.ComputeNextValue (cyclomatic 24) Β· Γ—1
  • ThreeWhiteSoldiers.ComputeNextValue (cyclomatic 24) Indicators/CandlestickPatterns/ThreeWhiteSoldiers.cs:86 β€” ThreeWhiteSoldiers.ComputeNextValue 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 Β· BracketOrderLimitEntryRegressionAlgorithm.OnData (cyclomatic 24) Β· Γ—1
  • BracketOrderLimitEntryRegressionAlgorithm.OnData (cyclomatic 24) Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:53 β€” BracketOrderLimitEntryRegressionAlgorithm.OnData 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 Β· FuturesChainFiltersRegressionAlgorithm.OnData (cyclomatic 24) Β· Γ—1
  • FuturesChainFiltersRegressionAlgorithm.OnData (cyclomatic 24) Algorithm.CSharp/FuturesChainFiltersRegressionAlgorithm.cs:85 β€” FuturesChainFiltersRegressionAlgorithm.OnData 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 Β· HistoryAuxiliaryDataRegressionAlgorithm.Initialize (cyclomatic 24) Β· Γ—1
  • HistoryAuxiliaryDataRegressionAlgorithm.Initialize (cyclomatic 24) Algorithm.CSharp/HistoryAuxiliaryDataRegressionAlgorithm.cs:34 β€” HistoryAuxiliaryDataRegressionAlgorithm.Initialize 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 Β· OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks (cyclomatic 24) Β· Γ—1
  • OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks (cyclomatic 24) Algorithm.CSharp/OptionPriceModelForOptionStylesBaseRegressionAlgorithm.cs:77 β€” OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks 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 Β· FillForwardEnumerator.MoveNext (cyclomatic 23) Β· Γ—1
  • FillForwardEnumerator.MoveNext (cyclomatic 23) Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:183 β€” FillForwardEnumerator.MoveNext 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 Β· LiveTradingResultHandler.Update (cyclomatic 23) Β· Γ—1
  • LiveTradingResultHandler.Update (cyclomatic 23) Engine/Results/LiveTradingResultHandler.cs:161 β€” LiveTradingResultHandler.Update 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 Β· BrokerageSetupHandler.Setup (cyclomatic 23) Β· Γ—1
  • BrokerageSetupHandler.Setup (cyclomatic 23) Engine/Setup/BrokerageSetupHandler.cs:148 β€” BrokerageSetupHandler.Setup has cyclomatic complexity 23 (threshold 15). Of this number, 17 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 Β· QCAlgorithm.GetLastKnownPricesImpl (cyclomatic 23) Β· Γ—1
  • QCAlgorithm.GetLastKnownPricesImpl (cyclomatic 23) Algorithm/QCAlgorithm.History.cs:812 β€” QCAlgorithm.GetLastKnownPricesImpl has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 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 Β· EquityFillModel.MarketOnOpenFill (cyclomatic 23) Β· Γ—1
  • EquityFillModel.MarketOnOpenFill (cyclomatic 23) Common/Orders/Fills/EquityFillModel.cs:482 β€” EquityFillModel.MarketOnOpenFill 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 Β· FillModel.Fill (cyclomatic 23) Β· Γ—1
  • FillModel.Fill (cyclomatic 23) Common/Orders/Fills/FillModel.cs:59 β€” FillModel.Fill 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 Β· Breakaway.ComputeNextValue (cyclomatic 23) Β· Γ—1
  • Breakaway.ComputeNextValue (cyclomatic 23) Indicators/CandlestickPatterns/Breakaway.cs:73 β€” Breakaway.ComputeNextValue 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 Β· ThreeStarsInSouth.ComputeNextValue (cyclomatic 23) Β· Γ—1
  • ThreeStarsInSouth.ComputeNextValue (cyclomatic 23) Indicators/CandlestickPatterns/ThreeStarsInSouth.cs:84 β€” ThreeStarsInSouth.ComputeNextValue 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 Β· BasicTemplateCryptoAlgorithm.OnData (cyclomatic 23) Β· Γ—1
  • BasicTemplateCryptoAlgorithm.OnData (cyclomatic 23) Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:83 β€” BasicTemplateCryptoAlgorithm.OnData 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 Β· BubbleAlgorithm.on_data (cyclomatic 23) Β· Γ—1
  • BubbleAlgorithm.on_data (cyclomatic 23) Algorithm.Python/BubbleAlgorithm.py:65 β€” BubbleAlgorithm.on_data 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 Β· IndicatorSelectorWorksWithDifferentOptions.on_data (cyclomatic 23) Β· Γ—1
  • IndicatorSelectorWorksWithDifferentOptions.on_data (cyclomatic 23) Algorithm.Python/IndicatorSelectorsWorkWithDifferentOptions.py:59 β€” IndicatorSelectorWorksWithDifferentOptions.on_data 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 Β· DataManager.Add (cyclomatic 22) Β· Γ—1
  • DataManager.Add (cyclomatic 22) Engine/DataFeeds/DataManager.cs:602 β€” DataManager.Add 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 Β· FillForwardEnumerator.RequiresFillForwardData (cyclomatic 22) Β· Γ—1
  • FillForwardEnumerator.RequiresFillForwardData (cyclomatic 22) Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:323 β€” FillForwardEnumerator.RequiresFillForwardData 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 Β· BrokerageTransactionHandler.HandleOrderUpdated (cyclomatic 22) Β· Γ—1
  • BrokerageTransactionHandler.HandleOrderUpdated (cyclomatic 22) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1512 β€” BrokerageTransactionHandler.HandleOrderUpdated 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 Β· BrokerageTransactionHandler.HandleOptionNotification (cyclomatic 22) Β· Γ—1
  • BrokerageTransactionHandler.HandleOptionNotification (cyclomatic 22) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1736 β€” BrokerageTransactionHandler.HandleOptionNotification has cyclomatic complexity 22 (threshold 15). Of this number, 14 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 Β· QCAlgorithm.OnEndOfTimeStep (cyclomatic 22) Β· Γ—1
  • QCAlgorithm.OnEndOfTimeStep (cyclomatic 22) Algorithm/QCAlgorithm.Universe.cs:69 β€” QCAlgorithm.OnEndOfTimeStep 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 Β· AlpacaBrokerageModel.CanSubmitContingentOrder (cyclomatic 22) Β· Γ—1
  • AlpacaBrokerageModel.CanSubmitContingentOrder (cyclomatic 22) Common/Brokerages/AlpacaBrokerageModel.cs:90 β€” AlpacaBrokerageModel.CanSubmitContingentOrder 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 Β· Extensions.Scale (cyclomatic 22) Β· Γ—1
  • Extensions.Scale (cyclomatic 22) Common/Extensions.cs:3746 β€” Extensions.Scale 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 Β· LeanData.GenerateZipEntryName (cyclomatic 22) Β· Γ—1
  • LeanData.GenerateZipEntryName (cyclomatic 22) Common/Util/LeanData.cs:669 β€” LeanData.GenerateZipEntryName 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 Β· AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData (cyclomatic 22) Β· Γ—1
  • AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData (cyclomatic 22) Algorithm.CSharp/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.cs:78 β€” AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData 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 Β· FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData (cyclomatic 22) Β· Γ—1
  • FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData (cyclomatic 22) Algorithm.CSharp/FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.cs:66 β€” FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData 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 Β· IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData (cyclomatic 22) Β· Γ—1
  • IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData (cyclomatic 22) Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:62 β€” IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData 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 Β· TextSubscriptionDataSourceReader.Read (cyclomatic 21) Β· Γ—1
  • TextSubscriptionDataSourceReader.Read (cyclomatic 21) Engine/DataFeeds/TextSubscriptionDataSourceReader.cs:82 β€” TextSubscriptionDataSourceReader.Read 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 Β· Tick.Tick.ctor (cyclomatic 21) Β· Γ—1
  • Tick.Tick.ctor (cyclomatic 21) Common/Data/Market/Tick.cs:415 β€” Tick.Tick.ctor 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 Β· EquityFillModel.GetBestEffortAskPrice (cyclomatic 21) Β· Γ—1
  • EquityFillModel.GetBestEffortAskPrice (cyclomatic 21) Common/Orders/Fills/EquityFillModel.cs:774 β€” EquityFillModel.GetBestEffortAskPrice 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. This shape REPEATS in the file: one other method here (EquityFillModel.GetBestEffortBidPrice) 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 Β· EquityFillModel.GetBestEffortBidPrice (cyclomatic 21) Β· Γ—1
  • EquityFillModel.GetBestEffortBidPrice (cyclomatic 21) Common/Orders/Fills/EquityFillModel.cs:883 β€” EquityFillModel.GetBestEffortBidPrice 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. This shape REPEATS in the file: one other method here (EquityFillModel.GetBestEffortAskPrice) 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 Β· PortfolioStatistics.PortfolioStatistics.ctor (cyclomatic 21) Β· Γ—1
  • PortfolioStatistics.PortfolioStatistics.ctor (cyclomatic 21) Common/Statistics/PortfolioStatistics.cs:211 β€” PortfolioStatistics.PortfolioStatistics.ctor 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 Β· MatHold.ComputeNextValue (cyclomatic 21) Β· Γ—1
  • MatHold.ComputeNextValue (cyclomatic 21) Indicators/CandlestickPatterns/MatHold.cs:99 β€” MatHold.ComputeNextValue 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 Β· ThreeLineStrike.ComputeNextValue (cyclomatic 21) Β· Γ—1
  • ThreeLineStrike.ComputeNextValue (cyclomatic 21) Indicators/CandlestickPatterns/ThreeLineStrike.cs:73 β€” ThreeLineStrike.ComputeNextValue 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 Β· BasicTemplateCryptoFutureAlgorithm.OnData (cyclomatic 21) Β· Γ—1
  • BasicTemplateCryptoFutureAlgorithm.OnData (cyclomatic 21) Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:82 β€” BasicTemplateCryptoFutureAlgorithm.OnData 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 Β· BybitCryptoFuturesRegressionAlgorithm.OnData (cyclomatic 21) Β· Γ—1
  • BybitCryptoFuturesRegressionAlgorithm.OnData (cyclomatic 21) Algorithm.CSharp/BybitCryptoFuturesRegressionAlgorithm.cs:71 β€” BybitCryptoFuturesRegressionAlgorithm.OnData 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 Β· DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent (cyclomatic 21) Β· Γ—1
  • DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent (cyclomatic 21) Algorithm.CSharp/DuplicateOptionAssignmentRegressionAlgorithm.cs:69 β€” DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent 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 Β· OptimizationClustering.KMeans (cyclomatic 21) Β· Γ—1
  • OptimizationClustering.KMeans (cyclomatic 21) Optimizer/Analysis/OptimizationClustering.cs:131 β€” OptimizationClustering.KMeans has cyclomatic complexity 21 (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 Β· BasicTemplateCryptoFutureAlgorithm.on_data (cyclomatic 21) Β· Γ—1
  • BasicTemplateCryptoFutureAlgorithm.on_data (cyclomatic 21) Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:57 β€” BasicTemplateCryptoFutureAlgorithm.on_data 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 Β· BybitCryptoFuturesRegressionAlgorithm.on_data (cyclomatic 21) Β· Γ—1
  • BybitCryptoFuturesRegressionAlgorithm.on_data (cyclomatic 21) Algorithm.Python/BybitCryptoFuturesRegressionAlgorithm.py:53 β€” BybitCryptoFuturesRegressionAlgorithm.on_data 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 Β· HistoryAuxiliaryDataRegressionAlgorithm.initialize (cyclomatic 21) Β· Γ—1
  • HistoryAuxiliaryDataRegressionAlgorithm.initialize (cyclomatic 21) Algorithm.Python/HistoryAuxiliaryDataRegressionAlgorithm.py:21 β€” HistoryAuxiliaryDataRegressionAlgorithm.initialize 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 Β· QCAlgorithm.CreateConsolidator (cyclomatic 20) Β· Γ—1
  • QCAlgorithm.CreateConsolidator (cyclomatic 20) Algorithm/QCAlgorithm.Indicators.cs:4264 β€” QCAlgorithm.CreateConsolidator 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 Β· ContingentOrderUpdateRegressionAlgorithm.OnData (cyclomatic 20) Β· Γ—1
  • ContingentOrderUpdateRegressionAlgorithm.OnData (cyclomatic 20) Algorithm.CSharp/ContingentOrderUpdateRegressionAlgorithm.cs:54 β€” ContingentOrderUpdateRegressionAlgorithm.OnData has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 Β· Cyclomatic Complexity Β· OptionRenameRegressionAlgorithm.OnData (cyclomatic 20) Β· Γ—1
  • OptionRenameRegressionAlgorithm.OnData (cyclomatic 20) Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:57 β€” OptionRenameRegressionAlgorithm.OnData 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 Β· SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData (cyclomatic 20) Β· Γ—1
  • SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData (cyclomatic 20) Algorithm.CSharp/SecuritySessionWithFuturesRegressionAlgorithm.cs:53 β€” SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData 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 Β· UpdateOrderLiveTestAlgorithm.OnData (cyclomatic 20) Β· Γ—1
  • UpdateOrderLiveTestAlgorithm.OnData (cyclomatic 20) Algorithm.CSharp/UpdateOrderLiveTestAlgorithm.cs:86 β€” UpdateOrderLiveTestAlgorithm.OnData 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 Β· WarmupDailyResolutionRegressionAlgorithm.OnData (cyclomatic 20) Β· Γ—1
  • WarmupDailyResolutionRegressionAlgorithm.OnData (cyclomatic 20) Algorithm.CSharp/WarmupDailyResolutionRegressionAlgorithm.cs:52 β€” WarmupDailyResolutionRegressionAlgorithm.OnData 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 Β· OptimizationModes.Find (cyclomatic 20) Β· Γ—1
  • OptimizationModes.Find (cyclomatic 20) Optimizer/Analysis/OptimizationModes.cs:29 β€” OptimizationModes.Find 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 Β· BasicTemplateCryptoAlgorithm.on_data (cyclomatic 20) Β· Γ—1
  • BasicTemplateCryptoAlgorithm.on_data (cyclomatic 20) Algorithm.Python/BasicTemplateCryptoAlgorithm.py:63 β€” BasicTemplateCryptoAlgorithm.on_data 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 Β· ContingentOrderProcessor.ProcessFill (cyclomatic 19) Β· Γ—1
  • ContingentOrderProcessor.ProcessFill (cyclomatic 19) Common/Orders/ContingentOrderProcessor.cs:153 β€” ContingentOrderProcessor.ProcessFill 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 Β· DataFrameGenerator.AddData (cyclomatic 19) Β· Γ—1
  • DataFrameGenerator.AddData (cyclomatic 19) Common/Python/PandasConverter.DataFrameGenerator.cs:77 β€” DataFrameGenerator.AddData 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 Β· BaseOptionFilterUniverse.IronCondor (cyclomatic 19) Β· Γ—1
  • BaseOptionFilterUniverse.IronCondor (cyclomatic 19) Common/Securities/Option/OptionFilterUniverse.cs:850 β€” BaseOptionFilterUniverse.IronCondor 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 literals inside it that branch (lines 890, 871, 872). 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 Β· LeanData.GenerateZipFileName (cyclomatic 19) Β· Γ—1
  • LeanData.GenerateZipFileName (cyclomatic 19) Common/Util/LeanData.cs:791 β€” LeanData.GenerateZipFileName 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 Β· StalledPattern.ComputeNextValue (cyclomatic 19) Β· Γ—1
  • StalledPattern.ComputeNextValue (cyclomatic 19) Indicators/CandlestickPatterns/StalledPattern.cs:86 β€” StalledPattern.ComputeNextValue 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 Β· BasicTemplateCryptoFutureHourlyAlgorithm.OnData (cyclomatic 19) Β· Γ—1
  • BasicTemplateCryptoFutureHourlyAlgorithm.OnData (cyclomatic 19) Algorithm.CSharp/BasicTemplateCryptoFutureHourlyAlgorithm.cs:77 β€” BasicTemplateCryptoFutureHourlyAlgorithm.OnData 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 Β· UpdateOrderRegressionAlgorithm.OnData (cyclomatic 19) Β· Γ—1
  • UpdateOrderRegressionAlgorithm.OnData (cyclomatic 19) Algorithm.CSharp/UpdateOrderRegressionAlgorithm.cs:77 β€” UpdateOrderRegressionAlgorithm.OnData 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 Β· AlgoSeekFuturesReader.Parse (cyclomatic 19) Β· Γ—1
  • AlgoSeekFuturesReader.Parse (cyclomatic 19) ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesReader.cs:140 β€” AlgoSeekFuturesReader.Parse 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 Β· BasicTemplateCryptoFutureHourlyAlgorithm.on_data (cyclomatic 19) Β· Γ—1
  • BasicTemplateCryptoFutureHourlyAlgorithm.on_data (cyclomatic 19) Algorithm.Python/BasicTemplateCryptoFutureHourlyAlgorithm.py:55 β€” BasicTemplateCryptoFutureHourlyAlgorithm.on_data 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 Β· BracketOrderRegressionAlgorithm.on_data (cyclomatic 19) Β· Γ—1
  • BracketOrderRegressionAlgorithm.on_data (cyclomatic 19) Algorithm.Python/BracketOrderRegressionAlgorithm.py:31 β€” BracketOrderRegressionAlgorithm.on_data 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 Β· UpdateOrderRegressionAlgorithm.on_data (cyclomatic 19) Β· Γ—1
  • UpdateOrderRegressionAlgorithm.on_data (cyclomatic 19) Algorithm.Python/UpdateOrderRegressionAlgorithm.py:53 β€” UpdateOrderRegressionAlgorithm.on_data 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 Β· DownloaderDataProvider.Fetch (cyclomatic 18) Β· Γ—1
  • DownloaderDataProvider.Fetch (cyclomatic 18) Engine/DataFeeds/DownloaderDataProvider.cs:80 β€” DownloaderDataProvider.Fetch 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 82). 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 Β· LiveSynchronizer.StreamData (cyclomatic 18) Β· Γ—1
  • LiveSynchronizer.StreamData (cyclomatic 18) Engine/DataFeeds/LiveSynchronizer.cs:85 β€” LiveSynchronizer.StreamData 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 Β· BaseResultsHandler.GenerateStatisticsResults (cyclomatic 18) Β· Γ—1
  • BaseResultsHandler.GenerateStatisticsResults (cyclomatic 18) Engine/Results/BaseResultsHandler.cs:1198 β€” BaseResultsHandler.GenerateStatisticsResults 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 Β· AlphaStreamsFeeModel.GetOrderFee (cyclomatic 18) Β· Γ—1
  • AlphaStreamsFeeModel.GetOrderFee (cyclomatic 18) Common/Orders/Fees/AlphaStreamsFeeModel.cs:53 β€” AlphaStreamsFeeModel.GetOrderFee 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 Β· PandasData.ToPandasDataFrame (cyclomatic 18) Β· Γ—1
  • PandasData.ToPandasDataFrame (cyclomatic 18) Common/Python/PandasData.cs:284 β€” PandasData.ToPandasDataFrame 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 Β· LeanData.GenerateRelativeZipFileDirectory (cyclomatic 18) Β· Γ—1
  • LeanData.GenerateRelativeZipFileDirectory (cyclomatic 18) Common/Util/LeanData.cs:549 β€” LeanData.GenerateRelativeZipFileDirectory 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 Β· LeanDataPathComponents.Parse (cyclomatic 18) Β· Γ—1
  • LeanDataPathComponents.Parse (cyclomatic 18) Common/Util/LeanDataPathComponents.cs:103 β€” LeanDataPathComponents.Parse 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 Β· AbandonedBaby.ComputeNextValue (cyclomatic 18) Β· Γ—1
  • AbandonedBaby.ComputeNextValue (cyclomatic 18) Indicators/CandlestickPatterns/AbandonedBaby.cs:104 β€” AbandonedBaby.ComputeNextValue 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 Β· IdenticalThreeCrows.ComputeNextValue (cyclomatic 18) Β· Γ—1
  • IdenticalThreeCrows.ComputeNextValue (cyclomatic 18) Indicators/CandlestickPatterns/IdenticalThreeCrows.cs:77 β€” IdenticalThreeCrows.ComputeNextValue 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 Β· AddOptionContractExpiresRegressionAlgorithm.OnData (cyclomatic 18) Β· Γ—1
  • AddOptionContractExpiresRegressionAlgorithm.OnData (cyclomatic 18) Algorithm.CSharp/AddOptionContractExpiresRegressionAlgorithm.cs:45 β€” AddOptionContractExpiresRegressionAlgorithm.OnData has cyclomatic complexity 18 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ContingentOrderCancelRegressionAlgorithm.OnData (cyclomatic 18) Β· Γ—1
  • ContingentOrderCancelRegressionAlgorithm.OnData (cyclomatic 18) Algorithm.CSharp/ContingentOrderCancelRegressionAlgorithm.cs:53 β€” ContingentOrderCancelRegressionAlgorithm.OnData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 Β· Cyclomatic Complexity Β· OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged (cyclomatic 18) Β· Γ—1
  • OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged (cyclomatic 18) Algorithm.CSharp/OptionChainUniverseRemovalRegressionAlgorithm.cs:101 β€” OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged 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 Β· OptionRenameDailyRegressionAlgorithm.OnData (cyclomatic 18) Β· Γ—1
  • OptionRenameDailyRegressionAlgorithm.OnData (cyclomatic 18) Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:59 β€” OptionRenameDailyRegressionAlgorithm.OnData has cyclomatic complexity 18 (threshold 15). Of this number, 14 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 Β· SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged (cyclomatic 18) Β· Γ—1
  • SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged (cyclomatic 18) Algorithm.CSharp/SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.cs:101 β€” SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged 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 Β· ContingentOrderCancelRegressionAlgorithm.on_data (cyclomatic 18) Β· Γ—1
  • ContingentOrderCancelRegressionAlgorithm.on_data (cyclomatic 18) Algorithm.Python/ContingentOrderCancelRegressionAlgorithm.py:33 β€” ContingentOrderCancelRegressionAlgorithm.on_data 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 Β· IronCondorStrategyAlgorithm.assert_strategy_position_group (cyclomatic 18) Β· Γ—1
  • IronCondorStrategyAlgorithm.assert_strategy_position_group (cyclomatic 18) Algorithm.Python/IronCondorStrategyAlgorithm.py:51 β€” IronCondorStrategyAlgorithm.assert_strategy_position_group 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 Β· DataQueueHandlerManager.Subscribe (cyclomatic 17) Β· Γ—1
  • DataQueueHandlerManager.Subscribe (cyclomatic 17) Engine/DataFeeds/DataQueueHandlerManager.cs:74 β€” DataQueueHandlerManager.Subscribe has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ScheduledEnumerator.MoveNext (cyclomatic 17) Β· Γ—1
  • ScheduledEnumerator.MoveNext (cyclomatic 17) Engine/DataFeeds/Enumerators/ScheduledEnumerator.cs:73 β€” ScheduledEnumerator.MoveNext 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 Β· BacktestingResultHandler.Update (cyclomatic 17) Β· Γ—1
  • BacktestingResultHandler.Update (cyclomatic 17) Engine/Results/BacktestingResultHandler.cs:160 β€” BacktestingResultHandler.Update 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 Β· BaseResultsHandler.IsEncodedRuntimeStatistic (cyclomatic 17) Β· Γ—1
  • BaseResultsHandler.IsEncodedRuntimeStatistic (cyclomatic 17) Engine/Results/BaseResultsHandler.cs:1078 β€” BaseResultsHandler.IsEncodedRuntimeStatistic 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 Β· QCAlgorithm.GetResolution (cyclomatic 17) Β· Γ—1
  • QCAlgorithm.GetResolution (cyclomatic 17) Algorithm/QCAlgorithm.History.cs:1426 β€” QCAlgorithm.GetResolution 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 Β· BinanceBrokerageModel.CanSubmitContingentOrder (cyclomatic 17) Β· Γ—1
  • BinanceBrokerageModel.CanSubmitContingentOrder (cyclomatic 17) Common/Brokerages/BinanceBrokerageModel.cs:122 β€” BinanceBrokerageModel.CanSubmitContingentOrder 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 Β· CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cyclomatic 17) Β· Γ—1
  • CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cyclomatic 17) Common/Securities/CashBuyingPowerModel.cs:191 β€” CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower 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 Β· StreamReaderExtensions.GetDecimal (cyclomatic 17) Β· Γ—1
  • StreamReaderExtensions.GetDecimal (cyclomatic 17) Common/Util/StreamReaderExtensions.cs:56 β€” StreamReaderExtensions.GetDecimal 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. Note what this body is, though: it carries an aggressive-inlining request, so its author has asked in the source for this body to be inlined into every caller. Each part pulled out of it becomes a call the runtime has to decide to inline again, against a size budget β€” so the split can quietly turn one inlined body into several real calls, on the path the marker exists to protect. The measurement stands β€” a hot path is not a licence to be unreadable β€” but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D1 Β· Cyclomatic Complexity Β· KickingByLength.ComputeNextValue (cyclomatic 17) Β· Γ—1
  • KickingByLength.ComputeNextValue (cyclomatic 17) Indicators/CandlestickPatterns/KickingByLength.cs:75 β€” KickingByLength.ComputeNextValue 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 Β· AddOptionContractTwiceRegressionAlgorithm.OnData (cyclomatic 17) Β· Γ—1
  • AddOptionContractTwiceRegressionAlgorithm.OnData (cyclomatic 17) Algorithm.CSharp/AddOptionContractTwiceRegressionAlgorithm.cs:53 β€” AddOptionContractTwiceRegressionAlgorithm.OnData 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 Β· ConstituentsUniverseRegressionAlgorithm.OnData (cyclomatic 17) Β· Γ—1
  • ConstituentsUniverseRegressionAlgorithm.OnData (cyclomatic 17) Algorithm.CSharp/ConstituentsUniverseRegressionAlgorithm.cs:59 β€” ConstituentsUniverseRegressionAlgorithm.OnData 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 Β· ContinuousFutureRolloverBaseRegressionAlgorithm.OnData (cyclomatic 17) Β· Γ—1
  • ContinuousFutureRolloverBaseRegressionAlgorithm.OnData (cyclomatic 17) Algorithm.CSharp/ContinuousFutureRolloverBaseRegressionAlgorithm.cs:86 β€” ContinuousFutureRolloverBaseRegressionAlgorithm.OnData 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 Β· CustomUniverseWithBenchmarkRegressionAlgorithm.OnData (cyclomatic 17) Β· Γ—1
  • CustomUniverseWithBenchmarkRegressionAlgorithm.OnData (cyclomatic 17) Algorithm.CSharp/CustomUniverseWithBenchmarkRegressionAlgorithm.cs:78 β€” CustomUniverseWithBenchmarkRegressionAlgorithm.OnData 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 Β· OptionOpenInterestRegressionAlgorithm.OnData (cyclomatic 17) Β· Γ—1
  • OptionOpenInterestRegressionAlgorithm.OnData (cyclomatic 17) Algorithm.CSharp/OptionOpenInterestRegressionAlgorithm.cs:53 β€” OptionOpenInterestRegressionAlgorithm.OnData 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 Β· Program.Main (cyclomatic 17) Β· Γ—1
  • Program.Main (cyclomatic 17) ToolBox/Program.cs:31 β€” Program.Main 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 Β· IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data (cyclomatic 17) Β· Γ—1
  • IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data (cyclomatic 17) Algorithm.Python/IndexOptionCallITMGreeksExpiryRegressionAlgorithm.py:44 β€” IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data 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 Β· OptionOpenInterestRegressionAlgorithm.on_data (cyclomatic 17) Β· Γ—1
  • OptionOpenInterestRegressionAlgorithm.on_data (cyclomatic 17) Algorithm.Python/OptionOpenInterestRegressionAlgorithm.py:36 β€” OptionOpenInterestRegressionAlgorithm.on_data 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 Β· TradierBrokerageModel.CanSubmitOrder (cyclomatic 16) Β· Γ—1
  • TradierBrokerageModel.CanSubmitOrder (cyclomatic 16) Common/Brokerages/TradierBrokerageModel.cs:70 β€” TradierBrokerageModel.CanSubmitOrder 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 Β· Isolator.MonitorTask (cyclomatic 16) Β· Γ—1
  • Isolator.MonitorTask (cyclomatic 16) Common/Isolator.cs:82 β€” Isolator.MonitorTask 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 Β· FillModel.LimitIfTouchedFill (cyclomatic 16) Β· Γ—1
  • FillModel.LimitIfTouchedFill (cyclomatic 16) Common/Orders/Fills/FillModel.cs:603 β€” FillModel.LimitIfTouchedFill 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 Β· Serie.Add (cyclomatic 16) Β· Γ—1
  • Serie.Add (cyclomatic 16) Common/Python/PandasData.cs:761 β€” Serie.Add 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 Β· SecurityCacheProvider.GetSecurityCache (cyclomatic 16) Β· Γ—1
  • SecurityCacheProvider.GetSecurityCache (cyclomatic 16) Common/Securities/SecurityCacheProvider.cs:58 β€” SecurityCacheProvider.GetSecurityCache 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 Β· SeriesSampler.SampleSeries (cyclomatic 16) Β· Γ—1
  • SeriesSampler.SampleSeries (cyclomatic 16) Common/SeriesSampler.cs:128 β€” SeriesSampler.SampleSeries 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 Β· Kicking.ComputeNextValue (cyclomatic 16) Β· Γ—1
  • Kicking.ComputeNextValue (cyclomatic 16) Indicators/CandlestickPatterns/Kicking.cs:74 β€” Kicking.ComputeNextValue 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 Β· ThreeInside.ComputeNextValue (cyclomatic 16) Β· Γ—1
  • ThreeInside.ComputeNextValue (cyclomatic 16) Indicators/CandlestickPatterns/ThreeInside.cs:75 β€” ThreeInside.ComputeNextValue 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 Β· AddRemoveOptionUniverseRegressionAlgorithm.OnData (cyclomatic 16) Β· Γ—1
  • AddRemoveOptionUniverseRegressionAlgorithm.OnData (cyclomatic 16) Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs:63 β€” AddRemoveOptionUniverseRegressionAlgorithm.OnData 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 Β· BasicTemplateMultiAssetAlgorithm.OnData (cyclomatic 16) Β· Γ—1
  • BasicTemplateMultiAssetAlgorithm.OnData (cyclomatic 16) Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:86 β€” BasicTemplateMultiAssetAlgorithm.OnData 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 Β· CheeseMilkHourlyRebalance.OnData (cyclomatic 16) Β· Γ—1
  • CheeseMilkHourlyRebalance.OnData (cyclomatic 16) Algorithm.CSharp/CapacityTests/CheeseMilkHourlyRebalance.cs:48 β€” CheeseMilkHourlyRebalance.OnData 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 Β· HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm (cyclomatic 16) Β· Γ—1
  • HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm (cyclomatic 16) Algorithm.CSharp/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.cs:40 β€” HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm 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 Β· OneTriggersOtherOrderRegressionAlgorithm.OnData (cyclomatic 16) Β· Γ—1
  • OneTriggersOtherOrderRegressionAlgorithm.OnData (cyclomatic 16) Algorithm.CSharp/OneTriggersOtherOrderRegressionAlgorithm.cs:59 β€” OneTriggersOtherOrderRegressionAlgorithm.OnData 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 Β· SplitEquityRegressionAlgorithm.OnEndOfAlgorithm (cyclomatic 16) Β· Γ—1
  • SplitEquityRegressionAlgorithm.OnEndOfAlgorithm (cyclomatic 16) Algorithm.CSharp/SplitEquityRegressionAlgorithm.cs:65 β€” SplitEquityRegressionAlgorithm.OnEndOfAlgorithm 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 Β· KaikoDataConverterProgram.KaikoDataConverter (cyclomatic 16) Β· Γ—1
  • KaikoDataConverterProgram.KaikoDataConverter (cyclomatic 16) ToolBox/KaikoDataConverter/KaikoDataConverterProgram.cs:41 β€” KaikoDataConverterProgram.KaikoDataConverter 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 Β· ConstituentsUniverseRegressionAlgorithm.on_data (cyclomatic 16) Β· Γ—1
  • ConstituentsUniverseRegressionAlgorithm.on_data (cyclomatic 16) Algorithm.Python/ConstituentsUniverseRegressionAlgorithm.py:42 β€” ConstituentsUniverseRegressionAlgorithm.on_data 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 Β· FuturesChainFiltersRegressionAlgorithm.on_data (cyclomatic 16) Β· Γ—1
  • FuturesChainFiltersRegressionAlgorithm.on_data (cyclomatic 16) Algorithm.Python/FuturesChainFiltersRegressionAlgorithm.py:65 β€” FuturesChainFiltersRegressionAlgorithm.on_data 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 Β· LongAndShortButterflyCallStrategiesAlgorithm.assert_strategy_position_group (cyclomatic 16) Β· Γ—1
  • LongAndShortButterflyCallStrategiesAlgorithm.assert_strategy_position_group (cyclomatic 16) Algorithm.Python/LongAndShortButterflyCallStrategiesAlgorithm.py:50 β€” LongAndShortButterflyCallStrategiesAlgorithm.assert_strategy_position_group 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 Β· LongAndShortButterflyPutStrategiesAlgorithm.assert_strategy_position_group (cyclomatic 16) Β· Γ—1
  • LongAndShortButterflyPutStrategiesAlgorithm.assert_strategy_position_group (cyclomatic 16) Algorithm.Python/LongAndShortButterflyPutStrategiesAlgorithm.py:50 β€” LongAndShortButterflyPutStrategiesAlgorithm.assert_strategy_position_group 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 Β· OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks (cyclomatic 16) Β· Γ—1
  • OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks (cyclomatic 16) Algorithm.Python/OptionPriceModelForOptionStylesBaseRegressionAlgorithm.py:51 β€” OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks 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 Β· OptionRenameRegressionAlgorithm.on_data (cyclomatic 16) Β· Γ—1
  • OptionRenameRegressionAlgorithm.on_data (cyclomatic 16) Algorithm.Python/OptionRenameRegressionAlgorithm.py:35 β€” OptionRenameRegressionAlgorithm.on_data 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 Β· SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data (cyclomatic 16) Β· Γ—1
  • SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data (cyclomatic 16) Algorithm.Python/SecuritySessionWithFuturesRegressionAlgorithm.py:38 β€” SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data 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 Β· Test cannot fail Β· Γ—1
  • Test cannot fail: DoesNotParseCSV Tests/Common/Securities/SecurityDefinitionTests.cs:43 β€” This test's act runs inside `catch` at line 55 of this file, which catches every exception and neither rethrows nor verifies β€” so the method passes whether or not the behaviour it names actually happens. The 1 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING β€” so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
D12 Β· Dependency Hygiene Β· Deprecated Β· Γ—1
  • Deprecated: DotNetZip REDACTED:32 β€” REDACTED β€” Legacy
D17 Β· Explicit Debt Β· BarePragmaDisable repeated across 15 files Β· Γ—1
  • BarePragmaDisable repeated across 15 files Tests/Algorithm/AlgorithmAddDataTests.cs:621 β€” The identical BarePragmaDisable (`#pragma warning disable CS0618`) appears in 15 files (17 occurrences) β€” a single repo-wide policy (e.g. a Directory.Build.props decision or an idiomatic suppression), not 17 independent debts. Decide it once centrally rather than file-by-file. (Every occurrence still counts toward the score and metrics.)
D17 Β· Explicit Debt Β· BarePragmaDisable repeated 17 times in 3 files Β· Γ—1
  • BarePragmaDisable repeated 17 times in 3 files Tests/Common/Storage/LocalObjectStoreTests.cs:46 β€” The identical BarePragmaDisable (`#pragma warning disable CA2000`) appears 17 times in 3 files β€” one decision applied repeatedly (e.g. the same rule silenced on every overload of a fluent API), not 17 independent debts. Decide it once β€” at the type or project level, or by fixing the underlying pattern β€” rather than occurrence-by-occurrence. (Every occurrence still counts toward the score and metrics.)
D2 Β· Cognitive Complexity Β· LeanData.GenerateLine (cognitive 187) Β· Γ—1
  • LeanData.GenerateLine (cognitive 187) Common/Util/LeanData.cs:90 β€” LeanData.GenerateLine has cognitive complexity 187 (threshold 15). 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 Β· TimeSliceFactory.Create (cognitive 182) Β· Γ—1
  • TimeSliceFactory.Create (cognitive 182) Engine/DataFeeds/TimeSliceFactory.cs:89 β€” TimeSliceFactory.Create has cognitive complexity 182 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· AlgorithmManager.Run (cognitive 175) Β· Γ—1
  • AlgorithmManager.Run (cognitive 175) Engine/AlgorithmManager.cs:121 β€” AlgorithmManager.Run has cognitive complexity 175 (threshold 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 Β· SubscriptionSynchronizer.Sync (cognitive 106) Β· Γ—1
  • SubscriptionSynchronizer.Sync (cognitive 106) Engine/DataFeeds/SubscriptionSynchronizer.cs:88 β€” SubscriptionSynchronizer.Sync has cognitive complexity 106 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· RandomDataGenerator.Run (cognitive 97) Β· Γ—1
  • RandomDataGenerator.Run (cognitive 97) ToolBox/RandomDataGenerator/RandomDataGenerator.cs:53 β€” RandomDataGenerator.Run has cognitive complexity 97 (threshold 15). Of this number, 93 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 Β· BacktestingBrokerage.Scan (cognitive 77) Β· Γ—1
  • BacktestingBrokerage.Scan (cognitive 77) Brokerages/Backtesting/BacktestingBrokerage.cs:240 β€” BacktestingBrokerage.Scan has cognitive complexity 77 (threshold 15). Of this number, 74 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 Β· TradeStatistics.TradeStatistics.ctor (cognitive 76) Β· Γ—1
  • TradeStatistics.TradeStatistics.ctor (cognitive 76) Common/Statistics/TradeStatistics.cs:276 β€” TradeStatistics.TradeStatistics.ctor has cognitive complexity 76 (threshold 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 Β· DividendSplitMapGenerator.GenerateSplitsDividends (cognitive 74) Β· Γ—1
  • DividendSplitMapGenerator.GenerateSplitsDividends (cognitive 74) ToolBox/RandomDataGenerator/DividendSplitMapGenerator.cs:84 β€” DividendSplitMapGenerator.GenerateSplitsDividends has cognitive complexity 74 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· UniverseSelection.ApplyUniverseSelection (cognitive 72) Β· Γ—1
  • UniverseSelection.ApplyUniverseSelection (cognitive 72) Engine/DataFeeds/UniverseSelection.cs:119 β€” UniverseSelection.ApplyUniverseSelection has cognitive complexity 72 (threshold 15). Of this number, 63 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· SecurityCache.ProcessDataPoint (cognitive 71) Β· Γ—1
  • SecurityCache.ProcessDataPoint (cognitive 71) Common/Securities/SecurityCache.cs:192 β€” SecurityCache.ProcessDataPoint has cognitive complexity 71 (threshold 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 Β· SessionBar.Update (cognitive 67) Β· Γ—1
  • SessionBar.Update (cognitive 67) Common/Data/Market/SessionBar.cs:98 β€” SessionBar.Update has cognitive complexity 67 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· BrokerageTransactionHandler.HandleOrderEvents (cognitive 57) Β· Γ—1
  • BrokerageTransactionHandler.HandleOrderEvents (cognitive 57) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1266 β€” BrokerageTransactionHandler.HandleOrderEvents has cognitive complexity 57 (threshold 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 Β· SubscriptionDataReader.MoveNext (cognitive 56) Β· Γ—1
  • SubscriptionDataReader.MoveNext (cognitive 56) Engine/DataFeeds/SubscriptionDataReader.cs:276 β€” SubscriptionDataReader.MoveNext has cognitive complexity 56 (threshold 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 Β· QCAlgorithm.PreOrderChecksImpl (cognitive 53) Β· Γ—1
  • QCAlgorithm.PreOrderChecksImpl (cognitive 53) Algorithm/QCAlgorithm.Trading.cs:842 β€” QCAlgorithm.PreOrderChecksImpl has cognitive complexity 53 (threshold 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 Β· DataManager.DataManager.ctor (cognitive 51) Β· Γ—1
  • DataManager.DataManager.ctor (cognitive 51) Engine/DataFeeds/DataManager.cs:68 β€” DataManager.DataManager.ctor has cognitive complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 90, 201, 205). 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 Β· QCAlgorithm.GetLastKnownPricesImpl (cognitive 51) Β· Γ—1
  • QCAlgorithm.GetLastKnownPricesImpl (cognitive 51) Algorithm/QCAlgorithm.History.cs:812 β€” QCAlgorithm.GetLastKnownPricesImpl has cognitive complexity 51 (threshold 15). Of this number, 33 points are the body's own statements and 18 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· BasicTemplateCryptoFutureAlgorithm.OnData (cognitive 50) Β· Γ—1
  • BasicTemplateCryptoFutureAlgorithm.OnData (cognitive 50) Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:82 β€” BasicTemplateCryptoFutureAlgorithm.OnData has cognitive complexity 50 (threshold 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 Β· SeriesSampler.SampleCandlestickSeries (cognitive 49) Β· Γ—1
  • SeriesSampler.SampleCandlestickSeries (cognitive 49) Common/SeriesSampler.cs:221 β€” SeriesSampler.SampleCandlestickSeries has cognitive complexity 49 (threshold 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 Β· Engine.Run (cognitive 47) Β· Γ—1
  • Engine.Run (cognitive 47) Engine/Engine.cs:87 β€” Engine.Run has cognitive complexity 47 (threshold 15). Of this number, 36 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 Β· DataFrameGenerator.AddData (cognitive 47) Β· Γ—1
  • DataFrameGenerator.AddData (cognitive 47) Common/Python/PandasConverter.DataFrameGenerator.cs:77 β€” DataFrameGenerator.AddData has cognitive complexity 47 (threshold 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 Β· OptimizationClustering.KMeans (cognitive 47) Β· Γ—1
  • OptimizationClustering.KMeans (cognitive 47) Optimizer/Analysis/OptimizationClustering.cs:131 β€” OptimizationClustering.KMeans has cognitive complexity 47 (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.
D2 Β· Cognitive Complexity Β· QCAlgorithm.GetMatchingSubscriptions (cognitive 46) Β· Γ—1
  • QCAlgorithm.GetMatchingSubscriptions (cognitive 46) Algorithm/QCAlgorithm.History.cs:1194 β€” QCAlgorithm.GetMatchingSubscriptions has cognitive complexity 46 (threshold 15). Of this number, 41 points are the body's own statements and 5 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 Β· BrokerageTransactionHandler.HandleOptionNotification (cognitive 44) Β· Γ—1
  • BrokerageTransactionHandler.HandleOptionNotification (cognitive 44) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1736 β€” BrokerageTransactionHandler.HandleOptionNotification has cognitive complexity 44 (threshold 15). Of this number, 37 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· ContingentOrderProcessor.ProcessFill (cognitive 44) Β· Γ—1
  • ContingentOrderProcessor.ProcessFill (cognitive 44) Common/Orders/ContingentOrderProcessor.cs:153 β€” ContingentOrderProcessor.ProcessFill has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin (cognitive 44) Β· Γ—1
  • OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin (cognitive 44) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:50 β€” OptionStrategyPositionGroupBuyingPowerModel.GetMaintenanceMargin has cognitive complexity 44 (threshold 15). Of this number, 37 points are the body's own statements and 7 belong to 7 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 Β· BybitCryptoFuturesRegressionAlgorithm.OnData (cognitive 44) Β· Γ—1
  • BybitCryptoFuturesRegressionAlgorithm.OnData (cognitive 44) Algorithm.CSharp/BybitCryptoFuturesRegressionAlgorithm.cs:71 β€” BybitCryptoFuturesRegressionAlgorithm.OnData has cognitive complexity 44 (threshold 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 Β· OptionOpenInterestRegressionAlgorithm.on_data (cognitive 44) Β· Γ—1
  • OptionOpenInterestRegressionAlgorithm.on_data (cognitive 44) Algorithm.Python/OptionOpenInterestRegressionAlgorithm.py:36 β€” OptionOpenInterestRegressionAlgorithm.on_data has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (33 pts), boolean chains 6, loops 2 (5 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 Β· LiveTradingResultHandler.Update (cognitive 43) Β· Γ—1
  • LiveTradingResultHandler.Update (cognitive 43) Engine/Results/LiveTradingResultHandler.cs:161 β€” LiveTradingResultHandler.Update has cognitive complexity 43 (threshold 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 Β· OptionOpenInterestRegressionAlgorithm.OnData (cognitive 43) Β· Γ—1
  • OptionOpenInterestRegressionAlgorithm.OnData (cognitive 43) Algorithm.CSharp/OptionOpenInterestRegressionAlgorithm.cs:53 β€” OptionOpenInterestRegressionAlgorithm.OnData has cognitive complexity 43 (threshold 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 Β· BasicTemplateCryptoFutureAlgorithm.on_data (cognitive 43) Β· Γ—1
  • BasicTemplateCryptoFutureAlgorithm.on_data (cognitive 43) Algorithm.Python/BasicTemplateCryptoFutureAlgorithm.py:57 β€” BasicTemplateCryptoFutureAlgorithm.on_data has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 2, loops 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 Β· BybitCryptoFuturesRegressionAlgorithm.on_data (cognitive 43) Β· Γ—1
  • BybitCryptoFuturesRegressionAlgorithm.on_data (cognitive 43) Algorithm.Python/BybitCryptoFuturesRegressionAlgorithm.py:53 β€” BybitCryptoFuturesRegressionAlgorithm.on_data has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (41 pts), boolean chains 1, loops 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 Β· ContingentComboOrderRegressionAlgorithm.on_data (cognitive 43) Β· Γ—1
  • ContingentComboOrderRegressionAlgorithm.on_data (cognitive 43) Algorithm.Python/ContingentComboOrderRegressionAlgorithm.py:37 β€” ContingentComboOrderRegressionAlgorithm.on_data has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 10, loops 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.
D2 Β· Cognitive Complexity Β· DataManager.Add (cognitive 42) Β· Γ—1
  • DataManager.Add (cognitive 42) Engine/DataFeeds/DataManager.cs:602 β€” DataManager.Add has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity (cognitive 42) Β· Γ—1
  • UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity (cognitive 42) Common/Securities/Option/StrategyMatcher/UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.cs:79 β€” UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.GetUncoveredQuantity has cognitive complexity 42 (threshold 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 Β· RandomDataGeneratorSettings.FromCommandLineArguments (cognitive 42) Β· Γ—1
  • RandomDataGeneratorSettings.FromCommandLineArguments (cognitive 42) ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs:53 β€” RandomDataGeneratorSettings.FromCommandLineArguments has cognitive complexity 42 (threshold 15). 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 Β· DownloaderDataProvider.Fetch (cognitive 41) Β· Γ—1
  • DownloaderDataProvider.Fetch (cognitive 41) Engine/DataFeeds/DownloaderDataProvider.cs:80 β€” DownloaderDataProvider.Fetch has cognitive complexity 41 (threshold 15). None of this is in the body itself: all 41 points belong to one function literal inside it that branches (line 82). 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 Β· BasicTemplateCryptoFutureHourlyAlgorithm.OnData (cognitive 41) Β· Γ—1
  • BasicTemplateCryptoFutureHourlyAlgorithm.OnData (cognitive 41) Algorithm.CSharp/BasicTemplateCryptoFutureHourlyAlgorithm.cs:77 β€” BasicTemplateCryptoFutureHourlyAlgorithm.OnData has cognitive complexity 41 (threshold 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 Β· BasicTemplateCryptoFutureHourlyAlgorithm.on_data (cognitive 41) Β· Γ—1
  • BasicTemplateCryptoFutureHourlyAlgorithm.on_data (cognitive 41) Algorithm.Python/BasicTemplateCryptoFutureHourlyAlgorithm.py:55 β€” BasicTemplateCryptoFutureHourlyAlgorithm.on_data has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 3, 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 Β· ReportCharts.GetExposure (cognitive 41) Β· Γ—1
  • ReportCharts.GetExposure (cognitive 41) Report/ReportCharts.py:973 β€” ReportCharts.GetExposure has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (26 pts), loops 8 (11 pts), ternaries 4 (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 Β· FillForwardEnumerator.RequiresFillForwardData (cognitive 40) Β· Γ—1
  • FillForwardEnumerator.RequiresFillForwardData (cognitive 40) Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:323 β€” FillForwardEnumerator.RequiresFillForwardData has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· TextSubscriptionDataSourceReader.Read (cognitive 40) Β· Γ—1
  • TextSubscriptionDataSourceReader.Read (cognitive 40) Engine/DataFeeds/TextSubscriptionDataSourceReader.cs:82 β€” TextSubscriptionDataSourceReader.Read has cognitive complexity 40 (threshold 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 Β· Slice.GetImpl (cognitive 40) Β· Γ—1
  • Slice.GetImpl (cognitive 40) Common/Data/Slice.cs:403 β€” Slice.GetImpl has cognitive complexity 40 (threshold 15). Of this number, 37 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 Β· UniverseExtensions.RunUniverseDownloader (cognitive 40) Β· Γ—1
  • UniverseExtensions.RunUniverseDownloader (cognitive 40) Common/Data/UniverseSelection/UniverseExtensions.cs:172 β€” UniverseExtensions.RunUniverseDownloader has cognitive complexity 40 (threshold 15). Of this number, 34 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 Β· OrderJsonConverter.CreateOrderFromJObject (cognitive 40) Β· Γ—1
  • OrderJsonConverter.CreateOrderFromJObject (cognitive 40) Common/Orders/OrderJsonConverter.cs:84 β€” OrderJsonConverter.CreateOrderFromJObject has cognitive complexity 40 (threshold 15). 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 Β· HikkakeModified.ComputeNextValue (cognitive 40) Β· Γ—1
  • HikkakeModified.ComputeNextValue (cognitive 40) Indicators/CandlestickPatterns/HikkakeModified.cs:81 β€” HikkakeModified.ComputeNextValue has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData (cognitive 40) Β· Γ—1
  • AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData (cognitive 40) Algorithm.CSharp/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.cs:78 β€” AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.OnData has cognitive complexity 40 (threshold 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 Β· OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement (cognitive 39) Β· Γ—1
  • OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement (cognitive 39) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:294 β€” OptionStrategyPositionGroupBuyingPowerModel.GetInitialMarginRequirement has cognitive complexity 39 (threshold 15). 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 Β· OptimizationModes.Find (cognitive 38) Β· Γ—1
  • OptimizationModes.Find (cognitive 38) Optimizer/Analysis/OptimizationModes.cs:29 β€” OptimizationModes.Find has cognitive complexity 38 (threshold 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 Β· IndicatorSelectorWorksWithDifferentOptions.on_data (cognitive 38) Β· Γ—1
  • IndicatorSelectorWorksWithDifferentOptions.on_data (cognitive 38) Algorithm.Python/IndicatorSelectorsWorkWithDifferentOptions.py:59 β€” IndicatorSelectorWorksWithDifferentOptions.on_data has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 3 (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 Β· QCAlgorithm.CreateConsolidator (cognitive 37) Β· Γ—1
  • QCAlgorithm.CreateConsolidator (cognitive 37) Algorithm/QCAlgorithm.Indicators.cs:4264 β€” QCAlgorithm.CreateConsolidator has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· QCAlgorithm.OnEndOfTimeStep (cognitive 37) Β· Γ—1
  • QCAlgorithm.OnEndOfTimeStep (cognitive 37) Algorithm/QCAlgorithm.Universe.cs:69 β€” QCAlgorithm.OnEndOfTimeStep has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· PeriodCountConsolidatorBase.Update (cognitive 37) Β· Γ—1
  • PeriodCountConsolidatorBase.Update (cognitive 37) Common/Data/Consolidators/PeriodCountConsolidatorBase.cs:147 β€” PeriodCountConsolidatorBase.Update has cognitive complexity 37 (threshold 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 Β· SplitEquityRegressionAlgorithm.OnEndOfAlgorithm (cognitive 37) Β· Γ—1
  • SplitEquityRegressionAlgorithm.OnEndOfAlgorithm (cognitive 37) Algorithm.CSharp/SplitEquityRegressionAlgorithm.cs:65 β€” SplitEquityRegressionAlgorithm.OnEndOfAlgorithm has cognitive complexity 37 (threshold 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 Β· BubbleAlgorithm.on_data (cognitive 37) Β· Γ—1
  • BubbleAlgorithm.on_data (cognitive 37) Algorithm.Python/BubbleAlgorithm.py:65 β€” BubbleAlgorithm.on_data has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 2 (6 pts), error handling 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.
D2 Β· Cognitive Complexity Β· FillForwardEnumerator.MoveNext (cognitive 36) Β· Γ—1
  • FillForwardEnumerator.MoveNext (cognitive 36) Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:183 β€” FillForwardEnumerator.MoveNext has cognitive complexity 36 (threshold 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 Β· SynchronizingEnumerator.GetBruteForceMethod (cognitive 36) Β· Γ—1
  • SynchronizingEnumerator.GetBruteForceMethod (cognitive 36) Engine/DataFeeds/Enumerators/SynchronizingEnumerator.cs:137 β€” SynchronizingEnumerator.GetBruteForceMethod has cognitive complexity 36 (threshold 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 Β· SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData (cognitive 36) Β· Γ—1
  • SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData (cognitive 36) Algorithm.CSharp/SecuritySessionWithFuturesRegressionAlgorithm.cs:53 β€” SecuritySessionWithFuturesRegressionAlgorithm.AccumulateSessionData has cognitive complexity 36 (threshold 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 Β· SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data (cognitive 36) Β· Γ—1
  • SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data (cognitive 36) Algorithm.Python/SecuritySessionWithFuturesRegressionAlgorithm.py:38 β€” SecuritySessionWithFuturesRegressionAlgorithm.accumulate_session_data has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 4, 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 Β· RegressionResultHandler.ProcessSynchronousEvents (cognitive 35) Β· Γ—1
  • RegressionResultHandler.ProcessSynchronousEvents (cognitive 35) Engine/Results/RegressionResultHandler.cs:317 β€” RegressionResultHandler.ProcessSynchronousEvents has cognitive complexity 35 (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.
D2 Β· Cognitive Complexity Β· PandasData.ToPandasDataFrame (cognitive 35) Β· Γ—1
  • PandasData.ToPandasDataFrame (cognitive 35) Common/Python/PandasData.cs:408 β€” PandasData.ToPandasDataFrame has cognitive complexity 35 (threshold 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 Β· HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm (cognitive 35) Β· Γ—1
  • HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm (cognitive 35) Algorithm.CSharp/HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.cs:40 β€” HistoryWithDifferentContinuousContractDepthOffsetsRegressionAlgorithm.OnEndOfAlgorithm has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OrderContingency.Link (cognitive 34) Β· Γ—1
  • OrderContingency.Link (cognitive 34) Common/Orders/OrderContingency.cs:311 β€” OrderContingency.Link has cognitive complexity 34 (threshold 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 Β· SecurityService.CreateSecurity (cognitive 34) Β· Γ—1
  • SecurityService.CreateSecurity (cognitive 34) Common/Securities/SecurityService.cs:75 β€” SecurityService.CreateSecurity has cognitive complexity 34 (threshold 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 Β· Hikkake.ComputeNextValue (cognitive 34) Β· Γ—1
  • Hikkake.ComputeNextValue (cognitive 34) Indicators/CandlestickPatterns/Hikkake.cs:71 β€” Hikkake.ComputeNextValue has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· BasicTemplateMultiAssetAlgorithm.OnData (cognitive 34) Β· Γ—1
  • BasicTemplateMultiAssetAlgorithm.OnData (cognitive 34) Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:86 β€” BasicTemplateMultiAssetAlgorithm.OnData has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· UpdateOrderRegressionAlgorithm.OnData (cognitive 34) Β· Γ—1
  • UpdateOrderRegressionAlgorithm.OnData (cognitive 34) Algorithm.CSharp/UpdateOrderRegressionAlgorithm.cs:77 β€” UpdateOrderRegressionAlgorithm.OnData has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· KaikoDataConverterProgram.KaikoDataConverter (cognitive 34) Β· Γ—1
  • KaikoDataConverterProgram.KaikoDataConverter (cognitive 34) ToolBox/KaikoDataConverter/KaikoDataConverterProgram.cs:41 β€” KaikoDataConverterProgram.KaikoDataConverter has cognitive complexity 34 (threshold 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 Β· CashBuyingPowerModel.GetOpenOrdersReservedQuantity (cognitive 33) Β· Γ—1
  • CashBuyingPowerModel.GetOpenOrdersReservedQuantity (cognitive 33) Common/Securities/CashBuyingPowerModel.cs:400 β€” CashBuyingPowerModel.GetOpenOrdersReservedQuantity has cognitive complexity 33 (threshold 15). Of this number, 28 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 Β· OptionRenameDailyRegressionAlgorithm.OnData (cognitive 33) Β· Γ—1
  • OptionRenameDailyRegressionAlgorithm.OnData (cognitive 33) Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:59 β€” OptionRenameDailyRegressionAlgorithm.OnData has cognitive complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· OptionRenameRegressionAlgorithm.OnData (cognitive 33) Β· Γ—1
  • OptionRenameRegressionAlgorithm.OnData (cognitive 33) Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:57 β€” OptionRenameRegressionAlgorithm.OnData has cognitive complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· UpdateOrderLiveTestAlgorithm.OnData (cognitive 33) Β· Γ—1
  • UpdateOrderLiveTestAlgorithm.OnData (cognitive 33) Algorithm.CSharp/UpdateOrderLiveTestAlgorithm.cs:86 β€” UpdateOrderLiveTestAlgorithm.OnData has cognitive complexity 33 (threshold 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 Β· OptionRenameRegressionAlgorithm.on_data (cognitive 33) Β· Γ—1
  • OptionRenameRegressionAlgorithm.on_data (cognitive 33) Algorithm.Python/OptionRenameRegressionAlgorithm.py:35 β€” OptionRenameRegressionAlgorithm.on_data has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 4, loops 2 (4 pts) (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.
D2 Β· Cognitive Complexity Β· BacktestingResultHandler.SampleRange (cognitive 32) Β· Γ—1
  • BacktestingResultHandler.SampleRange (cognitive 32) Engine/Results/BacktestingResultHandler.cs:708 β€” BacktestingResultHandler.SampleRange has cognitive complexity 32 (threshold 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 Β· EquityFillModel.GetBestEffortAskPrice (cognitive 32) Β· Γ—1
  • EquityFillModel.GetBestEffortAskPrice (cognitive 32) Common/Orders/Fills/EquityFillModel.cs:774 β€” EquityFillModel.GetBestEffortAskPrice has cognitive 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, split the body into named stages: move each independent 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 (EquityFillModel.GetBestEffortBidPrice) 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 Β· EquityFillModel.GetBestEffortBidPrice (cognitive 32) Β· Γ—1
  • EquityFillModel.GetBestEffortBidPrice (cognitive 32) Common/Orders/Fills/EquityFillModel.cs:883 β€” EquityFillModel.GetBestEffortBidPrice has cognitive 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, split the body into named stages: move each independent 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 (EquityFillModel.GetBestEffortAskPrice) 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 Β· PandasData.ToPandasDataFrame (cognitive 32) Β· Γ—1
  • PandasData.ToPandasDataFrame (cognitive 32) Common/Python/PandasData.cs:284 β€” PandasData.ToPandasDataFrame has cognitive complexity 32 (threshold 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 Β· TradeBuilder.ProcessFillUsingFillToFill (cognitive 32) Β· Γ—1
  • TradeBuilder.ProcessFillUsingFillToFill (cognitive 32) Common/Statistics/TradeBuilder.cs:256 β€” TradeBuilder.ProcessFillUsingFillToFill has cognitive complexity 32 (threshold 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 Β· BaseResultsHandler.GenerateStatisticsResults (cognitive 31) Β· Γ—1
  • BaseResultsHandler.GenerateStatisticsResults (cognitive 31) Engine/Results/BaseResultsHandler.cs:1198 β€” BaseResultsHandler.GenerateStatisticsResults has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· EquityFillModel.MarketOnOpenFill (cognitive 31) Β· Γ—1
  • EquityFillModel.MarketOnOpenFill (cognitive 31) Common/Orders/Fills/EquityFillModel.cs:482 β€” EquityFillModel.MarketOnOpenFill has cognitive complexity 31 (threshold 15). Of this number, 29 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 Β· QLOptionPriceModel.Evaluate (cognitive 31) Β· Γ—1
  • QLOptionPriceModel.Evaluate (cognitive 31) Common/Securities/Option/QLOptionPriceModel.cs:108 β€” QLOptionPriceModel.Evaluate has cognitive complexity 31 (threshold 15). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SeriesSampler.SampleSeries (cognitive 31) Β· Γ—1
  • SeriesSampler.SampleSeries (cognitive 31) Common/SeriesSampler.cs:128 β€” SeriesSampler.SampleSeries has cognitive complexity 31 (threshold 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 Β· Log.VarDump (cognitive 31) Β· Γ—1
  • Log.VarDump (cognitive 31) Logging/Log.cs:224 β€” Log.VarDump has cognitive complexity 31 (threshold 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 Β· LiveFillForwardEnumerator.RequiresFillForwardData (cognitive 30) Β· Γ—1
  • LiveFillForwardEnumerator.RequiresFillForwardData (cognitive 30) Engine/DataFeeds/Enumerators/LiveFillForwardEnumerator.cs:81 β€” LiveFillForwardEnumerator.RequiresFillForwardData has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· LocalObjectStore.GetObjectStoreEntries (cognitive 30) Β· Γ—1
  • LocalObjectStore.GetObjectStoreEntries (cognitive 30) Engine/Storage/LocalObjectStore.cs:184 β€” LocalObjectStore.GetObjectStoreEntries has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· Tick.Tick.ctor (cognitive 30) Β· Γ—1
  • Tick.Tick.ctor (cognitive 30) Common/Data/Market/Tick.cs:555 β€” Tick.Tick.ctor has cognitive complexity 30 (threshold 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 Β· TradeBuilder.ProcessFillUsingFlatToFlat (cognitive 30) Β· Γ—1
  • TradeBuilder.ProcessFillUsingFlatToFlat (cognitive 30) Common/Statistics/TradeBuilder.cs:397 β€” TradeBuilder.ProcessFillUsingFlatToFlat has cognitive complexity 30 (threshold 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 Β· TradeBuilder.ProcessFillUsingFlatToReduced (cognitive 30) Β· Γ—1
  • TradeBuilder.ProcessFillUsingFlatToReduced (cognitive 30) Common/Statistics/TradeBuilder.cs:508 β€” TradeBuilder.ProcessFillUsingFlatToReduced has cognitive complexity 30 (threshold 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 Β· ScheduledEnumerator.MoveNext (cognitive 29) Β· Γ—1
  • ScheduledEnumerator.MoveNext (cognitive 29) Engine/DataFeeds/Enumerators/ScheduledEnumerator.cs:73 β€” ScheduledEnumerator.MoveNext has cognitive complexity 29 (threshold 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 Β· LiveSynchronizer.StreamData (cognitive 29) Β· Γ—1
  • LiveSynchronizer.StreamData (cognitive 29) Engine/DataFeeds/LiveSynchronizer.cs:85 β€” LiveSynchronizer.StreamData has cognitive complexity 29 (threshold 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 Β· SubscriptionDataReader.Initialize (cognitive 29) Β· Γ—1
  • SubscriptionDataReader.Initialize (cognitive 29) Engine/DataFeeds/SubscriptionDataReader.cs:172 β€” SubscriptionDataReader.Initialize has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· CustomUniverseWithBenchmarkRegressionAlgorithm.OnData (cognitive 29) Β· Γ—1
  • CustomUniverseWithBenchmarkRegressionAlgorithm.OnData (cognitive 29) Algorithm.CSharp/CustomUniverseWithBenchmarkRegressionAlgorithm.cs:78 β€” CustomUniverseWithBenchmarkRegressionAlgorithm.OnData has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· LiveAuxiliaryDataSynchronizingEnumerator.DataPointEmitted (cognitive 28) Β· Γ—1
  • LiveAuxiliaryDataSynchronizingEnumerator.DataPointEmitted (cognitive 28) Engine/DataFeeds/Enumerators/LiveAuxiliaryDataSynchronizingEnumerator.cs:123 β€” LiveAuxiliaryDataSynchronizingEnumerator.DataPointEmitted has cognitive complexity 28 (threshold 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 Β· UniverseSelection.AddPendingInternalDataFeeds (cognitive 28) Β· Γ—1
  • UniverseSelection.AddPendingInternalDataFeeds (cognitive 28) Engine/DataFeeds/UniverseSelection.cs:353 β€” UniverseSelection.AddPendingInternalDataFeeds has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· SecurityExchangeHours.GetMarketHours (cognitive 28) Β· Γ—1
  • SecurityExchangeHours.GetMarketHours (cognitive 28) Common/Securities/SecurityExchangeHours.cs:514 β€” SecurityExchangeHours.GetMarketHours has cognitive complexity 28 (threshold 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 Β· LeanData.TryParsePath (cognitive 28) Β· Γ—1
  • LeanData.TryParsePath (cognitive 28) Common/Util/LeanData.cs:1155 β€” LeanData.TryParsePath has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged (cognitive 28) Β· Γ—1
  • OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged (cognitive 28) Algorithm.CSharp/OptionChainUniverseRemovalRegressionAlgorithm.cs:101 β€” OptionChainUniverseRemovalRegressionAlgorithm.OnSecuritiesChanged has cognitive complexity 28 (threshold 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 Β· UpdateOrderRegressionAlgorithm.on_data (cognitive 28) Β· Γ—1
  • UpdateOrderRegressionAlgorithm.on_data (cognitive 28) Algorithm.Python/UpdateOrderRegressionAlgorithm.py:53 β€” UpdateOrderRegressionAlgorithm.on_data has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (11 pts), boolean chains 5 (nesting depth added 13). 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 Β· Extensions.Scale (cognitive 27) Β· Γ—1
  • Extensions.Scale (cognitive 27) Common/Extensions.cs:3746 β€” Extensions.Scale has cognitive complexity 27 (threshold 15). 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 Β· Serie.Add (cognitive 27) Β· Γ—1
  • Serie.Add (cognitive 27) Common/Python/PandasData.cs:761 β€” Serie.Add has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· WarmupDailyResolutionRegressionAlgorithm.OnData (cognitive 27) Β· Γ—1
  • WarmupDailyResolutionRegressionAlgorithm.OnData (cognitive 27) Algorithm.CSharp/WarmupDailyResolutionRegressionAlgorithm.cs:52 β€” WarmupDailyResolutionRegressionAlgorithm.OnData has cognitive complexity 27 (threshold 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 Β· SynchronizingHistoryProvider.CreateSliceEnumerableFromSubscriptions (cognitive 26) Β· Γ—1
  • SynchronizingHistoryProvider.CreateSliceEnumerableFromSubscriptions (cognitive 26) Engine/HistoricalData/SynchronizingHistoryProvider.cs:57 β€” SynchronizingHistoryProvider.CreateSliceEnumerableFromSubscriptions has cognitive complexity 26 (threshold 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 Β· BrokerageTransactionHandler.HandleOrderUpdated (cognitive 26) Β· Γ—1
  • BrokerageTransactionHandler.HandleOrderUpdated (cognitive 26) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1512 β€” BrokerageTransactionHandler.HandleOrderUpdated has cognitive complexity 26 (threshold 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 Β· QCAlgorithm.SubmitOrders (cognitive 26) Β· Γ—1
  • QCAlgorithm.SubmitOrders (cognitive 26) Algorithm/QCAlgorithm.Trading.ContingentOrders.cs:161 β€” QCAlgorithm.SubmitOrders has cognitive complexity 26 (threshold 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 Β· QuoteBarConsolidator.AggregateBar (cognitive 26) Β· Γ—1
  • QuoteBarConsolidator.AggregateBar (cognitive 26) Common/Data/Consolidators/QuoteBarConsolidator.cs:91 β€” QuoteBarConsolidator.AggregateBar has cognitive complexity 26 (threshold 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 Β· SecurityPortfolioModel.ProcessFill (cognitive 26) Β· Γ—1
  • SecurityPortfolioModel.ProcessFill (cognitive 26) Common/Securities/SecurityPortfolioModel.cs:36 β€” SecurityPortfolioModel.ProcessFill has cognitive complexity 26 (threshold 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 Β· BacktestingBrokerage.ProcessDelistings (cognitive 26) Β· Γ—1
  • BacktestingBrokerage.ProcessDelistings (cognitive 26) Brokerages/Backtesting/BacktestingBrokerage.cs:646 β€” BacktestingBrokerage.ProcessDelistings has cognitive complexity 26 (threshold 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 Β· AddOptionContractExpiresRegressionAlgorithm.OnData (cognitive 26) Β· Γ—1
  • AddOptionContractExpiresRegressionAlgorithm.OnData (cognitive 26) Algorithm.CSharp/AddOptionContractExpiresRegressionAlgorithm.cs:45 β€” AddOptionContractExpiresRegressionAlgorithm.OnData has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BasicTemplateCryptoAlgorithm.OnData (cognitive 26) Β· Γ—1
  • BasicTemplateCryptoAlgorithm.OnData (cognitive 26) Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:83 β€” BasicTemplateCryptoAlgorithm.OnData has cognitive complexity 26 (threshold 15). Of this number, 24 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 Β· ContingentComboOrderRegressionAlgorithm.OnData (cognitive 26) Β· Γ—1
  • ContingentComboOrderRegressionAlgorithm.OnData (cognitive 26) Algorithm.CSharp/ContingentComboOrderRegressionAlgorithm.cs:61 β€” ContingentComboOrderRegressionAlgorithm.OnData has cognitive complexity 26 (threshold 15). Of this number, 22 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 Β· ContinuousFutureRolloverBaseRegressionAlgorithm.OnData (cognitive 26) Β· Γ—1
  • ContinuousFutureRolloverBaseRegressionAlgorithm.OnData (cognitive 26) Algorithm.CSharp/ContinuousFutureRolloverBaseRegressionAlgorithm.cs:86 β€” ContinuousFutureRolloverBaseRegressionAlgorithm.OnData has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData (cognitive 26) Β· Γ—1
  • FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData (cognitive 26) Algorithm.CSharp/FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.cs:66 β€” FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.OnData has cognitive complexity 26 (threshold 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 Β· SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged (cognitive 26) Β· Γ—1
  • SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged (cognitive 26) Algorithm.CSharp/SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.cs:101 β€” SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.OnSecuritiesChanged has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· QCAlgorithm.RemoveSecurity (cognitive 25) Β· Γ—1
  • QCAlgorithm.RemoveSecurity (cognitive 25) Algorithm/QCAlgorithm.cs:2717 β€” QCAlgorithm.RemoveSecurity has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SliceExtensions.PushThrough (cognitive 25) Β· Γ—1
  • SliceExtensions.PushThrough (cognitive 25) Common/Data/SliceExtensions.cs:286 β€” SliceExtensions.PushThrough has cognitive complexity 25 (threshold 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 Β· MemoizingEnumerable.GetEnumerator (cognitive 25) Β· Γ—1
  • MemoizingEnumerable.GetEnumerator (cognitive 25) Common/Util/MemoizingEnumerable.cs:95 β€” MemoizingEnumerable.GetEnumerator has cognitive complexity 25 (threshold 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 Β· Config.Flatten (cognitive 25) Β· Γ—1
  • Config.Flatten (cognitive 25) REDACTED:371 β€” Config.Flatten has cognitive complexity 25 (threshold 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 Β· AdjustedVolumeRegressionAlgorithm.OnData (cognitive 25) Β· Γ—1
  • AdjustedVolumeRegressionAlgorithm.OnData (cognitive 25) Algorithm.CSharp/AdjustedVolumeRegressionAlgorithm.cs:66 β€” AdjustedVolumeRegressionAlgorithm.OnData has cognitive complexity 25 (threshold 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 Β· ContinuousFutureRegressionAlgorithm.OnData (cognitive 25) Β· Γ—1
  • ContinuousFutureRegressionAlgorithm.OnData (cognitive 25) Algorithm.CSharp/ContinuousFutureRegressionAlgorithm.cs:57 β€” ContinuousFutureRegressionAlgorithm.OnData has cognitive complexity 25 (threshold 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 Β· OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks (cognitive 25) Β· Γ—1
  • OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks (cognitive 25) Algorithm.CSharp/OptionPriceModelForOptionStylesBaseRegressionAlgorithm.cs:77 β€” OptionPriceModelForOptionStylesBaseRegressionAlgorithm.CheckGreeks has cognitive complexity 25 (threshold 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 Β· OptionChainFiltersRegressionAlgorithm.initialize (cognitive 25) Β· Γ—1
  • OptionChainFiltersRegressionAlgorithm.initialize (cognitive 25) Algorithm.Python/OptionChainFiltersRegressionAlgorithm.py:22 β€” OptionChainFiltersRegressionAlgorithm.initialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, boolean chains 10, 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 Β· ApiDataProvider.NeedToDownload (cognitive 24) Β· Γ—1
  • ApiDataProvider.NeedToDownload (cognitive 24) Engine/DataFeeds/ApiDataProvider.cs:157 β€” ApiDataProvider.NeedToDownload has cognitive complexity 24 (threshold 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 Β· BaseDataExchange.ConsumeEnumerators (cognitive 24) Β· Γ—1
  • BaseDataExchange.ConsumeEnumerators (cognitive 24) Engine/DataFeeds/BaseDataExchange.cs:169 β€” BaseDataExchange.ConsumeEnumerators has cognitive complexity 24 (threshold 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 Β· DataQueueHandlerManager.Subscribe (cognitive 24) Β· Γ—1
  • DataQueueHandlerManager.Subscribe (cognitive 24) Engine/DataFeeds/DataQueueHandlerManager.cs:74 β€” DataQueueHandlerManager.Subscribe has cognitive complexity 24 (threshold 15). Of this number, 20 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 Β· BrokerageSetupHandler.Setup (cognitive 24) Β· Γ—1
  • BrokerageSetupHandler.Setup (cognitive 24) Engine/Setup/BrokerageSetupHandler.cs:148 β€” BrokerageSetupHandler.Setup has cognitive complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 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 Β· QCAlgorithm.Liquidate (cognitive 24) Β· Γ—1
  • QCAlgorithm.Liquidate (cognitive 24) Algorithm/QCAlgorithm.Trading.cs:1139 β€” QCAlgorithm.Liquidate has cognitive complexity 24 (threshold 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 Β· Extensions.Batch (cognitive 24) Β· Γ—1
  • Extensions.Batch (cognitive 24) Common/Extensions.cs:544 β€” Extensions.Batch has cognitive complexity 24 (threshold 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 Β· LeanDataPathComponents.Parse (cognitive 24) Β· Γ—1
  • LeanDataPathComponents.Parse (cognitive 24) Common/Util/LeanDataPathComponents.cs:103 β€” LeanDataPathComponents.Parse has cognitive complexity 24 (threshold 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 Β· ContinuousFutureBackMonthRegressionAlgorithm.OnData (cognitive 24) Β· Γ—1
  • ContinuousFutureBackMonthRegressionAlgorithm.OnData (cognitive 24) Algorithm.CSharp/ContinuousFutureBackMonthRegressionAlgorithm.cs:70 β€” ContinuousFutureBackMonthRegressionAlgorithm.OnData has cognitive complexity 24 (threshold 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 Β· HistoryAuxiliaryDataRegressionAlgorithm.Initialize (cognitive 24) Β· Γ—1
  • HistoryAuxiliaryDataRegressionAlgorithm.Initialize (cognitive 24) Algorithm.CSharp/HistoryAuxiliaryDataRegressionAlgorithm.cs:34 β€” HistoryAuxiliaryDataRegressionAlgorithm.Initialize has cognitive complexity 24 (threshold 15). 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 Β· Program.Main (cognitive 24) Β· Γ—1
  • Program.Main (cognitive 24) Report/Program.cs:35 β€” Program.Main has cognitive complexity 24 (threshold 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 Β· FuturesChainFiltersRegressionAlgorithm.on_data (cognitive 24) Β· Γ—1
  • FuturesChainFiltersRegressionAlgorithm.on_data (cognitive 24) Algorithm.Python/FuturesChainFiltersRegressionAlgorithm.py:65 β€” FuturesChainFiltersRegressionAlgorithm.on_data has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5 (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 Β· CollectionSubscriptionDataSourceReader.Read (cognitive 23) Β· Γ—1
  • CollectionSubscriptionDataSourceReader.Read (cognitive 23) Engine/DataFeeds/CollectionSubscriptionDataSourceReader.cs:60 β€” CollectionSubscriptionDataSourceReader.Read has cognitive complexity 23 (threshold 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 Β· DataManager.RemoveSubscriptionInternal (cognitive 23) Β· Γ—1
  • DataManager.RemoveSubscriptionInternal (cognitive 23) Engine/DataFeeds/DataManager.cs:382 β€” DataManager.RemoveSubscriptionInternal has cognitive complexity 23 (threshold 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 Β· ZipDataCacheProvider.Fetch (cognitive 23) Β· Γ—1
  • ZipDataCacheProvider.Fetch (cognitive 23) Engine/DataFeeds/ZipDataCacheProvider.cs:62 β€” ZipDataCacheProvider.Fetch has cognitive complexity 23 (threshold 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 Β· RenkoConsolidator.Update (cognitive 23) Β· Γ—1
  • RenkoConsolidator.Update (cognitive 23) Common/Data/Consolidators/RenkoConsolidator.cs:118 β€” RenkoConsolidator.Update has cognitive complexity 23 (threshold 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 Β· DownloaderExtensions.GetDataDownloaderParameterForAllMappedSymbols (cognitive 23) Β· Γ—1
  • DownloaderExtensions.GetDataDownloaderParameterForAllMappedSymbols (cognitive 23) Common/Data/DownloaderExtensions.cs:41 β€” DownloaderExtensions.GetDataDownloaderParameterForAllMappedSymbols has cognitive complexity 23 (threshold 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 Β· EquityFillModel.StopLimitFill (cognitive 23) Β· Γ—1
  • EquityFillModel.StopLimitFill (cognitive 23) Common/Orders/Fills/EquityFillModel.cs:280 β€” EquityFillModel.StopLimitFill has cognitive complexity 23 (threshold 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 Β· EquityFillModel.MarketOnCloseFill (cognitive 23) Β· Γ—1
  • EquityFillModel.MarketOnCloseFill (cognitive 23) Common/Orders/Fills/EquityFillModel.cs:623 β€” EquityFillModel.MarketOnCloseFill has cognitive 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, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· FillModel.Fill (cognitive 23) Β· Γ—1
  • FillModel.Fill (cognitive 23) Common/Orders/Fills/FillModel.cs:59 β€” FillModel.Fill has cognitive complexity 23 (threshold 15). 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 Β· FillModel.StopLimitFill (cognitive 23) Β· Γ—1
  • FillModel.StopLimitFill (cognitive 23) Common/Orders/Fills/FillModel.cs:486 β€” FillModel.StopLimitFill has cognitive complexity 23 (threshold 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 Β· CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cognitive 23) Β· Γ—1
  • CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cognitive 23) Common/Securities/CashBuyingPowerModel.cs:191 β€” CashBuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower has cognitive complexity 23 (threshold 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 Β· MarketHoursDatabaseEntryJson.Convert (cognitive 23) Β· Γ—1
  • MarketHoursDatabaseEntryJson.Convert (cognitive 23) Common/Util/MarketHoursDatabaseJsonConverter.cs:279 β€” MarketHoursDatabaseEntryJson.Convert has cognitive complexity 23 (threshold 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 Β· BubbleAlgorithm.OnData (cognitive 23) Β· Γ—1
  • BubbleAlgorithm.OnData (cognitive 23) Algorithm.CSharp/BubbleAlgorithm.cs:121 β€” BubbleAlgorithm.OnData has cognitive complexity 23 (threshold 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 Β· ConstituentsUniverseRegressionAlgorithm.OnData (cognitive 23) Β· Γ—1
  • ConstituentsUniverseRegressionAlgorithm.OnData (cognitive 23) Algorithm.CSharp/ConstituentsUniverseRegressionAlgorithm.cs:59 β€” ConstituentsUniverseRegressionAlgorithm.OnData has cognitive complexity 23 (threshold 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 Β· IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData (cognitive 23) Β· Γ—1
  • IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData (cognitive 23) Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:62 β€” IndicatorBasedOptionPricingModelRegressionAlgorithm.OnData has cognitive complexity 23 (threshold 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 Β· OptionSplitRegressionAlgorithm.OnData (cognitive 23) Β· Γ—1
  • OptionSplitRegressionAlgorithm.OnData (cognitive 23) Algorithm.CSharp/OptionSplitRegressionAlgorithm.cs:59 β€” OptionSplitRegressionAlgorithm.OnData has cognitive 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, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· LeanDataReader.Parse (cognitive 23) Β· Γ—1
  • LeanDataReader.Parse (cognitive 23) ToolBox/LeanDataReader.cs:109 β€” LeanDataReader.Parse has cognitive 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, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.on_data (cognitive 23) Β· Γ—1
  • AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.on_data (cognitive 23) Algorithm.Python/AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.py:53 β€” AddFutureOptionSingleOptionChainSelectedInUniverseFilterRegressionAlgorithm.on_data has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 3 (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 Β· HistoryAuxiliaryDataRegressionAlgorithm.initialize (cognitive 23) Β· Γ—1
  • HistoryAuxiliaryDataRegressionAlgorithm.initialize (cognitive 23) Algorithm.Python/HistoryAuxiliaryDataRegressionAlgorithm.py:21 β€” HistoryAuxiliaryDataRegressionAlgorithm.initialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 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 Β· ReportCharts.GetMonthlyReturns (cognitive 23) Β· Γ—1
  • ReportCharts.GetMonthlyReturns (cognitive 23) Report/ReportCharts.py:348 β€” ReportCharts.GetMonthlyReturns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (8 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 Β· SubscriptionFilterEnumerator.MoveNext (cognitive 22) Β· Γ—1
  • SubscriptionFilterEnumerator.MoveNext (cognitive 22) Engine/DataFeeds/Enumerators/SubscriptionFilterEnumerator.cs:121 β€” SubscriptionFilterEnumerator.MoveNext has cognitive complexity 22 (threshold 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 Β· OrderRequestProcessingPool.JoinWorkers (cognitive 22) Β· Γ—1
  • OrderRequestProcessingPool.JoinWorkers (cognitive 22) Engine/TransactionHandlers/OrderRequestProcessingPool.cs:316 β€” OrderRequestProcessingPool.JoinWorkers has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· QCAlgorithm.GetResolution (cognitive 22) Β· Γ—1
  • QCAlgorithm.GetResolution (cognitive 22) Algorithm/QCAlgorithm.History.cs:1426 β€” QCAlgorithm.GetResolution has cognitive complexity 22 (threshold 15). 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 Β· DynamicData.SetProperty (cognitive 22) Β· Γ—1
  • DynamicData.SetProperty (cognitive 22) Common/Data/DynamicData.cs:52 β€” DynamicData.SetProperty has cognitive complexity 22 (threshold 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 Β· Isolator.MonitorTask (cognitive 22) Β· Γ—1
  • Isolator.MonitorTask (cognitive 22) Common/Isolator.cs:82 β€” Isolator.MonitorTask has cognitive complexity 22 (threshold 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 Β· FillModel.LimitIfTouchedFill (cognitive 22) Β· Γ—1
  • FillModel.LimitIfTouchedFill (cognitive 22) Common/Orders/Fills/FillModel.cs:603 β€” FillModel.LimitIfTouchedFill has cognitive complexity 22 (threshold 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 Β· AdvanceBlock.ComputeNextValue (cognitive 22) Β· Γ—1
  • AdvanceBlock.ComputeNextValue (cognitive 22) Indicators/CandlestickPatterns/AdvanceBlock.cs:89 β€” AdvanceBlock.ComputeNextValue has cognitive complexity 22 (threshold 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 Β· JobQueue.NextJob (cognitive 22) Β· Γ—1
  • JobQueue.NextJob (cognitive 22) Queues/JobQueue.cs:125 β€” JobQueue.NextJob has cognitive complexity 22 (threshold 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 Β· BasicTemplateIndexOptionsAlgorithm.OnData (cognitive 22) Β· Γ—1
  • BasicTemplateIndexOptionsAlgorithm.OnData (cognitive 22) Algorithm.CSharp/BasicTemplateIndexOptionsAlgorithm.cs:59 β€” BasicTemplateIndexOptionsAlgorithm.OnData has cognitive complexity 22 (threshold 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 Β· DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent (cognitive 22) Β· Γ—1
  • DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent (cognitive 22) Algorithm.CSharp/DuplicateOptionAssignmentRegressionAlgorithm.cs:69 β€” DuplicateOptionAssignmentRegressionAlgorithm.OnOrderEvent has cognitive complexity 22 (threshold 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 Β· UnsettledCashWhenQuoteCurrencyIsNotAccountCurrencyAlgorithm.OnEndOfAlgorithm (cognitive 22) Β· Γ—1
  • UnsettledCashWhenQuoteCurrencyIsNotAccountCurrencyAlgorithm.OnEndOfAlgorithm (cognitive 22) Algorithm.CSharp/UnsettledCashWhenQuoteCurrencyIsNotAccountCurrencyAlgorithm.cs:104 β€” UnsettledCashWhenQuoteCurrencyIsNotAccountCurrencyAlgorithm.OnEndOfAlgorithm has cognitive complexity 22 (threshold 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 Β· AlgoSeekFuturesConverter.Convert (cognitive 22) Β· Γ—1
  • AlgoSeekFuturesConverter.Convert (cognitive 22) ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesConverter.cs:65 β€” AlgoSeekFuturesConverter.Convert has cognitive complexity 22 (threshold 15). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 86, 71). 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 Β· QuantBook.OptionHistory (cognitive 22) Β· Γ—1
  • QuantBook.OptionHistory (cognitive 22) Research/QuantBook.cs:393 β€” QuantBook.OptionHistory has cognitive complexity 22 (threshold 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 Β· NullResultValueTypeJsonConverter.ReadJson (cognitive 22) Β· Γ—1
  • NullResultValueTypeJsonConverter.ReadJson (cognitive 22) Report/NullResultValueTypeJsonConverter.cs:60 β€” NullResultValueTypeJsonConverter.ReadJson has cognitive complexity 22 (threshold 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 Β· BlackLittermanOptimizationPortfolioConstructionModel.get_views (cognitive 22) Β· Γ—1
  • BlackLittermanOptimizationPortfolioConstructionModel.get_views (cognitive 22) Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.py:223 β€” BlackLittermanOptimizationPortfolioConstructionModel.get_views has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), ternaries 1 (2 pts), 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 Β· BracketOrderRegressionAlgorithm.on_data (cognitive 22) Β· Γ—1
  • BracketOrderRegressionAlgorithm.on_data (cognitive 22) Algorithm.Python/BracketOrderRegressionAlgorithm.py:31 β€” BracketOrderRegressionAlgorithm.on_data has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, 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 Β· AlgorithmManager.HandleSplits (cognitive 21) Β· Γ—1
  • AlgorithmManager.HandleSplits (cognitive 21) Engine/AlgorithmManager.cs:779 β€” AlgorithmManager.HandleSplits has cognitive complexity 21 (threshold 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 Β· BaseDataCollectionAggregatorEnumerator.MoveNext (cognitive 21) Β· Γ—1
  • BaseDataCollectionAggregatorEnumerator.MoveNext (cognitive 21) Engine/DataFeeds/Enumerators/BaseDataCollectionAggregatorEnumerator.cs:60 β€” BaseDataCollectionAggregatorEnumerator.MoveNext has cognitive complexity 21 (threshold 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 Β· LiveTradingDataFeed.GetHistoryWarmupEnumerator (cognitive 21) Β· Γ—1
  • LiveTradingDataFeed.GetHistoryWarmupEnumerator (cognitive 21) Engine/DataFeeds/LiveTradingDataFeed.cs:499 β€” LiveTradingDataFeed.GetHistoryWarmupEnumerator has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 511, 560, 536). 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 Β· Synchronizer.StreamData (cognitive 21) Β· Γ—1
  • Synchronizer.StreamData (cognitive 21) Engine/DataFeeds/Synchronizer.cs:86 β€” Synchronizer.StreamData has cognitive complexity 21 (threshold 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 Β· HistoryProviderManager.GetHistory (cognitive 21) Β· Γ—1
  • HistoryProviderManager.GetHistory (cognitive 21) Engine/HistoricalData/HistoryProviderManager.cs:135 β€” HistoryProviderManager.GetHistory has cognitive complexity 21 (threshold 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 Β· OptimizationBacktestJsonConverter.WriteJson (cognitive 21) Β· Γ—1
  • OptimizationBacktestJsonConverter.WriteJson (cognitive 21) Common/Api/OptimizationBacktestJsonConverter.cs:88 β€” OptimizationBacktestJsonConverter.WriteJson has cognitive complexity 21 (threshold 15). Of this number, 18 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 Β· Tick.Tick.ctor (cognitive 21) Β· Γ—1
  • Tick.Tick.ctor (cognitive 21) Common/Data/Market/Tick.cs:415 β€” Tick.Tick.ctor has cognitive complexity 21 (threshold 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 Β· PortfolioStatistics.PortfolioStatistics.ctor (cognitive 21) Β· Γ—1
  • PortfolioStatistics.PortfolioStatistics.ctor (cognitive 21) Common/Statistics/PortfolioStatistics.cs:211 β€” PortfolioStatistics.PortfolioStatistics.ctor has cognitive complexity 21 (threshold 15). 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 Β· WebSocketClientWrapper.HandleConnection (cognitive 21) Β· Γ—1
  • WebSocketClientWrapper.HandleConnection (cognitive 21) Brokerages/WebSocketClientWrapper.cs:214 β€” WebSocketClientWrapper.HandleConnection has cognitive complexity 21 (threshold 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 Β· CoarseFineOptionUniverseChainRegressionAlgorithm.OnData (cognitive 21) Β· Γ—1
  • CoarseFineOptionUniverseChainRegressionAlgorithm.OnData (cognitive 21) Algorithm.CSharp/CoarseFineOptionUniverseChainRegressionAlgorithm.cs:78 β€” CoarseFineOptionUniverseChainRegressionAlgorithm.OnData has cognitive complexity 21 (threshold 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 Β· ContinuousBackMonthRawFutureRegressionAlgorithm.OnData (cognitive 21) Β· Γ—1
  • ContinuousBackMonthRawFutureRegressionAlgorithm.OnData (cognitive 21) Algorithm.CSharp/ContinuousBackMonthRawFutureRegressionAlgorithm.cs:56 β€” ContinuousBackMonthRawFutureRegressionAlgorithm.OnData has cognitive complexity 21 (threshold 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 Β· IndicatorSelectorsWorkWithDifferentOptions.OnData (cognitive 21) Β· Γ—1
  • IndicatorSelectorsWorkWithDifferentOptions.OnData (cognitive 21) Algorithm.CSharp/IndicatorSelectorsWorkWithDifferentOptions.cs:82 β€” IndicatorSelectorsWorkWithDifferentOptions.OnData has cognitive complexity 21 (threshold 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 Β· OptionChainFiltersRegressionAlgorithm.Initialize (cognitive 21) Β· Γ—1
  • OptionChainFiltersRegressionAlgorithm.Initialize (cognitive 21) Algorithm.CSharp/OptionChainFiltersRegressionAlgorithm.cs:38 β€” OptionChainFiltersRegressionAlgorithm.Initialize has cognitive complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 6 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 Β· BlackLittermanOptimizationPortfolioConstructionModel.determine_target_percent (cognitive 21) Β· Γ—1
  • BlackLittermanOptimizationPortfolioConstructionModel.determine_target_percent (cognitive 21) Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.py:83 β€” BlackLittermanOptimizationPortfolioConstructionModel.determine_target_percent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (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.
D2 Β· Cognitive Complexity Β· OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks (cognitive 21) Β· Γ—1
  • OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks (cognitive 21) Algorithm.Python/OptionPriceModelForOptionStylesBaseRegressionAlgorithm.py:51 β€” OptionPriceModelForOptionStylesBaseRegressionAlgorithm.check_greeks has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), error handling 1 (2 pts), 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 Β· LiveOptionChainProvider.GetOptionContractList (cognitive 20) Β· Γ—1
  • LiveOptionChainProvider.GetOptionContractList (cognitive 20) Engine/DataFeeds/LiveOptionChainProvider.cs:79 β€” LiveOptionChainProvider.GetOptionContractList has cognitive complexity 20 (threshold 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 Β· WeightedWorkQueue.WorkerThread (cognitive 20) Β· Γ—1
  • WeightedWorkQueue.WorkerThread (cognitive 20) Engine/DataFeeds/WorkScheduling/WeightedWorkQueue.cs:55 β€” WeightedWorkQueue.WorkerThread has cognitive complexity 20 (threshold 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 Β· BacktestingResultHandler.Update (cognitive 20) Β· Γ—1
  • BacktestingResultHandler.Update (cognitive 20) Engine/Results/BacktestingResultHandler.cs:160 β€” BacktestingResultHandler.Update has cognitive complexity 20 (threshold 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 Β· QCAlgorithm.TryGetWarmupHistoryStartTime (cognitive 20) Β· Γ—1
  • QCAlgorithm.TryGetWarmupHistoryStartTime (cognitive 20) Algorithm/QCAlgorithm.History.cs:174 β€” QCAlgorithm.TryGetWarmupHistoryStartTime has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· QCAlgorithm.WarmUpIndicatorImpl (cognitive 20) Β· Γ—1
  • QCAlgorithm.WarmUpIndicatorImpl (cognitive 20) Algorithm/QCAlgorithm.Indicators.cs:3610 β€” QCAlgorithm.WarmUpIndicatorImpl has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· CapacityEstimate.UpdateMarketCapacity (cognitive 20) Β· Γ—1
  • CapacityEstimate.UpdateMarketCapacity (cognitive 20) Common/CapacityEstimate.cs:124 β€” CapacityEstimate.UpdateMarketCapacity has cognitive complexity 20 (threshold 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 Β· LatestPriceFillModel.GetPrices (cognitive 20) Β· Γ—1
  • LatestPriceFillModel.GetPrices (cognitive 20) Common/Orders/Fills/LatestPriceFillModel.cs:35 β€” LatestPriceFillModel.GetPrices has cognitive complexity 20 (threshold 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 Β· ScheduledEvent.Scan (cognitive 20) Β· Γ—1
  • ScheduledEvent.Scan (cognitive 20) Common/Scheduling/ScheduledEvent.cs:152 β€” ScheduledEvent.Scan has cognitive complexity 20 (threshold 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 Β· FuturesExpiryUtilityFunctions.AddBusinessDays (cognitive 20) Β· Γ—1
  • FuturesExpiryUtilityFunctions.AddBusinessDays (cognitive 20) Common/Securities/Future/FuturesExpiryUtilityFunctions.cs:50 β€” FuturesExpiryUtilityFunctions.AddBusinessDays has cognitive complexity 20 (threshold 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 Β· Composer.GetExportedValueByTypeName (cognitive 20) Β· Γ—1
  • Composer.GetExportedValueByTypeName (cognitive 20) Common/Util/Composer.cs:207 β€” Composer.GetExportedValueByTypeName has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· IndicatorBasedOptionPriceModel.Evaluate (cognitive 20) Β· Γ—1
  • IndicatorBasedOptionPriceModel.Evaluate (cognitive 20) Indicators/IndicatorBasedOptionPriceModel.cs:69 β€” IndicatorBasedOptionPriceModel.Evaluate has cognitive complexity 20 (threshold 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 Β· EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.OnData (cognitive 20) Β· Γ—1
  • EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.OnData (cognitive 20) Algorithm.CSharp/EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.cs:56 β€” EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.OnData has cognitive complexity 20 (threshold 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 Β· FuturesChainFiltersRegressionAlgorithm.OnData (cognitive 20) Β· Γ—1
  • FuturesChainFiltersRegressionAlgorithm.OnData (cognitive 20) Algorithm.CSharp/FuturesChainFiltersRegressionAlgorithm.cs:85 β€” FuturesChainFiltersRegressionAlgorithm.OnData has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· TickGenerator.GenerateTicks (cognitive 20) Β· Γ—1
  • TickGenerator.GenerateTicks (cognitive 20) ToolBox/RandomDataGenerator/TickGenerator.cs:60 β€” TickGenerator.GenerateTicks has cognitive complexity 20 (threshold 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 Β· MaximumSectorExposureRiskManagementModel.ManageRisk (cognitive 20) Β· Γ—1
  • MaximumSectorExposureRiskManagementModel.ManageRisk (cognitive 20) Algorithm.Framework/Risk/MaximumSectorExposureRiskManagementModel.cs:56 β€” MaximumSectorExposureRiskManagementModel.ManageRisk has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BracketOrderLimitEntryRegressionAlgorithm.on_data (cognitive 20) Β· Γ—1
  • BracketOrderLimitEntryRegressionAlgorithm.on_data (cognitive 20) Algorithm.Python/BracketOrderLimitEntryRegressionAlgorithm.py:33 β€” BracketOrderLimitEntryRegressionAlgorithm.on_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 1 (2 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 Β· ConstituentsUniverseRegressionAlgorithm.on_data (cognitive 20) Β· Γ—1
  • ConstituentsUniverseRegressionAlgorithm.on_data (cognitive 20) Algorithm.Python/ConstituentsUniverseRegressionAlgorithm.py:42 β€” ConstituentsUniverseRegressionAlgorithm.on_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 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 Β· OptionSplitRegressionAlgorithm.on_data (cognitive 20) Β· Γ—1
  • OptionSplitRegressionAlgorithm.on_data (cognitive 20) Algorithm.Python/OptionSplitRegressionAlgorithm.py:41 β€” OptionSplitRegressionAlgorithm.on_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (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 Β· TimeSliceFactory.HandleOptionData (cognitive 19) Β· Γ—1
  • TimeSliceFactory.HandleOptionData (cognitive 19) Engine/DataFeeds/TimeSliceFactory.cs:422 β€” TimeSliceFactory.HandleOptionData has cognitive complexity 19 (threshold 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 Β· ZipDataCacheProvider.CreateEntryStream (cognitive 19) Β· Γ—1
  • ZipDataCacheProvider.CreateEntryStream (cognitive 19) Engine/DataFeeds/ZipDataCacheProvider.cs:317 β€” ZipDataCacheProvider.CreateEntryStream has cognitive complexity 19 (threshold 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 Β· BaseResultsHandler.ProcessAlgorithmLogsImpl (cognitive 19) Β· Γ—1
  • BaseResultsHandler.ProcessAlgorithmLogsImpl (cognitive 19) Engine/Results/BaseResultsHandler.cs:1371 β€” BaseResultsHandler.ProcessAlgorithmLogsImpl has cognitive complexity 19 (threshold 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 Β· FTXBrokerageModel.CanSubmitOrder (cognitive 19) Β· Γ—1
  • FTXBrokerageModel.CanSubmitOrder (cognitive 19) Common/Brokerages/FTXBrokerageModel.cs:104 β€” FTXBrokerageModel.CanSubmitOrder has cognitive complexity 19 (threshold 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 Β· InteractiveBrokersBrokerageModel.CanSubmitOrder (cognitive 19) Β· Γ—1
  • InteractiveBrokersBrokerageModel.CanSubmitOrder (cognitive 19) Common/Brokerages/InteractiveBrokersBrokerageModel.cs:164 β€” InteractiveBrokersBrokerageModel.CanSubmitOrder has cognitive 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, 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 Β· MappingContractFactorProvider.GetPriceFactor (cognitive 19) Β· Γ—1
  • MappingContractFactorProvider.GetPriceFactor (cognitive 19) Common/Data/Auxiliary/MappingContractFactorProvider.cs:39 β€” MappingContractFactorProvider.GetPriceFactor has cognitive complexity 19 (threshold 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 Β· OrderContingency.Join (cognitive 19) Β· Γ—1
  • OrderContingency.Join (cognitive 19) Common/Orders/OrderContingency.cs:409 β€” OrderContingency.Join has cognitive complexity 19 (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.
D2 Β· Cognitive Complexity Β· ParameterAttribute.ApplyAttributes (cognitive 19) Β· Γ—1
  • ParameterAttribute.ApplyAttributes (cognitive 19) Common/Parameters/ParameterAttribute.cs:58 β€” ParameterAttribute.ApplyAttributes has cognitive complexity 19 (threshold 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 Β· PandasData.AddMemberToSeries (cognitive 19) Β· Γ—1
  • PandasData.AddMemberToSeries (cognitive 19) Common/Python/PandasData.cs:220 β€” PandasData.AddMemberToSeries has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· BuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cognitive 19) Β· Γ—1
  • BuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower (cognitive 19) Common/Securities/BuyingPowerModel.cs:366 β€” BuyingPowerModel.GetMaximumOrderQuantityForTargetBuyingPower has cognitive complexity 19 (threshold 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 Β· LocalMarketHours.GetMarketClose (cognitive 19) Β· Γ—1
  • LocalMarketHours.GetMarketClose (cognitive 19) Common/Securities/LocalMarketHours.cs:203 β€” LocalMarketHours.GetMarketClose has cognitive complexity 19 (threshold 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 Β· SecurityCacheProvider.GetSecurityCache (cognitive 19) Β· Γ—1
  • SecurityCacheProvider.GetSecurityCache (cognitive 19) Common/Securities/SecurityCacheProvider.cs:58 β€” SecurityCacheProvider.GetSecurityCache has cognitive complexity 19 (threshold 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 Β· Brokerage.PerformCashSync (cognitive 19) Β· Γ—1
  • Brokerage.PerformCashSync (cognitive 19) Brokerages/Brokerage.cs:591 β€” Brokerage.PerformCashSync has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· DefaultConnectionHandler.Initialize (cognitive 19) Β· Γ—1
  • DefaultConnectionHandler.Initialize (cognitive 19) Brokerages/DefaultConnectionHandler.cs:82 β€” DefaultConnectionHandler.Initialize has cognitive complexity 19 (threshold 15). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 90). 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 Β· PairsAlphaModel.CorrelationPairsSelection (cognitive 19) Β· Γ—1
  • PairsAlphaModel.CorrelationPairsSelection (cognitive 19) Algorithm.CSharp/Alphas/GasAndCrudeOilEnergyCorrelationAlpha.cs:135 β€” PairsAlphaModel.CorrelationPairsSelection has cognitive complexity 19 (threshold 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 Β· SetHoldingsFutureRegressionAlgorithm.OnData (cognitive 19) Β· Γ—1
  • SetHoldingsFutureRegressionAlgorithm.OnData (cognitive 19) Algorithm.CSharp/SetHoldingsFutureRegressionAlgorithm.cs:55 β€” SetHoldingsFutureRegressionAlgorithm.OnData has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· ShortableProviderOrdersRejectedRegressionAlgorithm.OnData (cognitive 19) Β· Γ—1
  • ShortableProviderOrdersRejectedRegressionAlgorithm.OnData (cognitive 19) Algorithm.CSharp/ShortableProviderOrdersRejectedRegressionAlgorithm.cs:54 β€” ShortableProviderOrdersRejectedRegressionAlgorithm.OnData has cognitive complexity 19 (threshold 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 Β· CoarseUniverseGeneratorProgram.Run (cognitive 19) Β· Γ—1
  • CoarseUniverseGeneratorProgram.Run (cognitive 19) ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:110 β€” CoarseUniverseGeneratorProgram.Run has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 139, 188, 219). 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 Β· AccumulativeInsightPortfolioConstructionModel.DetermineTargetPercent (cognitive 19) Β· Γ—1
  • AccumulativeInsightPortfolioConstructionModel.DetermineTargetPercent (cognitive 19) Algorithm.Framework/Portfolio/AccumulativeInsightPortfolioConstructionModel.cs:165 β€” AccumulativeInsightPortfolioConstructionModel.DetermineTargetPercent has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· PortfolioLooper.ProcessOrders (cognitive 19) Β· Γ—1
  • PortfolioLooper.ProcessOrders (cognitive 19) Report/PortfolioLooper/PortfolioLooper.cs:337 β€” PortfolioLooper.ProcessOrders has cognitive complexity 19 (threshold 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 Β· AccumulativeInsightPortfolioConstructionModel.determine_target_percent (cognitive 19) Β· Γ—1
  • AccumulativeInsightPortfolioConstructionModel.determine_target_percent (cognitive 19) Algorithm.Framework/Portfolio/AccumulativeInsightPortfolioConstructionModel.py:44 β€” AccumulativeInsightPortfolioConstructionModel.determine_target_percent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (5 pts), boolean chains 1, loops 1 (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 Β· ComboOrderTicketDemoAlgorithm.on_data (cognitive 19) Β· Γ—1
  • ComboOrderTicketDemoAlgorithm.on_data (cognitive 19) Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:39 β€” ComboOrderTicketDemoAlgorithm.on_data has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (4 pts) (nesting depth added 12). 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 Β· ShortableProviderOrdersRejectedRegressionAlgorithm.on_data (cognitive 19) Β· Γ—1
  • ShortableProviderOrdersRejectedRegressionAlgorithm.on_data (cognitive 19) Algorithm.Python/ShortableProviderOrdersRejectedRegressionAlgorithm.py:41 β€” ShortableProviderOrdersRejectedRegressionAlgorithm.on_data has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 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 Β· ReportCharts.GetCumulativeReturns (cognitive 19) Β· Γ—1
  • ReportCharts.GetCumulativeReturns (cognitive 19) Report/ReportCharts.py:138 β€” ReportCharts.GetCumulativeReturns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (7 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 Β· InternalSubscriptionManager.AddedSubscriptionRequest (cognitive 18) Β· Γ—1
  • InternalSubscriptionManager.AddedSubscriptionRequest (cognitive 18) Engine/DataFeeds/InternalSubscriptionManager.cs:60 β€” InternalSubscriptionManager.AddedSubscriptionRequest has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· LiveTradingResultHandler.SampleRange (cognitive 18) Β· Γ—1
  • LiveTradingResultHandler.SampleRange (cognitive 18) Engine/Results/LiveTradingResultHandler.cs:734 β€” LiveTradingResultHandler.SampleRange has cognitive complexity 18 (threshold 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 Β· BrokerageTransactionHandler.HandleUpdateOrderRequest (cognitive 18) Β· Γ—1
  • BrokerageTransactionHandler.HandleUpdateOrderRequest (cognitive 18) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:1060 β€” BrokerageTransactionHandler.HandleUpdateOrderRequest has cognitive complexity 18 (threshold 15). 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 Β· QCAlgorithm.PostInitialize (cognitive 18) Β· Γ—1
  • QCAlgorithm.PostInitialize (cognitive 18) Algorithm/QCAlgorithm.cs:793 β€” QCAlgorithm.PostInitialize has cognitive complexity 18 (threshold 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 Β· QCAlgorithm.AddSecurity (cognitive 18) Β· Γ—1
  • QCAlgorithm.AddSecurity (cognitive 18) Algorithm/QCAlgorithm.cs:2031 β€” QCAlgorithm.AddSecurity has cognitive complexity 18 (threshold 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 Β· QCAlgorithm.InitializeInsights (cognitive 18) Β· Γ—1
  • QCAlgorithm.InitializeInsights (cognitive 18) Algorithm/QCAlgorithm.Framework.cs:437 β€” QCAlgorithm.InitializeInsights has cognitive complexity 18 (threshold 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 Β· LargeHistoryRequestDiagnostics.WarnOnLargeHistoryRequests (cognitive 18) Β· Γ—1
  • LargeHistoryRequestDiagnostics.WarnOnLargeHistoryRequests (cognitive 18) Algorithm/QCAlgorithm.History.cs:1605 β€” LargeHistoryRequestDiagnostics.WarnOnLargeHistoryRequests has cognitive complexity 18 (threshold 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 Β· QCAlgorithm.IndicatorHistory (cognitive 18) Β· Γ—1
  • QCAlgorithm.IndicatorHistory (cognitive 18) Algorithm/QCAlgorithm.Indicators.cs:4513 β€” QCAlgorithm.IndicatorHistory has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· Extensions.ConvertToSymbolEnumerable (cognitive 18) Β· Γ—1
  • Extensions.ConvertToSymbolEnumerable (cognitive 18) Common/Extensions.cs:3200 β€” Extensions.ConvertToSymbolEnumerable has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· BasePythonWrapper.GetPropertyName (cognitive 18) Β· Γ—1
  • BasePythonWrapper.GetPropertyName (cognitive 18) Common/Python/BasePythonWrapper.cs:250 β€” BasePythonWrapper.GetPropertyName has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· FuturesExpiryUtilityFunctions.NthBusinessDay (cognitive 18) Β· Γ—1
  • FuturesExpiryUtilityFunctions.NthBusinessDay (cognitive 18) Common/Securities/Future/FuturesExpiryUtilityFunctions.cs:149 β€” FuturesExpiryUtilityFunctions.NthBusinessDay has cognitive complexity 18 (threshold 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 Β· FuturesListings.MonthlyContractListings (cognitive 18) Β· Γ—1
  • FuturesListings.MonthlyContractListings (cognitive 18) Common/Securities/Future/FuturesListings.cs:160 β€” FuturesListings.MonthlyContractListings has cognitive complexity 18 (threshold 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 Β· PositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower (cognitive 18) Β· Γ—1
  • PositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower (cognitive 18) Common/Securities/Positions/PositionGroupBuyingPowerModel.cs:238 β€” PositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower has cognitive complexity 18 (threshold 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 Β· LeanData.GenerateZipEntryName (cognitive 18) Β· Γ—1
  • LeanData.GenerateZipEntryName (cognitive 18) Common/Util/LeanData.cs:669 β€” LeanData.GenerateZipEntryName has cognitive complexity 18 (threshold 15). 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 Β· MarketProfile.CalculateValueArea (cognitive 18) Β· Γ—1
  • MarketProfile.CalculateValueArea (cognitive 18) Indicators/MarketProfile.cs:268 β€” MarketProfile.CalculateValueArea has cognitive complexity 18 (threshold 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 Β· AddFutureOptionContractFromFutureChainRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • AddFutureOptionContractFromFutureChainRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/AddFutureOptionContractFromFutureChainRegressionAlgorithm.cs:43 β€” AddFutureOptionContractFromFutureChainRegressionAlgorithm.OnData has cognitive complexity 18 (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.
D2 Β· Cognitive Complexity Β· AddOptionContractTwiceRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • AddOptionContractTwiceRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/AddOptionContractTwiceRegressionAlgorithm.cs:53 β€” AddOptionContractTwiceRegressionAlgorithm.OnData has cognitive complexity 18 (threshold 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 Β· BasicTemplateEurexFuturesAlgorithm.OnOrderEvent (cognitive 18) Β· Γ—1
  • BasicTemplateEurexFuturesAlgorithm.OnOrderEvent (cognitive 18) Algorithm.CSharp/BasicTemplateEurexFuturesAlgorithm.cs:114 β€” BasicTemplateEurexFuturesAlgorithm.OnOrderEvent has cognitive complexity 18 (threshold 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 Β· BracketOrderLimitEntryRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • BracketOrderLimitEntryRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:53 β€” BracketOrderLimitEntryRegressionAlgorithm.OnData has cognitive complexity 18 (threshold 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 Β· BracketOrderRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • BracketOrderRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/BracketOrderRegressionAlgorithm.cs:50 β€” BracketOrderRegressionAlgorithm.OnData has cognitive 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, 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 Β· InsufficientBuyingPowerForAutomaticExerciseRegressionAlgorithm.OnOrderEvent (cognitive 18) Β· Γ—1
  • InsufficientBuyingPowerForAutomaticExerciseRegressionAlgorithm.OnOrderEvent (cognitive 18) Algorithm.CSharp/InsufficientBuyingPowerForAutomaticExerciseRegressionAlgorithm.cs:99 β€” InsufficientBuyingPowerForAutomaticExerciseRegressionAlgorithm.OnOrderEvent has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· SplitPartialShareRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • SplitPartialShareRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/SplitPartialShareRegressionAlgorithm.cs:42 β€” SplitPartialShareRegressionAlgorithm.OnData has cognitive complexity 18 (threshold 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 Β· WarmupLowerResolutionOptionRegressionAlgorithm.OnData (cognitive 18) Β· Γ—1
  • WarmupLowerResolutionOptionRegressionAlgorithm.OnData (cognitive 18) Algorithm.CSharp/WarmupLowerResolutionOptionRegressionAlgorithm.cs:51 β€” WarmupLowerResolutionOptionRegressionAlgorithm.OnData has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· AlgoSeekFuturesReader.Parse (cognitive 18) Β· Γ—1
  • AlgoSeekFuturesReader.Parse (cognitive 18) ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesReader.cs:140 β€” AlgoSeekFuturesReader.Parse has cognitive complexity 18 (threshold 15). 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 Β· EulerSearchOptimizationStrategy.PushNewResults (cognitive 18) Β· Γ—1
  • EulerSearchOptimizationStrategy.PushNewResults (cognitive 18) Optimizer/Strategies/EulerSearchOptimizationStrategy.cs:61 β€” EulerSearchOptimizationStrategy.PushNewResults has cognitive complexity 18 (threshold 15). 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 Β· ComboOrderTicketDemoAlgorithm.combo_leg_limit_orders (cognitive 18) Β· Γ—1
  • ComboOrderTicketDemoAlgorithm.combo_leg_limit_orders (cognitive 18) Algorithm.Python/ComboOrderTicketDemoAlgorithm.py:120 β€” ComboOrderTicketDemoAlgorithm.combo_leg_limit_orders has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 2 (6 pts), if/else 3 (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 Β· ContingentOrderUpdateRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • ContingentOrderUpdateRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/ContingentOrderUpdateRegressionAlgorithm.py:31 β€” ContingentOrderUpdateRegressionAlgorithm.on_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 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 Β· ContinuousFutureRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • ContinuousFutureRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/ContinuousFutureRegressionAlgorithm.py:36 β€” ContinuousFutureRegressionAlgorithm.on_data 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 Β· CustomDataUniverseRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • CustomDataUniverseRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/CustomDataUniverseRegressionAlgorithm.py:49 β€” CustomDataUniverseRegressionAlgorithm.on_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 1 (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 Β· ETFConstituentUniverseFilterFunctionRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • ETFConstituentUniverseFilterFunctionRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/ETFConstituentUniverseMappedCompositeRegressionAlgorithm.py:51 β€” ETFConstituentUniverseFilterFunctionRegressionAlgorithm.on_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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 Β· FutureOptionChainFiltersRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • FutureOptionChainFiltersRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/FutureOptionChainFiltersRegressionAlgorithm.py:58 β€” FutureOptionChainFiltersRegressionAlgorithm.on_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 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 Β· OneTriggersOtherOrderRegressionAlgorithm.on_data (cognitive 18) Β· Γ—1
  • OneTriggersOtherOrderRegressionAlgorithm.on_data (cognitive 18) Algorithm.Python/OneTriggersOtherOrderRegressionAlgorithm.py:34 β€” OneTriggersOtherOrderRegressionAlgorithm.on_data 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 Β· AlgorithmManager.ProcessSplitSymbols (cognitive 17) Β· Γ—1
  • AlgorithmManager.ProcessSplitSymbols (cognitive 17) Engine/AlgorithmManager.cs:920 β€” AlgorithmManager.ProcessSplitSymbols has cognitive 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· LiveTradingResultHandler.ProcessSynchronousEvents (cognitive 17) Β· Γ—1
  • LiveTradingResultHandler.ProcessSynchronousEvents (cognitive 17) Engine/Results/LiveTradingResultHandler.cs:1117 β€” LiveTradingResultHandler.ProcessSynchronousEvents has cognitive complexity 17 (threshold 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 Β· BrokerageTransactionHandler.ProcessSynchronousEvents (cognitive 17) Β· Γ—1
  • BrokerageTransactionHandler.ProcessSynchronousEvents (cognitive 17) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:729 β€” BrokerageTransactionHandler.ProcessSynchronousEvents has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· QCAlgorithm.ConvertMarketOrderIfRequired (cognitive 17) Β· Γ—1
  • QCAlgorithm.ConvertMarketOrderIfRequired (cognitive 17) Algorithm/QCAlgorithm.Trading.ContingentOrders.cs:305 β€” QCAlgorithm.ConvertMarketOrderIfRequired has cognitive complexity 17 (threshold 15). 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 Β· ConsolidatorWrapper.AdvanceScanTime (cognitive 17) Β· Γ—1
  • ConsolidatorWrapper.AdvanceScanTime (cognitive 17) Common/Data/ConsolidatorWrapper.cs:91 β€” ConsolidatorWrapper.AdvanceScanTime has cognitive complexity 17 (threshold 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 Β· DividendYieldProvider.GetDividendYieldImpl (cognitive 17) Β· Γ—1
  • DividendYieldProvider.GetDividendYieldImpl (cognitive 17) Common/Data/DividendYieldProvider.cs:193 β€” DividendYieldProvider.GetDividendYieldImpl has cognitive complexity 17 (threshold 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 Β· EquityFillModel.GetPrices (cognitive 17) Β· Γ—1
  • EquityFillModel.GetPrices (cognitive 17) Common/Orders/Fills/EquityFillModel.cs:1061 β€” EquityFillModel.GetPrices has cognitive complexity 17 (threshold 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 Β· FillModel.GetPrices (cognitive 17) Β· Γ—1
  • FillModel.GetPrices (cognitive 17) Common/Orders/Fills/FillModel.cs:1177 β€” FillModel.GetPrices has cognitive complexity 17 (threshold 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 Β· OrderContingency.GetUnits (cognitive 17) Β· Γ—1
  • OrderContingency.GetUnits (cognitive 17) Common/Orders/OrderContingency.cs:358 β€” OrderContingency.GetUnits has cognitive complexity 17 (threshold 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 Β· OrderJsonConverter.DeserializeContingency (cognitive 17) Β· Γ—1
  • OrderJsonConverter.DeserializeContingency (cognitive 17) Common/Orders/OrderJsonConverter.cs:396 β€” OrderJsonConverter.DeserializeContingency has cognitive complexity 17 (threshold 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 Β· PythonWrapper.ValidateImplementationOf (cognitive 17) Β· Γ—1
  • PythonWrapper.ValidateImplementationOf (cognitive 17) Common/Python/PythonWrapper.cs:35 β€” PythonWrapper.ValidateImplementationOf has cognitive complexity 17 (threshold 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 Β· StreamReaderExtensions.GetDecimal (cognitive 17) Β· Γ—1
  • StreamReaderExtensions.GetDecimal (cognitive 17) Common/Util/StreamReaderExtensions.cs:56 β€” StreamReaderExtensions.GetDecimal has cognitive complexity 17 (threshold 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. Note what this body is, though: it carries an aggressive-inlining request, so its author has asked in the source for this body to be inlined into every caller. Each part pulled out of it becomes a call the runtime has to decide to inline again, against a size budget β€” so the split can quietly turn one inlined body into several real calls, on the path the marker exists to protect. The measurement stands β€” a hot path is not a licence to be unreadable β€” but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D2 Β· Cognitive Complexity Β· Loader.TryCreateILAlgorithm (cognitive 17) Β· Γ—1
  • Loader.TryCreateILAlgorithm (cognitive 17) AlgorithmFactory/Loader.cs:207 β€” Loader.TryCreateILAlgorithm has cognitive complexity 17 (threshold 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 Β· AddOptionContractFromUniverseRegressionAlgorithm.OnData (cognitive 17) Β· Γ—1
  • AddOptionContractFromUniverseRegressionAlgorithm.OnData (cognitive 17) Algorithm.CSharp/AddOptionContractFromUniverseRegressionAlgorithm.cs:53 β€” AddOptionContractFromUniverseRegressionAlgorithm.OnData has cognitive complexity 17 (threshold 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 Β· AddRemoveOptionUniverseRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Β· Γ—1
  • AddRemoveOptionUniverseRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs:144 β€” AddRemoveOptionUniverseRegressionAlgorithm.OnSecuritiesChanged has cognitive complexity 17 (threshold 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 Β· AutomaticSeedBaseRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Β· Γ—1
  • AutomaticSeedBaseRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Algorithm.CSharp/AutomaticSeedBaseRegressionAlgorithm.cs:36 β€” AutomaticSeedBaseRegressionAlgorithm.OnSecuritiesChanged has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ContinuousFutureOpenPositionsLiquidationOnDelistingRegressionAlgorithm.OnData (cognitive 17) Β· Γ—1
  • ContinuousFutureOpenPositionsLiquidationOnDelistingRegressionAlgorithm.OnData (cognitive 17) Algorithm.CSharp/ContinuousFutureOpenPositionsLiquidationOnDelistingRegressionAlgorithm.cs:56 β€” ContinuousFutureOpenPositionsLiquidationOnDelistingRegressionAlgorithm.OnData has cognitive complexity 17 (threshold 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 Β· DelistedIndexOptionDivestedRegression.OnData (cognitive 17) Β· Γ—1
  • DelistedIndexOptionDivestedRegression.OnData (cognitive 17) Algorithm.CSharp/DelistedIndexOptionDivestedRegression.cs:45 β€” DelistedIndexOptionDivestedRegression.OnData has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· FutureChainInternalSubscriptionsRegressionAlgorithm.OnData (cognitive 17) Β· Γ—1
  • FutureChainInternalSubscriptionsRegressionAlgorithm.OnData (cognitive 17) Algorithm.CSharp/FutureChainInternalSubscriptionsRegressionAlgorithm.cs:47 β€” FutureChainInternalSubscriptionsRegressionAlgorithm.OnData has cognitive complexity 17 (threshold 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 Β· NonDynamicOptionsFilterRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Β· Γ—1
  • NonDynamicOptionsFilterRegressionAlgorithm.OnSecuritiesChanged (cognitive 17) Algorithm.CSharp/NonDynamicOptionsFilterRegressionAlgorithm.cs:52 β€” NonDynamicOptionsFilterRegressionAlgorithm.OnSecuritiesChanged has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.OnData (cognitive 17) Β· Γ—1
  • OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.OnData (cognitive 17) Algorithm.CSharp/OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.cs:40 β€” OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.OnData has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ETFConstituentUniverseMappedCompositeRegressionAlgorithm.OnData (cognitive 17) Β· Γ—1
  • ETFConstituentUniverseMappedCompositeRegressionAlgorithm.OnData (cognitive 17) Algorithm.CSharp/RegressionTests/Universes/ETFConstituentUniverseMappedCompositeRegressionAlgorithm.cs:75 β€” ETFConstituentUniverseMappedCompositeRegressionAlgorithm.OnData has cognitive complexity 17 (threshold 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 Β· SetAccountCurrencyCashBuyingPowerModelRegressionAlgorithm.OnOrderEvent (cognitive 17) Β· Γ—1
  • SetAccountCurrencyCashBuyingPowerModelRegressionAlgorithm.OnOrderEvent (cognitive 17) Algorithm.CSharp/SetAccountCurrencyCashBuyingPowerModelRegressionAlgorithm.cs:161 β€” SetAccountCurrencyCashBuyingPowerModelRegressionAlgorithm.OnOrderEvent has cognitive complexity 17 (threshold 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 Β· SetAccountCurrencySecurityMarginModelRegressionAlgorithm.OnOrderEvent (cognitive 17) Β· Γ—1
  • SetAccountCurrencySecurityMarginModelRegressionAlgorithm.OnOrderEvent (cognitive 17) Algorithm.CSharp/SetAccountCurrencySecurityMarginModelRegressionAlgorithm.cs:127 β€” SetAccountCurrencySecurityMarginModelRegressionAlgorithm.OnOrderEvent has cognitive complexity 17 (threshold 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 Β· Program.Main (cognitive 17) Β· Γ—1
  • Program.Main (cognitive 17) ToolBox/Program.cs:31 β€” Program.Main has cognitive complexity 17 (threshold 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 Β· QuantBook.PerformSelection (cognitive 17) Β· Γ—1
  • QuantBook.PerformSelection (cognitive 17) Research/QuantBook.cs:1124 β€” QuantBook.PerformSelection has cognitive complexity 17 (threshold 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 Β· RebalancingLeveragedETFAlphaModel.update (cognitive 17) Β· Γ—1
  • RebalancingLeveragedETFAlphaModel.update (cognitive 17) Algorithm.Python/Alphas/RebalancingLeveragedETFAlpha.py:72 β€” RebalancingLeveragedETFAlphaModel.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (4 pts), ternaries 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 Β· BasicTemplateEurexFuturesAlgorithm.on_order_event (cognitive 17) Β· Γ—1
  • BasicTemplateEurexFuturesAlgorithm.on_order_event (cognitive 17) Algorithm.Python/BasicTemplateEurexFuturesAlgorithm.py:87 β€” BasicTemplateEurexFuturesAlgorithm.on_order_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 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 Β· FuturesAndFutures_optionsExpiryTimeAndLiquidationRegressionAlgorithm.on_data (cognitive 17) Β· Γ—1
  • FuturesAndFutures_optionsExpiryTimeAndLiquidationRegressionAlgorithm.on_data (cognitive 17) Algorithm.Python/FuturesAndFuturesOptionsExpiryTimeAndLiquidationRegressionAlgorithm.py:52 β€” FuturesAndFutures_optionsExpiryTimeAndLiquidationRegressionAlgorithm.on_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, 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 Β· IronCondorStrategyAlgorithm.assert_strategy_position_group (cognitive 17) Β· Γ—1
  • IronCondorStrategyAlgorithm.assert_strategy_position_group (cognitive 17) Algorithm.Python/IronCondorStrategyAlgorithm.py:51 β€” IronCondorStrategyAlgorithm.assert_strategy_position_group 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 Β· AlgorithmManager.Stream (cognitive 16) Β· Γ—1
  • AlgorithmManager.Stream (cognitive 16) Engine/AlgorithmManager.cs:697 β€” AlgorithmManager.Stream has cognitive complexity 16 (threshold 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 Β· LiveOptionChainProvider.GetFutureOptionContractList (cognitive 16) Β· Γ—1
  • LiveOptionChainProvider.GetFutureOptionContractList (cognitive 16) Engine/DataFeeds/LiveOptionChainProvider.cs:137 β€” LiveOptionChainProvider.GetFutureOptionContractList has cognitive complexity 16 (threshold 15). 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, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 Β· Cognitive Complexity Β· PendingRemovalsManager.CheckPendingRemovals (cognitive 16) Β· Γ—1
  • PendingRemovalsManager.CheckPendingRemovals (cognitive 16) Engine/DataFeeds/PendingRemovalsManager.cs:179 β€” PendingRemovalsManager.CheckPendingRemovals has cognitive complexity 16 (threshold 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 Β· BrokerageTransactionHandler.UpdateOrder (cognitive 16) Β· Γ—1
  • BrokerageTransactionHandler.UpdateOrder (cognitive 16) Engine/TransactionHandlers/BrokerageTransactionHandler.cs:426 β€” BrokerageTransactionHandler.UpdateOrder has cognitive complexity 16 (threshold 15). 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 Β· QCAlgorithm.AddOptionContract (cognitive 16) Β· Γ—1
  • QCAlgorithm.AddOptionContract (cognitive 16) Algorithm/QCAlgorithm.cs:2533 β€” QCAlgorithm.AddOptionContract has cognitive complexity 16 (threshold 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 Β· QCAlgorithm.ProcessInsights (cognitive 16) Β· Γ—1
  • QCAlgorithm.ProcessInsights (cognitive 16) Algorithm/QCAlgorithm.Framework.cs:175 β€” QCAlgorithm.ProcessInsights has cognitive complexity 16 (threshold 15). 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 Β· AlpacaBrokerageModel.CanSubmitContingentOrder (cognitive 16) Β· Γ—1
  • AlpacaBrokerageModel.CanSubmitContingentOrder (cognitive 16) Common/Brokerages/AlpacaBrokerageModel.cs:90 β€” AlpacaBrokerageModel.CanSubmitContingentOrder has cognitive 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.
D2 Β· Cognitive Complexity Β· TradierBrokerageModel.CanSubmitOrder (cognitive 16) Β· Γ—1
  • TradierBrokerageModel.CanSubmitOrder (cognitive 16) Common/Brokerages/TradierBrokerageModel.cs:70 β€” TradierBrokerageModel.CanSubmitOrder has cognitive complexity 16 (threshold 15). 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 Β· TradingTechnologiesBrokerageModel.IsValidOrderPrices (cognitive 16) Β· Γ—1
  • TradingTechnologiesBrokerageModel.IsValidOrderPrices (cognitive 16) Common/Brokerages/TradingTechnologiesBrokerageModel.cs:187 β€” TradingTechnologiesBrokerageModel.IsValidOrderPrices has cognitive 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.
D2 Β· Cognitive Complexity Β· ContingentOrderExtensions.TryGetContingentOrders (cognitive 16) Β· Γ—1
  • ContingentOrderExtensions.TryGetContingentOrders (cognitive 16) Common/Orders/ContingentOrderExtensions.cs:116 β€” ContingentOrderExtensions.TryGetContingentOrders has cognitive complexity 16 (threshold 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 Β· InteractiveBrokersFeeModel.GetOrderFee (cognitive 16) Β· Γ—1
  • InteractiveBrokersFeeModel.GetOrderFee (cognitive 16) Common/Orders/Fees/InteractiveBrokersFeeModel.cs:77 β€” InteractiveBrokersFeeModel.GetOrderFee has cognitive complexity 16 (threshold 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 Β· EquityFillModel.LimitIfTouchedFill (cognitive 16) Β· Γ—1
  • EquityFillModel.LimitIfTouchedFill (cognitive 16) Common/Orders/Fills/EquityFillModel.cs:52 β€” EquityFillModel.LimitIfTouchedFill has cognitive complexity 16 (threshold 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 Β· PythonInitializer.ActivatePythonVirtualEnvironment (cognitive 16) Β· Γ—1
  • PythonInitializer.ActivatePythonVirtualEnvironment (cognitive 16) Common/Python/PythonInitializer.cs:193 β€” PythonInitializer.ActivatePythonVirtualEnvironment has cognitive complexity 16 (threshold 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 Β· DateRules.WeekIterator (cognitive 16) Β· Γ—1
  • DateRules.WeekIterator (cognitive 16) Common/Scheduling/DateRules.cs:682 β€” DateRules.WeekIterator has cognitive complexity 16 (threshold 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 Β· BaseOptionFilterUniverse.Strikes (cognitive 16) Β· Γ—1
  • BaseOptionFilterUniverse.Strikes (cognitive 16) Common/Securities/Option/OptionFilterUniverse.cs:206 β€” BaseOptionFilterUniverse.Strikes has cognitive 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: 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 Β· BaseOptionFilterUniverse.IronCondor (cognitive 16) Β· Γ—1
  • BaseOptionFilterUniverse.IronCondor (cognitive 16) Common/Securities/Option/OptionFilterUniverse.cs:850 β€” BaseOptionFilterUniverse.IronCondor has cognitive complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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 Β· OptionPositionCollection.OptionPositionCollection.ctor (cognitive 16) Β· Γ—1
  • OptionPositionCollection.OptionPositionCollection.ctor (cognitive 16) Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs:113 β€” OptionPositionCollection.OptionPositionCollection.ctor has cognitive complexity 16 (threshold 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 Β· SecurityExchangeHours.GetPreviousMarketOpen (cognitive 16) Β· Γ—1
  • SecurityExchangeHours.GetPreviousMarketOpen (cognitive 16) Common/Securities/SecurityExchangeHours.cs:269 β€” SecurityExchangeHours.GetPreviousMarketOpen has cognitive complexity 16 (threshold 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 Β· SecurityExchangeHours.GetNextMarketOpen (cognitive 16) Β· Γ—1
  • SecurityExchangeHours.GetNextMarketOpen (cognitive 16) Common/Securities/SecurityExchangeHours.cs:320 β€” SecurityExchangeHours.GetNextMarketOpen has cognitive complexity 16 (threshold 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 Β· Config.GetValue (cognitive 16) Β· Γ—1
  • Config.GetValue (cognitive 16) REDACTED:230 β€” Config.GetValue has cognitive complexity 16 (threshold 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 Β· BasicTemplateEurexFuturesAlgorithm.OnData (cognitive 16) Β· Γ—1
  • BasicTemplateEurexFuturesAlgorithm.OnData (cognitive 16) Algorithm.CSharp/BasicTemplateEurexFuturesAlgorithm.cs:66 β€” BasicTemplateEurexFuturesAlgorithm.OnData has cognitive complexity 16 (threshold 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 Β· ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.OnData (cognitive 16) Β· Γ—1
  • ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.OnData (cognitive 16) Algorithm.CSharp/ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.cs:62 β€” ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.OnData has cognitive complexity 16 (threshold 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 Β· ContinuousFutureImmediateUniverseSelectionRegressionAlgorithm.OnSecuritiesChanged (cognitive 16) Β· Γ—1
  • ContinuousFutureImmediateUniverseSelectionRegressionAlgorithm.OnSecuritiesChanged (cognitive 16) Algorithm.CSharp/ContinuousFutureImmediateUniverseSelectionRegressionAlgorithm.cs:116 β€” ContinuousFutureImmediateUniverseSelectionRegressionAlgorithm.OnSecuritiesChanged has cognitive complexity 16 (threshold 15). 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 Β· FuturesFrameworkRegressionAlgorithm.OnSecuritiesChanged (cognitive 16) Β· Γ—1
  • FuturesFrameworkRegressionAlgorithm.OnSecuritiesChanged (cognitive 16) Algorithm.CSharp/FuturesFrameworkRegressionAlgorithm.cs:86 β€” FuturesFrameworkRegressionAlgorithm.OnSecuritiesChanged has cognitive complexity 16 (threshold 15). 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 Β· OpeningBreakoutAlgorithm.OnData (cognitive 16) Β· Γ—1
  • OpeningBreakoutAlgorithm.OnData (cognitive 16) Algorithm.CSharp/OpeningBreakoutAlgorithm.cs:216 β€” OpeningBreakoutAlgorithm.OnData has cognitive complexity 16 (threshold 15). 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 Β· OptionEquityBearPutLadderRegressionAlgorithm.OnData (cognitive 16) Β· Γ—1
  • OptionEquityBearPutLadderRegressionAlgorithm.OnData (cognitive 16) Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:36 β€” OptionEquityBearPutLadderRegressionAlgorithm.OnData has cognitive complexity 16 (threshold 15). 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 Β· WarmupFutureRegressionAlgorithm.OnData (cognitive 16) Β· Γ—1
  • WarmupFutureRegressionAlgorithm.OnData (cognitive 16) Algorithm.CSharp/WarmupFutureRegressionAlgorithm.cs:56 β€” WarmupFutureRegressionAlgorithm.OnData has cognitive complexity 16 (threshold 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 Β· EmaCrossAlphaModel.Update (cognitive 16) Β· Γ—1
  • EmaCrossAlphaModel.Update (cognitive 16) Algorithm.Framework/Alphas/EmaCrossAlphaModel.cs:67 β€” EmaCrossAlphaModel.Update has cognitive complexity 16 (threshold 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 Β· BlackLittermanOptimizationPortfolioConstructionModel.DetermineTargetPercent (cognitive 16) Β· Γ—1
  • BlackLittermanOptimizationPortfolioConstructionModel.DetermineTargetPercent (cognitive 16) Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.cs:248 β€” BlackLittermanOptimizationPortfolioConstructionModel.DetermineTargetPercent has cognitive complexity 16 (threshold 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 Β· PortfolioLooper.FromOrders (cognitive 16) Β· Γ—1
  • PortfolioLooper.FromOrders (cognitive 16) Report/PortfolioLooper/PortfolioLooper.cs:252 β€” PortfolioLooper.FromOrders has cognitive complexity 16 (threshold 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 Β· OptimizationFailedBacktests.Build (cognitive 16) Β· Γ—1
  • OptimizationFailedBacktests.Build (cognitive 16) Optimizer/Analysis/OptimizationFailedBacktests.cs:31 β€” OptimizationFailedBacktests.Build has cognitive complexity 16 (threshold 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 Β· PearsonCorrelationPairsTradingAlphaModel.on_securities_changed (cognitive 16) Β· Γ—1
  • PearsonCorrelationPairsTradingAlphaModel.on_securities_changed (cognitive 16) Algorithm.Framework/Alphas/PearsonCorrelationPairsTradingAlphaModel.py:39 β€” PearsonCorrelationPairsTradingAlphaModel.on_securities_changed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (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 Β· FundamentalUniverseSelectionModel.create_universes (cognitive 16) Β· Γ—1
  • FundamentalUniverseSelectionModel.create_universes (cognitive 16) Algorithm.Framework/Selection/FundamentalUniverseSelectionModel.py:35 β€” FundamentalUniverseSelectionModel.create_universes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, 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 Β· BasicTemplateCryptoAlgorithm.on_data (cognitive 16) Β· Γ—1
  • BasicTemplateCryptoAlgorithm.on_data (cognitive 16) Algorithm.Python/BasicTemplateCryptoAlgorithm.py:63 β€” BasicTemplateCryptoAlgorithm.on_data has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 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 Β· BasicTemplateEurexFuturesAlgorithm.on_data (cognitive 16) Β· Γ—1
  • BasicTemplateEurexFuturesAlgorithm.on_data (cognitive 16) Algorithm.Python/BasicTemplateEurexFuturesAlgorithm.py:56 β€” BasicTemplateEurexFuturesAlgorithm.on_data 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 Β· ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.on_data (cognitive 16) Β· Γ—1
  • ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.on_data (cognitive 16) Algorithm.Python/ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.py:42 β€” ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.on_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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 Β· ConstituentWeightedRsiAlphaModel.update (cognitive 16) Β· Γ—1
  • ConstituentWeightedRsiAlphaModel.update (cognitive 16) Algorithm.Python/ETFConstituentUniverseRSIAlphaModelAlgorithm.py:59 β€” ConstituentWeightedRsiAlphaModel.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), loops 3, 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 Β· IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data (cognitive 16) Β· Γ—1
  • IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data (cognitive 16) Algorithm.Python/IndexOptionCallITMGreeksExpiryRegressionAlgorithm.py:44 β€” IndexOptionCallITMGreeksExpiryRegressionAlgorithm.on_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D4 Β· Code Duplication Β· Near-duplicate member family (4 members, 30 shared lines) Β· Γ—1
  • Near-duplicate member family (4 members, 30 shared lines) Indicators/CandlestickPatterns/Hammer.cs:83 β€” Indicators/CandlestickPatterns/Hammer.cs:83-140 | Indicators/CandlestickPatterns/HangingMan.cs:83-140 | Indicators/CandlestickPatterns/InvertedHammer.cs:80-129 | Indicators/CandlestickPatterns/ShootingStar.cs:81-130 β€” These 4 members are variants of one another: a block of 30 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 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.
D4 Β· Code Duplication Β· Near-duplicate member pair (35 shared lines) Β· Γ—1
  • Near-duplicate member pair (35 shared lines) Indicators/CandlestickPatterns/MatHold.cs:100 β€” Indicators/CandlestickPatterns/MatHold.cs:100-162 | Indicators/CandlestickPatterns/RiseFallThreeMethods.cs:82-146 β€” These two members are variants of one another: 35 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 (55 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (55 members, 50+ identical tokens) Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs:83 β€” Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs:83-93 | Common/Data/Fundamental/Generated/BankLoansCurrentBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/BankLoansNonCurrentBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/BasicAccountingChange.cs:83-93 | Common/Data/Fundamental/Generated/BasicEPSOtherGainsLosses.cs:83-93 | Common/Data/Fundamental/Generated/BasicExtraordinary.cs:99-109 | Common/Data/Fundamental/Generated/CashAndDueFromBanksBalanceSheet.cs:83-93 | Common/Data/Fundamental/Generated/CashReceiptsfromSecuritiesRelatedActivitiesCashFlowStatement.cs:91-101 | Common/Data/Fundamental/Generated/CashReceivedfromInsuranceActivitiesCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/ChangeInOtherWorkingCapitalCashFlowStatement.cs:99-109 | Common/Data/Fundamental/Generated/ChangeinAccruedIncomeCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/ChangeinInsuranceLiabilitiesNetofReinsuranceIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ChangeinInvestmentContractIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ChangeinReinsuranceReceivablesCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/ClaimsOutstandingBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/ConvertibleLoansCurrentBalanceSheet.cs:59-69 | Common/Data/Fundamental/Generated/ConvertibleLoansNonCurrentBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/DebtSecuritiesinIssueBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/DepositsReceivedunderCededInsuranceContractBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/DilutedAccountingChange.cs:83-93 | Common/Data/Fundamental/Generated/DilutedEPSOtherGainsLosses.cs:83-93 | Common/Data/Fundamental/Generated/DilutedExtraordinary.cs:99-109 | Common/Data/Fundamental/Generated/EquityInvestmentsBalanceSheet.cs:75-85 | Common/Data/Fundamental/Generated/EquitySharesInvestmentsBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesCurrentBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesNonCurrentBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/GainLossonDerecognitionofAvailableForSaleFinancialAssetsIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/GainLossonFinancialInstrumentsDesignatedasCashFlowHedgesIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ImpairmentLossReversalRecognizedinProfitorLossCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/ImpairmentLossesReversalsFinancialInstrumentsNetIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/LoansandAdvancestoCustomerBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/MinorityInterestCashFlowStatement.cs:59-69 | Common/Data/Fundamental/Generated/NegativeGoodwillImmediatelyRecognizedIncomeStatement.cs:75-85 | Common/Data/Fundamental/Generated/NetIncomeFromTaxLossCarryforwardIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/NetPolicyholderBenefitsAndClaimsIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/NetTradingIncomeIncomeStatement.cs:59-69 | Common/Data/Fundamental/Generated/NormalizedDilutedEPSGrowth.cs:83-93 | Common/Data/Fundamental/Generated/OtherOperatingIncomeTotalIncomeStatement.cs:91-101 | Common/Data/Fundamental/Generated/PreTreShaNumBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/ProfitOnDisposalsCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/PurchaseOfSubsidiariesCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/RegressionGrowthOperatingRevenue5Years.cs:59-69 | Common/Data/Fundamental/Generated/RegressionGrowthofDividends5Years.cs:59-69 | Common/Data/Fundamental/Generated/ReinsuranceRecoveriesClaimsandBenefitsIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ReinsuranceRecoveriesofInvestmentContractIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ReorganizationOtherCostsCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/RestructuringAndMergernAcquisitionIncomeStatement.cs:99-109 | Common/Data/Fundamental/Generated/SaleOfSubsidiariesCashFlowStatement.cs:67-77 | Common/Data/Fundamental/Generated/SecuritiesActivitiesIncomeStatement.cs:83-93 | Common/Data/Fundamental/Generated/ShareOfAssociatesCashFlowStatement.cs:83-93 | Common/Data/Fundamental/Generated/TaxAssetsTotalBalanceSheet.cs:67-77 | Common/Data/Fundamental/Generated/TaxLossCarryforwardBasicEPS.cs:83-93 | Common/Data/Fundamental/Generated/TaxLossCarryforwardDilutedEPS.cs:83-93 | Common/Data/Fundamental/Generated/TotalDebtInMaturityScheduleBalanceSheet.cs:67-77 β€” These 55 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 55 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 55 times.
D4 Β· Code Duplication Β· Members sharing a duplicated core (14 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (14 members, 50+ identical tokens) Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:67 β€” Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:67-74 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:66-73 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:62-69 | Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:62-69 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:62-69 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:63-70 | Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:54-61 | Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:67-74 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:49-55 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:67-74 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:55-62 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:51-58 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:55-62 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:51-58 β€” These 14 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 14 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 14 times.
D4 Β· Code Duplication Β· Members sharing a duplicated core (11 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) Report/ReportCharts.py:68 β€” Report/ReportCharts.py:68-136 | Report/ReportCharts.py:141-263 | Report/ReportCharts.py:268-346 | Report/ReportCharts.py:349-458 | Report/ReportCharts.py:462-529 | Report/ReportCharts.py:534-614 | Report/ReportCharts.py:660-746 | Report/ReportCharts.py:751-836 | Report/ReportCharts.py:840-904 | Report/ReportCharts.py:909-971 | Report/ReportCharts.py:976-1148 β€” These 11 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 11 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 11 times.
D4 Β· Code Duplication Β· Members sharing a duplicated core (10 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) Common/Brokerages/AxosClearingBrokerageModel.cs:103 β€” Common/Brokerages/AxosClearingBrokerageModel.cs:103-139 | Common/Brokerages/BitfinexBrokerageModel.cs:134-161 | Common/Brokerages/BloombergFixBrokerageModel.cs:65-86 | Common/Brokerages/CoinbaseBrokerageModel.cs:164-217 | Common/Brokerages/FxcmBrokerageModel.cs:78-136 | Common/Brokerages/KrakenBrokerageModel.cs:93-122 | Common/Brokerages/OandaBrokerageModel.cs:83-119 | Common/Brokerages/TerminalLinkBrokerageModel.cs:60-81 | Common/Brokerages/TradingTechnologiesBrokerageModel.cs:103-152 | Common/Brokerages/ZerodhaBrokerageModel.cs:100-138 β€” 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 Β· Duplicated block (466 lines × 2) Β· Γ—1
  • Duplicated block (466 lines × 2) Common/Securities/Future/Futures.cs:345 β€” Common/Securities/Future/Futures.cs:345-810 | Common/Securities/Future/Futures.cs:818-1283 β€” both copies are in the same file, so extract the 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, `Common/Securities/Future/Futures.cs:342` calls `Obsolete` and `Common/Securities/Future/Futures.cs:811` 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 (69 lines × 2) Β· Γ—1
  • Duplicated block (69 lines × 2) Common/Util/LeanData.cs:332 β€” Common/Util/LeanData.cs:332-400 | Common/Util/LeanData.cs:403-471 β€” both copies are in the same file, so extract the 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 (52 lines × 2) Β· Γ—1
  • Duplicated block (52 lines × 2) Common/Orders/Fills/EquityFillModel.cs:312 β€” Common/Orders/Fills/EquityFillModel.cs:312-363 | Common/Orders/Fills/FillModel.cs:514-565 β€” 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 `Common/Orders/Fills/EquityFillModel.cs:312` 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 (54 lines × 2) Β· Γ—1
  • Duplicated block (54 lines × 2) Indicators/CandlestickPatterns/Kicking.cs:76 β€” Indicators/CandlestickPatterns/Kicking.cs:76-129 | Indicators/CandlestickPatterns/KickingByLength.cs:77-130 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Kicking.cs` and `Indicators/CandlestickPatterns/KickingByLength.cs` as WHOLE FILES: 87% 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 2 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. 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 (44 lines × 2) Β· Γ—1
  • Duplicated block (44 lines × 2) Common/Orders/Fills/EquityFillModel.cs:821 β€” Common/Orders/Fills/EquityFillModel.cs:821-864 | Common/Orders/Fills/EquityFillModel.cs:930-973 β€” both copies are in the same file, so extract the 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 `Common/Orders/Fills/EquityFillModel.cs:821` 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 (39 lines × 2) Β· Γ—1
  • Duplicated block (39 lines × 2) Common/Orders/Fills/FillModel.cs:360 β€” Common/Orders/Fills/FillModel.cs:360-398 | Common/Orders/Fills/FutureFillModel.cs:130-168 β€” before extracting anything, compare `Common/Orders/Fills/FillModel.cs` and `Common/Orders/Fills/FutureFillModel.cs` as WHOLE FILES: this scan already matched 3 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. 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 `Common/Orders/Fills/FillModel.cs:360` 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 (34–39 lines × 2) Β· Γ—1
  • Duplicated block (34–39 lines × 2) Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:89 β€” Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:89-127 | Algorithm.CSharp/BybitCryptoFuturesRegressionAlgorithm.cs:87-120 β€” 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 `Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs: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.
D4 Β· Code Duplication Β· Duplicated block (38 lines × 2) Β· Γ—1
  • Duplicated block (38 lines × 2) Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:49 β€” Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:49-86 | Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs:49-86 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs` and `Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 (22–36 lines × 2) Β· Γ—1
  • Duplicated block (22–36 lines × 2) Algorithm.CSharp/OptionUniverseFilterOptionsDataLinqRegressionAlgorithm.cs:30 β€” Algorithm.CSharp/OptionUniverseFilterOptionsDataLinqRegressionAlgorithm.cs:30-65 | Algorithm.CSharp/OptionUniverseFilterOptionsDataRegressionAlgorithm.cs:43-64 β€” 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 `Algorithm.CSharp/OptionUniverseFilterOptionsDataLinqRegressionAlgorithm.cs: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. 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, `Algorithm.CSharp/OptionUniverseFilterOptionsDataRegressionAlgorithm.cs:42` calls `Contracts` and `Algorithm.CSharp/OptionUniverseFilterOptionsDataLinqRegressionAlgorithm.cs: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 (33–34 lines × 2) Β· Γ—1
  • Duplicated block (33–34 lines × 2) Algorithm/QCAlgorithm.Python.cs:759 β€” Algorithm/QCAlgorithm.Python.cs:759-792 | Algorithm/QCAlgorithm.Python.cs:831-863 β€” both copies are in the same file, so extract the 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 (31 lines × 2) Β· Γ—1
  • Duplicated block (31 lines × 2) Indicators/CandlestickPatterns/Hammer.cs:86 β€” Indicators/CandlestickPatterns/Hammer.cs:86-116 | Indicators/CandlestickPatterns/HangingMan.cs:86-116 β€” before extracting anything, compare `Indicators/CandlestickPatterns/Hammer.cs` and `Indicators/CandlestickPatterns/HangingMan.cs` as WHOLE FILES: this scan already matched 4 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 `Indicators/CandlestickPatterns/Hammer.cs:86` 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 (23–30 lines × 2) Β· Γ—1
  • Duplicated block (23–30 lines × 2) Common/Securities/Option/OptionFilterUniverse.cs:798 β€” Common/Securities/Option/OptionFilterUniverse.cs:798-820 | Common/Securities/Option/OptionFilterUniverse.cs:851-880 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionFilterUniverse.cs:798` it does not close everything it opens, so those 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 (23 lines × 3) Β· Γ—1
  • Duplicated block (23 lines × 3) Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:52 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:52-74 | Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs:54-76 | Algorithm.CSharp/OptionStrategyFilteringUniverseJellyRollRegressionAlgorithm.cs:52-74 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:52` 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 (25 lines × 3) Β· Γ—1
  • Duplicated block (25 lines × 3) Indicators/CandlestickPatterns/InNeck.cs:76 β€” Indicators/CandlestickPatterns/InNeck.cs:76-100 | Indicators/CandlestickPatterns/OnNeck.cs:76-100 | Indicators/CandlestickPatterns/Thrusting.cs:78-102 β€” 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 `Indicators/CandlestickPatterns/InNeck.cs:76` it does not close everything it opens, so those 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 (25–28 lines × 2) Β· Γ—1
  • Duplicated block (25–28 lines × 2) Algorithm.CSharp/CustomDataUniverseImmediateSelectionRegressionAlgorithm.cs:116 β€” Algorithm.CSharp/CustomDataUniverseImmediateSelectionRegressionAlgorithm.cs:116-143 | Algorithm.CSharp/DropboxBaseDataUniverseSelectionAlgorithm.cs:164-188 β€” 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. 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 (25 lines × 2) Β· Γ—1
  • Duplicated block (25 lines × 2) Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:38 β€” Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:38-62 | Algorithm.CSharp/OptionEquityShortJellyRollRegressionAlgorithm.cs:38-62 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortJellyRollRegressionAlgorithm.cs` as WHOLE FILES: 84% 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 2 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. 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 `Algorithm.CSharp/OptionEquityJellyRollRegressionAlgorithm.cs:38` it does not close everything it opens, so those 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) Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:106 β€” Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:106-131 | Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:98-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. Read the line range as the matched WINDOW rather than a finished unit: at `Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:106` 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–26 lines × 2) Β· Γ—1
  • Duplicated block (24–26 lines × 2) Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:247 β€” Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:247-272 | Algorithm.Framework/Portfolio/RiskParityPortfolioConstructionModel.cs:189-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 `Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:247` it does not close everything it opens, so those 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–25 lines × 2) Β· Γ—1
  • Duplicated block (15–25 lines × 2) Report/ReportElements/AnnualReturnsReportElement.cs:50 β€” Report/ReportElements/AnnualReturnsReportElement.cs:50-74 | Report/ReportElements/CumulativeReturnsReportElement.cs:60-74 β€” 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 `Report/ReportElements/AnnualReturnsReportElement.cs:50` it does not close everything it opens, so those 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 (19–24 lines × 8) Β· Γ—1
  • Duplicated block (19–24 lines × 8) Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:50 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs:50-73 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallCalendarSpreadRegressionAlgorithm.cs:49-67 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallLadderRegressionAlgorithm.cs:50-73 | Algorithm.CSharp/OptionStrategyFilteringUniverseCallSpreadRegressionAlgorithm.cs:49-67 | Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs:50-73 | Algorithm.CSharp/OptionStrategyFilteringUniversePutCalendarSpreadRegressionAlgorithm.cs:49-67 | Algorithm.CSharp/OptionStrategyFilteringUniversePutLadderRegressionAlgorithm.cs:50-73 | Algorithm.CSharp/OptionStrategyFilteringUniversePutSpreadRegressionAlgorithm.cs:49-67 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseCallButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniversePutButterflyRegressionAlgorithm.cs` as WHOLE FILES: 83% 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 2 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. 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 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 (22–24 lines × 2) Β· Γ—1
  • Duplicated block (22–24 lines × 2) Common/Brokerages/TradingTechnologiesBrokerageModel.cs:115 β€” Common/Brokerages/TradingTechnologiesBrokerageModel.cs:115-136 | Common/Brokerages/ZerodhaBrokerageModel.cs:112-135 β€” 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 `Common/Brokerages/TradingTechnologiesBrokerageModel.cs:115` 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 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 (21–23 lines × 2) Β· Γ—1
  • Duplicated block (21–23 lines × 2) Algorithm.CSharp/OptionEquityBearPutSpreadRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/OptionEquityBearPutSpreadRegressionAlgorithm.cs:36-58 | Algorithm.CSharp/OptionEquityBullPutSpreadRegressionAlgorithm.cs:36-56 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearPutSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullPutSpreadRegressionAlgorithm.cs` as WHOLE FILES: 87% 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. 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 `Algorithm.CSharp/OptionEquityBearPutSpreadRegressionAlgorithm.cs:36` it does not close everything it opens, so those 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–22 lines × 5) Β· Γ—1
  • Duplicated block (12–22 lines × 5) REDACTED:126 β€” REDACTED:126-147 | Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:82-93 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:173-184 | REDACTED:173-194 | REDACTED:138-149 β€” before extracting anything, compare `REDACTED` and `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 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 (19 lines × 5) Β· Γ—1
  • Duplicated block (19 lines × 5) REDACTED:195 β€” REDACTED:195-213 | Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs:148-166 | Algorithm.CSharp/CustomDataPropertiesRegressionAlgorithm.cs:238-256 | REDACTED:242-260 | REDACTED:204-222 β€” before extracting anything, compare `REDACTED` and `Algorithm.CSharp/CustomDataBitcoinAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 `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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:216` calls `AddDays` and `REDACTED:225` 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 (19–21 lines × 3) Β· Γ—1
  • Duplicated block (19–21 lines × 3) Common/Orders/Fills/EquityFillModel.cs:1083 β€” Common/Orders/Fills/EquityFillModel.cs:1083-1101 | Common/Orders/Fills/FillModel.cs:1197-1215 | Common/Orders/Fills/LatestPriceFillModel.cs:58-78 β€” 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. 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, `Common/Orders/Fills/EquityFillModel.cs:1101` calls `Contains` and `Common/Orders/Fills/LatestPriceFillModel.cs:78` 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–21 lines × 2) Β· Γ—1
  • Duplicated block (16–21 lines × 2) Common/Securities/Option/OptionFilterUniverse.cs:465 β€” Common/Securities/Option/OptionFilterUniverse.cs:465-480 | Common/Securities/Option/OptionFilterUniverse.cs:751-771 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionFilterUniverse.cs:465` it does not close everything it opens, so those 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 (20–21 lines × 2) Β· Γ—1
  • Duplicated block (20–21 lines × 2) Algorithm.CSharp/AddAlphaModelAlgorithm.cs:41 β€” Algorithm.CSharp/AddAlphaModelAlgorithm.cs:41-60 | Algorithm.CSharp/InsightTagAlphaRegressionAlgorithm.cs:39-59 β€” before extracting anything, compare `Algorithm.CSharp/AddAlphaModelAlgorithm.cs` and `Algorithm.CSharp/InsightTagAlphaRegressionAlgorithm.cs` as WHOLE FILES: 86% 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. 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 (16–20 lines × 2) Β· Γ—1
  • Duplicated block (16–20 lines × 2) Algorithm/Selection/CustomUniverse.cs:52 β€” Algorithm/Selection/CustomUniverse.cs:52-67 | Algorithm/Selection/ManualUniverse.cs:64-83 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (15–20 lines × 2) Β· Γ—1
  • Duplicated block (15–20 lines × 2) Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:51 β€” Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:51-70 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:28-42 β€” before extracting anything, compare `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs` and `Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs: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–20 lines × 2) Β· Γ—1
  • Duplicated block (19–20 lines × 2) Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.cs:278 β€” Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.cs:278-296 | Algorithm.Framework/Portfolio/MeanVarianceOptimizationPortfolioConstructionModel.cs:269-288 β€” 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 `Algorithm.Framework/Portfolio/BlackLittermanOptimizationPortfolioConstructionModel.cs: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.
D4 Β· Code Duplication Β· Duplicated block (16–19 lines × 4) Β· Γ—1
  • Duplicated block (16–19 lines × 4) Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72 β€” Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72-90 | Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:92-108 | Algorithm.CSharp/FutureSharingTickerRegressionAlgorithm.cs:51-66 | Algorithm.CSharp/FuturesMomentumAlgorithm.cs:70-86 β€” 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 `Algorithm.CSharp/BasicTemplateFuturesDailyAlgorithm.cs:72` it does not close everything it opens, so those 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–19 lines × 2) Β· Γ—1
  • Duplicated block (14–19 lines × 2) Common/Orders/Fills/EquityFillModel.cs:624 β€” Common/Orders/Fills/EquityFillModel.cs:624-637 | Common/Orders/Fills/FillModel.cs:828-846 β€” 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 `Common/Orders/Fills/EquityFillModel.cs:624` it does not close everything it opens, so those 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 (16–19 lines × 2) Β· Γ—1
  • Duplicated block (16–19 lines × 2) Algorithm.CSharp/CustomDataUniverseRegressionAlgorithm.cs:49 β€” Algorithm.CSharp/CustomDataUniverseRegressionAlgorithm.cs:49-64 | Algorithm.CSharp/CustomDataUniverseScheduledRegressionAlgorithm.cs:47-65 β€” 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 `Algorithm.CSharp/CustomDataUniverseRegressionAlgorithm.cs:49` 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 lines × 3) Β· Γ—1
  • Duplicated block (18 lines × 3) Indicators/CandlestickPatterns/BeltHold.cs:73 β€” Indicators/CandlestickPatterns/BeltHold.cs:73-92 | Indicators/CandlestickPatterns/ClosingMarubozu.cs:73-92 | Indicators/CandlestickPatterns/Marubozu.cs:73-90 β€” before extracting anything, compare `Indicators/CandlestickPatterns/BeltHold.cs` and `Indicators/CandlestickPatterns/ClosingMarubozu.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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 `Indicators/CandlestickPatterns/BeltHold.cs:73` it does not close everything it opens, so those 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 (14–18 lines × 2) Β· Γ—1
  • Duplicated block (14–18 lines × 2) Algorithm.CSharp/AddUniverseSelectionModelAlgorithm.cs:36 β€” Algorithm.CSharp/AddUniverseSelectionModelAlgorithm.cs:36-49 | Algorithm.CSharp/AddUniverseSelectionModelCoarseAlgorithm.cs:36-53 β€” 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 `Algorithm.CSharp/AddUniverseSelectionModelAlgorithm.cs:36` it does not close everything it opens, so those 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 × 2) Β· Γ—1
  • Duplicated block (15–18 lines × 2) Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs:43 β€” Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs:43-60 | Algorithm.CSharp/OptionEquityBullCallSpreadRegressionAlgorithm.cs:43-57 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullCallSpreadRegressionAlgorithm.cs` as WHOLE FILES: 85% 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 2 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. 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 `Algorithm.CSharp/OptionEquityBearCallSpreadRegressionAlgorithm.cs: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 (13–17 lines × 10) Β· Γ—1
  • Duplicated block (13–17 lines × 10) Common/Brokerages/AxosClearingBrokerageModel.cs:112 β€” Common/Brokerages/AxosClearingBrokerageModel.cs:112-127 | Common/Brokerages/BitfinexBrokerageModel.cs:146-159 | Common/Brokerages/BloombergFixBrokerageModel.cs:71-83 | Common/Brokerages/CoinbaseBrokerageModel.cs:187-199 | Common/Brokerages/FxcmBrokerageModel.cs:87-102 | Common/Brokerages/KrakenBrokerageModel.cs:105-119 | Common/Brokerages/OandaBrokerageModel.cs:92-107 | Common/Brokerages/TerminalLinkBrokerageModel.cs:66-78 | Common/Brokerages/TradingTechnologiesBrokerageModel.cs:112-127 | Common/Brokerages/ZerodhaBrokerageModel.cs:109-125 β€” before extracting anything, compare `Common/Brokerages/FxcmBrokerageModel.cs` and `Common/Brokerages/OandaBrokerageModel.cs` as WHOLE FILES: 88% 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 2 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. 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. 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 (14–17 lines × 2) Β· Γ—1
  • Duplicated block (14–17 lines × 2) Algorithm.CSharp/PortfolioRebalanceOnCustomFuncRegressionAlgorithm.cs:42 β€” Algorithm.CSharp/PortfolioRebalanceOnCustomFuncRegressionAlgorithm.cs:42-58 | Algorithm.CSharp/PortfolioRebalanceOnDateRulesRegressionAlgorithm.cs:46-59 β€” 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 `Algorithm.CSharp/PortfolioRebalanceOnCustomFuncRegressionAlgorithm.cs:42` it does not close everything it opens, so those 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–16 lines × 3) Β· Γ—1
  • Duplicated block (15–16 lines × 3) Common/Util/LeanData.cs:178 β€” Common/Util/LeanData.cs:178-192 | Common/Util/LeanData.cs:373-388 | Common/Util/LeanData.cs:444-459 β€” 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 `Common/Util/LeanData.cs:178` it does not close everything it opens, so those 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 (16 lines × 3) Β· Γ—1
  • Duplicated block (16 lines × 3) Indicators/CandlestickPatterns/InNeck.cs:104 β€” Indicators/CandlestickPatterns/InNeck.cs:104-119 | Indicators/CandlestickPatterns/OnNeck.cs:104-119 | Indicators/CandlestickPatterns/Thrusting.cs:107-122 β€” 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 `Indicators/CandlestickPatterns/InNeck.cs:104` 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.
D4 Β· Code Duplication Β· Duplicated block (13–15 lines × 6) Β· Γ—1
  • Duplicated block (13–15 lines × 6) Common/Brokerages/CharlesSchwabBrokerageModel.cs:98 β€” Common/Brokerages/CharlesSchwabBrokerageModel.cs:98-110 | Common/Brokerages/EzeBrokerageModel.cs:97-111 | Common/Brokerages/PublicBrokerageModel.cs:90-102 | Common/Brokerages/TDAmeritradeBrokerageModel.cs:73-87 | Common/Brokerages/TastytradeBrokerageModel.cs:98-110 | Common/Brokerages/TradeStationBrokerageModel.cs:140-152 β€” before extracting anything, compare `Common/Brokerages/CharlesSchwabBrokerageModel.cs` and `Common/Brokerages/PublicBrokerageModel.cs` as WHOLE FILES: this scan already matched 3 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. 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 × 4) Β· Γ—1
  • Duplicated block (12 lines × 4) Common/Data/Market/QuoteBar.cs:319 β€” Common/Data/Market/QuoteBar.cs:319-330 | Common/Data/Market/QuoteBar.cs:368-379 | Common/Data/Market/TradeBar.cs:230-241 | Common/Data/Market/TradeBar.cs:294-305 β€” 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 `Common/Data/Market/QuoteBar.cs: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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Common/Data/Market/TradeBar.cs:228` calls `ParseIndex` and `Common/Data/Market/QuoteBar.cs:317` 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 (9–15 lines × 2) Β· Γ—1
  • Duplicated block (9–15 lines × 2) Algorithm.CSharp/OptionChainSubscriptionRemovalRegressionAlgorithm.cs:74 β€” Algorithm.CSharp/OptionChainSubscriptionRemovalRegressionAlgorithm.cs:74-88 | Algorithm.CSharp/OptionChainUniverseRemovalRegressionAlgorithm.cs:184-192 β€” 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. 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 (14–15 lines × 2) Β· Γ—1
  • Duplicated block (14–15 lines × 2) Algorithm.CSharp/SecurityInitializationOnReAdditionForEquityRegressionAlgorithm.cs:48 β€” Algorithm.CSharp/SecurityInitializationOnReAdditionForEquityRegressionAlgorithm.cs:48-61 | Algorithm.CSharp/SecurityInitializationOnReAdditionForUniverseSelectionRegressionAlgorithm.cs:48-62 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 9) Β· Γ—1
  • Duplicated block (12 lines × 9) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:45 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:45-56 | Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:51-62 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:46-57 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:50-61 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:46-57 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:47-58 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:46-57 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:47-58 | Algorithm.CSharp/OptionOTMExpiryOrderHasZeroPriceRegressionAlgorithm.cs:52-63 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:45` it does not close everything it opens, so those 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 × 5) Β· Γ—1
  • Duplicated block (13–14 lines × 5) Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:43 β€” Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs:43-56 | Algorithm.CSharp/OptionEquityPutButterflyRegressionAlgorithm.cs:43-56 | Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs:43-55 | Algorithm.CSharp/OptionEquityShortButterflyPutRegressionAlgorithm.cs:43-55 | Algorithm.CSharp/OptionEquityStrategyMatcherRegressionAlgorithm.cs:48-61 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortButterflyCallRegressionAlgorithm.cs` as WHOLE FILES: 84% 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 2 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. 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 `Algorithm.CSharp/OptionEquityCallButterflyRegressionAlgorithm.cs: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. 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–14 lines × 3) Β· Γ—1
  • Duplicated block (8–14 lines × 3) Common/Orders/Fills/EquityFillModel.cs:483 β€” Common/Orders/Fills/EquityFillModel.cs:483-496 | Common/Orders/Fills/EquityFillModel.cs:624-631 | Common/Orders/Fills/FillModel.cs:828-840 β€” 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 `Common/Orders/Fills/EquityFillModel.cs:483` it does not close everything it opens, so those 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `order` to `MarketOnOpenOrder` in one and `MarketOnCloseOrder` 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 (11–14 lines × 3) Β· Γ—1
  • Duplicated block (11–14 lines × 3) Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:52 β€” Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:52-65 | Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:70-80 | Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs:62-72 β€” before extracting anything, compare `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs` and `Algorithm.CSharp/IsMarketOpenCheckWithExtendedMarketHoursAlgorithm.cs` as WHOLE FILES: this scan already matched 4 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. 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 `Algorithm.CSharp/IsMarketOpenCheckAlgorithm.cs:70` 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 (12–14 lines × 2) Β· Γ—1
  • Duplicated block (12–14 lines × 2) Common/Util/LeanData.cs:97 β€” Common/Util/LeanData.cs:97-108 | Common/Util/LeanData.cs:260-273 β€” both copies are in the same file, so extract the 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 `Common/Util/LeanData.cs:97` 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–13 lines × 5) Β· Γ—1
  • Duplicated block (12–13 lines × 5) Common/Brokerages/CharlesSchwabBrokerageModel.cs:96 β€” Common/Brokerages/CharlesSchwabBrokerageModel.cs:96-108 | Common/Brokerages/PublicBrokerageModel.cs:88-99 | Common/Brokerages/RBIBrokerageModel.cs:70-81 | Common/Brokerages/TDAmeritradeBrokerageModel.cs:71-83 | Common/Brokerages/TastytradeBrokerageModel.cs:96-108 β€” before extracting anything, compare `Common/Brokerages/CharlesSchwabBrokerageModel.cs` and `Common/Brokerages/PublicBrokerageModel.cs` as WHOLE FILES: this scan already matched 3 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 `Common/Brokerages/CharlesSchwabBrokerageModel.cs: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. 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–12 lines × 7) Β· Γ—1
  • Duplicated block (11–12 lines × 7) Common/Brokerages/CharlesSchwabBrokerageModel.cs:98 β€” Common/Brokerages/CharlesSchwabBrokerageModel.cs:98-108 | Common/Brokerages/EzeBrokerageModel.cs:97-108 | Common/Brokerages/PublicBrokerageModel.cs:90-100 | Common/Brokerages/RBIBrokerageModel.cs:71-82 | Common/Brokerages/TDAmeritradeBrokerageModel.cs:73-84 | Common/Brokerages/TastytradeBrokerageModel.cs:98-108 | Common/Brokerages/TradeStationBrokerageModel.cs:140-150 β€” before extracting anything, compare `Common/Brokerages/CharlesSchwabBrokerageModel.cs` and `Common/Brokerages/PublicBrokerageModel.cs` as WHOLE FILES: this scan already matched 3 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 `Common/Brokerages/CharlesSchwabBrokerageModel.cs:98` it does not close everything it opens, so those 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 × 6) Β· Γ—1
  • Duplicated block (12 lines × 6) Common/Util/LeanData.cs:165 β€” Common/Util/LeanData.cs:165-176 | Common/Util/LeanData.cs:181-192 | Common/Util/LeanData.cs:353-365 | Common/Util/LeanData.cs:376-388 | Common/Util/LeanData.cs:424-436 | Common/Util/LeanData.cs:447-459 β€” 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 `Common/Util/LeanData.cs:165` 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 (9 lines × 6) Β· Γ—1
  • Duplicated block (9 lines × 6) Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs:37-45 | Algorithm.CSharp/OptionEquityIronButterflyRegressionAlgorithm.cs:37-45 | Algorithm.CSharp/OptionEquityIronCondorRegressionAlgorithm.cs:37-45 | Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs:37-45 | Algorithm.CSharp/OptionEquityShortIronButterflyRegressionAlgorithm.cs:37-45 | Algorithm.CSharp/OptionEquityShortIronCondorRegressionAlgorithm.cs:37-45 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityShortBoxSpreadRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 `Algorithm.CSharp/OptionEquityBoxSpreadRegressionAlgorithm.cs: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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 5) Β· Γ—1
  • Duplicated block (9 lines × 5) Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:38 β€” Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:38-46 | Algorithm.CSharp/OptionEquityProtectiveCollarRegressionAlgorithm.cs:39-47 | Algorithm.CSharp/OptionEquityReverseConversionRegressionAlgorithm.cs:38-46 | Algorithm.CSharp/OptionEquityStraddleRegressionAlgorithm.cs:38-46 | Algorithm.CSharp/OptionEquityStrangleRegressionAlgorithm.cs:38-46 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityProtectiveCollarRegressionAlgorithm.cs` as WHOLE FILES: 89% 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. 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 `Algorithm.CSharp/OptionEquityConversionRegressionAlgorithm.cs:38` it does not close everything it opens, so those 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–12 lines × 4) Β· Γ—1
  • Duplicated block (7–12 lines × 4) Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:70 β€” Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:70-76 | Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:112-123 | Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:70-76 | Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:104-110 β€” 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 `Algorithm.CSharp/OptionRenameDailyRegressionAlgorithm.cs:70` it does not close everything it opens, so those 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, `Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:101` calls `Liquidate` and `Algorithm.CSharp/OptionRenameRegressionAlgorithm.cs:69` 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 (10–12 lines × 3) Β· Γ—1
  • Duplicated block (10–12 lines × 3) Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:110 β€” Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:110-121 | Algorithm.CSharp/BasicTemplateOptionStrategyAlgorithm.cs:68-77 | Algorithm.CSharp/BasicTemplateOptionTradesAlgorithm.cs:61-71 β€” 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 `Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:110` it does not close everything it opens, so those 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 × 3) Β· Γ—1
  • Duplicated block (11–12 lines × 3) Algorithm.CSharp/ComboOrderAlgorithm.cs:52 β€” Algorithm.CSharp/ComboOrderAlgorithm.cs:52-63 | Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs:41-52 | Algorithm.CSharp/ContingentComboOrderRegressionAlgorithm.cs:45-55 β€” before extracting anything, compare `Algorithm.CSharp/ComboOrderAlgorithm.cs` and `Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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 (11–12 lines × 2) Β· Γ—1
  • Duplicated block (11–12 lines × 2) Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs:35 β€” Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs:35-46 | Algorithm.CSharp/SingleOptionPositionGroupBuyingPowerModelRegressionAlgorithm.cs:37-47 β€” 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 `Algorithm.CSharp/OptionShortCallMarginCallEventsAlgorithm.cs: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. 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 lines × 55) Β· Γ—1
  • Duplicated block (10 lines × 55) Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs:84 β€” Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs:84-93 | Common/Data/Fundamental/Generated/BankLoansCurrentBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/BankLoansNonCurrentBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/BasicAccountingChange.cs:84-93 | Common/Data/Fundamental/Generated/BasicEPSOtherGainsLosses.cs:84-93 | Common/Data/Fundamental/Generated/BasicExtraordinary.cs:100-109 | Common/Data/Fundamental/Generated/CashAndDueFromBanksBalanceSheet.cs:84-93 | Common/Data/Fundamental/Generated/CashReceiptsfromSecuritiesRelatedActivitiesCashFlowStatement.cs:92-101 | Common/Data/Fundamental/Generated/CashReceivedfromInsuranceActivitiesCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/ChangeInOtherWorkingCapitalCashFlowStatement.cs:100-109 | Common/Data/Fundamental/Generated/ChangeinAccruedIncomeCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/ChangeinInsuranceLiabilitiesNetofReinsuranceIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ChangeinInvestmentContractIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ChangeinReinsuranceReceivablesCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/ClaimsOutstandingBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/ConvertibleLoansCurrentBalanceSheet.cs:60-69 | Common/Data/Fundamental/Generated/ConvertibleLoansNonCurrentBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/DebtSecuritiesinIssueBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/DepositsReceivedunderCededInsuranceContractBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/DilutedAccountingChange.cs:84-93 | Common/Data/Fundamental/Generated/DilutedEPSOtherGainsLosses.cs:84-93 | Common/Data/Fundamental/Generated/DilutedExtraordinary.cs:100-109 | Common/Data/Fundamental/Generated/EquityInvestmentsBalanceSheet.cs:76-85 | Common/Data/Fundamental/Generated/EquitySharesInvestmentsBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesCurrentBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/FinanceLeaseReceivablesNonCurrentBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/GainLossonDerecognitionofAvailableForSaleFinancialAssetsIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/GainLossonFinancialInstrumentsDesignatedasCashFlowHedgesIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ImpairmentLossReversalRecognizedinProfitorLossCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/ImpairmentLossesReversalsFinancialInstrumentsNetIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/LoansandAdvancestoCustomerBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/MinorityInterestCashFlowStatement.cs:60-69 | Common/Data/Fundamental/Generated/NegativeGoodwillImmediatelyRecognizedIncomeStatement.cs:76-85 | Common/Data/Fundamental/Generated/NetIncomeFromTaxLossCarryforwardIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/NetPolicyholderBenefitsAndClaimsIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/NetTradingIncomeIncomeStatement.cs:60-69 | Common/Data/Fundamental/Generated/NormalizedDilutedEPSGrowth.cs:84-93 | Common/Data/Fundamental/Generated/OtherOperatingIncomeTotalIncomeStatement.cs:92-101 | Common/Data/Fundamental/Generated/PreTreShaNumBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/ProfitOnDisposalsCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/PurchaseOfSubsidiariesCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/RegressionGrowthOperatingRevenue5Years.cs:60-69 | Common/Data/Fundamental/Generated/RegressionGrowthofDividends5Years.cs:60-69 | Common/Data/Fundamental/Generated/ReinsuranceRecoveriesClaimsandBenefitsIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ReinsuranceRecoveriesofInvestmentContractIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ReorganizationOtherCostsCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/RestructuringAndMergernAcquisitionIncomeStatement.cs:100-109 | Common/Data/Fundamental/Generated/SaleOfSubsidiariesCashFlowStatement.cs:68-77 | Common/Data/Fundamental/Generated/SecuritiesActivitiesIncomeStatement.cs:84-93 | Common/Data/Fundamental/Generated/ShareOfAssociatesCashFlowStatement.cs:84-93 | Common/Data/Fundamental/Generated/TaxAssetsTotalBalanceSheet.cs:68-77 | Common/Data/Fundamental/Generated/TaxLossCarryforwardBasicEPS.cs:84-93 | Common/Data/Fundamental/Generated/TaxLossCarryforwardDilutedEPS.cs:84-93 | Common/Data/Fundamental/Generated/TotalDebtInMaturityScheduleBalanceSheet.cs:68-77 β€” before extracting anything, compare `Common/Data/Fundamental/Generated/AvailableForSaleSecuritiesBalanceSheet.cs` and `Common/Data/Fundamental/Generated/BankLoansCurrentBalanceSheet.cs` as WHOLE FILES: 82% 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. 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 (11 lines × 7) Β· Γ—1
  • Duplicated block (11 lines × 7) Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:55 β€” Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:55-65 | Algorithm.CSharp/OptionStrategyFilteringUniverseConversionRegressionAlgorithm.cs:48-59 | Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs:57-67 | Algorithm.CSharp/OptionStrategyFilteringUniverseJellyRollRegressionAlgorithm.cs:55-65 | Algorithm.CSharp/OptionStrategyFilteringUniverseProtectiveCollarRegressionAlgorithm.cs:49-60 | Algorithm.CSharp/OptionStrategyFilteringUniverseStraddleRegressionAlgorithm.cs:48-59 | Algorithm.CSharp/OptionStrategyFilteringUniverseStrangleRegressionAlgorithm.cs:49-60 β€” before extracting anything, compare `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionStrategyFilteringUniverseIronCondorRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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 `Algorithm.CSharp/OptionStrategyFilteringUniverseBoxSpreadRegressionAlgorithm.cs:55` 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 (6–11 lines × 4) Β· Γ—1
  • Duplicated block (6–11 lines × 4) Report/ReportElements/CumulativeReturnsReportElement.cs:133 β€” Report/ReportElements/CumulativeReturnsReportElement.cs:133-143 | Report/ReportElements/LeverageUtilizationReportElement.cs:72-78 | Report/ReportElements/RollingPortfolioBetaReportElement.cs:79-84 | Report/ReportElements/RollingSharpeReportElement.cs:73-83 β€” before extracting anything, compare `Report/ReportElements/LeverageUtilizationReportElement.cs` and `Report/ReportElements/RollingSharpeReportElement.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (10–11 lines × 2) Β· Γ—1
  • Duplicated block (10–11 lines × 2) Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:511 β€” Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:511-521 | Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:529-538 β€” both copies are in the same file, so extract the 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 `Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs:511` 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 lines × 8) Β· Γ—1
  • Duplicated block (10 lines × 8) Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:43 β€” Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:43-52 | Algorithm.CSharp/OptionEquityBearPutLadderRegressionAlgorithm.cs:44-53 | Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs:44-53 | Algorithm.CSharp/OptionEquityBullPutLadderRegressionAlgorithm.cs:43-52 | Algorithm.CSharp/OptionEquityCallBackspreadRegressionAlgorithm.cs:44-53 | Algorithm.CSharp/OptionEquityPutBackspreadRegressionAlgorithm.cs:44-53 | Algorithm.CSharp/OptionEquityShortCallBackspreadRegressionAlgorithm.cs:45-54 | Algorithm.CSharp/OptionEquityShortPutBackspreadRegressionAlgorithm.cs:45-54 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs: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. 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–10 lines × 3) Β· Γ—1
  • Duplicated block (7–10 lines × 3) Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:67 β€” Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs:67-76 | Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs:67-76 | Algorithm.CSharp/LongAndShortButterflyCallStrategiesAlgorithm.cs:51-57 β€” before extracting anything, compare `Algorithm.CSharp/IndexOptionCallButterflyAlgorithm.cs` and `Algorithm.CSharp/IndexOptionPutButterflyAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 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 lines × 7) Β· Γ—1
  • Duplicated block (9 lines × 7) Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:36 β€” Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:36-46 | Algorithm.CSharp/AddRiskManagementAlgorithm.cs:36-44 | Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:40-55 | Algorithm.CSharp/CompositeRiskManagementModelFrameworkAlgorithm.cs:32-42 | Algorithm.CSharp/ConfidenceWeightedFrameworkAlgorithm.cs:36-50 | Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs:39-47 | Algorithm.CSharp/InsightWeightingFrameworkAlgorithm.cs:36-50 β€” before extracting anything, compare `Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs` and `Algorithm.CSharp/ExecutionModelOrderEventsRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `Algorithm.CSharp/AccumulativeInsightPortfolioRegressionAlgorithm.cs:36` it does not close everything it opens, so those 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 lines × 5) Β· Γ—1
  • Duplicated block (8 lines × 5) Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:37 β€” Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs:37-44 | Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs:38-45 | Algorithm.CSharp/OptionEquityCallBackspreadRegressionAlgorithm.cs:38-45 | Algorithm.CSharp/OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.cs:42-49 | Algorithm.CSharp/OptionEquityShortCallBackspreadRegressionAlgorithm.cs:39-46 β€” before extracting anything, compare `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs` and `Algorithm.CSharp/OptionEquityBullCallLadderRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `Algorithm.CSharp/OptionEquityBearCallLadderRegressionAlgorithm.cs: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.
D4 Β· Code Duplication Β· Duplicated block (6–8 lines × 2) Β· Γ—1
  • Duplicated block (6–8 lines × 2) DownloaderDataProvider/Program.cs:223 β€” DownloaderDataProvider/Program.cs:223-228 | ToolBox/Program.cs:49-56 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 882) Β· Γ—1
  • Duplicated block (10 lines × 882) Common/Data/Fundamental/Generated/AVG5YrsROIC.cs:69 β€” Common/Data/Fundamental/Generated/AVG5YrsROIC.cs:69-78 | Common/Data/Fundamental/Generated/AccountsPayableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/AccountsReceivableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/AccruedInterestReceivableBalanceSheet.cs:95-104 | Common/Data/Fundamental/Generated/AccruedInvestmentIncomeBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/AccruedLiabilitiesTotalBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/AccruedandDeferredIncomeBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AccruedandDeferredIncomeCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AccruedandDeferredIncomeNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AccumulatedDepreciationBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/AccumulatedDepreciationValueBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AdditionalPaidInCapitalBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/AdjustedBasicNetAssetValue.cs:93-102 | Common/Data/Fundamental/Generated/AdjustedBasicNetAssetValuePerShare.cs:93-102 | Common/Data/Fundamental/Generated/AdjustedDilutedNetAssetValue.cs:93-102 | Common/Data/Fundamental/Generated/AdjustedDilutedNetAssetValuePerShare.cs:93-102 | Common/Data/Fundamental/Generated/AdvanceFromFederalHomeLoanBanksBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/AdvancesfromCentralBanksBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AllTaxesPaidCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/AllowanceForDoubtfulAccountsReceivableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AllowanceForLoansAndLeaseLossesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/AllowanceForNotesReceivableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AmortizationCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationOfFinancingCostsAndDiscountsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationOfIntangiblesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationOfIntangiblesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationOfSecuritiesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/AmortizationSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/AssetDisposalsAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/AssetDisposalsSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/AssetImpairmentChargeCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/AssetsHeldForSaleBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AssetsHeldForSaleCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AssetsHeldForSaleNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AssetsOfDiscontinuedOperationsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/AssetsTurnover.cs:85-94 | Common/Data/Fundamental/Generated/AverageDilutionEarningsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/BankIndebtednessBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/BankLoansTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/BankOwnedLifeInsuranceBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/BasicAverageShares.cs:99-108 | Common/Data/Fundamental/Generated/BasicContinuousOperations.cs:99-108 | Common/Data/Fundamental/Generated/BasicDiscontinuousOperations.cs:99-108 | Common/Data/Fundamental/Generated/BasicEPS.cs:99-108 | Common/Data/Fundamental/Generated/BeginningCashPositionCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/BiologicalAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/BookValuePerShareGrowth.cs:87-96 | Common/Data/Fundamental/Generated/BookValueToEBITDARatio.cs:69-78 | Common/Data/Fundamental/Generated/BookValueToEBITRatio.cs:69-78 | Common/Data/Fundamental/Generated/BookValueToNetIncomeRatio.cs:69-78 | Common/Data/Fundamental/Generated/BookValueToRevenueRatio.cs:69-78 | Common/Data/Fundamental/Generated/BuildingsAndImprovementsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CFOGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CapExGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CapExReportedCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CapExSalesRatio.cs:69-78 | Common/Data/Fundamental/Generated/CapitalExpenditureAnnual5YrGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CapitalExpenditureCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CapitalExpenditurePerShare.cs:87-96 | Common/Data/Fundamental/Generated/CapitalExpendituretoEBITDA.cs:69-78 | Common/Data/Fundamental/Generated/CapitalLeaseObligationsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CapitalStockBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CashAdvancesandLoansMadetoOtherPartiesCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/CashAndCashEquivalentsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CashBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CashCashEquivalentsAndFederalFundsSoldBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/CashCashEquivalentsAndMarketableSecuritiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CashConversionCycle.cs:85-94 | Common/Data/Fundamental/Generated/CashDividendsAndInterestPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashDividendsForMinoritiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashDividendsPaidCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CashEquivalentsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/CashFlowFromContinuingFinancingActivitiesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashFlowFromContinuingInvestingActivitiesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashFlowFromContinuingOperatingActivitiesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashFlowFromDiscontinuedOperationCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashFlowFromOperatingActivitiesPerFullTimeEmployee.cs:69-78 | Common/Data/Fundamental/Generated/CashFlowFromOperationsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashFlowFromOperationsGrowth.cs:69-78 | Common/Data/Fundamental/Generated/CashFlowPerShareGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CashFlowToDebtRatio.cs:69-78 | Common/Data/Fundamental/Generated/CashFlowfromFinancingGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CashFlowfromInvestingGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CashFlowsfromusedinOperatingActivitiesDirectCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashFromDiscontinuedFinancingActivitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashFromDiscontinuedInvestingActivitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashFromDiscontinuedOperatingActivitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashGeneratedfromOperatingActivitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashPaidforInsuranceActivitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashPaidtoReinsurersCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashPaymentsforDepositsbyBanksandCustomersCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashPaymentsforLoansCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashRatio.cs:75-84 | Common/Data/Fundamental/Generated/CashRatioGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CashReceiptsfromDepositsbyBanksandCustomersCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashReceiptsfromFeesandCommissionsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashReceiptsfromLoansCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/CashReceiptsfromRepaymentofAdvancesandLoansMadetoOtherPartiesCashFlowStatement.cs:75-84 | Common/Data/Fundamental/Generated/CashReceiptsfromTaxRefundsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CashRestrictedOrPledgedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CashTurnoverRatio.cs:69-78 | Common/Data/Fundamental/Generated/CashtoTotalAssets.cs:75-84 | Common/Data/Fundamental/Generated/CededPremiumsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInAccountPayableCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInAccruedExpenseCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInAccruedInvestmentIncomeCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInDeferredAcquisitionCostsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInDeferredChargesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInDividendPayableCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInFederalFundsAndSecuritiesSoldForRepurchaseCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInFundsWithheldCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInIncomeTaxPayableCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInInterestPayableCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInInventoryCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInLoansCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInLossAndLossAdjustmentExpenseReservesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInOtherCurrentAssetsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInOtherCurrentLiabilitiesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInOtherOperatingCapitalCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInPayableCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInPayablesAndAccruedExpenseCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInPrepaidAssetsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInReceivablesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInReinsuranceRecoverableOnPaidAndUnpaidLossesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInRestrictedCashCashFlowStatement.cs:75-84 | Common/Data/Fundamental/Generated/ChangeInTaxPayableCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeInTradingAccountSecuritiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInUnearnedPremiumsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeInWorkingCapitalCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangeinAdvancesfromCentralBanksCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinCashSupplementalAsReportedCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinDeferredAcquisitionCostsNetCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinDepositsbyBanksandCustomersCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/ChangeinFinancialAssetsCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/ChangeinFinancialLiabilitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinInsuranceContractAssetsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinInsuranceContractLiabilitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinInsuranceFundsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinInvestmentContractLiabilitiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinTheGrossProvisionforUnearnedPremiumsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangeinTheGrossProvisionforUnearnedPremiumsReinsurersShareIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ChangesInAccountReceivablesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ChangesInCashCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ClaimsPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ClaimsandChangeinInsuranceLiabilitiesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ClaimsandPaidIncurredIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ClassesofCashPaymentsCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/ClassesofCashReceiptsfromOperatingActivitiesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/ComTreShaNumBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CommercialLoanBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/CommercialPaperBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CommissionExpensesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/CommissionPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/CommonEquityTier1Capital.cs:93-102 | Common/Data/Fundamental/Generated/CommonEquityTier1CapitalRatio.cs:93-102 | Common/Data/Fundamental/Generated/CommonEquityToAssets.cs:105-114 | Common/Data/Fundamental/Generated/CommonStockBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CommonStockDividendPaidCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CommonStockEquityBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CommonStockIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CommonStockPaymentsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/CommonUtilityPlantBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/ConstructionInProgressBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/ConsumerLoanBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/ContinuingAndDiscontinuedBasicEPS.cs:99-108 | Common/Data/Fundamental/Generated/ContinuingAndDiscontinuedDilutedEPS.cs:99-108 | Common/Data/Fundamental/Generated/ConvertibleLoansTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CostOfRevenueIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/CreditCardIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/CreditLossesProvisionIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/CreditRiskProvisionsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/CurrentAccruedExpensesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentCapitalLeaseObligationBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDebtAndCapitalLeaseObligationBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDebtBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDeferredAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDeferredLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDeferredRevenueBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDeferredTaxesAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentDeferredTaxesLiabilitiesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/CurrentLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentNotesPayableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/CurrentOtherFinancialLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CurrentPortionOfLongTermDebtAndCapitalLeaseBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CurrentProvisionsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/CurrentRatio.cs:105-114 | Common/Data/Fundamental/Generated/CurrentRatioGrowth.cs:81-90 | Common/Data/Fundamental/Generated/CustomerAcceptancesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/CustomerAccountsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DDACostofRevenueIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DPSGrowth.cs:87-96 | Common/Data/Fundamental/Generated/DaysInInventory.cs:85-94 | Common/Data/Fundamental/Generated/DaysInPayment.cs:85-94 | Common/Data/Fundamental/Generated/DaysInSales.cs:85-94 | Common/Data/Fundamental/Generated/DebtDueBeyondBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebtDueInYear1BalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebtDueInYear2BalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebtDueInYear5BalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebtRestructuringAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DebtRestructuringSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DebtSecuritiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebtTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DebttoAssets.cs:105-114 | Common/Data/Fundamental/Generated/DecreaseInInterestBearingDepositsInBankCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/DeferredAssetsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/DeferredCostsBalanceSheet.cs:103-112 | Common/Data/Fundamental/Generated/DeferredIncomeTaxCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/DeferredIncomeTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DeferredPolicyAcquisitionCostsBalanceSheet.cs:87-96 | Common/Data/Fundamental/Generated/DeferredTaxAssetsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/DeferredTaxCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/DeferredTaxLiabilitiesTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DefinedPensionBenefitBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/DegreeOfOperatingLeverage.cs:69-78 | Common/Data/Fundamental/Generated/DepletionCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/DepletionIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DepositCertificatesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DepositsMadeunderAssumedReinsuranceContractBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DepositsbyBankBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DepreciationAmortizationAndDepletionCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/DepreciationAmortizationDepletionCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/DepreciationAmortizationDepletionIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/DepreciationAndAmortizationCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/DepreciationAndAmortizationIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/DepreciationCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/DepreciationIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/DepreciationSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DerivativeAssetsBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/DerivativeProductLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/DerivativesUnrealizedGainsLossesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DilutedAverageShares.cs:99-108 | Common/Data/Fundamental/Generated/DilutedContEPSGrowth.cs:87-96 | Common/Data/Fundamental/Generated/DilutedContinuousOperations.cs:99-108 | Common/Data/Fundamental/Generated/DilutedDiscontinuousOperations.cs:99-108 | Common/Data/Fundamental/Generated/DilutedEPS.cs:99-108 | Common/Data/Fundamental/Generated/DilutedEPSGrowth.cs:87-96 | Common/Data/Fundamental/Generated/DilutedNIAvailtoComStockholdersIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DiscontinuedOperationsAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DiscontinuedOperationsSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DisposalOfBusinessesAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DisposalofBusinessesSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/DividendCoverageRatio.cs:93-102 | Common/Data/Fundamental/Generated/DividendIncomeIncomeStatement.cs:101-110 | Common/Data/Fundamental/Generated/DividendPaidCFOCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/DividendPerShare.cs:103-112 | Common/Data/Fundamental/Generated/DividendReceivedCFOCashFlowStatement.cs:75-84 | Common/Data/Fundamental/Generated/DividendsPaidDirectCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/DividendsPayableBalanceSheet.cs:99-108 | Common/Data/Fundamental/Generated/DividendsReceivedCFICashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/DividendsReceivedDirectCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/DueFromRelatedPartiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DuefromRelatedPartiesCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DuefromRelatedPartiesNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DuetoRelatedPartiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DuetoRelatedPartiesCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/DuetoRelatedPartiesNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/EBITAIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/EBITAMargin.cs:87-96 | Common/Data/Fundamental/Generated/EBITDAGrowth.cs:81-90 | Common/Data/Fundamental/Generated/EBITDAIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/EBITDAInterestCoverage.cs:69-78 | Common/Data/Fundamental/Generated/EBITDAMargin.cs:99-108 | Common/Data/Fundamental/Generated/EBITDANetCapitalExpenditureToInterestExpensesRatio.cs:69-78 | Common/Data/Fundamental/Generated/EBITDAPerShare.cs:87-96 | Common/Data/Fundamental/Generated/EBITDARIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/EBITDARMargin.cs:87-96 | Common/Data/Fundamental/Generated/EBITDARPerShare.cs:87-96 | Common/Data/Fundamental/Generated/EBITGrowth.cs:69-78 | Common/Data/Fundamental/Generated/EBITIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/EBITMargin.cs:99-108 | Common/Data/Fundamental/Generated/EBITPerShare.cs:87-96 | Common/Data/Fundamental/Generated/EarningsFromEquityInterestIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/EarningsLossesFromEquityInvestmentsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/EarningsPerShareGrowth.cs:93-102 | Common/Data/Fundamental/Generated/EarningsfromEquityInterestNetOfTaxIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/EffectOfExchangeRateChangesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/EffectiveTaxRateAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ElectricUtilityPlantBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/EmployeeBenefitsBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/EndCashPositionCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/EquipmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/EquityAttributableToOwnersOfParentBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/EquityMultiplierRatio.cs:75-84 | Common/Data/Fundamental/Generated/EquityPerShareGrowth.cs:89-98 | Common/Data/Fundamental/Generated/EquityTurnoverRatio.cs:69-78 | Common/Data/Fundamental/Generated/ExcessCashMargin.cs:87-96 | Common/Data/Fundamental/Generated/ExcessTaxBenefitFromStockBasedCompensationCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/ExciseTaxesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ExpenseRatio.cs:75-84 | Common/Data/Fundamental/Generated/ExplorationDevelopmentAndMineralPropertyLeaseExpensesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FCFGrowth.cs:81-90 | Common/Data/Fundamental/Generated/FCFNetIncomeRatio.cs:69-78 | Common/Data/Fundamental/Generated/FCFPerShareGrowth.cs:81-90 | Common/Data/Fundamental/Generated/FCFSalesRatio.cs:69-78 | Common/Data/Fundamental/Generated/FCFtoCFO.cs:69-78 | Common/Data/Fundamental/Generated/FederalFundsPurchasedAndSecuritiesSoldUnderAgreementToRepurchaseBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/FederalFundsPurchasedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FederalFundsSoldAndSecuritiesPurchaseUnderAgreementsToResellBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/FederalFundsSoldBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/FederalHomeLoanBankStockBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/FeeRevenueAndOtherIncomeIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FeesAndCommissionsIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/FeesandCommissionExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FeesandCommissionIncomeIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FinancialAssetsBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/FinancialAssetsDesignatedasFairValueThroughProfitorLossTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancialAssetsUnrealizedGainsLossesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FinancialInstrumentsAndInvestmentsGainsLossesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FinancialInstrumentsSoldUnderAgreementsToRepurchaseBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/FinancialLeverage.cs:109-118 | Common/Data/Fundamental/Generated/FinancialLiabilitiesCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancialLiabilitiesDesignatedasFairValueThroughProfitorLossTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancialLiabilitiesMeasuredatAmortizedCostTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancialLiabilitiesNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancialOrDerivativeInvestmentCurrentLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FinancingCashFlowCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/FinishedGoodsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/FixAssetsTuronver.cs:85-94 | Common/Data/Fundamental/Generated/FixedAssetsRevaluationReserveBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FixedMaturityInvestmentsBalanceSheet.cs:87-96 | Common/Data/Fundamental/Generated/FlightFleetVehicleAndRelatedEquipmentsBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/ForeclosedAssetsBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/ForeignCurrencyExchangeUnrealizedGainsLossesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ForeignCurrencyTranslationAdjustmentsBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/ForeignExchangeTradingGainsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FreeCashFlowCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/FreeCashFlowInterestCoverage.cs:69-78 | Common/Data/Fundamental/Generated/FreeCashFlowToAssetsRatio.cs:69-78 | Common/Data/Fundamental/Generated/FreeCashFlowToDebtRatio.cs:69-78 | Common/Data/Fundamental/Generated/FreeCashFlowToEquityHoldersCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/FreeCashFlowToEquityRatio.cs:69-78 | Common/Data/Fundamental/Generated/FuelAndPurchasePowerIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/FuelIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/FundFromOperationCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/FurnitureFixturesAndOfficeEquipmentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/FuturePolicyBenefitsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/GainLossOnDisposalsNonCashAdjustmentCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/GainLossOnExtinguishmentofDebtSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GainLossOnInvestmentSecuritiesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainLossOnSaleOfBusinessCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainLossOnSaleOfPPECashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainLossonSaleofAssetsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainOnSaleOfBusinessIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainOnSaleOfPPEIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/GainOnSaleOfSecurityIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/GainonInvestmentPropertiesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GainonSaleofInvestmentPropertyIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GainonSaleofLoansIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/GainsLossesNotAffectingRetainedEarningsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/GainsLossesonFinancialInstrumentsDuetoFairValueAdjustmentsinHedgeAccountingTotalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GeneralAndAdministrativeExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/GeneralPartnershipCapitalBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/GoodwillAndOtherIntangibleAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/GoodwillBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/GoodwillImpairmentWriteOffAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GoodwillImpairmentWriteOffSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GrossAccountsReceivableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/GrossDividendPaymentIncomeStatement.cs:81-90 | Common/Data/Fundamental/Generated/GrossGoodwillAndOtherIntangibleAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/GrossLoanBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/GrossMargin.cs:99-108 | Common/Data/Fundamental/Generated/GrossMargin5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/GrossNotesReceivableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/GrossPPEBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/GrossPremiumsWrittenIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/GrossProfitAnnual5YrGrowth.cs:81-90 | Common/Data/Fundamental/Generated/GrossProfitIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/HedgingAssetsCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/HeldToMaturitySecuritiesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/ImpairmentOfCapitalAssetsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/ImpairmentWriteOffWriteDownofCapitalAssetsSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ImpairmentWriteOffWriteDownofOtherAssetsSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncomeAfterTaxesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncomeLossBeforeNonCashAdjustmentCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncomeTaxPaidSupplementalDataCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/IncomeTaxPayableBalanceSheet.cs:95-104 | Common/Data/Fundamental/Generated/IncomefromAssociatesandOtherParticipatingInterestsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncreaseDecreaseInDepositCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncreaseDecreaseInLeaseFinancingCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncreaseDecreaseInNetUnearnedPremiumReservesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncreaseInInterestBearingDepositsInBankCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IncreaseInLeaseFinancingCashFlowStatement.cs:75-84 | Common/Data/Fundamental/Generated/InsuranceAndClaimsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InsuranceContractAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InsuranceContractLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InsuranceFundsNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InterestAsAPercentOfInvestedCapitalRatio.cs:69-78 | Common/Data/Fundamental/Generated/InterestBearingBorrowingsNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InterestBearingDepositsAssetsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/InterestBearingDepositsLiabilitiesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/InterestCoverage.cs:109-118 | Common/Data/Fundamental/Generated/InterestCreditedOnPolicyholderDepositsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestExpenseForDepositIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/InterestExpenseForFederalFundsSoldAndSecuritiesPurchaseUnderAgreementsToResellIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestExpenseForLongTermDebtAndCapitalSecuritiesIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/InterestExpenseForShortTermDebtIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestExpenseNonOperatingIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestIncomeAfterProvisionForLoanLossIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestIncomeFromDepositsIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/InterestIncomeFromFederalFundsSoldAndSecuritiesPurchaseUnderAgreementsToResellIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestIncomeFromLeasesIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/InterestIncomeFromLoansAndLeaseIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/InterestIncomeFromLoansIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/InterestIncomeFromSecuritiesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestIncomeNonOperatingIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestPaidCFFCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestPaidCFOCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestPaidDirectCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestPaidSupplementalDataCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/InterestPayableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/InterestRateIncomeStatement.cs:69-78 | Common/Data/Fundamental/Generated/InterestReceivedCFICashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestReceivedCFOCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestReceivedDirectCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InterestandCommissionPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/InventoriesAdjustmentsAllowancesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/InventoryBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/InventoryTurnover.cs:85-94 | Common/Data/Fundamental/Generated/InvestedCapitalBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/InvestingCashFlowCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/InvestmentBankingProfitIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InvestmentContractLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InvestmentContractLiabilitiesIncurredIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/InvestmentPropertiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InvestmentinFinancialAssetsBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/InvestmentsAndAdvancesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/InvestmentsInOtherVenturesUnderEquityMethodBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InvestmentsinAssociatesatCostBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InvestmentsinJointVenturesatCostBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/InvestmentsinSubsidiariesatCostBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/IrregularIncomeExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/IrregularIncomeLossNonCashAdjustmentCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssuanceOfCapitalStockCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/IssuanceOfCommonStockCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssuanceOfDebtCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/IssuanceOfLeaseFinancingCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssuanceOfLongTermDebtCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssuanceOfPreferredStockCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssuanceOfShortTermDebtCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/IssueExpensesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/ItemsinTheCourseofTransmissiontoOtherBanksBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LandAndImprovementsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/LeasedPropertyPlantAndEquipmentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LeasesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/LiabilitiesHeldforSaleCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LiabilitiesHeldforSaleNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LiabilitiesHeldforSaleTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LiabilitiesOfDiscontinuedOperationsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LimitedPartnershipCapitalBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/LineOfCreditBalanceSheet.cs:91-100 | Common/Data/Fundamental/Generated/LiquidityCoverageRatio.cs:93-102 | Common/Data/Fundamental/Generated/LitigationIncomeExpenseAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/LitigationIncomeExpenseSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/LoansHeldForSaleBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/LoansReceivableBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/LoansandAdvancestoBankBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/LongTermCapitalLeaseObligationBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/LongTermDebtAndCapitalLeaseObligationBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/LongTermDebtBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/LongTermDebtEquityRatio.cs:105-114 | Common/Data/Fundamental/Generated/LongTermDebtIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/LongTermDebtPaymentsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/LongTermDebtToAssetsRatio.cs:75-84 | Common/Data/Fundamental/Generated/LongTermDebtTotalCapitalRatio.cs:105-114 | Common/Data/Fundamental/Generated/LongTermInvestmentsBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/LongTermProvisionsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/LossAdjustmentExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/LossRatio.cs:75-84 | Common/Data/Fundamental/Generated/LossonExtinguishmentofDebtIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/MachineryFurnitureEquipmentBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/MaintenanceAndRepairsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/MaterialsAndSuppliesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/MergerAndAcquisitionIncomeExpenseAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/MergerAndAcquisitionIncomeExpenseSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/MineralPropertiesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/MinimumPensionLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/MinorityInterestBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/MinorityInterestsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/MoneyMarketInvestmentsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/MortgageAndConsumerloansBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/MortgageLoanBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NaturalGasFuelAndOtherBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NetBusinessPurchaseAndSaleCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetCashFromDiscontinuedOperationsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetCommonStockIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetDebtBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NetDebtToEBITDARatio.cs:69-78 | Common/Data/Fundamental/Generated/NetForeignCurrencyExchangeGainLossCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/NetForeignExchangeGainLossIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetIncomeAfterMinorityInterestGrowth.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeCommonStockholdersIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeContOpsGrowth.cs:87-96 | Common/Data/Fundamental/Generated/NetIncomeContinuousOperationsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeContinuousOperationsNetMinorityInterestIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetIncomeDiscontinuousOperationsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeExtraordinaryIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeFromContinuingAndDiscontinuedOperationIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeFromContinuingOperationNetMinorityInterestIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeFromContinuingOperationsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeGrowth.cs:87-96 | Common/Data/Fundamental/Generated/NetIncomeIncludingNoncontrollingInterestsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIncomePerEmployee.cs:77-86 | Common/Data/Fundamental/Generated/NetIncomeSelectionGrowth.cs:81-90 | Common/Data/Fundamental/Generated/NetIntangiblesPurchaseAndSaleCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetInterestIncomeExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetInterestIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetInterestMargin.cs:93-102 | Common/Data/Fundamental/Generated/NetInterestSpread.cs:93-102 | Common/Data/Fundamental/Generated/NetInvestmentIncomeIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetInvestmentIncomeLossNonCashAdjustmentCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetInvestmentIncomeValueIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetInvestmentPropertiesPurchaseAndSaleCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetInvestmentPurchaseAndSaleCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetIssuancePaymentsOfDebtCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetLoanBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NetLongTermDebtIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetMargin.cs:99-108 | Common/Data/Fundamental/Generated/NetNonOperatingInterestIncomeExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetOccupancyExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetOperatingAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NetOperatingAssetsTurnover.cs:69-78 | Common/Data/Fundamental/Generated/NetOperatingProfitAfterTaxIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetOtherFinancingChargesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetOtherInvestingChangesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetOutwardLoansCashFlowStatement.cs:69-78 | Common/Data/Fundamental/Generated/NetPPEBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NetPPEPurchaseAndSaleCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetPreferredStockIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetPremiumsWrittenIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetProceedsPaymentForLoanCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetRealizedGainLossOnInvestmentsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NetShortTermDebtIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/NetTangibleAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NetTangibleAssetsCalculatedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NetUtilityPlantBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/NonCurrentAccountsReceivableBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NonCurrentAccruedExpensesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NonCurrentDeferredAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NonCurrentDeferredLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NonCurrentDeferredRevenueBalanceSheet.cs:103-112 | Common/Data/Fundamental/Generated/NonCurrentDeferredTaxesAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NonCurrentDeferredTaxesLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/NonCurrentNoteReceivablesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NonCurrentOtherFinancialLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NonCurrentPensionAndOtherPostretirementBenefitPlansBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/NonCurrentPrepaidAssetsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NonInterestBearingBorrowingsCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NonInterestBearingBorrowingsNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NonInterestBearingBorrowingsTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/NonInterestBearingDepositsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/NonInterestExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NonInterestIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NonOperatingIncomeExpensesTotalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NonPerformingAssetsLoans.cs:93-102 | Common/Data/Fundamental/Generated/NormalizedBasicEPS.cs:99-108 | Common/Data/Fundamental/Generated/NormalizedBasicEPSGrowth.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedDilutedEPS.cs:99-108 | Common/Data/Fundamental/Generated/NormalizedEBITAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDAAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDAIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NormalizedEBITDAMargin.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDAPerShare.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDARIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDARMargin.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITDARPerShare.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITMargin.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEBITPerShare.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedEPS.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedIncomeAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedIncomeGrowth.cs:81-90 | Common/Data/Fundamental/Generated/NormalizedIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/NormalizedIncomePerFullTimeEmployee.cs:69-78 | Common/Data/Fundamental/Generated/NormalizedNetProfitMargin.cs:99-108 | Common/Data/Fundamental/Generated/NormalizedOperatingProfitAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedPreTaxIncomeIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/NormalizedROIC.cs:85-94 | Common/Data/Fundamental/Generated/NormalizedReturnOnAsset.cs:69-78 | Common/Data/Fundamental/Generated/NormalizedReturnOnEquity.cs:69-78 | Common/Data/Fundamental/Generated/NotesReceivableBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/OccupancyAndEquipmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OperatingCashFlowCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperatingExpenseAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OperatingExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperatingGainsLossesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperatingIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperatingLeaseAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OperatingRevenueIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperationAndMaintenanceIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OperationIncomeGrowth.cs:87-96 | Common/Data/Fundamental/Generated/OperationMargin.cs:99-108 | Common/Data/Fundamental/Generated/OperationRevenueGrowth3MonthAvg.cs:87-96 | Common/Data/Fundamental/Generated/OrdinarySharesNumberBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherAssetsBalanceSheet.cs:95-104 | Common/Data/Fundamental/Generated/OtherBorrowedFundsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherCapitalStockBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/OtherCashAdjustExcludeFromChangeinCashCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherCashAdjustIncludedIntoChangeinCashCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherCashPaymentsfromOperatingActivitiesCashFlowStatement.cs:95-104 | Common/Data/Fundamental/Generated/OtherCashReceiptsfromOperatingActivitiesCashFlowStatement.cs:95-104 | Common/Data/Fundamental/Generated/OtherCostofRevenueIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherCurrentAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherCurrentBorrowingsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/OtherCurrentLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherCustomerServicesIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/OtherEquityAdjustmentsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/OtherEquityInterestBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherFinancialLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherGAIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherIncomeExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OtherIncomeExpenseOperatingIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherIntangibleAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherIntangibleAssetsValueBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherInterestExpenseIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/OtherInterestIncomeIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/OtherInventoriesBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/OtherInvestedAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherInvestmentsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherIrregularIncomeExpensesAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherLiabilitiesBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/OtherLoanAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherLoansCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherLoansNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherLoansTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherNonCashItemsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/OtherNonCurrentAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherNonCurrentLiabilitiesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherNonInterestExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OtherNonInterestIncomeIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/OtherNonOperatingExpensesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherNonOperatingIncomeExpensesIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/OtherNonOperatingIncomeIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherOperatingExpensesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OtherOperatingInflowsOutflowsofCashCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherPayableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/OtherPropertiesBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/OtherRealEstateOwnedBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/OtherReceivablesBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/OtherReceivablesCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherReservesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/OtherShortTermInvestmentsBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/OtherSpecialChargesIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/OtherStaffCostsIncomeStatement.cs:69-78 | Common/Data/Fundamental/Generated/OtherTaxesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/OtherUnderwritingExpensesPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/OtherunderPreferredStockDividendIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/PaidInCapitalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PayablesAndAccruedExpensesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/PayablesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/PaymentForLoansCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PaymentTurnover.cs:85-94 | Common/Data/Fundamental/Generated/PaymentsonBehalfofEmployeesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PaymentstoSuppliersforGoodsandServicesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PensionAndEmployeeBenefitExpenseCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PensionAndOtherPostretirementBenefitPlansTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PensionCostsIncomeStatement.cs:69-78 | Common/Data/Fundamental/Generated/PensionandOtherPostRetirementBenefitPlansCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PolicyAcquisitionExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/PolicyLoansBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PolicyReservesBenefitsBalanceSheet.cs:87-96 | Common/Data/Fundamental/Generated/PolicyholderBenefitsCededIncomeStatement.cs:69-78 | Common/Data/Fundamental/Generated/PolicyholderBenefitsGrossIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/PolicyholderDepositInvestmentReceivedCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PolicyholderDividendsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/PolicyholderFundsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PolicyholderInterestIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/PostTaxMargin5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/PreTaxMargin5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/PreferredSecuritiesOutsideStockEquityBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/PreferredSharesNumberBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PreferredStockBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/PreferredStockDividendPaidCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PreferredStockDividendsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/PreferredStockEquityBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/PreferredStockIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PreferredStockPaymentsCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/PremiumReceivedCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PrepaidAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/PretaxIncomeIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/PretaxMargin.cs:99-108 | Common/Data/Fundamental/Generated/ProceedsFromLoansCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ProceedsFromStockOptionExercisedCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ProceedsPaymentFederalFundsSoldAndSecuritiesPurchasedUnderAgreementToResellCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ProceedsPaymentInInterestBearingDepositsInBankCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ProfessionalExpenseAndContractServicesExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/ProfitMargin5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/PropertiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ProvisionForDoubtfulAccountsIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/ProvisionForLoanLeaseAndOtherLossesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ProvisionandWriteOffofAssetsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ProvisionsTotalBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/PurchaseOfBusinessCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PurchaseOfIntangiblesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PurchaseOfInvestmentCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/PurchaseOfInvestmentPropertiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PurchaseOfJointVentureAssociateCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/PurchaseOfPPECashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/QuickRatio.cs:105-114 | Common/Data/Fundamental/Generated/ROA.cs:85-94 | Common/Data/Fundamental/Generated/ROA5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/ROE.cs:85-94 | Common/Data/Fundamental/Generated/ROE5YrAvg.cs:69-78 | Common/Data/Fundamental/Generated/ROIC.cs:85-94 | Common/Data/Fundamental/Generated/RawMaterialsBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/RealizedGainLossOnSaleOfLoansAndLeaseCashFlowStatement.cs:95-104 | Common/Data/Fundamental/Generated/RealizedInvestmentGainsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ReceiptsfromCustomersCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ReceiptsfromGovernmentGrantsCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ReceivableTurnover.cs:85-94 | Common/Data/Fundamental/Generated/ReceivablesAdjustmentsAllowancesBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/ReceivablesBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/ReconciledCostOfRevenueIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/ReconciledDepreciationIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/RegulatoryAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/RegulatoryLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ReinsuranceAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ReinsuranceBalancesPayableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ReinsuranceRecoverableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ReinsuranceRecoveriesofInsuranceLiabilitiesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ReinsuranceandOtherRecoveriesReceivedCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/RentAndLandingFeesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/RentExpenseSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/RentandLandingFeesCostofRevenueIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/RepaymentInLeaseFinancingCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/RepaymentOfDebtCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/RepaymentOfLeaseFinancingCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/RepaymentOfLongTermDebtCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/RepaymentOfShortTermDebtCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ReportedBasicAdjustedFundFromOperations.cs:93-102 | Common/Data/Fundamental/Generated/ReportedBasicAdjustedFundFromOperationsPerShare.cs:93-102 | Common/Data/Fundamental/Generated/ReportedBasicFundFromOperationsPerShare.cs:93-102 | Common/Data/Fundamental/Generated/ReportedDilutedAdjustedFundFromOperations.cs:93-102 | Common/Data/Fundamental/Generated/ReportedDilutedAdjustedFundFromOperationsPerShare.cs:93-102 | Common/Data/Fundamental/Generated/ReportedDilutedFundFromOperations.cs:93-102 | Common/Data/Fundamental/Generated/ReportedDilutedFundFromOperationsPerShare.cs:93-102 | Common/Data/Fundamental/Generated/ReportedNormalizedBasicEPS.cs:87-96 | Common/Data/Fundamental/Generated/ReportedNormalizedDilutedEPS.cs:87-96 | Common/Data/Fundamental/Generated/RepurchaseOfCapitalStockCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/RepurchaseOfCommonStockCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/RepurchaseOfPreferredStockCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/ResearchAndDevelopmentExpensesSupplementalIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/ResearchAndDevelopmentIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/RestrictedCashAndCashEquivalentsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/RestrictedCashAndInvestmentsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/RestrictedCashBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/RestrictedCommonStockBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/RestrictedInvestmentsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/RestructuringAndReorganizationExpenseAdjustmentIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/RetainedEarningsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/ReturnOnCapitalEmployed.cs:69-78 | Common/Data/Fundamental/Generated/ReturnOnNetOperatingAssets.cs:69-78 | Common/Data/Fundamental/Generated/RevenueGrowth.cs:87-96 | Common/Data/Fundamental/Generated/RiskWeightedAsset.cs:93-102 | Common/Data/Fundamental/Generated/SalariesAndWagesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/SaleOfBusinessCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/SaleOfIntangiblesCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/SaleOfInvestmentCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/SaleOfInvestmentPropertiesCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/SaleOfJointVentureAssociateCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/SaleOfPPECashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/SalesPerEmployee.cs:109-118 | Common/Data/Fundamental/Generated/SalesPerShareGrowth.cs:93-102 | Common/Data/Fundamental/Generated/SecuritiesAmortizationIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/SecuritiesAndInvestmentsBalanceSheet.cs:95-104 | Common/Data/Fundamental/Generated/SecuritiesLendingCollateralBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SecuritiesLoanedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SecurityAgreeToBeResellBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SecurityBorrowedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SecuritySoldNotYetRepurchasedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SellingAndMarketingExpenseIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/SellingGeneralAdministrativeExpenseMargin.cs:87-96 | Common/Data/Fundamental/Generated/SellingGeneralAndAdministrationIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/SeparateAccountAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SeparateAccountBusinessBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ServiceChargeOnDepositorAccountsIncomeStatement.cs:95-104 | Common/Data/Fundamental/Generated/ShareIssuedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ShortTermDebtIssuanceCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ShortTermDebtPaymentsCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/ShortTermInvestmentsAvailableForSaleBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ShortTermInvestmentsHeldToMaturityBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/ShortTermInvestmentsTradingBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/SocialSecurityCostsIncomeStatement.cs:69-78 | Common/Data/Fundamental/Generated/SolvencyRatio.cs:75-84 | Common/Data/Fundamental/Generated/SpecialIncomeChargesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/StaffCostsIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/StockBasedCompensationCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/StockBasedCompensationIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/StockholdersEquityBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/StockholdersEquityGrowth.cs:81-90 | Common/Data/Fundamental/Generated/SubordinatedLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TangibleBookValueBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TaxEffectOfUnusualItemsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TaxProvisionIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TaxRate.cs:99-108 | Common/Data/Fundamental/Generated/TaxRateForCalcsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TaxesAssetsCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TaxesReceivableBalanceSheet.cs:97-106 | Common/Data/Fundamental/Generated/TaxesRefundPaidCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/TaxesRefundPaidDirectCashFlowStatement.cs:87-96 | Common/Data/Fundamental/Generated/Tier1Capital.cs:93-102 | Common/Data/Fundamental/Generated/Tier1CapitalRatio.cs:93-102 | Common/Data/Fundamental/Generated/Tier1LeverageRatio.cs:93-102 | Common/Data/Fundamental/Generated/Tier2Capital.cs:93-102 | Common/Data/Fundamental/Generated/Tier2CapitalRatio.cs:93-102 | Common/Data/Fundamental/Generated/TotalAdjustmentsforNonCashItemsCashFlowStatement.cs:93-102 | Common/Data/Fundamental/Generated/TotalAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalAssetsGrowth.cs:81-90 | Common/Data/Fundamental/Generated/TotalCapital.cs:93-102 | Common/Data/Fundamental/Generated/TotalCapitalizationBalanceSheet.cs:107-116 | Common/Data/Fundamental/Generated/TotalDebtBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalDebtEquityRatio.cs:105-114 | Common/Data/Fundamental/Generated/TotalDebtEquityRatioGrowth.cs:81-90 | Common/Data/Fundamental/Generated/TotalDebtToEBITDARatio.cs:69-78 | Common/Data/Fundamental/Generated/TotalDebtToInvestedCapitalRatio.cs:75-84 | Common/Data/Fundamental/Generated/TotalDeferredCreditsAndOtherNonCurrentLiabilitiesBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/TotalDepositsBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/TotalDividendPaymentofEquitySharesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalDividendPaymentofNonEquitySharesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalDividendPerShare.cs:103-112 | Common/Data/Fundamental/Generated/TotalEquityAsReportedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TotalEquityBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalEquityGrossMinorityInterestBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalExpensesIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TotalFinancialLeaseObligationsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TotalInvestmentsBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/TotalLiabilitiesAndEquityBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TotalLiabilitiesAsReportedBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TotalLiabilitiesGrowth.cs:81-90 | Common/Data/Fundamental/Generated/TotalLiabilitiesNetMinorityInterestBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalMoneyMarketInvestmentsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TotalNetFinanceIncomeExpenseIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalNonCurrentAssetsBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalNonCurrentLiabilitiesNetMinorityInterestBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalOperatingIncomeAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalOperatingProfitLossGrowth.cs:75-84 | Common/Data/Fundamental/Generated/TotalOtherFinanceCostIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalPartnershipCapitalBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/TotalPreferredBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TotalPremiumsEarnedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalRevenueAsReportedIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalRevenueIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TotalRiskBasedCapital.cs:97-106 | Common/Data/Fundamental/Generated/TotalTaxPayableBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TotalUnusualItemsAfterTaxIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalUnusualItemsBeforeTaxIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/TotalUnusualItemsExcludingGoodwillIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TotalUnusualItemsIncomeStatement.cs:99-108 | Common/Data/Fundamental/Generated/TotalUnusualItemsPerShare.cs:87-96 | Common/Data/Fundamental/Generated/TradeAndOtherReceivablesNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TradeandOtherPayablesNonCurrentBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TradingAndOtherReceivableBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TradingAssetsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TradingGainLossIncomeStatement.cs:93-102 | Common/Data/Fundamental/Generated/TradingLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TradingSecuritiesBalanceSheet.cs:83-92 | Common/Data/Fundamental/Generated/TradingandFinancialLiabilitiesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TreasuryBillsandOtherEligibleBillsBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TreasurySharesNumberBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/TreasuryStockBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/TrustFeesbyCommissionsIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/UnadjustedRevenueIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/UnallocatedSurplusBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/UnbilledReceivablesBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/UnderwritingExpensesIncomeStatement.cs:87-96 | Common/Data/Fundamental/Generated/UnearnedIncomeBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/UnearnedPremiumsBalanceSheet.cs:87-96 | Common/Data/Fundamental/Generated/UnpaidLossAndLossReserveBalanceSheet.cs:89-98 | Common/Data/Fundamental/Generated/UnrealizedGainLossBalanceSheet.cs:81-90 | Common/Data/Fundamental/Generated/UnrealizedGainLossOnInvestmentSecuritiesCashFlowStatement.cs:99-108 | Common/Data/Fundamental/Generated/UnrealizedGainsLossesOnDerivativesCashFlowStatement.cs:75-84 | Common/Data/Fundamental/Generated/WagesandSalariesIncomeStatement.cs:75-84 | Common/Data/Fundamental/Generated/WaterProductionBalanceSheet.cs:75-84 | Common/Data/Fundamental/Generated/WorkInProcessBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/WorkingCapitalBalanceSheet.cs:105-114 | Common/Data/Fundamental/Generated/WorkingCapitalTurnoverRatio.cs:77-86 | Common/Data/Fundamental/Generated/WriteOffIncomeStatement.cs:87-96 β€” before extracting anything, compare `Common/Data/Fundamental/Generated/AVG5YrsROIC.cs` and `Common/Data/Fundamental/Generated/BookValuePerShareGrowth.cs` as WHOLE FILES: 84% 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. 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 (10 lines × 7) Β· Γ—1
  • Duplicated block (10 lines × 7) Common/Data/Fundamental/Generated/AuditorReportStatus.cs:99 β€” Common/Data/Fundamental/Generated/AuditorReportStatus.cs:99-108 | Common/Data/Fundamental/Generated/EarningReportsAccessionNumber.cs:99-108 | Common/Data/Fundamental/Generated/EarningReportsFormType.cs:99-108 | Common/Data/Fundamental/Generated/EarningReportsPeriodType.cs:99-108 | Common/Data/Fundamental/Generated/FinancialStatementsAccessionNumber.cs:99-108 | Common/Data/Fundamental/Generated/FinancialStatementsFormType.cs:99-108 | Common/Data/Fundamental/Generated/FinancialStatementsPeriodType.cs:99-108 β€” before extracting anything, compare `Common/Data/Fundamental/Generated/AuditorReportStatus.cs` and `Common/Data/Fundamental/Generated/EarningReportsAccessionNumber.cs` as WHOLE FILES: 84% 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. 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 (10 lines × 10) Β· Γ—1
  • Duplicated block (10 lines × 10) Common/Data/Fundamental/Generated/BalanceSheetFileDate.cs:83 β€” Common/Data/Fundamental/Generated/BalanceSheetFileDate.cs:83-92 | Common/Data/Fundamental/Generated/BalanceSheetPeriodEndingDate.cs:87-96 | Common/Data/Fundamental/Generated/CashFlowFileDate.cs:99-108 | Common/Data/Fundamental/Generated/CashFlowStatementPeriodEndingDate.cs:87-96 | Common/Data/Fundamental/Generated/EarningReportsFileDate.cs:99-108 | Common/Data/Fundamental/Generated/EarningReportsPeriodEndingDate.cs:99-108 | Common/Data/Fundamental/Generated/FinancialStatementsFileDate.cs:99-108 | Common/Data/Fundamental/Generated/FinancialStatementsPeriodEndingDate.cs:99-108 | Common/Data/Fundamental/Generated/IncomeStatementFileDate.cs:99-108 | Common/Data/Fundamental/Generated/IncomeStatementPeriodEndingDate.cs:87-96 β€” before extracting anything, compare `Common/Data/Fundamental/Generated/BalanceSheetFileDate.cs` and `Common/Data/Fundamental/Generated/CashFlowFileDate.cs` as WHOLE FILES: 82% 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. 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 (7 lines × 7) Β· Γ—1
  • Duplicated block (7 lines × 7) Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:41 β€” Algorithm.CSharp/BracketOrderLimitEntryRegressionAlgorithm.cs:41-47 | Algorithm.CSharp/BracketOrderRegressionAlgorithm.cs:38-44 | Algorithm.CSharp/ContingentOrderCancelRegressionAlgorithm.cs:41-47 | Algorithm.CSharp/ContingentOrderUpdateRegressionAlgorithm.cs:42-48 | Algorithm.CSharp/ContingentTrailingStopOrderRegressionAlgorithm.cs:40-46 | Algorithm.CSharp/OneCancelsOtherOrderRegressionAlgorithm.cs:40-46 | Algorithm.CSharp/TimeInForceAlgorithm.cs:42-53 β€” 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 7 call sites, so a change lands once.
D4 Β· Code Duplication Β· Duplicated block (20 lines × 16) Β· Γ—1
  • Duplicated block (20 lines × 16) Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:76 β€” Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs:76-95 | Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs:83-102 | Algorithm.CSharp/FutureOptionPutITMExpiryRegressionAlgorithm.cs:77-96 | Algorithm.CSharp/FutureOptionPutOTMExpiryRegressionAlgorithm.cs:81-100 | Algorithm.CSharp/FutureOptionShortCallITMExpiryRegressionAlgorithm.cs:77-96 | Algorithm.CSharp/FutureOptionShortCallOTMExpiryRegressionAlgorithm.cs:78-97 | Algorithm.CSharp/FutureOptionShortPutITMExpiryRegressionAlgorithm.cs:77-96 | Algorithm.CSharp/FutureOptionShortPutOTMExpiryRegressionAlgorithm.cs:78-97 | Algorithm.CSharp/IndexOptionCallITMExpiryRegressionAlgorithm.cs:74-93 | Algorithm.CSharp/IndexOptionCallOTMExpiryRegressionAlgorithm.cs:79-98 | Algorithm.CSharp/IndexOptionPutITMExpiryRegressionAlgorithm.cs:71-90 | Algorithm.CSharp/IndexOptionPutOTMExpiryRegressionAlgorithm.cs:76-95 | Algorithm.CSharp/IndexOptionShortCallITMExpiryRegressionAlgorithm.cs:83-102 | Algorithm.CSharp/IndexOptionShortCallOTMExpiryRegressionAlgorithm.cs:73-92 | Algorithm.CSharp/IndexOptionShortPutITMExpiryRegressionAlgorithm.cs:82-101 | Algorithm.CSharp/IndexOptionShortPutOTMExpiryRegressionAlgorithm.cs:73-92 β€” before extracting anything, compare `Algorithm.CSharp/FutureOptionCallITMExpiryRegressionAlgorithm.cs` and `Algorithm.CSharp/FutureOptionCallOTMExpiryRegressionAlgorithm.cs` as WHOLE FILES: this scan already matched 3 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. 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 (23–27 lines × 2) Β· Γ—1
  • Duplicated block (23–27 lines × 2) Algorithm.Python/Collective2PortfolioSignalExportDemonstrationAlgorithm.py:43 β€” Algorithm.Python/Collective2PortfolioSignalExportDemonstrationAlgorithm.py:43-65 | Algorithm.Python/Collective2SignalExportDemonstrationAlgorithm.py:49-75 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (24 lines × 12) Β· Γ—1
  • Duplicated block (24 lines × 12) Report/ReportCharts.py:69 β€” Report/ReportCharts.py:69-92 | Report/ReportCharts.py:154-177 | Report/ReportCharts.py:203-226 | Report/ReportCharts.py:269-292 | Report/ReportCharts.py:362-385 | Report/ReportCharts.py:471-494 | Report/ReportCharts.py:535-558 | Report/ReportCharts.py:661-684 | Report/ReportCharts.py:752-775 | Report/ReportCharts.py:841-864 | Report/ReportCharts.py:910-933 | Report/ReportCharts.py:977-1000 β€” all 12 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, `Report/ReportCharts.py:498` calls `list` and `Report/ReportCharts.py:180` 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 (10–18 lines × 2) Β· Γ—1
  • Duplicated block (10–18 lines × 2) Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:28 β€” Algorithm.Python/AddFutureOptionContractDataStreamingRegressionAlgorithm.py:28-37 | Algorithm.Python/FutureOptionBuySellCallIntradayRegressionAlgorithm.py:33-50 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (4–17 lines × 6) Β· Γ—1
  • Duplicated block (4–17 lines × 6) Algorithm.Python/AccumulativeInsightPortfolioRegressionAlgorithm.py:22 β€” Algorithm.Python/AccumulativeInsightPortfolioRegressionAlgorithm.py:22-34 | Algorithm.Python/AddRiskManagementAlgorithm.py:23-33 | Algorithm.Python/BasicTemplateFrameworkAlgorithm.py:26-42 | Algorithm.Python/ConfidenceWeightedFrameworkAlgorithm.py:22-38 | Algorithm.Python/InsightScoringRegressionAlgorithm.py:27-30 | Algorithm.Python/InsightWeightingFrameworkAlgorithm.py:28-44 β€” before extracting anything, compare `Algorithm.Python/ConfidenceWeightedFrameworkAlgorithm.py` and `Algorithm.Python/InsightWeightingFrameworkAlgorithm.py` as WHOLE FILES: 82% 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. 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 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, `Algorithm.Python/InsightScoringRegressionAlgorithm.py:24` calls `set_start_date`, `set_end_date`, `create` and `Algorithm.Python/AccumulativeInsightPortfolioRegressionAlgorithm.py:22` 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–16 lines × 5) Β· Γ—1
  • Duplicated block (2–16 lines × 5) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:69 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:69-83 | Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:68-82 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:72-87 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:72-87 | Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:76-77 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py` 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. 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 `Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:76` 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 (14–15 lines × 8) Β· Γ—1
  • Duplicated block (14–15 lines × 8) Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:30 β€” Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py:30-43 | Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:34-48 | Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py:29-42 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:34-47 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:30-43 | Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:31-44 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:30-43 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:31-44 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutITMExpiryRegressionAlgorithm.py` 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. 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 `Algorithm.Python/FutureOptionCallITMExpiryRegressionAlgorithm.py: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. 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–11 lines × 2) Β· Γ—1
  • Duplicated block (8–11 lines × 2) Algorithm.Python/CustomDataNIFTYAlgorithm.py:85 β€” Algorithm.Python/CustomDataNIFTYAlgorithm.py:85-95 | Algorithm.Python/CustomDataNIFTYAlgorithm.py:118-125 β€” both copies are in the same file, so extract the 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 (6–8 lines × 4) Β· Γ—1
  • Duplicated block (6–8 lines × 4) Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:92 β€” Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:92-99 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:93-100 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:78-83 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:78-83 β€” before extracting anything, compare `Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 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.
D4 Β· Code Duplication Β· Duplicated block (7–8 lines × 3) Β· Γ—1
  • Duplicated block (7–8 lines × 3) Algorithm.Python/BasicTemplateOptionsAlgorithm.py:50 β€” Algorithm.Python/BasicTemplateOptionsAlgorithm.py:50-57 | Algorithm.Python/BasicTemplateOptionsHourlyAlgorithm.py:50-57 | Algorithm.Python/CustomOptionPriceModelRegressionAlgorithm.py:38-44 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (7–8 lines × 2) Β· Γ—1
  • Duplicated block (7–8 lines × 2) Algorithm.Python/BasicTemplateOptionStrategyAlgorithm.py:48 β€” Algorithm.Python/BasicTemplateOptionStrategyAlgorithm.py:48-54 | Algorithm.Python/BasicTemplateOptionTradesAlgorithm.py:43-50 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (6–7 lines × 14) Β· Γ—1
  • Duplicated block (6–7 lines × 14) Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:67 β€” Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py:67-73 | Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py:66-72 | Algorithm.Python/FutureOptionShortCallITMExpiryRegressionAlgorithm.py:62-68 | Algorithm.Python/FutureOptionShortCallOTMExpiryRegressionAlgorithm.py:62-68 | Algorithm.Python/FutureOptionShortPutITMExpiryRegressionAlgorithm.py:62-68 | Algorithm.Python/FutureOptionShortPutOTMExpiryRegressionAlgorithm.py:63-69 | Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:54-60 | Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:67-73 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:49-54 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:67-73 | Algorithm.Python/IndexOptionShortCallITMExpiryRegressionAlgorithm.py:55-61 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:51-57 | Algorithm.Python/IndexOptionShortPutITMExpiryRegressionAlgorithm.py:55-61 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:51-57 β€” before extracting anything, compare `Algorithm.Python/FutureOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/FutureOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 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. 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–7 lines × 6) Β· Γ—1
  • Duplicated block (4–7 lines × 6) Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:33 β€” Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:33-36 | Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:35-41 | Algorithm.Python/IndexOptionPutITMExpiryRegressionAlgorithm.py:29-35 | Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py:35-41 | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py:31-37 | Algorithm.Python/IndexOptionShortPutOTMExpiryRegressionAlgorithm.py:31-37 β€” before extracting anything, compare `Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py` and `Algorithm.Python/IndexOptionPutOTMExpiryRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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 before the matched lines, `Algorithm.Python/IndexOptionCallITMExpiryRegressionAlgorithm.py:30` calls `set_end_date`, `set_cash`, `add_index` and `Algorithm.Python/IndexOptionCallOTMExpiryRegressionAlgorithm.py:35` 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 (5 lines × 7) Β· Γ—1
  • Duplicated block (5 lines × 7) Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:49 β€” Algorithm.Python/CustomDataBenchmarkRegressionAlgorithm.py:49-53 | Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py:97-101 | Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py:88-92 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:110-114 | Algorithm.Python/CustomDataRegressionAlgorithm.py:108-112 | Algorithm.Python/DescendingCustomDataObjectStoreRegressionAlgorithm.py:104-108 | Algorithm.Python/LiveFeaturesAlgorithm.py:135-139 β€” before extracting anything, compare `Algorithm.Python/CustomDataMultiFileObjectStoreRegressionAlgorithm.py` and `Algorithm.Python/CustomDataObjectStoreRegressionAlgorithm.py` as WHOLE FILES: this scan already matched 5 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 before the matched lines, `Algorithm.Python/CustomDataRegressionAlgorithm.py:107` calls `timedelta` and `Algorithm.Python/LiveFeaturesAlgorithm.py:134` 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 (5 lines × 5) Β· Γ—1
  • Duplicated block (5 lines × 5) Algorithm.Python/CustomDataBitcoinAlgorithm.py:78 β€” Algorithm.Python/CustomDataBitcoinAlgorithm.py:78-82 | Algorithm.Python/CustomDataBitcoinAlgorithm.py:106-110 | Algorithm.Python/CustomDataPropertiesRegressionAlgorithm.py:89-93 | Algorithm.Python/CustomDataRegressionAlgorithm.py:85-89 | Algorithm.Python/LiveFeaturesAlgorithm.py:113-117 β€” before extracting anything, compare `Algorithm.Python/CustomDataBitcoinAlgorithm.py` and `Algorithm.Python/LiveFeaturesAlgorithm.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 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.
D8 Β· Code Coverage Β· Coverage not measured Β· Γ—1
  • Coverage not measured β€” no coverage collector is wired up β€” Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none β€” no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
ED5 Β· Idempotency Β· Non-idempotent mutation Β· Γ—1
  • Non-idempotent mutation: Setup.BacktestingSetupHandler.Setup Engine/Setup/BacktestingSetupHandler.cs:136 β€” `Setup.BacktestingSetupHandler.Setup` mutates persistent state (a repository write one hop away, in ScheduleManager.SetEventSchedule) with no idempotency guard, and the model confirms a re-run would double-apply it. A retry or at-least-once redelivery means it can run twice β€” add an exists/dedup check, an upsert, an idempotency-key/inbox, or a versioned write.
IC1 Β· Incompleteness & stubs Β· Both branches open with the same statements Β· Γ—1
  • Both branches open with the same statements β€” the condition does not decide them Common/Statistics/TradeBuilder.cs:424 β€” The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` β€” leaving them duplicated inside makes the branches read as though they handled this differently.
S1 Β· Cryptographic Hygiene Β· Obsolete TLS/SSL protocol version enabled Β· Γ—1
  • Obsolete TLS/SSL protocol version enabled Engine/DataFeeds/LiveOptionChainProvider.cs:62 β€” `SecurityProtocol` explicitly selects `SecurityProtocolType.Tls11`, a protocol version that is broken (SSL 2.0/3.0) or withdrawn (TLS 1.0/1.1, RFC 8996). Offering an obsolete version does not merely permit it β€” it is what a downgrade attack negotiates, so the weakest version on the list is the one that decides the connection's strength. Stop pinning versions here: leave the protocol unset (`SecurityProtocolType.SystemDefault`, or simply do not assign it) so the connection uses the OS policy and picks up TLS 1.3 and future versions without a code change. Where a version must be named explicitly, name `Tls12` and `Tls13` only.
S1 Β· Cryptographic Hygiene Β· Weak hash algorithm Β· Γ—1
  • Weak hash algorithm Common/Extensions.cs:2427 β€” MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything β€” a signature, an integrity or tamper check, a credential, or any value an attacker can influence β€” that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead β€” a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code β€” since the algorithm alone cannot distinguish the two uses.
SC1 Β· Supply-chain hygiene Β· NuGet dependencies are not locked Β· Γ—1
  • NuGet dependencies are not locked β€” No packages.lock.json and no central package management β€” restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory β€” never scored.
X18 Β· Disposal-pattern correctness Β· Owned disposable field is never released Β· Γ—1
  • Owned disposable field is never released Engine/DataFeeds/Queues/FakeDataQueue.cs:42 β€” `FakeDataQueue` implements `IDisposable` β€” so it has told every caller it holds something worth releasing β€” and it constructs `_subscriptionManager` itself (line 42), which makes that instance its own. But `_subscriptionManager` is named in none of the methods the disposal search covered: `Dispose` (line 155) β€” that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not β€” which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_subscriptionManager?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
X18 Β· Disposal-pattern correctness Β· Finalizer on a type that owns no unmanaged resource Β· Γ—1
  • Finalizer on a type that owns no unmanaged resource Common/Util/StreamReaderEnumerable.cs:102 β€” `StreamReaderEnumerable` declares a finalizer (line 102), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one β€” where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
Minor β€” 844 finding(s)
D34 Β· Knowledge Freshness Β· Orphaned file Β· Γ—736
  • Orphaned file Common/Util/LinqExtensions.cs: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 Algorithm.CSharp/HistoryAlgorithm.cs: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 Indicators/IndicatorBase.Operators.cs: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 Algorithm.Framework/Portfolio/MeanReversionPortfolioConstructionModel.cs: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 Indicators/Alpha.cs: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 ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs: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 Common/Securities/MarketHoursDatabase.cs: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 Common/Scheduling/FluentScheduledEventBuilder.cs: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 Report/ReportElements/CrisisReportElement.cs: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 Common/Data/Auxiliary/TradeConditionFlags.cs: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 Indicators/Delta.cs: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 Common/Data/SliceExtensions.cs: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 Indicators/Gamma.cs: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 Indicators/Theta.cs: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 Indicators/MarketProfile.cs: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 Algorithm.CSharp/BacktestingBrokerageRegressionAlgorithm.cs: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 ToolBox/FactorFileGenerator.cs: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 Indicators/PivotPointsHighLow.cs: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 Common/StringExtensions.cs: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 Indicators/Rho.cs: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 Indicators/TomDemarkSequential.cs: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 Common/Securities/Option/StrategyMatcher/OptionStrategyDefinition.cs: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 Indicators/Vega.cs: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 Algorithm.CSharp/CapacityTests/EmaPortfolioRebalance100.cs: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 Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs: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.
  • + 711 more in this group β€” see findings.md.
IC1 Β· Incompleteness & stubs Β· Commented-out code Β· Γ—25
  • Commented-out code Algorithm.CSharp/AddUniverseSelectionModelCoarseAlgorithm.cs:42 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/AlgorithmModeAndDeploymentTargetAlgorithm.cs:51 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/AlgorithmModeAndDeploymentTargetAlgorithm.cs:52 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/AlgorithmModeAndDeploymentTargetAlgorithm.cs:55 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateCryptoAlgorithm.cs:66 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:61 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs:63 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateFuturesConsolidationAlgorithm.cs:49 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateIndiaAlgorithm.cs:49 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:64 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:71 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateMultiAssetAlgorithm.cs:76 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateOptionTradesAlgorithm.cs:47 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BasicTemplateOptionsHistoryAlgorithm.cs:46 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BlackLittermanPortfolioOptimizationFrameworkAlgorithm.cs:42 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BrokerageModelAlgorithm.cs:45 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BrokerageModelAlgorithm.cs:46 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BrokerageModelAlgorithm.cs:47 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:61 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:62 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:66 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:67 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:71 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/BubbleAlgorithm.cs:72 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Algorithm.CSharp/ComboOrdersFillModelAlgorithm.cs:211 β€” A line of code has been commented out rather than removed β€” dead weight that rots and confuses. Delete it (version control remembers).
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—25
  • Duplicated predicate Engine/DataFeeds/ApiDataProvider.cs:192 β€” `!File.Exists(filePath) || filePath.IsOutOfDate()` appears character-identically in 2 files β€” Engine/DataFeeds/ApiDataProvider.cs, Engine/DataFeeds/DownloaderDataProvider.cs. 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 Algorithm.CSharp/CapacityTests/CheeseMilkHourlyRebalance.cs:77 β€” `!Portfolio.ContainsKey(contract) || (Portfolio[contract].Quantity <= 0 && _fast > _slow)` appears character-identically in 2 files β€” Algorithm.CSharp/CapacityTests/CheeseMilkHourlyRebalance.cs, Algorithm.CSharp/CapacityTests/IntradayMinuteScalpingFuturesES.cs. 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 Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs:66 β€” `!Portfolio.Invested && IsMarketOpen(_optionSymbol)` appears character-identically in 7 files β€” Algorithm.CSharp/BasicTemplateOptionsAlgorithm.cs, Algorithm.CSharp/BasicTemplateOptionsHourlyAlgorithm.cs, Algorithm.CSharp/OptionExpiryDateOnHolidayCase.cs, Algorithm.CSharp/OptionFilterReturnsNullRegressionAlgorithm.cs. 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 Algorithm.CSharp/HourReverseSplitRegressionAlgorithm.cs:47 β€” `!Portfolio.Invested && Time.Date == EndDate.Date` appears character-identically in 2 files β€” Algorithm.CSharp/HourReverseSplitRegressionAlgorithm.cs, Algorithm.CSharp/HourSplitRegressionAlgorithm.cs. 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 Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs:72 β€” `!Portfolio.Invested && Transactions.GetOpenOrders().Count == 0` appears character-identically in 2 files β€” Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataCoarseSelectionRegressionAlgorithm.cs, Algorithm.CSharp/RegressionTests/CustomData/CustomDataLinkedIconicTypeAddDataOnSecuritiesChangedRegressionAlgorithm.cs. 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 Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs:98 β€” `!Portfolio.Invested && Transactions.OrdersCount == 0` appears character-identically in 4 files β€” Algorithm.CSharp/BasicTemplateCryptoFutureAlgorithm.cs, Algorithm.CSharp/BasicTemplateCryptoFutureHourlyAlgorithm.cs, Algorithm.CSharp/BybitCryptoFuturesRegressionAlgorithm.cs, Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs. 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 Optimizer/Strategies/EulerSearchOptimizationStrategy.cs:70 β€” `!ReferenceEquals(result, OptimizationResult.Initial) && string.IsNullOrEmpty(result?.JsonBacktestResult)` appears character-identically in 2 files β€” Optimizer/Strategies/EulerSearchOptimizationStrategy.cs, Optimizer/Strategies/GridSearchOptimizationStrategy.cs. 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 Engine/DataFeeds/CachingFutureChainProvider.cs:52 β€” `!_cache.TryGetValue(symbol, out entry) || date.Date != entry.Date` appears character-identically in 2 files β€” Engine/DataFeeds/CachingFutureChainProvider.cs, Engine/DataFeeds/CachingOptionChainProvider.cs. 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 Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs:64 β€” `!_checked && slice.OptionChains.TryGetValue(_option.Symbol, out var chain)` appears character-identically in 2 files β€” Algorithm.CSharp/IndicatorBasedOptionPricingModelRegressionAlgorithm.cs, Algorithm.CSharp/QLOptionPricingModelRegressionAlgorithm.cs. 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 Algorithm.CSharp/FuturesChainFiltersRegressionAlgorithm.cs:134 β€” `!_esChainSeen || !_gcChainSeen || !_traded` appears character-identically in 2 files β€” Algorithm.CSharp/FutureUniverseFiltersRegressionAlgorithm.cs, Algorithm.CSharp/FuturesChainFiltersRegressionAlgorithm.cs. 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 Algorithm.CSharp/SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.cs:135 β€” `!_securityInializationCounts.TryGetValue(x, out var count) || count != 1` appears character-identically in 2 files β€” Algorithm.CSharp/SecurityInitializationOnReAdditionForSelectedOptionRegressionAlgorithm.cs, Algorithm.CSharp/SecurityInitializationOnReAdditionForUniverseSelectionRegressionAlgorithm.cs. 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 Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:58 β€” `!esIsInRegularHours && _es.Exchange.Hours.IsOpen(Time, true)` appears character-identically in 2 files β€” Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs, Algorithm.CSharp/FuturesExtendedMarketHoursRegressionAlgorithm.cs. 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 Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs:64 β€” `!gcIsInRegularHours && _gc.Exchange.Hours.IsOpen(Time, true)` appears character-identically in 2 files β€” Algorithm.CSharp/FutureContractsExtendedMarketHoursRegressionAlgorithm.cs, Algorithm.CSharp/FuturesExtendedMarketHoursRegressionAlgorithm.cs. 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 Algorithm.CSharp/SecurityInitializationOnReAdditionForEquityRegressionAlgorithm.cs:170 β€” `!securityInializationCounts.TryGetValue(security, out var count) || count != 1` appears character-identically in 2 files β€” Algorithm.CSharp/SecurityInitializationOnReAdditionForEquityRegressionAlgorithm.cs, Algorithm.CSharp/SecurityInitializationOnReAdditionForManuallyAddedOptionRegressionAlgorithm.cs. 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 Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs:100 β€” `!slice.Delistings.ContainsKey(sym) || slice.Delistings[sym].Type != DelistingType.Delisted` appears character-identically in 2 files β€” Algorithm.CSharp/CoarseFineFundamentalRegressionAlgorithm.cs, Algorithm.CSharp/UniverseSelectionRegressionAlgorithm.cs. 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 Algorithm.CSharp/EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.cs:66 β€” `!slice.OptionChains.TryGetValue(_option.Symbol, out contracts) || !contracts.Any()` appears character-identically in 2 files β€” Algorithm.CSharp/EuropeanOptionsCannotBeExercisedBeforeExpiryRegressionAlgorithm.cs, Algorithm.CSharp/InteractiveBrokersBrokerageDisablesIndexOptionsExerciseRegressionAlgorithm.cs. 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 Common/Securities/Future/FutureMarginModel.cs:270 β€” `!x.StartsWith("#") && !string.IsNullOrWhiteSpace(x)` appears character-identically in 2 files β€” Common/Securities/Future/FutureMarginModel.cs, Common/Securities/SymbolPropertiesDatabase.cs. 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 Algorithm.CSharp/OptionEquityBaseStrategyRegressionAlgorithm.cs:55 β€” `((OptionStrategyPositionGroupBuyingPowerModel)@group.BuyingPowerModel).ToString() == name && (!quantity.HasValue || Math.Abs(group.Quantity)…` appears character-identically in 2 files β€” Algorithm.CSharp/OptionEquityBaseStrategyRegressionAlgorithm.cs, Algorithm.CSharp/OptionStrategyFilteringUniverseBaseAlgorithm.cs. 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 Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs:131 β€” `(_fast < _slow * 0.999m) && (_emaFastWasAbove)` appears character-identically in 2 files β€” Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs, Algorithm.CSharp/Collective2SignalExportDemonstrationAlgorithm.cs. 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 Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs:126 β€” `(_fast > _slow * 1.001m) && (!_emaFastWasAbove)` appears character-identically in 2 files β€” Algorithm.CSharp/Collective2PortfolioSignalExportDemonstrationAlgorithm.cs, Algorithm.CSharp/Collective2SignalExportDemonstrationAlgorithm.cs. 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 Engine/DataFeeds/BacktestingChainProvider.cs:79 β€” `(history == null || history.Count == 0) && periods <= 3` appears character-identically in 2 files β€” Algorithm/QCAlgorithm.cs, Engine/DataFeeds/BacktestingChainProvider.cs. 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 Indicators/CandlestickPatterns/Kicking.cs:96 β€” `(int)GetCandleColor(window[1]) == -(int)GetCandleColor(input) && // 1st marubozu GetRealBody(window[1]) > GetCandleAverage(CandleSettingType…` appears character-identically in 2 files β€” Indicators/CandlestickPatterns/Kicking.cs, Indicators/CandlestickPatterns/KickingByLength.cs. 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 Common/Brokerages/BinanceBrokerageModel.cs:73 β€” `AccountType == AccountType.Cash || security.IsInternalFeed() || security.Type == SecurityType.Base` appears character-identically in 6 files β€” Common/Brokerages/BinanceBrokerageModel.cs, Common/Brokerages/BitfinexBrokerageModel.cs, Common/Brokerages/BybitBrokerageModel.cs, Common/Brokerages/ExanteBrokerageModel.cs. 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 Engine/DataFeeds/Enumerators/DividendEventProvider.cs:74 β€” `Config.Symbol == eventArgs.Symbol && FactorFile != null && _mapFile.HasData(eventArgs.Date)` appears character-identically in 2 files β€” Engine/DataFeeds/Enumerators/DividendEventProvider.cs, Engine/DataFeeds/Enumerators/SplitEventProvider.cs. 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 Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs:61 β€” `IsMarketOpen(_optionSymbol) && slice.OptionChains.TryGetValue(_optionSymbol, out chain)` appears character-identically in 39 files β€” Algorithm.CSharp/BasicTemplateOptionEquityStrategyAlgorithm.cs, Algorithm.CSharp/ComboOrderAlgorithm.cs, Algorithm.CSharp/ComboOrderTicketDemoAlgorithm.cs, Algorithm.CSharp/CoveredCallComboLimitOrderAlgorithm.cs. 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.
X23 Β· Unguarded diagnostic materialisation Β· Diagnostic log message is built whether or not it is wanted Β· Γ—12
  • Diagnostic log message is built whether or not it is wanted Engine/DataFeeds/DataQueueHandlerManager.cs:253 β€” `Trace` at line 253 is called with an argument built by `string.Join(",", timeProviders.Select(x => x.GetType()))` (line 253), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Engine/HistoricalData/HistoryProviderManager.cs:126 β€” `Trace` at line 126 is called with an argument built by `string.Join(",", _historyProviders.Select(x => x.GetType().Name))` (line 126), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Engine/HistoricalData/HistoryProviderManager.cs:165 β€” `Trace` at line 165 is called with an argument built by `string.Join(",", _historyProviders.Skip(1).Select(x => x.GetType().Name))` (line 166), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Engine/Results/RegressionResultHandler.cs:400 β€” `Trace` at line 400 is called with an argument built by `string.Join(Environment.NewLine, holdings)` (line 400), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Common/Data/EventBasedDataQueueHandlerSubscriptionManager.cs:66 β€” `Trace` at line 66 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 66), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Common/Data/EventBasedDataQueueHandlerSubscriptionManager.cs:78 β€” `Trace` at line 78 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 78), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted AlgorithmFactory/Loader.cs:251 β€” `Debug` at line 251 is called with an argument built by `string.Join(",", types)` (line 251), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:137 β€” `Trace` at line 137 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 137), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Brokerages/BrokerageMultiWebSocketSubscriptionManager.cs:158 β€” `Trace` at line 158 is called with an argument built by `string.Join(",", symbols.Select(x => x.Value))` (line 158), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted Api/Api.cs:1008 β€” `Trace` at line 1008 is called with an argument built by `string.Join(',', dataLink.Errors)` (line 1009), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesProgram.cs:75 β€” `Trace` at line 75 is called with an argument built by `string.Join(";", resolutionList.Select(x => x.ToString()).ToArray())` (line 75), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
  • Diagnostic log message is built whether or not it is wanted ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:144 β€” `Debug` at line 144 is called with an argument built by `string.Join(",", sidContext.Tickers)` (line 144), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached β€” and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
AX6 Β· Interface segregation Β· Fat interface Β· Γ—7
  • Fat interface: IResultHandler (24 members) Engine/Results/IResultHandler.cs:35 β€” `IResultHandler` declares 24 members: `Messages`, `IsActive`, `OnSecuritiesChanged`, `OnWarmupFinished`, `Initialize`, `DebugMessage`, `SystemDebugMessage`, `SecurityType`, `LogMessage`, `ErrorMessage`, `RuntimeError`, `BrokerageMessage`, `Sample`, `SetAlgorithm`, `SendStatusUpdate`, `RuntimeStatistic`, `AddDeploymentDetail`, `DeploymentDetails`, `OrderEvent`, `Exit`, `ProcessSynchronousEvents`, `SaveResults`, `AlgorithmNameUpdated`, `AlgorithmTagsUpdated`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IBrokerageModel (18 members) Common/Brokerages/IBrokerageModel.cs:34 β€” `IBrokerageModel` declares 18 members: `AccountType`, `RequiredFreeBuyingPowerPercent`, `DefaultMarkets`, `CanSubmitOrder`, `CanUpdateOrder`, `CanExecuteOrder`, `ApplySplit`, `GetLeverage`, `GetBenchmark`, `GetFillModel`, `GetFeeModel`, `GetSlippageModel`, `GetSettlementModel`, `GetMarginInterestRateModel`, `GetSettlementModel`, `GetBuyingPowerModel`, `GetBuyingPowerModel`, `GetShortableProvider`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 18 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: IAlgorithm (126 members) Common/Interfaces/IAlgorithm.cs:52 β€” `IAlgorithm` declares 126 members: `InsightsGenerated`, `TimeKeeper`, `SubscriptionManager`, `ProjectId`, `Securities`, `UniverseManager`, `Portfolio`, `Transactions`, `BrokerageModel`, `BrokerageName`, `RiskFreeInterestRateModel`, `BrokerageMessageHandler`, `Notify`, `Schedule`, `HistoryProvider`, `Status`, `IsWarmingUp`, `Name`, `Tags`, `NameUpdated`, `TagsUpdated`, `Time`, `TimeZone`, `UtcTime`, `StartDate`, `EndDate`, `AlgorithmId`, `LiveMode`, `AlgorithmMode`, `DeploymentTarget`, `UniverseSettings`, `DebugMessages`, `ErrorMessages`, `LogMessages`, `RunTimeError`, `RuntimeStatistics`, `Statistics`, `Benchmark`, `TradeBuilder`, `Settings`, and 86 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 126 declarations carry 119 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 119 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: IAlgorithmSettings (19 members) Common/Interfaces/IAlgorithmSettings.cs:24 β€” `IAlgorithmSettings` declares 19 members: `AutomaticIndicatorWarmUp`, `RebalancePortfolioOnSecurityChanges`, `RebalancePortfolioOnInsightChanges`, `MaxAbsolutePortfolioTargetPercentage`, `MinAbsolutePortfolioTargetPercentage`, `MinimumOrderMarginPortfolioPercentage`, `FreePortfolioValue`, `FreePortfolioValuePercentage`, `LiquidateEnabled`, `DailyPreciseEndTime`, `DailyConsolidationUseExtendedMarketHours`, `DataSubscriptionLimit`, `StalePriceTimeSpan`, `WarmupResolution`, `TradingDaysPerYear`, `DatabasesRefreshPeriod`, `IgnoreUnknownAssetHoldings`, `PerformanceSamplePeriod`, `SeedInitialPrices`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IApi (65 members) Common/Interfaces/IApi.cs:32 β€” `IApi` declares 65 members: `Initialize`, `CreateProject`, `ReadProject`, `UpdateProject`, `AddProjectFile`, `UpdateProjectFileName`, `UpdateProjectFileContent`, `ReadProjectFile`, `ReadProjectFiles`, `ReadProjectNodes`, `UpdateProjectNodes`, `DeleteProjectFile`, `DeleteProject`, `ListProjects`, `CreateCompile`, `ReadCompile`, `CreateBacktest`, `ReadBacktest`, `UpdateBacktest`, `UpdateBacktestTags`, `DeleteBacktest`, `ListBacktests`, `ReadBacktestInsights`, `ReadBacktestOrders`, `ReadBacktestLog`, `EstimateOptimization`, `CreateOptimization`, `ListOptimizations`, `ReadOptimization`, `AbortOptimization`, `UpdateOptimization`, `DeleteOptimization`, `ReadLiveLogs`, `ReadLiveChart`, `ReadLivePortfolio`, `ReadLiveInsights`, `ReadLiveInsights`, `ReadLiveOrders`, `ReadDataLink`, `ReadDataDirectory`, and 25 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 65 declarations carry 64 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 64 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: IBrokerage (23 members) Common/Interfaces/IBrokerage.cs:29 β€” `IBrokerage` declares 23 members: `OrderIdChanged`, `OrdersStatusChanged`, `OrderUpdated`, `OptionPositionAssigned`, `OptionNotification`, `NewBrokerageOrderNotification`, `DelistingNotification`, `AccountChanged`, `Message`, `Name`, `IsConnected`, `GetOpenOrders`, `GetAccountHoldings`, `GetCashBalance`, `PlaceOrder`, `UpdateOrder`, `CancelOrder`, `Connect`, `Disconnect`, `AccountInstantlyUpdated`, `AccountBaseCurrency`, `GetHistory`, `ConcurrencyEnabled`. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IOptionContractFilters<TSelf> (42 members) Common/Securities/Option/IOptionContractFilters.cs:27 β€” `IOptionContractFilters<TSelf>` declares 42 members: `Strikes`, `Strikes`, `StrikesAbove`, `StrikesBelow`, `OutOfTheMoney`, `OTM`, `InTheMoney`, `ITM`, `AtTheMoney`, `ATM`, `CallsOnly`, `PutsOnly`, `Delta`, `D`, `Gamma`, `G`, `Theta`, `T`, `Vega`, `V`, `Rho`, `R`, `ImpliedVolatility`, `IV`, `NakedCall`, `NakedPut`, `CallSpread`, `PutSpread`, `CallCalendarSpread`, `PutCalendarSpread`, `Strangle`, `Straddle`, `ProtectiveCollar`, `Conversion`, `CallButterfly`, `PutButterfly`, `IronButterfly`, `IronCondor`, `BoxSpread`, `JellyRoll`, and 2 more. Counted as the author wrote them β€” a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 42 declarations carry 41 distinct name(s), so part of the width is overloading rather than separate responsibilities β€” but 41 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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.
D16 Β· Bus Factor Β· Off-boarding risk Β· Γ—7
  • Off-boarding risk: anonymized user #1 β€” If anonymized user #1 becomes unavailable, 43 significant file(s) lose their only recent owner: Common/Securities/Option/OptionFilterUniverse.cs, Common/Securities/Option/OptionStrategyPositionGroupBuyingPowerModel.cs, Common/Python/PandasData.cs, Common/Data/Market/OptionChain.Filters.cs, Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs, Common/Statistics/TradeBuilder.cs, Engine/DataFeeds/TimeSliceFactory.cs, Common/Securities/ContractSecurityFilterUniverse.cs (+35 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 β€” If anonymized user #2 becomes unavailable, 33 significant file(s) lose their only recent owner: REDACTED, Brokerages/Backtesting/BacktestingBrokerage.cs, Common/Securities/SecurityExchangeHours.cs, Common/Data/Market/QuoteBar.cs, Report/PortfolioLooper/PortfolioLooper.cs, Common/Data/UniverseSelection/Universe.cs, ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs, Engine/DataFeeds/SubscriptionSynchronizer.cs (+25 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 β€” If anonymized user #3 becomes unavailable, 13 significant file(s) lose their only recent owner: Indicators/AutoRegressiveIntegratedMovingAverage.cs, Indicators/PythonIndicator.cs, Indicators/CandlestickPatterns/AbandonedBaby.cs, Indicators/CandlestickPatterns/MatHold.cs, Indicators/CandlestickPatterns/RiseFallThreeMethods.cs, Indicators/ConnorsRelativeStrengthIndex.cs, Indicators/AdvanceDeclineIndicator.cs, Indicators/SuperTrend.cs (+5 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 β€” If anonymized user #4 becomes unavailable, 10 significant file(s) lose their only recent owner: Brokerages/SymbolPropertiesDatabaseSymbolMapper.cs, Algorithm.CSharp/ScheduledUniverseSelectionModelRegressionAlgorithm.cs, Common/Statistics/PerformanceMetrics.cs, Algorithm.CSharp/CustomOptionPriceModelRegressionAlgorithm.cs, Algorithm.CSharp/MarketHourAwareIntradayConsolidationRegressionAlgorithm.cs, Indicators/RelativeVigorIndex.cs, Common/Data/Consolidators/ConsolidatorBase.cs, Common/Data/Market/Greeks.cs (+2 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 β€” If anonymized user #5 becomes unavailable, 9 significant file(s) lose their only recent owner: Common/Securities/Option/StrategyMatcher/OptionStrategyMatcherOptions.cs, Common/Securities/Option/StrategyMatcher/UncoveredShortQuantityOptionStrategyMatchObjectiveFunction.cs, Indicators/KnowSureThing.cs, Common/Securities/Option/StrategyMatcher/OptionStrategyMatcher.cs, Algorithm.Framework/Selection/QC500UniverseSelectionModel.cs, Algorithm.CSharp/OptionEquityOverlappingBullCallSpreadsRegressionAlgorithm.cs, Common/Data/Auxiliary/LocalZipMapFileProvider.cs, Engine/DataFeeds/Enumerators/Factories/BaseDataCollectionSubscriptionEnumeratorFactory.cs (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 β€” If anonymized user #6 becomes unavailable, 7 significant file(s) lose their only recent owner: Common/Exchange.cs, Common/Brokerages/BrokerageExtensions.cs, Brokerages/LevelOneOrderBook/LevelOneMarketData.cs, Brokerages/Authentication/LeanTokenHandler.cs, Common/Brokerages/BloombergFixBrokerageModel.cs, Engine/HistoricalData/MappedSynchronizingHistoryProvider.cs, Common/Orders/EzeOrderProperties.cs. 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: Common/Orders/Slippage/MarketImpactSlippageModel.cs, Algorithm.CSharp/MarketOnOpenOrderSlippageRegressionAlgorithm.cs, Common/Orders/Slippage/VolumeShareSlippageModel.cs. Pair on, review, or document these before any departure.
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—5
  • Outdated: System.ComponentModel.Composition Logging/QuantConnect.Logging.csproj:37 β€” System.ComponentModel.Composition 6.0.0 β†’ 10.0.13 available (referenced by QuantConnect.Logging).
  • Outdated: Deedle Report/QuantConnect.Report.csproj:43 β€” Deedle 2.1.0 β†’ 8.1.0 available (referenced by QuantConnect.Tests).
  • Outdated: CsvHelper Brokerages/QuantConnect.Brokerages.csproj:32 β€” CsvHelper 19.0.0 β†’ 33.1.0 available (referenced by QuantConnect.Brokerages).
  • Outdated: RestSharp Api/QuantConnect.Api.csproj:37 β€” RestSharp 106.12.0 β†’ 114.1.0 available (referenced by QuantConnect.Brokerages).
  • Outdated: McMaster.Extensions.CommandLineUtils Configuration/QuantConnect.Configuration.csproj:33 β€” McMaster.Extensions.CommandLineUtils 2.6.0 β†’ 5.1.0 available (referenced by QuantConnect.Configuration).
D31 Β· IaC & Container Security Β· Low IaC Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 Β· Silent fallback defaults Β· Silent fallback default in catch Β· Γ—3
  • Silent fallback default in catch Common/BinaryComparison.cs:192 β€” `MakeBinaryComparisonLambdaOrNull` swallows every exception into `return null;` β€” a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch Algorithm.CSharp/CustomDataTypeHistoryAlgorithm.cs:94 β€” `Reader` swallows every exception into `return null;` β€” a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch Algorithm.CSharp/CustomDataZipFileRegressionAlgorithm.cs:89 β€” `Reader` swallows every exception into `return null;` β€” a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D16 Β· Bus Factor Β· Further sole-owners (lower concentration) Β· Γ—1
  • Further sole-owners (lower concentration) β€” 10 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 (133 single-owned of 1877 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1877 of the 2737 production source files in this repository met that bar). They are anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (1 file(s)) (+4 more) β€” spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Indicators/SwissArmyKnife.cs, Indicators/LeastSquaresMovingAverageWithReference.cs, Algorithm.CSharp/TrainingInitializeRegressionAlgorithm.cs, Common/Interfaces/IRegressionAlgorithmDefinition.cs, Common/Util/DecimalJsonConverter.cs, Common/Orders/dYdXOrderProperties.cs, Indicators/StandardDeviation.cs, Engine/Results/Analysis/Analyses/OrderResponseErrorsAnalyses/SecurityPriceZeroOrderResponseErrorAnalysis.cs (+7 more).
D20 Β· ADR Quality Β· No ADRs found Β· Γ—1
  • No ADRs found β€” 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/`.
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion β€” 4 of 23 project(s) overshoot their size bounds, lowering Project Cohesion to 6.5/10. The most over is `QuantConnect` (270514 LoC, 2351 public types across 64 namespaces). Review these for cohesion β€” split a project that spans unrelated responsibilities.
D27 Β· Navigability Β· Pass-through layer Β· Γ—1
  • Pass-through layer Compression/ZipStreamWriter.cs:25 β€” ZipStreamWriter: all 3 public methods forward their arguments unchanged to _writer and add no behaviour β€” an extra hop (and usually an extra interface) to trace through. Call _writer directly, or give the layer a job.
D28 Β· Secrets (history) Β· Rotate the exposed credentials Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D34 Β· Knowledge Freshness Β· Further orphaned files (smaller) Β· Γ—1
  • Further orphaned files (smaller) β€” 736 smaller file(s) also have no living knowledge β€” folded into the freshness score and metrics rather than raised one row each β€” most significant first: Common/Util/LinqExtensions.cs, Algorithm.CSharp/HistoryAlgorithm.cs, Indicators/IndicatorBase.Operators.cs, Algorithm.Framework/Portfolio/MeanReversionPortfolioConstructionModel.cs, Indicators/Alpha.cs, ToolBox/RandomDataGenerator/RandomDataGeneratorSettings.cs, Common/Securities/MarketHoursDatabase.cs, Common/Scheduling/FluentScheduledEventBuilder.cs (and 728 more) (746 orphaned of 2113 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 2113 of the 2737 production source files in this repository met that bar). 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
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D39 Β· IL Efficiency Β· IL efficiency Β· Γ—1
  • IL efficiency: 131 authored method(s) exceed the IL budget Algorithm.CSharp/CapacityTests/EmaPortfolioRebalance100.cs:33 β€” 131 of 11749 first-party methods compile to oversized IL bodies (> 250 instructions); worst: QuantConnect.Algorithm.CSharp.EmaPortfolioRebalance100.Initialize @ Algorithm.CSharp/CapacityTests/EmaPortfolioRebalance100.cs:33, 1720 IL instructions; that pulled this dimension to 9.8/10. These bodies are far past the JIT's inline budget, so splitting them does not make them inlinable β€” what moves the number is emitting less: collapsing LINQ chains and closures on hot paths, and interpolation built eagerly where it is only sometimes used.
IC1 Β· Incompleteness & stubs Β· Empty method body Β· Γ—1
  • Empty method body Algorithm.CSharp/Benchmarks/ScheduledEventsBenchmark.cs:38 β€” `Rebalance` has an empty body β€” confirm it's an intentional no-op and not an unfinished method.
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.
M3 Β· Folder & project structure Β· No src/ separation Β· Γ—1
  • No src/ separation β€” Production code isn't grouped under a src/ folder β€” it's spread across several top-level directories, so there's no one place that says 'this is the product'.
M4 Β· Documentation accuracy Β· README/code drift Β· Γ—1
  • README/code drift Algorithm.Python/readme.md:126 β€” Algorithm.Python/readme.md runs `dotnet build pythonnet.sln`, but no project, solution or folder named `pythonnet.sln` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P12 Β· CI test-gate honesty Β· Sleep-based test synchronization Β· Γ—1
  • Sleep-based test synchronization β€” 110 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping β€” a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P6 Β· Release Hygiene Β· No changelog Β· Γ—1
  • No changelog β€” No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X2 Β· Cancellation propagation Β· Not all async methods take a CancellationToken Β· Γ—1
  • Not all async methods take a CancellationToken β€” Only 0/7 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up β€” whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice β€” judge against your hosting model.
X7 Β· Silent fallback defaults Β· Silent fallback default on parse failure Β· Γ—1
  • Silent fallback default on parse failure Optimizer/Analysis/OptimizationSlicing.cs:170 β€” `SliceKey` falls back to `"NaN"` when `backtest.Parameters.TryGetValue(p, out var v)` is false, 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 to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Minor β€” 70 finding(s)
D10 Β· Test Quality Β· Skipped (documented) Β· Γ—32
  • Skipped (documented): ApiConnectionWillAuthenticate_ValidCredentials_Successfully Tests/Api/ApiTests.cs:34 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires configured api access
  • Skipped (documented): ApiWillAuthenticate_ValidCredentials_Successfully Tests/Api/ApiTests.cs:44 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires configured api access
  • Skipped (documented): Link Tests/Api/AuthenticationTests.cs:27 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires api creds
  • Skipped (documented): PartialFills Tests/Brokerages/BrokerageTests.cs:715 β€” Skipped with a documented reason β€” a deferral, not lazy debt: This test requires reading the output and selection of a low volume security for the Brokerage
  • Skipped (documented): FindsFactorFilesWithErrors Tests/Common/Data/Auxiliary/LocalDiskFactorFileProviderTests.cs:60 β€” Skipped with a documented reason β€” a deferral, not lazy debt: This test is meant to be run manually
  • Skipped (documented): PythonSlice_performance Tests/Common/Data/SliceTests.cs:996 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Performance test
  • Skipped (documented): SpeedTest Tests/Common/ProtobufSerializationTests.cs:340 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Performance test
  • Skipped (documented): ValidateAAPLOptionChainSecurityIdentifiers Tests/Common/Securities/SecurityIdentifierTests.cs:591 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires complete option data to validate chain
  • Skipped (documented): ConvertMarketHoursDatabaseCsvToJson Tests/Common/Util/MarketHoursDatabaseJsonConverterTests.cs:250 β€” Skipped with a documented reason β€” a deferral, not lazy debt: This is provided to make it easier to convert your own market-hours-database.csv to the new format
  • Skipped (documented): HandlesRestApi Tests/Engine/DataFeeds/LiveTradingDataFeedTests.cs:1860 β€” Skipped with a documented reason β€” a deferral, not lazy debt: These tests depend on a remote server
  • Skipped (documented): CacheMissPerformance Tests/Engine/DataFeeds/TextSubscriptionDataSourceReaderTests.cs:244 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Performance test
  • Skipped (documented): CacheHappyPerformance Tests/Engine/DataFeeds/TextSubscriptionDataSourceReaderTests.cs:310 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Performance test
  • Skipped (documented): PyCaret Tests/Python/PythonPackagesTests.cs:596 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires older pandas
  • Skipped (documented): XTransformers Tests/Python/PythonPackagesTests.cs:688 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Needs to be run by itself to avoid hanging
  • Skipped (documented): Functime Tests/Python/PythonPackagesTests.cs:718 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires old polars
  • Skipped (documented): Transformers Tests/Python/PythonPackagesTests.cs:877 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Needs to be run by itself to avoid hanging
  • Skipped (documented): TensorflowProbabilityTest Tests/Python/PythonPackagesTests.cs:1222 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Hangs if run along side the rest
  • Skipped (documented): IgniteTest Tests/Python/PythonPackagesTests.cs:1400 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Hangs if run along side the rest
  • Skipped (documented): StellargraphTest Tests/Python/PythonPackagesTests.cs:1412 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Hangs if run along side the rest
  • Skipped (documented): TensorlyTest Tests/Python/PythonPackagesTests.cs:1424 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Sometimes hangs when run along side the other tests
  • Skipped (documented): KerasTest Tests/Python/PythonPackagesTests.cs:1707 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Hangs if run along side the rest
  • Skipped (documented): TensorflowTest Tests/Python/PythonPackagesTests.cs:1731 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Hangs if run along side the rest
  • Skipped (documented): TensorflowAddons Tests/Python/PythonPackagesTests.cs:2022 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires old version of TF, addons are winding down
  • Skipped (documented): ScikerasTest Tests/Python/PythonPackagesTests.cs:2220 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Requires keras < 3
  • Skipped (documented): StableBaselinesTest Tests/Python/PythonPackagesTests.cs:2434 β€” Skipped with a documented reason β€” a deferral, not lazy debt: Sometimes hangs when run along side the other tests
  • + 7 more in this group β€” see findings.md.
D19 Β· Documentation Quality Β· XML-doc coverage Β· Γ—21
  • XML-doc coverage: QuantConnect.Lean.Launcher Launcher/QuantConnect.Lean.Launcher.csproj β€” QuantConnect.Lean.Launcher: 0 % XML-doc coverage (0/3).
  • XML-doc coverage: QuantConnect.Lean.Engine Engine/QuantConnect.Lean.Engine.csproj β€” QuantConnect.Lean.Engine: 93 % XML-doc coverage (1224/1317).
  • XML-doc coverage: QuantConnect.Algorithm Algorithm/QuantConnect.Algorithm.csproj β€” QuantConnect.Algorithm: 99 % XML-doc coverage (974/988).
  • XML-doc coverage: QuantConnect Common/QuantConnect.csproj β€” QuantConnect: 98 % XML-doc coverage (21363/21703).
  • XML-doc coverage: QuantConnect.Logging Logging/QuantConnect.Logging.csproj β€” QuantConnect.Logging: 100 % XML-doc coverage (83/83).
  • XML-doc coverage: QuantConnect.Indicators Indicators/QuantConnect.Indicators.csproj β€” QuantConnect.Indicators: 99 % XML-doc coverage (1539/1551).
  • XML-doc coverage: QuantConnect.Queues Queues/QuantConnect.Queues.csproj β€” QuantConnect.Queues: 100 % XML-doc coverage (5/5).
  • XML-doc coverage: QuantConnect.Messaging REDACTED β€” QuantConnect.Messaging: 64 % XML-doc coverage (25/39).
  • XML-doc coverage: QuantConnect.AlgorithmFactory AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj β€” QuantConnect.AlgorithmFactory: 100 % XML-doc coverage (148/148).
  • XML-doc coverage: QuantConnect.Brokerages Brokerages/QuantConnect.Brokerages.csproj β€” QuantConnect.Brokerages: 94 % XML-doc coverage (240/254).
  • XML-doc coverage: QuantConnect.Configuration Configuration/QuantConnect.Configuration.csproj β€” QuantConnect.Configuration: 100 % XML-doc coverage (36/36).
  • XML-doc coverage: QuantConnect.Compression REDACTED β€” QuantConnect.Compression: 98 % XML-doc coverage (44/45).
  • XML-doc coverage: QuantConnect.Api Api/QuantConnect.Api.csproj β€” QuantConnect.Api: 96 % XML-doc coverage (86/90).
  • XML-doc coverage: QuantConnect.Algorithm.CSharp Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj β€” QuantConnect.Algorithm.CSharp: 75 % XML-doc coverage (5583/7449).
  • XML-doc coverage: QuantConnect.ToolBox ToolBox/QuantConnect.ToolBox.csproj β€” QuantConnect.ToolBox: 73 % XML-doc coverage (178/245).
  • XML-doc coverage: QuantConnect.Research Research/QuantConnect.Research.csproj β€” QuantConnect.Research: 100 % XML-doc coverage (35/35).
  • XML-doc coverage: QuantConnect.Algorithm.Framework Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj β€” QuantConnect.Algorithm.Framework: 92 % XML-doc coverage (287/311).
  • XML-doc coverage: QuantConnect.Report Report/QuantConnect.Report.csproj β€” QuantConnect.Report: 82 % XML-doc coverage (161/197).
  • XML-doc coverage: QuantConnect.Optimizer Optimizer/QuantConnect.Optimizer.csproj β€” QuantConnect.Optimizer: 90 % XML-doc coverage (60/67).
  • XML-doc coverage: QuantConnect.Optimizer.Launcher Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj β€” QuantConnect.Optimizer.Launcher: 50 % XML-doc coverage (2/4).
  • XML-doc coverage: QuantConnect.DownloaderDataProvider.Launcher DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj β€” QuantConnect.DownloaderDataProvider.Launcher: 66 % XML-doc coverage (23/35).
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—16
  • Outdated: Newtonsoft.Json β€” Newtonsoft.Json 13.0.2 β†’ 13.0.4 available (referenced by QuantConnect.Lean.Engine).
  • Outdated: NodaTime β€” NodaTime 3.0.5 β†’ 3.3.6 available (referenced by QuantConnect.Lean.Engine).
  • Outdated: CloneExtensions β€” CloneExtensions 1.3.0 β†’ 1.4.2 available (referenced by QuantConnect).
  • Outdated: protobuf-net β€” protobuf-net 3.1.33 β†’ 3.4.40 available (referenced by QuantConnect).
  • Outdated: Accord β€” Accord 3.6.0 β†’ 3.8.0 available (referenced by QuantConnect.Tests).
  • Outdated: Accord.Math β€” Accord.Math 3.6.0 β†’ 3.8.0 available (referenced by QuantConnect.Tests).
  • Outdated: Microsoft.NET.Test.Sdk β€” Microsoft.NET.Test.Sdk 16.9.4 β†’ 18.11.0 available (referenced by QuantConnect.Tests).
  • Outdated: Microsoft.TestPlatform.ObjectModel β€” Microsoft.TestPlatform.ObjectModel 16.9.4 β†’ 18.11.0 available (referenced by QuantConnect.Tests).
  • Outdated: Moq β€” Moq 4.16.1 β†’ 4.21.0 available (referenced by QuantConnect.Tests).
  • Outdated: NetMQ β€” NetMQ 4.0.1.6 β†’ 4.0.4.5 available (referenced by QuantConnect.Tests).
  • Outdated: NUnit β€” NUnit 4.2.2 β†’ 5.0.0 available (referenced by QuantConnect.Tests).
  • Outdated: NUnit3TestAdapter β€” NUnit3TestAdapter 4.6.0 β†’ 6.3.1 available (referenced by QuantConnect.Tests).
  • Outdated: SharpZipLib β€” SharpZipLib 1.3.3 β†’ 1.4.2 available (referenced by QuantConnect.Compression).
  • Outdated: Accord.Fuzzy β€” Accord.Fuzzy 3.6.0 β†’ 3.8.0 available (referenced by QuantConnect.Algorithm.CSharp).
  • Outdated: Accord.MachineLearning β€” Accord.MachineLearning 3.6.0 β†’ 3.8.0 available (referenced by QuantConnect.Algorithm.CSharp).
  • Outdated: Accord.Statistics β€” Accord.Statistics 3.6.0 β†’ 3.8.0 available (referenced by QuantConnect.Algorithm.CSharp).
D10 Β· Test Quality Β· Mock framework Β· Γ—1
  • Mock framework: Moq β€” QuantConnect.Tests references Moq.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7e7b7cf186a7416b89b6bf2a89dd8060/history.json --exit-code 0 --source .9artifacts/raw/gitleaks-history.json
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7e7b7cf186a7416b89b6bf2a89dd8060/tree.json --exit-code 0 --source .2artifacts/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .44artifacts/raw/semgrep.json
D30 Β· Dependency Vulnerabilitiesdotnetβ€”dotnet list QuantConnect.Lean.sln package --vulnerable --include-transitive --format json5artifacts/raw/dotnet-vulnerable.json
D31 Β· IaC & Container Securitytrivyβ€”trivy config --format json --quiet .9artifacts/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 53 file(s) β€” `Common/Analysis.cs`, `Common/Data/UniverseSelection/BackupUniverseFileDataProvider.cs`, `Engine/Results/Analysis/Analyses/CrisisEventsAnalysis.cs`, `Engine/Results/Analysis/Analyses/InsightsEmittedForDelistedSecuritiesAnalysis.cs`, `Engine/Results/Analysis/Analyses/MarginCallsAnalysis.cs`, … (+48 more) β€” so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0β€”
D37 Β· Vulnerability-disclosure Policydisclosureβ€”disclosure: not applicable β€” No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.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 Dependenciesnone (no readable dependency manifest)β€”none (no readable dependency manifest): not applicable β€” Not scored β€” no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) β€” not scanned yet).0β€”

Run 01a167c8-ece5-7fdb-90af-f2be2560aa4f Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C β€” Personal-data map

Every field, property and record parameter whose name is conventional personal data β€” 11 field(s) across 5 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from β€” right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier β€” the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it β€” that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational β€” it feeds no score.

Phone β€” 3 field(s)
  • CompanyProfile.HeadquarterPhone Common/Data/Fundamental/Generated/CompanyProfile.cs:119
  • CompanyProfile.RegisteredPhone Common/Data/Fundamental/Generated/CompanyProfile.cs:247
  • NotificationSms.PhoneNumber Common/Notifications/Notification.cs:85
Address β€” 2 field(s)
  • CompanyProfile.HeadquarterPostalCode Common/Data/Fundamental/Generated/CompanyProfile.cs:110
  • CompanyProfile.RegisteredPostalCode Common/Data/Fundamental/Generated/CompanyProfile.cs:238
Email β€” 2 field(s)
  • Collaborator.Email Common/Api/Project.cs:61
  • CompanyProfile.ContactEmail Common/Data/Fundamental/Generated/CompanyProfile.cs:157
Financial (card / IBAN) β€” 2 field(s)
  • IncomeStatement.CreditCard Common/Data/Fundamental/Generated/IncomeStatement.cs:560
  • IncomeStatement._creditCard Common/Data/Fundamental/Generated/IncomeStatement.cs:561
Government ID (SSN / passport / tax) β€” 2 field(s)
  • IncomeStatement.SocialSecurityCosts Common/Data/Fundamental/Generated/IncomeStatement.cs:1296
  • IncomeStatement._socialSecurityCosts Common/Data/Fundamental/Generated/IncomeStatement.cs:1297

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