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 reportMeasured 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 scoreAt riskNo 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 critical1620 serious914 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.
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 forThe 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.
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
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.
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 problem
Standard, 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.
Size
Very large: 541,430 lines of product code
Comment lines
The 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.
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.
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.
QuantConnect.Data.Fundamental uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Data.Fundamental, while a change to QuantConnect.Data.Fundamental can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2β24 QuantConnect.Data.Fundamental uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Data.Fundamental uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Data.Fundamental uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Data.Fundamental, while a change to QuantConnect.Data.Fundamental can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2β30 QuantConnect.Data.Fundamental uses QuantConnectpart of a loop✕
Connections
1953 pairs of types, where a type in QuantConnect.Data.Fundamental uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.Fundamental uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data.Fundamental, while a change to QuantConnect.Data.Fundamental can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β11 QuantConnect.Orders.Fills uses QuantConnect.Securitiespart of a loop✕
Connections
6 pairs of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Securities.
QuantConnect.Orders.Fills uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β12 QuantConnect.Orders.Fills uses QuantConnect.Orderspart of a loop✕
Connections
28 pairs of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Orders. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Orders.Fills uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β16 QuantConnect.Orders.Fills uses QuantConnect.Interfacespart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Interfaces.
QuantConnect.Orders.Fills uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β18 QuantConnect.Orders.Fills uses QuantConnect.Pythonpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Python.
QuantConnect.Orders.Fills uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Python.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β21 QuantConnect.Orders.Fills uses QuantConnect.Data.Marketpart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Data.Market.
QuantConnect.Orders.Fills uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3β23 QuantConnect.Orders.Fills uses QuantConnect.Datapart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Orders.Fills uses a type in QuantConnect.Data.
QuantConnect.Orders.Fills uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Orders.Fills, while a change to QuantConnect.Orders.Fills can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β11 QuantConnect.Orders.Slippage uses QuantConnect.Securitiespart of a loop✕
Connections
7 pairs of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Securities.
QuantConnect.Orders.Slippage uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β12 QuantConnect.Orders.Slippage uses QuantConnect.Orderspart of a loop✕
Connections
6 pairs of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Orders.
QuantConnect.Orders.Slippage uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β16 QuantConnect.Orders.Slippage uses QuantConnect.Interfacespart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Interfaces.
QuantConnect.Orders.Slippage uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β19 QuantConnect.Orders.Slippage uses QuantConnect.Indicatorspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Indicators.
QuantConnect.Orders.Slippage uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Indicators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β20 QuantConnect.Orders.Slippage uses QuantConnect.Data.Consolidatorspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Data.Consolidators.
QuantConnect.Orders.Slippage uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Data.Consolidators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β21 QuantConnect.Orders.Slippage uses QuantConnect.Data.Marketpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.Data.Market.
QuantConnect.Orders.Slippage uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4β30 QuantConnect.Orders.Slippage uses QuantConnectpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders.Slippage uses a type in QuantConnect.
QuantConnect.Orders.Slippage uses QuantConnect, so a change to QuantConnect can break QuantConnect.Orders.Slippage, while a change to QuantConnect.Orders.Slippage can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5β11 QuantConnect.Securities.Future uses QuantConnect.Securitiespart of a loop✕
Connections
30 pairs of types, where a type in QuantConnect.Securities.Future uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Securities.Future uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Securities.Future, while a change to QuantConnect.Securities.Future can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5β16 QuantConnect.Securities.Future uses QuantConnect.Interfacespart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Securities.Future uses a type in QuantConnect.Interfaces.
QuantConnect.Securities.Future uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Securities.Future, while a change to QuantConnect.Securities.Future can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5β23 QuantConnect.Securities.Future uses QuantConnect.Datapart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Securities.Future uses a type in QuantConnect.Data.
QuantConnect.Securities.Future uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Securities.Future, while a change to QuantConnect.Securities.Future can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5β24 QuantConnect.Securities.Future uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Securities.Future uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Securities.Future uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Securities.Future, while a change to QuantConnect.Securities.Future can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5β30 QuantConnect.Securities.Future uses QuantConnectpart of a loop✕
Connections
9 pairs of types, where a type in QuantConnect.Securities.Future uses a type in QuantConnect.
QuantConnect.Securities.Future uses QuantConnect, so a change to QuantConnect can break QuantConnect.Securities.Future, while a change to QuantConnect.Securities.Future can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Securities.Option uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect.Securities.Option uses a module listed above it, which is the healthy direction.
QuantConnect.Securities.Option uses QuantConnect.Orders.Slippage, so a change to QuantConnect.Orders.Slippage can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Orders.Slippage.
Position
Below the diagonal: QuantConnect.Securities.Option uses a module listed above it, which is the healthy direction.
QuantConnect.Securities.Option uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.Securities.Option uses a module listed above it, which is the healthy direction.
6β11 QuantConnect.Securities.Option uses QuantConnect.Securitiespart of a loop✕
Connections
57 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Securities.Option uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β12 QuantConnect.Securities.Option uses QuantConnect.Orderspart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Orders.
QuantConnect.Securities.Option uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β16 QuantConnect.Securities.Option uses QuantConnect.Interfacespart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Interfaces.
QuantConnect.Securities.Option uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β18 QuantConnect.Securities.Option uses QuantConnect.Pythonpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Python.
QuantConnect.Securities.Option uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Python.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β19 QuantConnect.Securities.Option uses QuantConnect.Indicatorspart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Indicators.
QuantConnect.Securities.Option uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Indicators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β21 QuantConnect.Securities.Option uses QuantConnect.Data.Marketpart of a loop✕
Connections
13 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Data.Market.
QuantConnect.Securities.Option uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β23 QuantConnect.Securities.Option uses QuantConnect.Datapart of a loop✕
Connections
15 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Data.
QuantConnect.Securities.Option uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β24 QuantConnect.Securities.Option uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Securities.Option uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6β30 QuantConnect.Securities.Option uses QuantConnectpart of a loop✕
Connections
20 pairs of types, where a type in QuantConnect.Securities.Option uses a type in QuantConnect.
QuantConnect.Securities.Option uses QuantConnect, so a change to QuantConnect can break QuantConnect.Securities.Option, while a change to QuantConnect.Securities.Option can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Util uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Util uses a module listed above it, which is the healthy direction.
7β11 QuantConnect.Util uses QuantConnect.Securitiespart of a loop✕
Connections
12 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.Securities.
QuantConnect.Util uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β16 QuantConnect.Util uses QuantConnect.Interfacespart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.Interfaces.
QuantConnect.Util uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β20 QuantConnect.Util uses QuantConnect.Data.Consolidatorspart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.Data.Consolidators.
QuantConnect.Util uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Data.Consolidators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β21 QuantConnect.Util uses QuantConnect.Data.Marketpart of a loop✕
Connections
5 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.Data.Market.
QuantConnect.Util uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β23 QuantConnect.Util uses QuantConnect.Datapart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.Data.
QuantConnect.Util uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β24 QuantConnect.Util uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Util uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Util uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7β30 QuantConnect.Util uses QuantConnectpart of a loop✕
Connections
16 pairs of types, where a type in QuantConnect.Util uses a type in QuantConnect.
QuantConnect.Util uses QuantConnect, so a change to QuantConnect can break QuantConnect.Util, while a change to QuantConnect.Util can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Statistics uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Statistics uses a module listed above it, which is the healthy direction.
8β11 QuantConnect.Statistics uses QuantConnect.Securitiespart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.Securities.
QuantConnect.Statistics uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8β12 QuantConnect.Statistics uses QuantConnect.Orderspart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.Orders.
QuantConnect.Statistics uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8β16 QuantConnect.Statistics uses QuantConnect.Interfacespart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.Interfaces.
QuantConnect.Statistics uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8β21 QuantConnect.Statistics uses QuantConnect.Data.Marketpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.Data.Market.
QuantConnect.Statistics uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8β23 QuantConnect.Statistics uses QuantConnect.Datapart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.Data.
QuantConnect.Statistics uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8β30 QuantConnect.Statistics uses QuantConnectpart of a loop✕
Connections
5 pairs of types, where a type in QuantConnect.Statistics uses a type in QuantConnect.
QuantConnect.Statistics uses QuantConnect, so a change to QuantConnect can break QuantConnect.Statistics, while a change to QuantConnect.Statistics can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Packets uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.Packets, while a change to QuantConnect.Packets can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.Packets uses a module listed above it, which is the healthy direction.
9β11 QuantConnect.Packets uses QuantConnect.Securitiespart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Packets uses a type in QuantConnect.Securities.
QuantConnect.Packets uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Packets, while a change to QuantConnect.Packets can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9β12 QuantConnect.Packets uses QuantConnect.Orderspart of a loop✕
Connections
9 pairs of types, where a type in QuantConnect.Packets uses a type in QuantConnect.Orders.
QuantConnect.Packets uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Packets, while a change to QuantConnect.Packets can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9β29 QuantConnect.Packets uses QuantConnect.Algorithm.Framework.Alphaspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Packets uses a type in QuantConnect.Algorithm.Framework.Alphas.
QuantConnect.Packets uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Packets, while a change to QuantConnect.Packets can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9β30 QuantConnect.Packets uses QuantConnectpart of a loop✕
Connections
24 pairs of types, where a type in QuantConnect.Packets uses a type in QuantConnect.
QuantConnect.Packets uses QuantConnect, so a change to QuantConnect can break QuantConnect.Packets, while a change to QuantConnect.Packets can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Brokerages uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect.Brokerages uses a module listed above it, which is the healthy direction.
QuantConnect.Brokerages uses QuantConnect.Orders.Slippage, so a change to QuantConnect.Orders.Slippage can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Orders.Slippage.
Position
Below the diagonal: QuantConnect.Brokerages uses a module listed above it, which is the healthy direction.
QuantConnect.Brokerages uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Brokerages uses a module listed above it, which is the healthy direction.
QuantConnect.Brokerages uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Brokerages uses a module listed above it, which is the healthy direction.
10β11 QuantConnect.Brokerages uses QuantConnect.Securitiespart of a loop✕
Connections
85 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Brokerages uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Securities.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β12 QuantConnect.Brokerages uses QuantConnect.Orderspart of a loop✕
Connections
113 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Orders. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Brokerages uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β14 QuantConnect.Brokerages uses QuantConnect.Apipart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Api.
QuantConnect.Brokerages uses QuantConnect.Api, so a change to QuantConnect.Api can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Api.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β16 QuantConnect.Brokerages uses QuantConnect.Interfacespart of a loop✕
Connections
12 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Interfaces.
QuantConnect.Brokerages uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β21 QuantConnect.Brokerages uses QuantConnect.Data.Marketpart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Data.Market.
QuantConnect.Brokerages uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β23 QuantConnect.Brokerages uses QuantConnect.Datapart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect.Data.
QuantConnect.Brokerages uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10β30 QuantConnect.Brokerages uses QuantConnectpart of a loop✕
Connections
84 pairs of types, where a type in QuantConnect.Brokerages uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Brokerages uses QuantConnect, so a change to QuantConnect can break QuantConnect.Brokerages, while a change to QuantConnect.Brokerages can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Securities uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
QuantConnect.Securities uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
QuantConnect.Securities uses QuantConnect.Orders.Slippage, so a change to QuantConnect.Orders.Slippage can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Orders.Slippage.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
QuantConnect.Securities uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
QuantConnect.Securities uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
QuantConnect.Securities uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Securities uses a module listed above it, which is the healthy direction.
11β12 QuantConnect.Securities uses QuantConnect.Orderspart of a loop✕
Connections
32 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Orders. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Securities uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Orders.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β16 QuantConnect.Securities uses QuantConnect.Interfacespart of a loop✕
Connections
16 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Interfaces.
QuantConnect.Securities uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β18 QuantConnect.Securities uses QuantConnect.Pythonpart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Python.
QuantConnect.Securities uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Python.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β19 QuantConnect.Securities uses QuantConnect.Indicatorspart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Indicators.
QuantConnect.Securities uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Indicators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β21 QuantConnect.Securities uses QuantConnect.Data.Marketpart of a loop✕
Connections
15 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Data.Market.
QuantConnect.Securities uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β23 QuantConnect.Securities uses QuantConnect.Datapart of a loop✕
Connections
28 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Securities uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β24 QuantConnect.Securities uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
8 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Securities uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β25 QuantConnect.Securities uses QuantConnect.Algorithm.Framework.Portfoliopart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Securities uses a type in QuantConnect.Algorithm.Framework.Portfolio.
QuantConnect.Securities uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11β30 QuantConnect.Securities uses QuantConnectpart of a loop✕
Connections
55 pairs of types, where a type in QuantConnect.Securities uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Securities uses QuantConnect, so a change to QuantConnect can break QuantConnect.Securities, while a change to QuantConnect.Securities can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Orders uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Orders uses a module listed above it, which is the healthy direction.
QuantConnect.Orders uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Orders uses a module listed above it, which is the healthy direction.
QuantConnect.Orders uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Orders uses a module listed above it, which is the healthy direction.
12β14 QuantConnect.Orders uses QuantConnect.Apipart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Orders uses a type in QuantConnect.Api.
QuantConnect.Orders uses QuantConnect.Api, so a change to QuantConnect.Api can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Api.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12β16 QuantConnect.Orders uses QuantConnect.Interfacespart of a loop✕
Connections
29 pairs of types, where a type in QuantConnect.Orders uses a type in QuantConnect.Interfaces. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Orders uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12β25 QuantConnect.Orders uses QuantConnect.Algorithm.Framework.Portfoliopart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Orders uses a type in QuantConnect.Algorithm.Framework.Portfolio.
QuantConnect.Orders uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12β30 QuantConnect.Orders uses QuantConnectpart of a loop✕
Connections
29 pairs of types, where a type in QuantConnect.Orders uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Orders uses QuantConnect, so a change to QuantConnect can break QuantConnect.Orders, while a change to QuantConnect.Orders can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Scheduling uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Scheduling, while a change to QuantConnect.Scheduling can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Scheduling uses a module listed above it, which is the healthy direction.
13β16 QuantConnect.Scheduling uses QuantConnect.Interfacespart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Scheduling uses a type in QuantConnect.Interfaces.
QuantConnect.Scheduling uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Scheduling, while a change to QuantConnect.Scheduling can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13β30 QuantConnect.Scheduling uses QuantConnectpart of a loop✕
Connections
9 pairs of types, where a type in QuantConnect.Scheduling uses a type in QuantConnect.
QuantConnect.Scheduling uses QuantConnect, so a change to QuantConnect can break QuantConnect.Scheduling, while a change to QuantConnect.Scheduling can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Api uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.Api uses a module listed above it, which is the healthy direction.
QuantConnect.Api uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Api uses a module listed above it, which is the healthy direction.
QuantConnect.Api uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Api uses a module listed above it, which is the healthy direction.
QuantConnect.Api uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Api uses a module listed above it, which is the healthy direction.
14β16 QuantConnect.Api uses QuantConnect.Interfacespart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Api uses a type in QuantConnect.Interfaces.
QuantConnect.Api uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14β29 QuantConnect.Api uses QuantConnect.Algorithm.Framework.Alphaspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Api uses a type in QuantConnect.Algorithm.Framework.Alphas.
QuantConnect.Api uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14β30 QuantConnect.Api uses QuantConnectpart of a loop✕
Connections
12 pairs of types, where a type in QuantConnect.Api uses a type in QuantConnect.
QuantConnect.Api uses QuantConnect, so a change to QuantConnect can break QuantConnect.Api, while a change to QuantConnect.Api can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Commands uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Commands, while a change to QuantConnect.Commands can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Commands uses a module listed above it, which is the healthy direction.
QuantConnect.Commands uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Commands, while a change to QuantConnect.Commands can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Commands uses a module listed above it, which is the healthy direction.
15β16 QuantConnect.Commands uses QuantConnect.Interfacespart of a loop✕
Connections
12 pairs of types, where a type in QuantConnect.Commands uses a type in QuantConnect.Interfaces.
QuantConnect.Commands uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Commands, while a change to QuantConnect.Commands can't break QuantConnect.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15β23 QuantConnect.Commands uses QuantConnect.Datapart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Commands uses a type in QuantConnect.Data.
QuantConnect.Commands uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Commands, while a change to QuantConnect.Commands can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15β30 QuantConnect.Commands uses QuantConnectpart of a loop✕
Connections
9 pairs of types, where a type in QuantConnect.Commands uses a type in QuantConnect.
QuantConnect.Commands uses QuantConnect, so a change to QuantConnect can break QuantConnect.Commands, while a change to QuantConnect.Commands can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Interfaces uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Api. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Interfaces uses QuantConnect.Api, so a change to QuantConnect.Api can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Api.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
QuantConnect.Interfaces uses QuantConnect.Commands, so a change to QuantConnect.Commands can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Commands.
Position
Below the diagonal: QuantConnect.Interfaces uses a module listed above it, which is the healthy direction.
16β17 QuantConnect.Interfaces uses QuantConnect.Algorithm.Framework.Portfolio.SignalExportspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
QuantConnect.Interfaces uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β21 QuantConnect.Interfaces uses QuantConnect.Data.Marketpart of a loop✕
Connections
7 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Data.Market.
QuantConnect.Interfaces uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β22 QuantConnect.Interfaces uses QuantConnect.Data.Auxiliarypart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Data.Auxiliary.
QuantConnect.Interfaces uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Data.Auxiliary.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β23 QuantConnect.Interfaces uses QuantConnect.Datapart of a loop✕
Connections
19 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Data.
QuantConnect.Interfaces uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β24 QuantConnect.Interfaces uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Interfaces uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β29 QuantConnect.Interfaces uses QuantConnect.Algorithm.Framework.Alphaspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect.Algorithm.Framework.Alphas.
QuantConnect.Interfaces uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16β30 QuantConnect.Interfaces uses QuantConnectpart of a loop✕
Connections
44 pairs of types, where a type in QuantConnect.Interfaces uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Interfaces uses QuantConnect, so a change to QuantConnect can break QuantConnect.Interfaces, while a change to QuantConnect.Interfaces can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a module listed above it, which is the healthy direction.
17β25 QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Algorithm.Framework.Portfoliopart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a type in QuantConnect.Algorithm.Framework.Portfolio.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17β30 QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnectpart of a loop✕
Connections
5 pairs of types, where a type in QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses a type in QuantConnect.
QuantConnect.Algorithm.Framework.Portfolio.SignalExports uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.Framework.Portfolio.SignalExports, while a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Python uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Orders.Slippage, so a change to QuantConnect.Orders.Slippage can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Orders.Slippage.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
34 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Python uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
QuantConnect.Python uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Below the diagonal: QuantConnect.Python uses a module listed above it, which is the healthy direction.
18β19 QuantConnect.Python uses QuantConnect.Indicatorspart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.Indicators.
QuantConnect.Python uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Indicators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18β20 QuantConnect.Python uses QuantConnect.Data.Consolidatorspart of a loop✕
Connections
5 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.Data.Consolidators.
QuantConnect.Python uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Data.Consolidators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18β21 QuantConnect.Python uses QuantConnect.Data.Marketpart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.Data.Market.
QuantConnect.Python uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18β23 QuantConnect.Python uses QuantConnect.Datapart of a loop✕
Connections
13 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.Data.
QuantConnect.Python uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18β30 QuantConnect.Python uses QuantConnectpart of a loop✕
Connections
7 pairs of types, where a type in QuantConnect.Python uses a type in QuantConnect.
QuantConnect.Python uses QuantConnect, so a change to QuantConnect can break QuantConnect.Python, while a change to QuantConnect.Python can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Indicators uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Indicators uses a module listed above it, which is the healthy direction.
QuantConnect.Indicators uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Indicators uses a module listed above it, which is the healthy direction.
QuantConnect.Indicators uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Indicators uses a module listed above it, which is the healthy direction.
19β20 QuantConnect.Indicators uses QuantConnect.Data.Consolidatorspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Indicators uses a type in QuantConnect.Data.Consolidators.
QuantConnect.Indicators uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Data.Consolidators.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19β21 QuantConnect.Indicators uses QuantConnect.Data.Marketpart of a loop✕
Connections
66 pairs of types, where a type in QuantConnect.Indicators uses a type in QuantConnect.Data.Market. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Indicators uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19β23 QuantConnect.Indicators uses QuantConnect.Datapart of a loop✕
Connections
36 pairs of types, where a type in QuantConnect.Indicators uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Indicators uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19β30 QuantConnect.Indicators uses QuantConnectpart of a loop✕
Connections
31 pairs of types, where a type in QuantConnect.Indicators uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Indicators uses QuantConnect, so a change to QuantConnect can break QuantConnect.Indicators, while a change to QuantConnect.Indicators can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Data.Consolidators uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Data.Consolidators, while a change to QuantConnect.Data.Consolidators can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Data.Consolidators uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Consolidators uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Data.Consolidators, while a change to QuantConnect.Data.Consolidators can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Data.Consolidators uses a module listed above it, which is the healthy direction.
20β21 QuantConnect.Data.Consolidators uses QuantConnect.Data.Marketpart of a loop✕
Connections
18 pairs of types, where a type in QuantConnect.Data.Consolidators uses a type in QuantConnect.Data.Market.
QuantConnect.Data.Consolidators uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Data.Consolidators, while a change to QuantConnect.Data.Consolidators can't break QuantConnect.Data.Market.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20β23 QuantConnect.Data.Consolidators uses QuantConnect.Datapart of a loop✕
Connections
18 pairs of types, where a type in QuantConnect.Data.Consolidators uses a type in QuantConnect.Data.
QuantConnect.Data.Consolidators uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Data.Consolidators, while a change to QuantConnect.Data.Consolidators can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20β30 QuantConnect.Data.Consolidators uses QuantConnectpart of a loop✕
Connections
10 pairs of types, where a type in QuantConnect.Data.Consolidators uses a type in QuantConnect.
QuantConnect.Data.Consolidators uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data.Consolidators, while a change to QuantConnect.Data.Consolidators can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Data.Market uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Market uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Data.Market uses a module listed above it, which is the healthy direction.
21β23 QuantConnect.Data.Market uses QuantConnect.Datapart of a loop✕
Connections
47 pairs of types, where a type in QuantConnect.Data.Market uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.Market uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21β24 QuantConnect.Data.Market uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
5 pairs of types, where a type in QuantConnect.Data.Market uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Data.Market uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21β30 QuantConnect.Data.Market uses QuantConnectpart of a loop✕
Connections
30 pairs of types, where a type in QuantConnect.Data.Market uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.Market uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data.Market, while a change to QuantConnect.Data.Market can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Data.Auxiliary uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Data.Auxiliary, while a change to QuantConnect.Data.Auxiliary can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Data.Auxiliary uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Auxiliary uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Data.Auxiliary, while a change to QuantConnect.Data.Auxiliary can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Data.Auxiliary uses a module listed above it, which is the healthy direction.
QuantConnect.Data.Auxiliary uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Data.Auxiliary, while a change to QuantConnect.Data.Auxiliary can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Data.Auxiliary uses a module listed above it, which is the healthy direction.
22β23 QuantConnect.Data.Auxiliary uses QuantConnect.Datapart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Data.Auxiliary uses a type in QuantConnect.Data.
QuantConnect.Data.Auxiliary uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Data.Auxiliary, while a change to QuantConnect.Data.Auxiliary can't break QuantConnect.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22β30 QuantConnect.Data.Auxiliary uses QuantConnectpart of a loop✕
Connections
33 pairs of types, where a type in QuantConnect.Data.Auxiliary uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.Auxiliary uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data.Auxiliary, while a change to QuantConnect.Data.Auxiliary can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Data uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
QuantConnect.Data uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Data.Auxiliary.
Position
Below the diagonal: QuantConnect.Data uses a module listed above it, which is the healthy direction.
23β24 QuantConnect.Data uses QuantConnect.Data.UniverseSelectionpart of a loop✕
Connections
2 pairs of types, where a type in QuantConnect.Data uses a type in QuantConnect.Data.UniverseSelection.
QuantConnect.Data uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.Data.UniverseSelection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
23β30 QuantConnect.Data uses QuantConnectpart of a loop✕
Connections
58 pairs of types, where a type in QuantConnect.Data uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data, while a change to QuantConnect.Data can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Data.UniverseSelection uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
QuantConnect.Data.UniverseSelection uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in QuantConnect.Data.UniverseSelection uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.UniverseSelection uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Data.UniverseSelection uses a module listed above it, which is the healthy direction.
24β30 QuantConnect.Data.UniverseSelection uses QuantConnectpart of a loop✕
Connections
48 pairs of types, where a type in QuantConnect.Data.UniverseSelection uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Data.UniverseSelection uses QuantConnect, so a change to QuantConnect can break QuantConnect.Data.UniverseSelection, while a change to QuantConnect.Data.UniverseSelection can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Portfolio uses a module listed above it, which is the healthy direction.
25β28 QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Algorithmpart of a loop✕
Connections
11 pairs of types, where a type in QuantConnect.Algorithm.Framework.Portfolio uses a type in QuantConnect.Algorithm.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Algorithm.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25β29 QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Algorithm.Framework.Alphaspart of a loop✕
Connections
15 pairs of types, where a type in QuantConnect.Algorithm.Framework.Portfolio uses a type in QuantConnect.Algorithm.Framework.Alphas.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25β30 QuantConnect.Algorithm.Framework.Portfolio uses QuantConnectpart of a loop✕
Connections
21 pairs of types, where a type in QuantConnect.Algorithm.Framework.Portfolio uses a type in QuantConnect.
QuantConnect.Algorithm.Framework.Portfolio uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.Framework.Portfolio, while a change to QuantConnect.Algorithm.Framework.Portfolio can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
36 pairs of types, where a type in QuantConnect.Algorithm.Framework.Selection uses a type in QuantConnect.Data.UniverseSelection. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Selection uses a module listed above it, which is the healthy direction.
26β28 QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Algorithmpart of a loop✕
Connections
17 pairs of types, where a type in QuantConnect.Algorithm.Framework.Selection uses a type in QuantConnect.Algorithm.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.Algorithm.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26β30 QuantConnect.Algorithm.Framework.Selection uses QuantConnectpart of a loop✕
Connections
16 pairs of types, where a type in QuantConnect.Algorithm.Framework.Selection uses a type in QuantConnect.
QuantConnect.Algorithm.Framework.Selection uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.Framework.Selection, while a change to QuantConnect.Algorithm.Framework.Selection can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Execution uses a module listed above it, which is the healthy direction.
27β28 QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Algorithmpart of a loop✕
Connections
9 pairs of types, where a type in QuantConnect.Algorithm.Framework.Execution uses a type in QuantConnect.Algorithm.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.Algorithm.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27β30 QuantConnect.Algorithm.Framework.Execution uses QuantConnectpart of a loop✕
Connections
4 pairs of types, where a type in QuantConnect.Algorithm.Framework.Execution uses a type in QuantConnect.
QuantConnect.Algorithm.Framework.Execution uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.Framework.Execution, while a change to QuantConnect.Algorithm.Framework.Execution can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Api, so a change to QuantConnect.Api can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Api.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Commands, so a change to QuantConnect.Commands can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Commands.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
146 pairs of types, where a type in QuantConnect.Algorithm uses a type in QuantConnect.Indicators. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Selection, so a change to QuantConnect.Algorithm.Framework.Selection can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Algorithm.Framework.Selection.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Execution, so a change to QuantConnect.Algorithm.Framework.Execution can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Algorithm.Framework.Execution.
Position
Below the diagonal: QuantConnect.Algorithm uses a module listed above it, which is the healthy direction.
28β29 QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Alphaspart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Algorithm uses a type in QuantConnect.Algorithm.Framework.Alphas.
QuantConnect.Algorithm uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28β30 QuantConnect.Algorithm uses QuantConnectpart of a loop✕
Connections
18 pairs of types, where a type in QuantConnect.Algorithm uses a type in QuantConnect.
QuantConnect.Algorithm uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm, while a change to QuantConnect.Algorithm can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Algorithm.Framework.Alphas uses a module listed above it, which is the healthy direction.
29β30 QuantConnect.Algorithm.Framework.Alphas uses QuantConnectpart of a loop✕
Connections
20 pairs of types, where a type in QuantConnect.Algorithm.Framework.Alphas uses a type in QuantConnect.
QuantConnect.Algorithm.Framework.Alphas uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.Framework.Alphas, while a change to QuantConnect.Algorithm.Framework.Alphas can't break QuantConnect.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in QuantConnect uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in QuantConnect uses a type in QuantConnect.Orders. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Commands, so a change to QuantConnect.Commands can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Commands.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Data.Auxiliary.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect, while a change to QuantConnect can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Below the diagonal: QuantConnect uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Orders.Fills, so a change to QuantConnect.Orders.Fills can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Orders.Fills.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Orders.Slippage, so a change to QuantConnect.Orders.Slippage can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Orders.Slippage.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
35 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Securities.Future. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
37 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Securities.Option. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
107 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Securities. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
273 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Orders. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Commands, so a change to QuantConnect.Commands can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Commands.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
574 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Interfaces. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
138 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Indicators. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
116 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Data.Market. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.Auxiliary.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
585 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
125 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Data.UniverseSelection. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm.Framework.Selection, so a change to QuantConnect.Algorithm.Framework.Selection can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.Framework.Selection.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm.Framework.Execution, so a change to QuantConnect.Algorithm.Framework.Execution can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.Framework.Execution.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
656 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect.Algorithm. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
1734 pairs of types, where a type in QuantConnect.Algorithm.CSharp uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.CSharp, while a change to QuantConnect.Algorithm.CSharp can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Data.Fundamental, so a change to QuantConnect.Data.Fundamental can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Data.Fundamental.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Algorithm.Framework.Portfolio, so a change to QuantConnect.Algorithm.Framework.Portfolio can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Algorithm.Framework.Portfolio.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Algorithm.Framework.Selection, so a change to QuantConnect.Algorithm.Framework.Selection can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Algorithm.Framework.Selection.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Algorithm.Framework.Execution, so a change to QuantConnect.Algorithm.Framework.Execution can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Algorithm.Framework.Execution.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in QuantConnect.Algorithm.CSharp.Alphas uses a type in QuantConnect.Algorithm. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in QuantConnect.Algorithm.CSharp.Alphas uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Algorithm.CSharp.Alphas uses QuantConnect, so a change to QuantConnect can break QuantConnect.Algorithm.CSharp.Alphas, while a change to QuantConnect.Algorithm.CSharp.Alphas can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Algorithm.CSharp.Alphas uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Securities.Future, so a change to QuantConnect.Securities.Future can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Securities.Future.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Securities.Option, so a change to QuantConnect.Securities.Option can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Securities.Option.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Scheduling, so a change to QuantConnect.Scheduling can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Scheduling.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Commands, so a change to QuantConnect.Commands can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Commands.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in QuantConnect.AlgorithmFactory.Python.Wrappers uses a type in QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Python, so a change to QuantConnect.Python can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Python.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Algorithm.Framework.Execution, so a change to QuantConnect.Algorithm.Framework.Execution can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Algorithm.Framework.Execution.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect.Algorithm.Framework.Alphas, so a change to QuantConnect.Algorithm.Framework.Alphas can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.Algorithm.Framework.Alphas.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.AlgorithmFactory.Python.Wrappers uses QuantConnect, so a change to QuantConnect can break QuantConnect.AlgorithmFactory.Python.Wrappers, while a change to QuantConnect.AlgorithmFactory.Python.Wrappers can't break QuantConnect.
Position
Below the diagonal: QuantConnect.AlgorithmFactory.Python.Wrappers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages, while a change to QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results.Analysis.Analyses.Messages uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Algorithm.Framework.Portfolio.SignalExports, so a change to QuantConnect.Algorithm.Framework.Portfolio.SignalExports can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Algorithm.Framework.Portfolio.SignalExports.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Algorithm.Framework.Execution, so a change to QuantConnect.Algorithm.Framework.Execution can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Algorithm.Framework.Execution.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine.TransactionHandlers uses a module listed above it, which is the healthy direction.
35β36 QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Lean.Engine.Resultspart of a loop✕
Connections
3 pairs of types, where a type in QuantConnect.Lean.Engine.TransactionHandlers uses a type in QuantConnect.Lean.Engine.Results.
QuantConnect.Lean.Engine.TransactionHandlers uses QuantConnect.Lean.Engine.Results, so a change to QuantConnect.Lean.Engine.Results can break QuantConnect.Lean.Engine.TransactionHandlers, while a change to QuantConnect.Lean.Engine.TransactionHandlers can't break QuantConnect.Lean.Engine.Results.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Lean.Engine.Results uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Statistics, so a change to QuantConnect.Statistics can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Statistics.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Indicators, so a change to QuantConnect.Indicators can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Indicators.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.Results uses QuantConnect.Lean.Engine.TransactionHandlers, so a change to QuantConnect.Lean.Engine.TransactionHandlers can break QuantConnect.Lean.Engine.Results, while a change to QuantConnect.Lean.Engine.Results can't break QuantConnect.Lean.Engine.TransactionHandlers.
Position
Below the diagonal: QuantConnect.Lean.Engine.Results uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Data.Auxiliary.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
41 pairs of types, where a type in QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Lean.Engine.Results, so a change to QuantConnect.Lean.Engine.Results can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Lean.Engine.Results.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a module listed above it, which is the healthy direction.
37β38 QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Lean.Engine.DataFeedspart of a loop✕
Connections
1 pair of types, where a type in QuantConnect.Lean.Engine.DataFeeds.Enumerators uses a type in QuantConnect.Lean.Engine.DataFeeds.
QuantConnect.Lean.Engine.DataFeeds.Enumerators uses QuantConnect.Lean.Engine.DataFeeds, so a change to QuantConnect.Lean.Engine.DataFeeds can break QuantConnect.Lean.Engine.DataFeeds.Enumerators, while a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can't break QuantConnect.Lean.Engine.DataFeeds.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Brokerages, so a change to QuantConnect.Brokerages can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Brokerages.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Api, so a change to QuantConnect.Api can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Api.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
89 pairs of types, where a type in QuantConnect.Lean.Engine.DataFeeds uses a type in QuantConnect.Interfaces. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Data.Consolidators, so a change to QuantConnect.Data.Consolidators can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Data.Consolidators.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Data.Auxiliary, so a change to QuantConnect.Data.Auxiliary can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Data.Auxiliary.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
64 pairs of types, where a type in QuantConnect.Lean.Engine.DataFeeds uses a type in QuantConnect.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in QuantConnect.Lean.Engine.DataFeeds uses a type in QuantConnect.Data.UniverseSelection. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
60 pairs of types, where a type in QuantConnect.Lean.Engine.DataFeeds uses a type in QuantConnect. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Lean.Engine.Results, so a change to QuantConnect.Lean.Engine.Results can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Lean.Engine.Results.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine.DataFeeds uses QuantConnect.Lean.Engine.DataFeeds.Enumerators, so a change to QuantConnect.Lean.Engine.DataFeeds.Enumerators can break QuantConnect.Lean.Engine.DataFeeds, while a change to QuantConnect.Lean.Engine.DataFeeds can't break QuantConnect.Lean.Engine.DataFeeds.Enumerators.
Position
Below the diagonal: QuantConnect.Lean.Engine.DataFeeds uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Util, so a change to QuantConnect.Util can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Util.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Data.Market, so a change to QuantConnect.Data.Market can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Data.Market.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect, so a change to QuantConnect can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Lean.Engine.TransactionHandlers, so a change to QuantConnect.Lean.Engine.TransactionHandlers can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Lean.Engine.TransactionHandlers.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Lean.Engine.Results, so a change to QuantConnect.Lean.Engine.Results can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Lean.Engine.Results.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Lean.Engine uses QuantConnect.Lean.Engine.DataFeeds, so a change to QuantConnect.Lean.Engine.DataFeeds can break QuantConnect.Lean.Engine, while a change to QuantConnect.Lean.Engine can't break QuantConnect.Lean.Engine.DataFeeds.
Position
Below the diagonal: QuantConnect.Lean.Engine uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Packets, so a change to QuantConnect.Packets can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Packets.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Securities, so a change to QuantConnect.Securities can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Securities.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Orders, so a change to QuantConnect.Orders can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Orders.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Interfaces, so a change to QuantConnect.Interfaces can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Interfaces.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Data, so a change to QuantConnect.Data can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Data.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Data.UniverseSelection, so a change to QuantConnect.Data.UniverseSelection can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Data.UniverseSelection.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Algorithm, so a change to QuantConnect.Algorithm can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Algorithm.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect, so a change to QuantConnect can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Lean.Engine.Results, so a change to QuantConnect.Lean.Engine.Results can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Lean.Engine.Results.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
QuantConnect.Report uses QuantConnect.Lean.Engine.DataFeeds, so a change to QuantConnect.Lean.Engine.DataFeeds can break QuantConnect.Report, while a change to QuantConnect.Report can't break QuantConnect.Lean.Engine.DataFeeds.
Position
Below the diagonal: QuantConnect.Report uses a module listed above it, which is the healthy direction.
At a glance β Code Health Β· 39% Β· Weak Β· gated by X1, X5 Β·
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 category
Findings
Severity
A05:2025 β Injection
44
High / Critical
A03:2025 β Software Supply Chain Failures
19
High / Critical
A07:2025 β Authentication Failures
10
High / Critical
A02:2025 β Security Misconfiguration
9
High / 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 this
Helps
Effort
Dimension
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt β start with QuantConnect.Tests.csproj (2), QuantConnect.Algorithm.CSharp.csproj (2).
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.).
Resolve the 5 Outdated finding(s) in Dependency Hygiene β start with QuantConnect.Logging.csproj, QuantConnect.Report.csproj, QuantConnect.Brokerages.csproj.
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.
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
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
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.)
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.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
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.
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.
+ 157 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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.
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.
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.
+ 318 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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.
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.
Do you agree with this assessment?
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.
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).
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).
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).
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.
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.
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.
+ 163 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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).
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).
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).
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.
Do you agree with this assessment?
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.
Off the main sequence: QuantConnect.Configuration Β· Γ5Configuration/QuantConnect.Configuration.csproj:1
What to do
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).
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.
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.
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).
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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
+ 1 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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).
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).
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).
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.
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.
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).
Resolve the 1 Vulnerable finding(s) in Dependency Hygiene. β One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Deprecated finding(s) in Dependency Hygiene β start with REDACTED. β One of this dimension's main actionable groups (1 warning-level).
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
+ 10 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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).
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).
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).
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.
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.
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.
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.
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.)
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.
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.
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.
4 of 23 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
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.
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.
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.
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.
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.
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
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).
Resolve the 1 High secret finding(s) in Secrets (history) β start with REDACTED. β One of this dimension's main actionable groups (1 issue-level).
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.
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).
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
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).
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).
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.
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.
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).
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.
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).
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).
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.
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.
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.
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).
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).
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.
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.
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.
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.
+ 1 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. β One of this dimension's main actionable groups (1 warning-level).
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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().
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.
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, β¦
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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)
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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 `!`.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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).
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.
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
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.
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.
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.
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'.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
Issues: 146 Β· Warnings: 1620 Β· Recommendations: 844 Β· Info: 70 β Appendix A Β· all findings Β· full markdown report.
Generated by Watchdog β deterministic code-health analysis. 23-10-2026 @ 08:03 UTC.
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.